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

[Xen-users] Fwd: CPUID DomU configuration not working


  • To: xen-users@xxxxxxxxxxxxx
  • From: Fanny Dwargee <fdwargee6@xxxxxxxxx>
  • Date: Mon, 28 Mar 2016 12:52:43 +0200
  • Delivery-date: Mon, 28 Mar 2016 10:54:17 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Sorry, forgot to CC the list...

---------- Forwarded message ----------
From: Fanny Dwargee <fdwargee6@xxxxxxxxx>
Date: 2016-03-28 10:07 GMT+02:00
Subject: Re: [Xen-users] CPUID DomU configuration not working
To: Roger Pau Monné <roger.pau@xxxxxxxxxx>


Hi Roger,
many thanks in advance, you're right, it was my fault, I was referring to the hypervisor bit (bit 31 returned on ECX) not the VMX bit.

Now it's working just zeroing that bit:
cpuid = [ '0x1:ecx=0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ] 


Now I'm facing another issue, I'm trying to changing the returned hypervisor vendor string, the CPUID instruction with EAX=0x40000000 returns the mentioned string on the EBX-ECX-EDX registers.

Currently Xen returns the string "XenVMMXenVMM" but unfortunately playing with the cpuid configuration setting doesn't change it in any way, in fact, taking a look to the Xen sources the string is harcoded in many places so I'm afraid  I can't change it.

I'm using the cpuid setting on the configuration file this way:
cpuid = [ '0x40000000:eax=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,ebx=01010100010100110101010101001010,ecx=00000000000000000000000001010100,edx=01010011010001010101010001000001' ]

Any idea?

2016-03-23 12:22 GMT+01:00 Roger Pau Monné <roger.pau@xxxxxxxxxx>:
On Fri, 18 Mar 2016, Fanny Dwargee wrote:
> Hi,
> I'm trying to remove the VMX feature from the CPUID responses (bit 5 returned on ecx register) setting the cpuid DomU configuration for a HVM Windows7.
>
> Unfortunately using the CPUID instruction from inside the guest does still shows the VMX bit as enabled.
>
> No error is visible on logs nor xl dmesg. Xen is v4.6.1 compiled from source.
>
> DomU configuration follows:
>       name = "win7-sp1-x64-2"
>
> firmware_override = "/usr/local/lib/xen/boot/hvmloader"
>
> builder='hvm'
> vcpus = 1
> maxcpus = 1
>
> cpuid = [ '0x1:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxx0xxxxx' ]
>
> hap  = 1
> acpi = 1
>
> _on_poweroff_ = 'destroy'
> on_reboot   = 'restart'
> on_crash    = 'destroy'
>
> vif = [ 'type=ioemu,model=e1000 ]
> disk = [ 'phy:/dev/vms/win7-sp1-x64-2,hda,w', 'file:/opt/iso/win7.iso,hdc:cdrom,r' ]
>
> boot="cd"
>
> serial = 'pty'
> usb = 1
> usbdevice = 'tablet'
> #altp2mhvm = 1
> keymap = 'es'
> vga = 'stdvga'
> videoram = 16

Are you sure this is all you have in your domain configuration file? The
VMX bit should only be enabled if you have nestedhvm=1 in your config file
AFAIK. Here is for example a configuration file for one of my HVM guests:

memory=512
vcpus=1
name="freebsd"
builder="hvm"
disk = [
 'phy:/dev/zvol/tank/freebsd,hda,rw,script=block',
]
vif = [
 'mac=00:16:3E:74:3d:76,bridge=bridge0',
]
serial='pty'

And the relevant output of cpuid:

Feature flags set 2 (CPUID.01H:ECX): fff83203:
SSE3     SSE3 extensions
PCLMULDQ PCLMULDQ instruction
SSSE3    Supplemental Streaming SIMD Extension 3
FMA      Fused Multiply-Add
CX16     CMPXCHG16B
SSE4.1   Streaming SIMD Extension 4.1
SSE4.2   Streaming SIMD Extension 4.2
x2APIC   Extended xAPIC support
MOVBE    MOVBE instruction
POPCNT   POPCNT instruction
TSC-Deadline
AESNI    AES Instruction set
XSAVE    XSAVE/XSTOR states
OSXSAVE  OS-enabled extended state managerment
AVX      AVX extensions
F16C     Half-precision conversions
RDRAND   RDRAND Instruction
31 - unknown feature

As you can see bit 5 (VMX) is not enabled at all (and I'm not using any
kind of CPUID masking in the config file).

How do you know that the VMX bit is set inside of the guest?

Roger.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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