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

Re: [Xen-devel] Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it


  • To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • From: Boris Derzhavets <bderzhavets@xxxxxxxxx>
  • Date: Tue, 10 Mar 2009 15:24:48 -0700 (PDT)
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 10 Mar 2009 15:25:25 -0700
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=BhU4J6ZtCcSXUQoYgRnNrkv0sOOgz3pLpV4izwwqp1m6ysTPu2yf5PKGRKhYRs0VRrFxcDF9GgbeifIsAU8eB3lsC4UQlmraeVCSKXn2UgL7pXoFMbDw+fb6Zj8c4sBmI2zJSDneRX5z2bxCUWgBCDIEzdtvPisQ4cjgkcRpTSM=;
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>


  Seems like new kernel brought up back some old issues with ubuntu 8.10
devices. It never happened before patching 2.6.29-rc7 kernel on C2D boxes with the same ubuntu 8.10 server release and 2.6.29-rc5.
  In particular, CentOS 5.2 PV DomU's xen-hotplug.log looks like:-

xenstore-read: couldn't read path /local/domain/2/vm
xenstore-read: couldn't read path /local/domain/9/vm
xenstore-read: couldn't read path /local/domain/3/vm
xenstore-read: couldn't read path /local/domain/4/vm
 
 Either xen-tools (or whatever else in xen unstable) requires correlation
with patched kernel.


--- On Mon, 3/9/09, Boris Derzhavets <bderzhavets@xxxxxxxxx> wrote:
From: Boris Derzhavets <bderzhavets@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it
To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Cc: "Xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Date: Monday, March 9, 2009, 10:31 AM

Just cloned,built and installed the most recent xen-unstable.
Seems like "make tools"  reports some errors , but still finishes  with no
error message.
CentOS 5.2 PV DomU may be loaded OK only the very first time.
The next attempt after DomU shutdown brings it to paused state.
After "xm unpause DomainName":-

i8042.c: No controller found. in  1 seconds
Red Hat nash version 5.1.19.6 starting
  Reading all physical volumes.  This may take a while...
  No volume groups found
  Volume group "VolGroup00" not found
mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
 root@ServerUbuntu810:/home/boris/vm# Error: Device 51712 (vbd) could not be connected. Hotplug scripts not working.

/var/log/xen/xend.log:-

[2009-03-09 10:18:33 6335] DEBUG (XendDomainInfo:2131) No device model
[2009-03-09 10:18:33 6335] DEBUG (XendDomainInfo:2133) Releasing devices
[2009-03-09 10:19:29 6335] DEBUG (DevController:629) hotplugStatusCallback /local/domain/0/backend/vbd/2/51712/hotplug-status.
[2009-03-09 10:19:29 6335] DEBUG (DevController:643) hotplugStatusCallback 1.
[2009-03-09 10:19:42 6335] ERROR (XendDomainInfo:1983) Failed to restart domain 2.
Traceback (most recent call last):
  File "//usr/lib64/python/xen/xend/XendDomainInfo.py", line 1969, in _restart
    new_dom.waitForDevices()
  File "//usr/lib64/python/xen/xend/XendDomainInfo.py", line 1020, in waitForDevices
    self.getDeviceController(devclass).waitForDevices()
  File "//usr/lib64/python/xen/xend/server/DevController.py", line 140, in waitForDevices
    return map(self.waitForDevice, self.deviceIDs())
  File "//usr/lib64/python/xen/xend/server/DevController.py", line 152, in waitForDevice
    self.destroyDevice(devid, False)
  File "//usr/lib64/python/xen/xend/server/blkif.py", line 200, in destroyDevice
    DevController.destroyDevice(self, devid, force)
  File "//usr/lib64/python/xen/xend/server/DevController.py", line 228, in destroyDevice
    self.writeBackend(dev, 'online', "0")
  File "//usr/lib64/python/xen/xend/server/DevController.py", line 474, in writeBackend
    raise VmError("Device %s not connected" % devid)
VmError: Device 51712 not connected
[2009-03-09 10:21:06 6335] DEBUG (DevController:629) hotplugStatusCallback /local/domain/0/backend/vbd/3/51712/hotplug-status.
[2009-03-09 10:21:06 6335] DEBUG (DevController:643) hotplugStatusCallback 2.

Start F10 PV DomU:-


root@ServerUbuntu810:/home/boris/vm# xm create -c f10.pyrun
Using config file "./f10.pyrun".
PCI: Fatal: No config space access function found
IO APIC resources could be not be allocated.
Loading /lib/kbd/keymaps/i386/qwerty/us.map
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
IP: [<ffffffffa00010e5>] backend_changed+0x2d5/0x3af [xen_blkfront]
PGD 7d1f6067 PUD 7d143067 PMD 7d116067 PTE 0
Oops: 0000 [1] SMP
CPU 1
Modules linked in: xen_blkfront
Pid: 19, comm: xenwatch Not tainted 2.6.27.5-117.fc10.x86_64 #1
RIP: e030:[<ffffffffa00010e5>]  [<ffffffffa00010e5>] backend_changed+0x2d5/0x3af [xen_blkfront]
RSP: e02b:ffff88007f40fdf0  EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88007d02d840 RCX: 0000000000000000
RDX: ffff88007f40fe28 RSI: 0000000000000005 RDI: ffff88007ff5f400
RBP: ffff88007f40fe80 R08: ffff88007f40fdd0 R09: ffff88007f40fcc0
R10: 0000000000000001 R11: ffff880000000018 R12: ffff88007ff5f400
R13: ffff88007d042000 R14: 000000000000000a R15: ffffffff817e2f44
FS:  00007fb68f67e6f0(0000) GS:ffff88007fc04880(0000) knlGS:0000000000000000
CS:  e033 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007d105000 CR4: 0000000000002660
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process xenwatch (pid: 19, threadinfo ffff88007f40e000, task ffff88007ffd5c40)
Stack:  ffff88007f40fe00 ffff88007f40fe40 ffffffff816de500 ffffffff816de500
 ffffffff81455f53 ffffffff81462b99 ffff88007f40fe7c 0000000000000000
 000000000000000a ffff88007d02d840 ffff88007ff5f400 ffffffffa0002ac0
Call Trace:
 [<ffffffff811c91e6>] otherend_changed+0x81/0x8a
 [<ffffffff811c7e14>] xenwatch_thread+0x101/0x134
 [<ffffffff81055199>] ? autoremove_wake_function+0x0/0x38
 [<ffffffff811c7d13>] ? xenwatch_thread+0x0/0x134
 [<ffffffff81054e53>] kthread+0x49/0x76
 [<ffffffff810116e9>] child_rip+0xa/0x11
 [<ffffffff81010a07>] ? restore_args+0x0/0x30
 [<ffffffff810116df>] ? child_rip+0x0/0x11


Code: 58 08 e9 97 00 00 00 49 8b 7d 00 48 c7 c2 b9 15 00 a0 be ed ff ff ff 48 8b 4f 10 31 c0 e8 da 5f 1c e1 e9 cf 00 00 00 49 8b 45 08 <8b> 38 c1 e7 14 0b 78 04 e8 26 55 0e e1 48 85 c0 48 89 c3 75 16
RIP  [<ffffffffa00010e5>] backend_changed+0x2d5/0x3af [xen_blkfront]
 RSP <ffff88007f40fdf0>
CR2: 0000000000000000
---[ end trace bf88f6e1c7a703d2 ]---
root@ServerUbuntu810:/home/boris/vm# Error: Device 51712 (vbd) could not be connected. Hotplug scripts not working.





--- On Mon, 3/9/09, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it
To: "bderzhavets@xxxxxxxxx" <bderzhavets@xxxxxxxxx>
Cc: "Xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Date: Monday, March 9, 2009, 7:26 AM

If you¹re using a recent xen-unstable then you might try again with the
current tip. A couple of changes went in recently (including one fix today).

-- Keir

On 09/03/2009 11:18, "Boris Derzhavets" <bderzhavets@xxxxxxxxx>
wrote:

