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

Re: [Xen-devel] [PATCH 2/2] x86/hvm: Don't intercept #UD exceptions in general



On 01/27/2016 01:59 PM, Andrew Cooper wrote:
On 27/01/16 18:49, Boris Ostrovsky wrote:
On 01/27/2016 01:11 PM, Andrew Cooper wrote:
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 1d71216..1084e82 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -65,8 +65,20 @@ static void update_domain_cpuid_info(struct domain
*d,
                   .ecx = ctl->ecx
               }
           };
+        int old_vendor = d->arch.x86_vendor;
             d->arch.x86_vendor = get_cpu_vendor(vendor_id.str,
gcv_guest);
+
+        if ( is_hvm_domain(d) && (d->arch.x86_vendor != old_vendor) )
+        {
+            struct vcpu *v;
+
+            domain_pause(d);
+            for_each_vcpu( d, v )
+                hvm_update_guest_vendor(v);
+            domain_unpause(d);
+        }
+
           break;
       }
Not specific to this patch, but shouldn't we pause/unpause domain for
the whole routine?
Not specifically, although that might be better lonterm.

In practice, this hypercall is only made as part of domain construction,
and never at domain runtime.

Is it safe to unpause a domain here if it is not running?

-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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