WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow gu

To: "bderzhavets@xxxxxxxxx" <bderzhavets@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 09 Mar 2009 11:26:37 +0000
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 09 Mar 2009 04:27:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <868545.28268.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmgqMzaTcBxQ1LiR+qlDgtNqvnSbgAARvNW
Thread-topic: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it
User-agent: Microsoft-Entourage/12.15.0.081119
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

<Prev in Thread] Current Thread [Next in Thread>