From 8ddceb7f7513a101165b49255b54589d52597f1e Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Sat, 11 Jun 2022 11:50:50 +0100 Subject: [PATCH] ANDROID: KVM: arm64: Add PC_UPDATE_REQ flags covering all PC updates In order to deal with PC updates (such as INCREMENT_PC and the collection of flags that come with PENDING_EXCEPTION), add a single mask that covers them all. This will be used to manipulate these flags as a single entity. Bug: 357781595 Change-Id: Id24f79f482911efe3374abbead8a70e46cf12725 Signed-off-by: Marc Zyngier Signed-off-by: Fuad Tabba --- arch/arm64/include/asm/kvm_host.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 69842ca4d115..205dc73a02a2 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -872,6 +872,8 @@ struct kvm_vcpu_arch { #define INCREMENT_PC __vcpu_single_flag(iflags, BIT(1)) /* Target EL/MODE (not a single flag, but let's abuse the macro) */ #define EXCEPT_MASK __vcpu_single_flag(iflags, GENMASK(3, 1)) +/* Cover both PENDING_EXCEPTION and EXCEPT_MASK for global operations */ +#define PC_UPDATE_REQ __vcpu_single_flag(iflags, GENMASK(3, 0)) /* Helpers to encode exceptions with minimum fuss */ #define __EXCEPT_MASK_VAL unpack_vcpu_flag(EXCEPT_MASK)