From e18a331cbcf586c3380ac6f193b419540c58a4cc 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. Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon Bug: 233587962 Change-Id: Id24f79f482911efe3374abbead8a70e46cf12725 --- 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 3026877e105e..2e481864ec19 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -583,6 +583,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)