• Fuad Tabba's avatar
    KVM: arm64: Trap access to pVM restricted features · 1423afcb
    Fuad Tabba authored
    Trap accesses to restricted features for VMs running in protected
    mode.
    
    Access to feature registers are emulated, and only supported
    features are exposed to protected VMs.
    
    Accesses to restricted registers as well as restricted
    instructions are trapped, and an undefined exception is injected
    into the protected guests, i.e., with EC = 0x0 (unknown reason).
    This EC is the one used, according to the Arm Architecture
    Reference Manual, for unallocated or undefined system registers
    or instructions.
    
    Only affects the functionality of protected VMs. Otherwise,
    should not affect non-protected VMs when KVM is running in
    protected mode.
    Signed-off-by: default avatarFuad Tabba <tabba@google.com>
    Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
    Link: https://lore.kernel.org/r/20211010145636.1950948-11-tabba@google.com
    1423afcb
switch.c 9.54 KB