* [Patch] Fix the dom0 crash issue when "vcpus=0" in HVM guest configuration file
@ 2007-03-09 2:47 Han, Weidong
2007-03-09 9:48 ` Keir Fraser
0 siblings, 1 reply; 5+ messages in thread
From: Han, Weidong @ 2007-03-09 2:47 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
Dom0 would crash when "vcpus=0" in HVM guest configuration file. The
attached patch fixes the issue.
-- Weidong
Signed-off-by: Weidong Han <weidong.han@intel.com>
[-- Attachment #2: vcpu0.patch --]
[-- Type: application/octet-stream, Size: 428 bytes --]
diff -r 8117f6684991 xen/common/domctl.c
--- a/xen/common/domctl.c Wed Mar 07 16:21:21 2007 +0000
+++ b/xen/common/domctl.c Thu Mar 08 10:23:41 2007 +0800
@@ -360,7 +360,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
unsigned int i, max = op->u.max_vcpus.max, cpu;
ret = -EINVAL;
- if ( max > MAX_VIRT_CPUS )
+ if ( max > MAX_VIRT_CPUS || max == 0 )
break;
ret = -ESRCH;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Patch] Fix the dom0 crash issue when "vcpus=0" in HVM guest configuration file
2007-03-09 2:47 [Patch] Fix the dom0 crash issue when "vcpus=0" in HVM guest configuration file Han, Weidong
@ 2007-03-09 9:48 ` Keir Fraser
2007-03-09 10:58 ` Han, Weidong
2007-03-09 19:02 ` [Patch] Fix the dom0 crash issue when "vcpus=0"in " Li, Xin B
0 siblings, 2 replies; 5+ messages in thread
From: Keir Fraser @ 2007-03-09 9:48 UTC (permalink / raw)
To: Han, Weidong, xen-devel
On 9/3/07 02:47, "Han, Weidong" <weidong.han@intel.com> wrote:
> Dom0 would crash when "vcpus=0" in HVM guest configuration file. The
> attached patch fixes the issue.
If there is an underlying crash then I think this papers over it rather than
fixing it. Do you have a backtrace? If it's the BUG in page_alloc.c then
it's already fixed.
-- Keir
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Patch] Fix the dom0 crash issue when "vcpus=0" in HVM guest configuration file
2007-03-09 9:48 ` Keir Fraser
@ 2007-03-09 10:58 ` Han, Weidong
2007-03-09 19:02 ` [Patch] Fix the dom0 crash issue when "vcpus=0"in " Li, Xin B
1 sibling, 0 replies; 5+ messages in thread
From: Han, Weidong @ 2007-03-09 10:58 UTC (permalink / raw)
To: Keir Fraser, xen-devel
Keir Fraser wrote:
> On 9/3/07 02:47, "Han, Weidong" <weidong.han@intel.com> wrote:
>
>> Dom0 would crash when "vcpus=0" in HVM guest configuration file. The
>> attached patch fixes the issue.
>
> If there is an underlying crash then I think this papers over it
> rather than fixing it. Do you have a backtrace? If it's the BUG in
> page_alloc.c then it's already fixed.
>
I think Xen assumes existence of vcpu0, and don't check whether the vcpu
number is equal to 0.
The trace information is as follows:
CPU: 0
(XEN) RIP: e008:[<ffff830000162424>] set_p2m_entry+0x174/0x1c0
(XEN) RFLAGS: 0000000000010206 CONTEXT: hypervisor
(XEN) rax: ffff8300001dbf28 rbx: ffff830000f88080 rcx:
0000000237b4e067
(XEN) rdx: ffff830237b4b000 rsi: ffff8300001dbd58 rdi:
0000000000000000
(XEN) rbp: 0000000000000000 rsp: ffff8300001dbd38 r8:
0000000000106800
(XEN) r9: 0000000000000000 r10: 0000000000008ded r11:
ffff8300001b82ac
(XEN) r12: 0000000000237b4e r13: 0000000000000000 r14:
0000000000237b4e
(XEN) r15: 0000000000002000 cr0: 000000008005003b cr4:
00000000000026f0
(XEN) cr3: 000000022ab4c000 cr2: 00000000000018a0
(XEN) ds: 0000 es: 0000 fs: 0063 gs: 0000 ss: e010 cs: e008
(XEN) Xen stack trace from rsp=ffff8300001dbd38:
(XEN) 0000000000000200 0000000020000000 0000000000237b4b
ffff830237b4b000
(XEN) 0000000000000000 ffff830000f88080 000000000000e59e
ffff8300001dbf28
(XEN) 0000000000000000 ffff830000162b6e ffff88000ec83c40
0000000000000001
(XEN) 0000000000000006 0000000043800210 0000000000000000
ffff830000f88080
(XEN) ffff8300001dbe98 ffff8300001117c4 ffff88000f171268
0000000000009791
(XEN) 000000022f191105 ffff88000ec83cb8 0000000000009791
0000000e00000007
(XEN) ffffffff80266da6 0000000000000001 ffff8300001dbf28
0000000080000002
(XEN) 0000000000231713 8000000231713167 ffff8284057b9af8
ffff83000013200e
(XEN) 0000000000000000 000000022dcbc067 ffff830000fb0080
ffff830000fb0080
(XEN) 0000000000237b4e 0000000000000000 8000000231713167
8000000231713067
(XEN) ffff811555559840 0000000000000004 8000000231713167
ffff830000132574
(XEN) ffff830000f88080 00002aaaaab08010 00000000000000a0
0000000000000000
(XEN) 0000000000000000 0000000000000206 00002aaaaab08010
00000000000000a0
(XEN) 0000000000000000 0000000000000001 0000000000000206
ffff830000fac080
(XEN) ffff880008a7fef8 ffff880005bb6a80 0000000000000000
0000000000305000
(XEN) 00000000fffffff7 ffff830000178102 00000000fffffff7
0000000000305000
(XEN) 0000000000000000 ffff880005bb6a80 ffff880008a7fef8
00000000ffffffda
(XEN) 0000000000000282 0000000000000400 ffffffff80409860
0000000000000009
(XEN) 000000000000000c ffffffff8020618a 0000000000000000
0000000043800210
(XEN) 0000000000000006 0000010000000000 ffffffff8020618a
000000000000e033
(XEN) Xen call trace:
(XEN) [<ffff830000162424>] set_p2m_entry+0x174/0x1c0
(XEN) [<ffff830000162b6e>] guest_physmap_add_page+0x26e/0x2f0
(XEN) [<ffff8300001117c4>] do_memory_op+0x834/0xe80
(XEN) [<ffff83000013200e>] get_page_from_l1e+0x30e/0x4b0
(XEN) [<ffff830000132574>] mod_l1_entry+0x3c4/0x3f0
(XEN) [<ffff830000178102>] syscall_enter+0x62/0x67
(XEN)
(XEN) Pagetable walk from 00000000000018a0:
(XEN) L4[0x000] = 000000022a7d3067 000000000000e1d3
(XEN) L3[0x000] = 000000022a512067 000000000000e312
(XEN) L2[0x000] = 0000000000000000 ffffffffffffffff
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) FATAL PAGE FAULT
(XEN) [error_code=0000]
(XEN) Faulting linear address: 00000000000018a0
(XEN) ****************************************
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Patch] Fix the dom0 crash issue when "vcpus=0"in HVM guest configuration file
2007-03-09 9:48 ` Keir Fraser
2007-03-09 10:58 ` Han, Weidong
@ 2007-03-09 19:02 ` Li, Xin B
2007-03-09 19:17 ` Keir Fraser
1 sibling, 1 reply; 5+ messages in thread
From: Li, Xin B @ 2007-03-09 19:02 UTC (permalink / raw)
To: Keir Fraser, Han, Weidong, xen-devel
>-----Original Message-----
>From: xen-devel-bounces@lists.xensource.com
>[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Keir Fraser
>Sent: Friday, March 09, 2007 5:49 PM
>To: Han, Weidong; xen-devel@lists.xensource.com
>Subject: Re: [Xen-devel] [Patch] Fix the dom0 crash issue when
>"vcpus=0"in HVM guest configuration file
>
>
>
>
>On 9/3/07 02:47, "Han, Weidong" <weidong.han@intel.com> wrote:
>
>> Dom0 would crash when "vcpus=0" in HVM guest configuration file. The
>> attached patch fixes the issue.
>
>If there is an underlying crash then I think this papers over
>it rather than
>fixing it. Do you have a backtrace? If it's the BUG in
>page_alloc.c then
>it's already fixed.
>
> -- Keir
Log for you:
(XEN) ----[ Xen-3.0-unstable x86_64 debug=n Not tainted ]----
(XEN) CPU: 2
(XEN) RIP: e008:[<ffff830000161564>] set_p2m_entry+0x174/0x1c0
(XEN) RFLAGS: 0000000000010206 CONTEXT: hypervisor
(XEN) rax: ffff830000257f28 rbx: ffff8300001c8080 rcx:
000000023725c067
(XEN) rdx: ffff830237207000 rsi: ffff830000257d58 rdi:
0000000000000000
(XEN) rbp: 0000000000000000 rsp: ffff830000257d38 r8:
0000000000106800
(XEN) r9: 0000000000000000 r10: 0000000000008dc9 r11:
0000000000000001
(XEN) r12: 000000000023725c r13: 0000000000000000 r14:
000000000023725c
(XEN) r15: 0000000000002000 cr0: 000000008005003b cr4:
00000000000026b0
(XEN) cr3: 000000001ccdc000 cr2: 00000000000018a0
(XEN) ds: 0000 es: 0000 fs: 0063 gs: 0000 ss: e010 cs: e008
(XEN) Xen stack trace from rsp=ffff830000257d38:
(XEN) 0000002700000200 0000000020000000 0000000000237207
ffff830237207000
(XEN) 0000000000000000 ffff8300001c8080 00000000001efa64
ffff830000257f28
(XEN) 0000000000000000 ffff830000161cae 0000000000000000
0000000000000001
(XEN) 0000000000000006 00000000438005e0 0000000000000000
ffff8300001c8080
(XEN) ffff830000257e98 ffff8300001117c4 0000000000000000
0000000000000000
(XEN) 0000000000000000 0000000000000000 0000000000000000
0000000000000000
(XEN) 0000000000000000 0000000000000001 ffff830000257f28
0000000080000002
(XEN) 000000000002692b 000000002692b167 ffff828400606eb8
ffff830000131b6e
(XEN) 0000000000000000 0000000000000000 0000000000000000
0000000000000000
(XEN) 000000000023725c 0000000000000000 000000002692b167
000000002692b067
(XEN) ffff811555556760 0000000000000004 000000002692b167
ffff8300001320d4
(XEN) ffff8300001c8080 00002aaaaac6c010 00000000000000a0
0000000000000000
(XEN) 0000000000000000 0000000000000206 00002aaaaac6c010
00000000000000a0
(XEN) 0000000000000000 0000000000000001 0000000000000206
ffff8300001d0080
(XEN) 00000000ffffffe7 00000000ffffffda 0000000000305000
0000000000000009
(XEN) 0000000000000009 ffff830000176102 0000000000000009
0000000000000009
(XEN) 0000000000305000 00000000ffffffda 00000000ffffffe7
ffff8801e38426c0
(XEN) 0000000000000282 0000000000000400 ffff8801e38426c0
0000000000000009
(XEN) 000000000000000c ffffffff8020618a 0000000000000000
00000000438005e0
(XEN) 0000000000000006 0000010000000000 ffffffff8020618a
000000000000e033
(XEN) Xen call trace:
(XEN) [<ffff830000161564>] set_p2m_entry+0x174/0x1c0
(XEN) [<ffff830000161cae>] guest_physmap_add_page+0x26e/0x2f0
(XEN) [<ffff8300001117c4>] do_memory_op+0x834/0xe80
(XEN) [<ffff830000131b6e>] get_page_from_l1e+0x30e/0x4b0
(XEN) [<ffff8300001320d4>] mod_l1_entry+0x3c4/0x3f0
(XEN) [<ffff830000176102>] syscall_enter+0x62/0x67
(XEN)
(XEN) Pagetable walk from 00000000000018a0:
(XEN) L4[0x000] = 000000001ccf4067 00000000001db8f4
(XEN) L3[0x000] = 000000001cd1c067 00000000001db91c
(XEN) L2[0x000] = 0000000000000000 ffffffffffffffff
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 2:
(XEN) FATAL PAGE FAULT
(XEN) [error_code=0000]
(XEN) Faulting linear address: 00000000000018a0
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...
-Xin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-09 19:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-09 2:47 [Patch] Fix the dom0 crash issue when "vcpus=0" in HVM guest configuration file Han, Weidong
2007-03-09 9:48 ` Keir Fraser
2007-03-09 10:58 ` Han, Weidong
2007-03-09 19:02 ` [Patch] Fix the dom0 crash issue when "vcpus=0"in " Li, Xin B
2007-03-09 19:17 ` Keir Fraser
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.