Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: x86: use inlines instead of macros for is_sev_*guest

This helps avoiding more embarrassment to this maintainer, but also
will catch mistakes more easily for others.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

+13 -3
+13 -3
arch/x86/kvm/svm/svm.h
··· 422 422 return ____sev_snp_guest(vcpu->kvm); 423 423 } 424 424 #else 425 - #define is_sev_guest(vcpu) false 426 - #define is_sev_es_guest(vcpu) false 427 - #define is_sev_snp_guest(vcpu) false 425 + static __always_inline bool is_sev_guest(struct kvm_vcpu *vcpu) 426 + { 427 + return false; 428 + } 429 + static __always_inline bool is_sev_es_guest(struct kvm_vcpu *vcpu) 430 + { 431 + return false; 432 + } 433 + 434 + static __always_inline bool is_sev_snp_guest(struct kvm_vcpu *vcpu) 435 + { 436 + return false; 437 + } 428 438 #endif 429 439 430 440 static inline bool ghcb_gpa_is_registered(struct vcpu_svm *svm, u64 val)