[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/svm: use nsvm_efer_svm_enabled() to check guest's EFER.SVME
commit 10eb9e0aa1dd8a10c8c6c483a79dd4433e43a501 Author: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx> AuthorDate: Mon Mar 24 12:55:00 2025 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Mar 24 12:55:00 2025 +0100 x86/svm: use nsvm_efer_svm_enabled() to check guest's EFER.SVME There's a macro for this, might improve readability a bit & save a bit of space. Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/hvm/svm/nestedsvm.c | 2 +- xen/arch/x86/hvm/svm/svm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c index 35a2cbfd7d..dc2b6a4253 100644 --- a/xen/arch/x86/hvm/svm/nestedsvm.c +++ b/xen/arch/x86/hvm/svm/nestedsvm.c @@ -1616,7 +1616,7 @@ void svm_nested_features_on_efer_update(struct vcpu *v) * Need state for transfering the nested gif status so only write on * the hvm_vcpu EFER.SVME changing. */ - if ( v->arch.hvm.guest_efer & EFER_SVME ) + if ( nsvm_efer_svm_enabled(v) ) { if ( !vmcb->virt_ext.fields.vloadsave_enable && paging_mode_hap(v->domain) && diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 4b24891096..e33a38c1e4 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -253,7 +253,7 @@ static void cf_check svm_update_guest_efer(struct vcpu *v) vmcb_set_efer(vmcb, guest_efer); ASSERT(nestedhvm_enabled(v->domain) || - !(v->arch.hvm.guest_efer & EFER_SVME)); + !nsvm_efer_svm_enabled(v)); if ( nestedhvm_enabled(v->domain) ) svm_nested_features_on_efer_update(v); -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |