Skip to content

Commit 892fd25

Browse files
author
Marc Zyngier
committed
KVM: arm64: Reorder vcpu flag definitions
The vcpu arch flags are in an interesting, semi random order. As I have made the mistake of reusing a flag once, let's rework this in an order that I find a bit less confusing. Signed-off-by: Marc Zyngier <[email protected]>
1 parent 1360572 commit 892fd25

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

arch/arm64/include/asm/kvm_host.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -417,14 +417,12 @@ struct kvm_vcpu_arch {
417417
#define KVM_ARM64_VCPU_SVE_FINALIZED (1 << 6) /* SVE config completed */
418418
#define KVM_ARM64_GUEST_HAS_PTRAUTH (1 << 7) /* PTRAUTH exposed to guest */
419419
#define KVM_ARM64_PENDING_EXCEPTION (1 << 8) /* Exception pending */
420+
/*
421+
* Overlaps with KVM_ARM64_EXCEPT_MASK on purpose so that it can't be
422+
* set together with an exception...
423+
*/
424+
#define KVM_ARM64_INCREMENT_PC (1 << 9) /* Increment PC */
420425
#define KVM_ARM64_EXCEPT_MASK (7 << 9) /* Target EL/MODE */
421-
#define KVM_ARM64_DEBUG_STATE_SAVE_SPE (1 << 12) /* Save SPE context if active */
422-
#define KVM_ARM64_DEBUG_STATE_SAVE_TRBE (1 << 13) /* Save TRBE context if active */
423-
424-
#define KVM_GUESTDBG_VALID_MASK (KVM_GUESTDBG_ENABLE | \
425-
KVM_GUESTDBG_USE_SW_BP | \
426-
KVM_GUESTDBG_USE_HW | \
427-
KVM_GUESTDBG_SINGLESTEP)
428426
/*
429427
* When KVM_ARM64_PENDING_EXCEPTION is set, KVM_ARM64_EXCEPT_MASK can
430428
* take the following values:
@@ -442,11 +440,13 @@ struct kvm_vcpu_arch {
442440
#define KVM_ARM64_EXCEPT_AA64_EL1 (0 << 11)
443441
#define KVM_ARM64_EXCEPT_AA64_EL2 (1 << 11)
444442

445-
/*
446-
* Overlaps with KVM_ARM64_EXCEPT_MASK on purpose so that it can't be
447-
* set together with an exception...
448-
*/
449-
#define KVM_ARM64_INCREMENT_PC (1 << 9) /* Increment PC */
443+
#define KVM_ARM64_DEBUG_STATE_SAVE_SPE (1 << 12) /* Save SPE context if active */
444+
#define KVM_ARM64_DEBUG_STATE_SAVE_TRBE (1 << 13) /* Save TRBE context if active */
445+
446+
#define KVM_GUESTDBG_VALID_MASK (KVM_GUESTDBG_ENABLE | \
447+
KVM_GUESTDBG_USE_SW_BP | \
448+
KVM_GUESTDBG_USE_HW | \
449+
KVM_GUESTDBG_SINGLESTEP)
450450

451451
#define vcpu_has_sve(vcpu) (system_supports_sve() && \
452452
((vcpu)->arch.flags & KVM_ARM64_GUEST_HAS_SVE))

0 commit comments

Comments
 (0)