xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* What is up with XSAVE? 2.6.37, 2.6.39 crashes with Xen 4.2
@ 2011-04-22 19:51 Konrad Rzeszutek Wilk
  2011-04-22 21:46 ` Keir Fraser
  2011-04-25 12:14 ` Keir Fraser
  0 siblings, 2 replies; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-04-22 19:51 UTC (permalink / raw)
  To: xen-devel, Tim.Deegan

If I use 'xsave=0' on the latest Xen it works fine with PV guests.
But if I boot the machine without that workaroudn the PV guests fail.

Here is the 'xl info' from a bootup with 'xsave=0'.
host                   : tst013.dumpdata.com
release                : 2.6.39-rc4yes_xen_blkdev-01970-g308daa7
version                : #1 SMP Fri Apr 22 14:20:31 EDT 2011
machine                : x86_64
nr_cpus                : 2
nr_nodes               : 1
cores_per_socket       : 2
threads_per_core       : 1
cpu_mhz                : 2992
hw_caps                : bfebfbff:20100800:00000000:00000940:0008e3fd:00000000:00000001:00000000
virt_caps              : hvm hvm_directio
total_memory           : 3929
free_memory            : 607
free_cpus              : 0
xen_major              : 4
xen_minor              : 2
xen_extra              : -110422
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : Wed Apr 20 12:02:51 2011 +0100 23246:eb4505f8dd97
xen_commandline        : com1=115200,8n1,0xecb8,0 xsave=0 dom0_mem=1500MB iommu=verbose console=com1,vga guest_loglvl=all e820-verbose=1 apic=debug
cc_compiler            : gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC) 
cc_compile_by          : konrad
cc_compile_domain      : dumpdata.com
cc_compile_date        : Fri Apr 22 14:20:44 EDT 2011
xend_config_format     : 4


But if I don't have it set, this is what I see when I start a PV guest:

[    0.000000] Kernel command line: console=hvc0 debug earlyprintk=xenboot
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] FP/SSE not shown under xsave features 0x0
[    0.000000] ------------[ cut here ]------------
[    0.000000] kernel BUG at /home/konrad/ssd/linux/arch/x86/kernel/xsave.c:432!
[    0.000000] invalid opcode: 0000 [#1] SMP 
[    0.000000] last sysfs file: 
[    0.000000] CPU 0 
[    0.000000] Modules linked in:
[    0.000000] 
[    0.000000] Pid: 0, comm: swapper Not tainted 2.6.39-rc4yes_xen_blkdev-01970-g308daa7 #1  
[    0.000000] RIP: e030:[<ffffffff81897808>]  [<ffffffff81897808>] xstate_enable_boot_cpu+0x99/0x2d5
[    0.000000] RSP: e02b:ffffffff81801e38  EFLAGS: 00010096
[    0.000000] RAX: 000000000000003f RBX: ffffffff81801e68 RCX: ffffffff8145caa2
[    0.000000] RDX: 00000000ffffedda RSI: 0000000000000026 RDI: 0000000000000004
[    0.000000] RBP: ffffffff81801ea8 R08: 000000000000000a R09: 0000ffff00066c0a
[    0.000000] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff81801e6c
[    0.000000] R13: ffffffff81801e70 R14: ffffffff81801e74 R15: 0000000000000000
[    0.000000] FS:  0000000000000000(0000) GS:ffff88007ffaf000(0000) knlGS:0000000000000000
[    0.000000] CS:  e033 DS: 0000 ES: 0000 CR0: 000000008005003b
[    0.000000] CR2: 0000000000000000 CR3: 0000000001803000 CR4: 0000000000002660
[    0.000000] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    0.000000] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[    0.000000] Process swapper (pid: 0, threadinfo ffffffff81800000, task ffffffff8180b020)
[    0.000000] Stack:
[    0.000000]  0000000000000000 0000000000000001 ffffffff810069df ffffffff81003d00
[    0.000000]  ffffffff81801e98 ffffffff81003e1a 0000000000000000 0000000000000000
[    0.000000]  ffff88007ffba0e0 0000000000000008 0000000000000000 0000000000000000
[    0.000000] Call Trace:
[    0.000000]  [<ffffffff810069df>] ? xen_restore_fl_direct_reloc+0x4/0x4
[    0.000000]  [<ffffffff81003d00>] ? xen_mc_issue.clone.0+0x22/0x24

