mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
d7ef23954c
commit
10eb9e0aa1
2 files changed
+2
-2
No files matched your search
@@ -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) &&
|
||||
|
||||
@@ -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);
|
||||
|
||||