> I was able to go through creating PV DomUs images via
corresponding
pygrub's
> profiles for F10,CentOS 5.2,SNV_106 (64-bit all).
> However, only Solaris Nevada PV DomU gets loaded via standard
> pygrub profile.
>
> Attempt to load F10 PV:-
>
> [2009-03-09 05:33:38 6351] DEBUG (XendDomainInfo:92)
> XendDomainInfo.create(['vm', ['name', 'F10PV'],
['memory', 2048],
> ['on_reboot', 'restart'], ['on_crash',
'restart'], ['vcpus', 1],
> ['on_xend_start', 'ignore'], ['on_xend_stop',
'ignore'], ['bootloader',
> '/usr/bin/pygrub'], ['bootloader_args', '-q'],
['image', ['linux',
> ['videoram', 4]]], ['device', ['vbd',
['uname', 'phy:/dev/sdb5'], ['dev',
> 'xvda'], ['mode', 'w']]], ['device',
['vif', ['bridge', 'eth0']]], ['device',
> ['vkbd']], ['device', ['vfb',
['vncunused', '1'], ['type', 'vnc'],
> ['xauthority', '/root/.Xauthority']]]])
> [2009-03-09 05:33:38 6351] DEBUG
(XendDomainInfo:2183)
> XendDomainInfo.constructDomain
> [2009-03-09 05:33:38 6351] DEBUG (balloon:166) Balloon: 7239368 KiB free;
need
> 2048; done.
> [2009-03-09 05:33:38 6351] DEBUG (XendDomain:452) Adding Domain: 8
> [2009-03-09 05:33:38 6351] DEBUG (XendDomainInfo:2362)
> XendDomainInfo.initDomain: 8 256
> [2009-03-09 05:33:38 12975] DEBUG (XendBootloader:113) Launching
bootloader as
> ['/usr/bin/pygrub',
'--output=/var/run/xend/boot/xenbl.29001', '-q',
> '/dev/sdb5'].
> [2009-03-09 05:33:39 6351] ERROR (XendBootloader:213) Boot loader
didn't
> return any data!
> [2009-03-09 05:33:39 6351] ERROR (XendDomainInfo:472) VM start failed
> Traceback (most recent call last):
> File "//usr/lib64/python/xen/xend/XendDomainInfo.py", line
452, in start
> XendTask.log_progress(31, 60, self._initDomain)
> File
"//usr/lib64/python/xen/xend/XendTask.py", line 209, in
log_progress
> retval = func(*args, **kwds)
> File "//usr/lib64/python/xen/xend/XendDomainInfo.py", line
2364, in
> _initDomain
> self._configureBootloader()
> File "//usr/lib64/python/xen/xend/XendDomainInfo.py", line
2765, in
> _configureBootloader
> bootloader_args, kernel, ramdisk, args)
> File "//usr/lib64/python/xen/xend/XendBootloader.py", line
214, in
> bootloader
> raise VmError, msg
>
> Attempt to load CentOS 5.2 PV:-
>
> [2009-03-09 06:45:39 6351] DEBUG (XendDomainInfo:92)
> XendDomainInfo.create(['vm', ['name', 'RHEL52PV'],
['memory', 2048], ['vcpus',
> 1], ['on_xend_start', 'ignore'], ['on_xend_stop',
'ignore'], ['image',
> ['linux', ['videoram', 4]]], ['device',
['vbd', ['uname', 'phy:/dev/sdb5'],
> ['dev', 'xvda'], ['mode',
'w']]],
['device', ['vif', ['bridge', 'eth0']]]])
> [2009-03-09 06:45:39 6351] DEBUG (XendDomainInfo:2183)
> XendDomainInfo.constructDomain
> [2009-03-09 06:45:39 6351] DEBUG (balloon:166) Balloon: 7239368 KiB free;
need
> 2048; done.
> [2009-03-09 06:45:39 6351] DEBUG (XendDomain:452) Adding Domain: 12
> [2009-03-09 06:45:39 6351] DEBUG (XendDomainInfo:2362)
> XendDomainInfo.initDomain: 12 256
> [2009-03-09 06:45:39 16739] DEBUG (XendBootloader:113) Launching
bootloader as
> ['/usr/bin/pygrub',
'--output=/var/run/xend/boot/xenbl.15023', '/dev/sdb5'].
> [2009-03-09 06:45:44 6351] ERROR (XendBootloader:213) Boot loader
didn't
> return any data!
> [2009-03-09 06:45:44 6351] ERROR (XendDomainInfo:472) VM start failed
> Traceback (most recent call last):
> File "//usr/lib64/python/xen/xend/XendDomainInfo.py", line
452, in start
>
XendTask.log_progress(31, 60, self._initDomain)
> File "//usr/lib64/python/xen/xend/XendTask.py", line 209, in
log_progress
> retval = func(*args, **kwds)
> File "//usr/lib64/python/xen/xend/XendDomainInfo.py", line
2364, in
> _initDomain
> self._configureBootloader()
> File "//usr/lib64/python/xen/xend/XendDomainInfo.py", line
2765, in
> _configureBootloader
> bootloader_args, kernel, ramdisk, args)
> File "//usr/lib64/python/xen/xend/XendBootloader.py", line
214, in
> bootloader
> raise VmError, msg
> VmError: Boot loader didn't return any data!
>
>
>
>
>
>
>
>
>
> --- On Sun, 3/8/09, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
>> From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
>> Subject: [PATCH] xen: mask XSAVE in cpuid since we don't
allow
guests to use
>> it
>> To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
>> Cc: "Xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>,
"Marc - A. Dahlhaus [
>> Administration | Westermann GmbH ]" <mad@xxxxxx>,
"Boris Derzhavets"
>> <bderzhavets@xxxxxxxxx>
>> Date: Sunday, March 8, 2009, 12:31 AM
>>
>> Mask X86_FEATURE_XSAVE in cpuid leaf 1, ecx, as we don't allow
guests to
>> use it (by setting cr4.OSXSAVE).
>>
>> This prevents crashes in pvops dom0 kernels, as new versions of Linux
try
>> to use this feature.
>>
>> (This patch deals with dom0 cpuid; I'm not sure where the right
place to
>> set up the default mask for domU is.)
>>
>> Signed-off-by: Jeremy Fitzhardinge
<jeremy.fitzhardinge@xxxxxxxxxx>
>>
>> diff -r 7f573cb76db4
xen/arch/x86/traps.c
>> --- a/xen/arch/x86/traps.c Tue Mar 03 13:22:28 2009 +0000
>> +++ b/xen/arch/x86/traps.c Sat Mar 07 17:02:03 2009 -0800
>> @@ -757,6 +757,7 @@
>> __clear_bit(X86_FEATURE_XTPR % 32, &c);
>> __clear_bit(X86_FEATURE_PDCM % 32, &c);
>> __clear_bit(X86_FEATURE_DCA % 32, &c);
>> + __clear_bit(X86_FEATURE_XSAVE % 32, &c);
>> if ( !cpu_has_apic )
>>
>> __clear_bit(X86_FEATURE_X2APIC % 32, &c);
>> __set_bit(X86_FEATURE_HYPERVISOR % 32, &c);
>> diff -r 7f573cb76db4 xen/include/asm-x86/cpufeature.h
>> --- a/xen/include/asm-x86/cpufeature.h Tue Mar 03 13:22:28 2009 +0000
>> +++ b/xen/include/asm-x86/cpufeature.h Sat Mar 07 17:02:03 2009 -0800
>> @@ -95,6 +95,7 @@
>> #define X86_FEATURE_SSE4_2 (4*32+20) /* Streaming SIMD
Extensions 4.2
*/
>> #define X86_FEATURE_X2APIC (4*32+21) /* Extended xAPIC */
>> #define X86_FEATURE_POPCNT (4*32+23) /* POPCNT instruction */
>> +#define X86_FEATURE_XSAVE (4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV */
>> #define X86_FEATURE_HYPERVISOR (4*32+31) /* Running under some
hypervisor */
>>
>> /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001,
word 5 */
>>
>>
>
>



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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