Or with an older kernel: 2.6.37 I get:

e entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Initializing CPU#0
[    0.000000] FP/SSE not shown under xsave features 0x0
[    0.000000] ------------[ cut here ]------------
[    0.000000] kernel BUG at /home/konrad/ssd/linux/arch/x86/kernel/xsave.c:432!
[    0.000000] invalid opcode: 0000 [#1] SMP 
[    0.000000] last sysfs file: 
[    0.000000] Modules linked in:
[    0.000000] 
[    0.000000] Pid: 0, comm: swapper Not tainted 2.6.37 #1 /
[    0.000000] EIP: e019:[<c152f970>] EFLAGS: 00010046 CPU: 0
[    0.000000] EIP is at xstate_enable_boot_cpu+0x93/0x273
[    0.000000] EAX: 0000003f EBX: 00000000 ECX: c14eea24 EDX: c14e00f0
[    0.000000] ESI: c14e3ea4 EDI: c14e3ea0 EBP: c14e3eb8 ESP: c14e3e70
[    0.000000]  DS: e021 ES: e021 FS: 00d8 GS: 0000 SS: e021
[    0.000000] Process swapper (pid: 0, ti=c14e2000 task=c14e9060 task.ti=c14e2000)
[    0.000000] Stack:
[    0.000000]  c144859b 00000000 00000000 c151c3d0 c14e3e9c 00000003 ec3cc058 00000000
[    0.000000]  8005003b c1006caf c1004166 00000000 00000000 00000000 00000000 00000008
[    0.000000]  00000000 00000009 c14e3ec0 c1392783 c14e3ef4 c1393d0a ec3cff00 c14e3ee0
[    0.000000] Call Trace:
[    0.000000]  [<c1006caf>] ? xen_restore_fl_direct_end+0x0/0x1
[    0.000000]  [<c1004166>] ? xen_mc_issue.clone.0+0x1d/0x1f
[    0.000000]  [<c1392783>] ? xsave_init+0x20/0x22
[    0.000000]  [<c1393d0a>] ? cpu_init+0x207/0x20f
[    0.000000]  [<c100894e>] ? setup_sigcontext+0x16/0xc3
[    0.000000]  [<c152c279>] ? trap_init+0x329/0x338
[    0.000000]  [<c139ef00>] ? __get_valid_kprobe+0x17/0x67
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
[    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What is up with XSAVE? 2.6.37, 2.6.39 crashes with Xen 4.2
  2011-04-22 19:51 What is up with XSAVE? 2.6.37, 2.6.39 crashes with Xen 4.2 Konrad Rzeszutek Wilk
@ 2011-04-22 21:46 ` Keir Fraser
  2011-04-25 12:14 ` Keir Fraser
  1 sibling, 0 replies; 4+ messages in thread
From: Keir Fraser @ 2011-04-22 21:46 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, xen-devel, Tim Deegan

On 22/04/2011 20:51, "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com> wrote:

> If I use 'xsave=0' on the latest Xen it works fine with PV guests.
> But if I boot the machine without that workaroudn the PV guests fail.

I think some CPUID setup is missing from xc_cpuid_x86.c for PV guests. I'll
sort out a patch for you to try.

 -- Keir

> Here is the 'xl info' from a bootup with 'xsave=0'.
> host                   : tst013.dumpdata.com
> release                : 2.6.39-rc4yes_xen_blkdev-01970-g308daa7
> version                : #1 SMP Fri Apr 22 14:20:31 EDT 2011
> machine                : x86_64
> nr_cpus                : 2
> nr_nodes               : 1
> cores_per_socket       : 2
> threads_per_core       : 1
> cpu_mhz                : 2992
> hw_caps                :
> bfebfbff:20100800:00000000:00000940:0008e3fd:00000000:00000001:00000000
> virt_caps              : hvm hvm_directio
> total_memory           : 3929
> free_memory            : 607
> free_cpus              : 0
> xen_major              : 4
> xen_minor              : 2
> xen_extra              : -110422
> xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32
> hvm-3.0-x86_32p hvm-3.0-x86_64
> xen_scheduler          : credit
> xen_pagesize           : 4096
> platform_params        : virt_start=0xffff800000000000
> xen_changeset          : Wed Apr 20 12:02:51 2011 +0100 23246:eb4505f8dd97
> xen_commandline        : com1=115200,8n1,0xecb8,0 xsave=0 dom0_mem=1500MB
> iommu=verbose console=com1,vga guest_loglvl=all e820-verbose=1 apic=debug
> cc_compiler            : gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC)
> cc_compile_by          : konrad
> cc_compile_domain      : dumpdata.com
> cc_compile_date        : Fri Apr 22 14:20:44 EDT 2011
> xend_config_format     : 4
> 
> 
> But if I don't have it set, this is what I see when I start a PV guest:
> 
> [    0.000000] Kernel command line: console=hvc0 debug earlyprintk=xenboot
> [    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
> [    0.000000] FP/SSE not shown under xsave features 0x0
> [    0.000000] ------------[ cut here ]------------
> [    0.000000] kernel BUG at
> /home/konrad/ssd/linux/arch/x86/kernel/xsave.c:432!
> [    0.000000] invalid opcode: 0000 [#1] SMP
> [    0.000000] last sysfs file:
> [    0.000000] CPU 0
> [    0.000000] Modules linked in:
> [    0.000000] 
> [    0.000000] Pid: 0, comm: swapper Not tainted
> 2.6.39-rc4yes_xen_blkdev-01970-g308daa7 #1
> [    0.000000] RIP: e030:[<ffffffff81897808>]  [<ffffffff81897808>]
> xstate_enable_boot_cpu+0x99/0x2d5
> [    0.000000] RSP: e02b:ffffffff81801e38  EFLAGS: 00010096
> [    0.000000] RAX: 000000000000003f RBX: ffffffff81801e68 RCX:
> ffffffff8145caa2
> [    0.000000] RDX: 00000000ffffedda RSI: 0000000000000026 RDI:
> 0000000000000004
> [    0.000000] RBP: ffffffff81801ea8 R08: 000000000000000a R09:
> 0000ffff00066c0a
> [    0.000000] R10: 0000000000000000 R11: 0000000000000000 R12:
> ffffffff81801e6c
> [    0.000000] R13: ffffffff81801e70 R14: ffffffff81801e74 R15:
> 0000000000000000
> [    0.000000] FS:  0000000000000000(0000) GS:ffff88007ffaf000(0000)
> knlGS:0000000000000000
> [    0.000000] CS:  e033 DS: 0000 ES: 0000 CR0: 000000008005003b
> [    0.000000] CR2: 0000000000000000 CR3: 0000000001803000 CR4:
> 0000000000002660
> [    0.000000] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
> 0000000000000000
> [    0.000000] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
> 0000000000000400
> [    0.000000] Process swapper (pid: 0, threadinfo ffffffff81800000, task
> ffffffff8180b020)
> [    0.000000] Stack:
> [    0.000000]  0000000000000000 0000000000000001 ffffffff810069df
> ffffffff81003d00
> [    0.000000]  ffffffff81801e98 ffffffff81003e1a 0000000000000000
> 0000000000000000
> [    0.000000]  ffff88007ffba0e0 0000000000000008 0000000000000000
> 0000000000000000
> [    0.000000] Call Trace:
> [    0.000000]  [<ffffffff810069df>] ? xen_restore_fl_direct_reloc+0x4/0x4
> [    0.000000]  [<ffffffff81003d00>] ? xen_mc_issue.clone.0+0x22/0x24
> 
> Or with an older kernel: 2.6.37 I get:
> 
> e entries: 65536 (order: 6, 262144 bytes)
> [    0.000000] Initializing CPU#0
> [    0.000000] FP/SSE not shown under xsave features 0x0
> [    0.000000] ------------[ cut here ]------------
> [    0.000000] kernel BUG at
> /home/konrad/ssd/linux/arch/x86/kernel/xsave.c:432!
> [    0.000000] invalid opcode: 0000 [#1] SMP
> [    0.000000] last sysfs file:
> [    0.000000] Modules linked in:
> [    0.000000] 
> [    0.000000] Pid: 0, comm: swapper Not tainted 2.6.37 #1 /
> [    0.000000] EIP: e019:[<c152f970>] EFLAGS: 00010046 CPU: 0
> [    0.000000] EIP is at xstate_enable_boot_cpu+0x93/0x273
> [    0.000000] EAX: 0000003f EBX: 00000000 ECX: c14eea24 EDX: c14e00f0
> [    0.000000] ESI: c14e3ea4 EDI: c14e3ea0 EBP: c14e3eb8 ESP: c14e3e70
> [    0.000000]  DS: e021 ES: e021 FS: 00d8 GS: 0000 SS: e021
> [    0.000000] Process swapper (pid: 0, ti=c14e2000 task=c14e9060
> task.ti=c14e2000)
> [    0.000000] Stack:
> [    0.000000]  c144859b 00000000 00000000 c151c3d0 c14e3e9c 00000003 ec3cc058
> 00000000
> [    0.000000]  8005003b c1006caf c1004166 00000000 00000000 00000000 00000000
> 00000008
> [    0.000000]  00000000 00000009 c14e3ec0 c1392783 c14e3ef4 c1393d0a ec3cff00
> c14e3ee0
> [    0.000000] Call Trace:
> [    0.000000]  [<c1006caf>] ? xen_restore_fl_direct_end+0x0/0x1
> [    0.000000]  [<c1004166>] ? xen_mc_issue.clone.0+0x1d/0x1f
> [    0.000000]  [<c1392783>] ? xsave_init+0x20/0x22
> [    0.000000]  [<c1393d0a>] ? cpu_init+0x207/0x20f
> [    0.000000]  [<c100894e>] ? setup_sigcontext+0x16/0xc3
> [    0.000000]  [<c152c279>] ? trap_init+0x329/0x338
> [    0.000000]  [<c139ef00>] ? __get_valid_kprobe+0x17/0x67
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What is up with XSAVE? 2.6.37, 2.6.39 crashes with Xen 4.2
  2011-04-22 19:51 What is up with XSAVE? 2.6.37, 2.6.39 crashes with Xen 4.2 Konrad Rzeszutek Wilk
  2011-04-22 21:46 ` Keir Fraser
@ 2011-04-25 12:14 ` Keir Fraser
  2011-04-25 14:01   ` Konrad Rzeszutek Wilk
  1 sibling, 1 reply; 4+ messages in thread
From: Keir Fraser @ 2011-04-25 12:14 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, xen-devel, Tim Deegan

[-- Attachment #1: Type: text/plain, Size: 6513 bytes --]

On 22/04/2011 20:51, "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com> wrote:

> If I use 'xsave=0' on the latest Xen it works fine with PV guests.
> But if I boot the machine without that workaroudn the PV guests fail.

Can you try the attached patch? Should fill in XSAVE-related CPUID leaves
for PV guests.

 -- Keir

> Here is the 'xl info' from a bootup with 'xsave=0'.
> host                   : tst013.dumpdata.com
> release                : 2.6.39-rc4yes_xen_blkdev-01970-g308daa7
> version                : #1 SMP Fri Apr 22 14:20:31 EDT 2011
> machine                : x86_64
> nr_cpus                : 2
> nr_nodes               : 1
> cores_per_socket       : 2
> threads_per_core       : 1
> cpu_mhz                : 2992
> hw_caps                :
> bfebfbff:20100800:00000000:00000940:0008e3fd:00000000:00000001:00000000
> virt_caps              : hvm hvm_directio
> total_memory           : 3929
> free_memory            : 607
> free_cpus              : 0
> xen_major              : 4
> xen_minor              : 2
> xen_extra              : -110422
> xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32
> hvm-3.0-x86_32p hvm-3.0-x86_64
> xen_scheduler          : credit
> xen_pagesize           : 4096
> platform_params        : virt_start=0xffff800000000000
> xen_changeset          : Wed Apr 20 12:02:51 2011 +0100 23246:eb4505f8dd97
> xen_commandline        : com1=115200,8n1,0xecb8,0 xsave=0 dom0_mem=1500MB
> iommu=verbose console=com1,vga guest_loglvl=all e820-verbose=1 apic=debug
> cc_compiler            : gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC)
> cc_compile_by          : konrad
> cc_compile_domain      : dumpdata.com
> cc_compile_date        : Fri Apr 22 14:20:44 EDT 2011
> xend_config_format     : 4
> 
> 
> But if I don't have it set, this is what I see when I start a PV guest:
> 
> [    0.000000] Kernel command line: console=hvc0 debug earlyprintk=xenboot
> [    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
> [    0.000000] FP/SSE not shown under xsave features 0x0
> [    0.000000] ------------[ cut here ]------------
> [    0.000000] kernel BUG at
> /home/konrad/ssd/linux/arch/x86/kernel/xsave.c:432!
> [    0.000000] invalid opcode: 0000 [#1] SMP
> [    0.000000] last sysfs file:
> [    0.000000] CPU 0
> [    0.000000] Modules linked in:
> [    0.000000] 
> [    0.000000] Pid: 0, comm: swapper Not tainted
> 2.6.39-rc4yes_xen_blkdev-01970-g308daa7 #1
> [    0.000000] RIP: e030:[<ffffffff81897808>]  [<ffffffff81897808>]
> xstate_enable_boot_cpu+0x99/0x2d5
> [    0.000000] RSP: e02b:ffffffff81801e38  EFLAGS: 00010096
> [    0.000000] RAX: 000000000000003f RBX: ffffffff81801e68 RCX:
> ffffffff8145caa2
> [    0.000000] RDX: 00000000ffffedda RSI: 0000000000000026 RDI:
> 0000000000000004
> [    0.000000] RBP: ffffffff81801ea8 R08: 000000000000000a R09:
> 0000ffff00066c0a
> [    0.000000] R10: 0000000000000000 R11: 0000000000000000 R12:
> ffffffff81801e6c
> [    0.000000] R13: ffffffff81801e70 R14: ffffffff81801e74 R15:
> 0000000000000000
> [    0.000000] FS:  0000000000000000(0000) GS:ffff88007ffaf000(0000)
> knlGS:0000000000000000
> [    0.000000] CS:  e033 DS: 0000 ES: 0000 CR0: 000000008005003b
> [    0.000000] CR2: 0000000000000000 CR3: 0000000001803000 CR4:
> 0000000000002660
> [    0.000000] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
> 0000000000000000
> [    0.000000] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
> 0000000000000400
> [    0.000000] Process swapper (pid: 0, threadinfo ffffffff81800000, task
> ffffffff8180b020)
> [    0.000000] Stack:
> [    0.000000]  0000000000000000 0000000000000001 ffffffff810069df
> ffffffff81003d00
> [    0.000000]  ffffffff81801e98 ffffffff81003e1a 0000000000000000
> 0000000000000000
> [    0.000000]  ffff88007ffba0e0 0000000000000008 0000000000000000
> 0000000000000000
> [    0.000000] Call Trace:
> [    0.000000]  [<ffffffff810069df>] ? xen_restore_fl_direct_reloc+0x4/0x4
> [    0.000000]  [<ffffffff81003d00>] ? xen_mc_issue.clone.0+0x22/0x24
> 
> Or with an older kernel: 2.6.37 I get:
> 
> e entries: 65536 (order: 6, 262144 bytes)
> [    0.000000] Initializing CPU#0
> [    0.000000] FP/SSE not shown under xsave features 0x0
> [    0.000000] ------------[ cut here ]------------
> [    0.000000] kernel BUG at
> /home/konrad/ssd/linux/arch/x86/kernel/xsave.c:432!
> [    0.000000] invalid opcode: 0000 [#1] SMP
> [    0.000000] last sysfs file:
> [    0.000000] Modules linked in:
> [    0.000000] 
> [    0.000000] Pid: 0, comm: swapper Not tainted 2.6.37 #1 /
> [    0.000000] EIP: e019:[<c152f970>] EFLAGS: 00010046 CPU: 0
> [    0.000000] EIP is at xstate_enable_boot_cpu+0x93/0x273
> [    0.000000] EAX: 0000003f EBX: 00000000 ECX: c14eea24 EDX: c14e00f0
> [    0.000000] ESI: c14e3ea4 EDI: c14e3ea0 EBP: c14e3eb8 ESP: c14e3e70
> [    0.000000]  DS: e021 ES: e021 FS: 00d8 GS: 0000 SS: e021
> [    0.000000] Process swapper (pid: 0, ti=c14e2000 task=c14e9060
> task.ti=c14e2000)
> [    0.000000] Stack:
> [    0.000000]  c144859b 00000000 00000000 c151c3d0 c14e3e9c 00000003 ec3cc058
> 00000000
> [    0.000000]  8005003b c1006caf c1004166 00000000 00000000 00000000 00000000
> 00000008
> [    0.000000]  00000000 00000009 c14e3ec0 c1392783 c14e3ef4 c1393d0a ec3cff00
> c14e3ee0
> [    0.000000] Call Trace:
> [    0.000000]  [<c1006caf>] ? xen_restore_fl_direct_end+0x0/0x1
> [    0.000000]  [<c1004166>] ? xen_mc_issue.clone.0+0x1d/0x1f
> [    0.000000]  [<c1392783>] ? xsave_init+0x20/0x22
> [    0.000000]  [<c1393d0a>] ? cpu_init+0x207/0x20f
> [    0.000000]  [<c100894e>] ? setup_sigcontext+0x16/0xc3
> [    0.000000]  [<c152c279>] ? trap_init+0x329/0x338
> [    0.000000]  [<c139ef00>] ? __get_valid_kprobe+0x17/0x67
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> [    0.000000]  [<c1398e00>] ? trustee_thread+0x3bc/0x46d
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel


[-- Attachment #2: 00-xsave-cpuid --]
[-- Type: application/octet-stream, Size: 1856 bytes --]

diff -r eb4505f8dd97 tools/libxc/xc_cpuid_x86.c
--- a/tools/libxc/xc_cpuid_x86.c	Wed Apr 20 12:02:51 2011 +0100
+++ b/tools/libxc/xc_cpuid_x86.c	Mon Apr 25 13:09:52 2011 +0100
@@ -405,8 +405,9 @@
     const unsigned int *input, unsigned int *regs)
 {
     DECLARE_DOMCTL;
-    int guest_64bit, xsave_supported, xen_64bit = hypervisor_is_64bit(xch);
+    int guest_64bit, xen_64bit = hypervisor_is_64bit(xch);
     char brand[13];
+    uint64_t xfeature_mask;
 
     xc_cpuid_brand_get(brand);
 
@@ -421,7 +422,7 @@
     domctl.cmd = XEN_DOMCTL_getvcpuextstate;
     domctl.domain = domid;
     do_domctl(xch, &domctl);
-    xsave_supported = (domctl.u.vcpuextstate.xfeature_mask != 0);
+    xfeature_mask = domctl.u.vcpuextstate.xfeature_mask;
 
     if ( (input[0] & 0x7fffffff) == 1 )
     {
@@ -452,7 +453,7 @@
         clear_bit(X86_FEATURE_TM2, regs[2]);
         if ( !guest_64bit )
             clear_bit(X86_FEATURE_CX16, regs[2]);
-        if ( !xsave_supported )
+        if ( xfeature_mask == 0 )
         {
             clear_bit(X86_FEATURE_XSAVE, regs[2]);
             clear_bit(X86_FEATURE_AVX, regs[2]);
@@ -462,6 +463,11 @@
         clear_bit(X86_FEATURE_DCA, regs[2]);
         set_bit(X86_FEATURE_HYPERVISOR, regs[2]);
         break;
+
+    case 0x0000000d:
+        xc_cpuid_config_xsave(xch, domid, xfeature_mask, input, regs);
+        break;
+
     case 0x80000001:
         if ( !guest_64bit )
         {
@@ -486,9 +492,9 @@
         clear_bit(X86_FEATURE_NODEID_MSR, regs[2]);
         clear_bit(X86_FEATURE_TOPOEXT, regs[2]);
         break;
+
     case 5: /* MONITOR/MWAIT */
     case 0xa: /* Architectural Performance Monitor Features */
-    case 0xd: /* XSAVE */
     case 0x8000000a: /* SVM revision and features */
     case 0x8000001b: /* Instruction Based Sampling */
     case 0x8000001c: /* Light Weight Profiling */

[-- 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] 4+ messages in thread

* Re: What is up with XSAVE? 2.6.37, 2.6.39 crashes with Xen 4.2
  2011-04-25 12:14 ` Keir Fraser
@ 2011-04-25 14:01   ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-04-25 14:01 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, Tim Deegan

On Mon, Apr 25, 2011 at 01:14:31PM +0100, Keir Fraser wrote:
> On 22/04/2011 20:51, "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com> wrote:
> 
> > If I use 'xsave=0' on the latest Xen it works fine with PV guests.
> > But if I boot the machine without that workaroudn the PV guests fail.
> 
> Can you try the attached patch? Should fill in XSAVE-related CPUID leaves
> for PV guests.

Works great. Thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-25 14:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-22 19:51 What is up with XSAVE? 2.6.37, 2.6.39 crashes with Xen 4.2 Konrad Rzeszutek Wilk
2011-04-22 21:46 ` Keir Fraser
2011-04-25 12:14 ` Keir Fraser
2011-04-25 14:01   ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).