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@epam.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Sergiy Kibrik authored and Jan Beulich committed 2025-03-24 12:55:00 +01:00
1 parent d7ef23954c
commit 10eb9e0aa1
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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) &&
+1 -1
View File
@@ -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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.