Skip to contentSkip to conversation

xen: update_runstate_area for 32 bit PV on HVM guests

PATCH In review Stefano Stabellini 3 participants 4 messages May 28, 2010 – Jun 1, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: update_runstate_area for 32 bit PV on HVM guests

Hi all,
the current implementation of update_runstate_area is unable to handle 32 bit PV on HVM guests because the check is_pv_32on64_domain doesn't cover that case. This patch fixes it.

---

xen/arch/x86/domain.c +3 -1
diff -r 26c2922da53c xen/arch/x86/domain.c
@@ -1315,7 +1315,9 @@
         return;
 
 #ifdef CONFIG_COMPAT
-    if ( is_pv_32on64_domain(v->domain) )
+    if ( is_pv_32on64_domain(v->domain) ||
+         (is_hvm_pv_evtchn_domain(v->domain) &&
+          has_32bit_shinfo(v->domain)) )
     {
         struct compat_vcpu_runstate_info info;
#1 lore raw

xen/arch/x86/domain.c line 1322

Quoted 13 lines
Quoted 1 line
Quoted 1 line · Stefano Stabellini
xen/arch/x86/domain.c +3 -1
@@ -1315,7 +1315,9 @@
         return;
 
 #ifdef CONFIG_COMPAT
-    if ( is_pv_32on64_domain(v->domain) )
+    if ( is_pv_32on64_domain(v->domain) ||
+         (is_hvm_pv_evtchn_domain(v->domain) &&
+          has_32bit_shinfo(v->domain)) )
     {
         struct compat_vcpu_runstate_info info;

Is there any reason why this cannot be just has_32bit_shinfo()?

Jan

#2 lore raw
Quoted 6 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Stefano Stabellini
xen/arch/x86/domain.c +0 -0
@@ -1315,7 +1315,9 @@
         return;
 
Quoted 10 lines

xen/arch/x86/domain.c line 1322

Quoted 7 lines
xen/arch/x86/domain.c +3 -1
 #ifdef CONFIG_COMPAT
-    if ( is_pv_32on64_domain(v->domain) )
+    if ( is_pv_32on64_domain(v->domain) ||
+         (is_hvm_pv_evtchn_domain(v->domain) &&
+          has_32bit_shinfo(v->domain)) )
     {
         struct compat_vcpu_runstate_info info;

Is there any reason why this cannot be just has_32bit_shinfo()?

no, actually has_32bit_shinfo should be able to cover all cases

#3 lore raw
Quoted 8 lines · Stefano Stabellini
Quoted 8 lines
Quoted 7 lines

#ifdef CONFIG_COMPAT

xen/arch/x86/domain.c +3 -1
-    if ( is_pv_32on64_domain(v->domain) )
+    if ( is_pv_32on64_domain(v->domain) ||
+         (is_hvm_pv_evtchn_domain(v->domain) &&
+          has_32bit_shinfo(v->domain)) )
     {
         struct compat_vcpu_runstate_info info;
Quoted 4 lines
Quoted 2 lines

Is there any reason why this cannot be just has_32bit_shinfo()?

no, actually has_32bit_shinfo should be able to cover all cases

Xen-unstable:21493

-- Keir