[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86/hvm: Add check for cpu_has_vmx_virt_exceptions



commit a2eb46491e28079debc39488a7e23ed76cb5b003
Author:     Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
AuthorDate: Tue Sep 25 12:10:38 2018 +0300
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Sep 25 11:59:32 2018 +0100

    x86/hvm: Add check for cpu_has_vmx_virt_exceptions
    
    This is useful so HVMOP_altp2m_vcpu_enable_notify will fail and not
    silently succeed. It save a call to HVMOP_altp2m_set_suppress_ve.
    
    Signed-off-by: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 9a490ef68c..51fc3ec07f 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4561,6 +4561,12 @@ static int do_altp2m_op(
             break;
         }
 
+        if ( !cpu_has_vmx_virt_exceptions )
+        {
+            rc = -EOPNOTSUPP;
+            break;
+        }
+
         v = d->vcpu[a.u.enable_notify.vcpu_id];
 
         if ( !gfn_eq(vcpu_altp2m(v).veinfo_gfn, INVALID_GFN) ||
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.