Re: [RFC PATCH v2 1/6] KVM: arm64: Add a helper to check if a VM has ran once
From: Sean Christopherson <seanjc@google.com>
Date: 2023-02-13 15:38:21
Also in:
kvmarm
On Sat, Feb 11, 2023, Oliver Upton wrote:
quoted hunk ↗ jump to hunk
The test_bit(...) pattern is quite a lot of keystrokes. Replace existing callsites with a helper. No functional change intended. Signed-off-by: Oliver Upton <redacted> --- arch/arm64/include/asm/kvm_host.h | 3 +++ arch/arm64/kvm/pmu-emul.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-)diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 35a159d131b5..012e94bc9e4a 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h@@ -1019,6 +1019,9 @@ bool kvm_arm_vcpu_is_finalized(struct kvm_vcpu *vcpu); (system_supports_32bit_el0() && \ !static_branch_unlikely(&arm64_mismatched_32bit_el0)) +#define kvm_vm_has_ran_once(kvm) \
From the peanut gallery... The ONCE part of the flag+API is unnecessary and flawed from a pendatic point of view, e.g. if a VM has ran twice... What about kvm_vm_has_run() to align with a similar proposed x86 API for individual vCPUs[*], if either one ever gets moved to common code? [*] https://lore.kernel.org/all/20230210003148.2646712-3-seanjc@google.com (local) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel