Skip to contentSkip to conversation

hypervisor: Enable hypervisor detect pvhvm running on COMPAT mode

PATCH In review Joe Jin 2 participants 5 messages Mar 3, 2009 – Mar 5, 2009

lore
Share & tools
lore

Joe Jin

author
#0 lore raw

PATCH 1/1 hypervisor: Enable hypervisor detect pvhvm running on COMPAT mode

Hi,

When 32bit pvhvm running on 64bit hypervisor, if guest OS create event-channel more than 32, Domain0 maybe could not communication with guest OS via new event-channel, also xenwatch thread state is TASK_UNINTERRUPTIBLE and could not got schedule, all inter-domain command almost no response.

How to reproduce:
Try to with "xm block-attach" attach more disk to the pvhvm guest, the issue will appear.

This caused by hypervisor could not probe and decide if pvhvm guest running in COMPAT mode, and could set the right bits for guest os.

Please review, thanks.

---

 domain.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/asm-x86/domain.h +1 -1
diff -r 98d48f7680db xen/include/asm-x86/domain.h
@@ -16,7 +16,7 @@
 #define is_pv_32on64_domain(d) (0)
 #endif
 #define is_pv_32on64_vcpu(v)   (is_pv_32on64_domain((v)->domain))
-#define IS_COMPAT(d)           (is_pv_32on64_domain(d))
+#define IS_COMPAT(d)           (is_pv_32on64_domain(d) || has_32bit_shinfo(d))
 
 struct trap_bounce {
     uint32_t      error_code;
#1 lore raw

Thanks, I'll check in a clearer version of this.

-- Keir

Quoted 38 lines · Joe Jin

Hi,

When 32bit pvhvm running on 64bit hypervisor, if guest OS create event-channel more than 32, Domain0 maybe could not communication with guest OS via new event-channel, also xenwatch thread state is TASK_UNINTERRUPTIBLE and could not got schedule, all inter-domain command almost no response.

How to reproduce:
Try to with "xm block-attach" attach more disk to the pvhvm guest, the issue will appear.

This caused by hypervisor could not probe and decide if pvhvm guest running in COMPAT mode, and could set the right bits for guest os.

Please review, thanks.

---

 domain.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r 98d48f7680db xen/include/asm-x86/domain.h

xen/include/asm-x86/domain.h Tue Mar 03 14:35:19 2009 +0800 renamed from xen/include/asm-x86/domain.h Wed Nov 19 19:13:22 2008 +0000 +1 -1
@@ -16,7 +16,7 @@
 #define is_pv_32on64_domain(d) (0)
 #endif
 #define is_pv_32on64_vcpu(v)   (is_pv_32on64_domain((v)->domain))
-#define IS_COMPAT(d)           (is_pv_32on64_domain(d))
+#define IS_COMPAT(d)           (is_pv_32on64_domain(d) ||
 has_32bit_shinfo(d))
 
 struct trap_bounce {
     uint32_t      error_code;
#2 lore raw
In reply to Joe Jin
Quoted 6 lines · Joe Jin

When 32bit pvhvm running on 64bit hypervisor, if guest OS create event-channel more than 32, Domain0 maybe could not communication with guest OS via new event-channel, also xenwatch thread state is TASK_UNINTERRUPTIBLE and could not got schedule, all inter-domain command almost no response.

Quoted 8 lines

How to reproduce:
Try to with "xm block-attach" attach more disk to the pvhvm guest, the issue will appear.

This caused by hypervisor could not probe and decide if pvhvm guest running in COMPAT mode, and could set the right bits for guest os.

Please review, thanks.

I checked in a larger but nicer patch as c/s 19266. Please test it.

-- Keir

author
#3 lore raw
Quoted 2 lines

I checked in a larger but nicer patch as c/s 19266. Please test it.

Thanks, just do a sample test and looked like it working fine, will try to do more testing!

Joe

author
#4 lore raw
In reply to Keir Fraser
Quoted 12 lines · Keir Fraser
Quoted 10 lines · Joe Jin

When 32bit pvhvm running on 64bit hypervisor, if guest OS create event-channel more than 32, Domain0 maybe could not communication with guest OS via new event-channel, also xenwatch thread state is TASK_UNINTERRUPTIBLE and could not got schedule, all inter-domain command almost no response.

How to reproduce:
Try to with "xm block-attach" attach more disk to the pvhvm guest, the issue will appear.

Quoted 9 lines
Quoted 4 lines

This caused by hypervisor could not probe and decide if pvhvm guest running in COMPAT mode, and could set the right bits for guest os.

Please review, thanks.

I checked in a larger but nicer patch as c/s 19266. Please test it.

-- Keir

Bhanu's test have finished and it working fine, Thanks.

Joe