Re: [BUG] Xen x86_64 needs PAE?

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

 



Hello,

Am Dienstag 24 August 2010 14:12:24 schrieb Daniel P. Berrange:
> If you can provide the 'xm' config file, the libvirt XML and the output
> of 'xm list --list $GUESTNAME' when the guest is succesfully running we
> can add a test case to validate this PAE setup & fix the xen driver.

I attached 8 files:
1. xen-fv-w2k8.broken.xml is my initial file, which was used with 'virsh 
define' + 'virsh start'.
2. xen-fv-w2k8.broken.xm was created using "virsh domxml-to-native xen-xm"
3. xen-fv-w2k8.broken.dump was created using "xm list --long Windows2008r2_64"
4. xen-fv-w2k8.fixed.xml with just '<pae/>' added, 'virsh define' + 'virsh 
start'.
5.-6. xen-fv-w2k8.fixed.{xm,dump} analog to above.
7. xen-fv-w2k8.clean.xm is without the pae=[01] line, so 'xm create' uses it's 
default.
8. xen-fv-w2k8.clean.dump of 'xm list --long' after 'xm create'

501 root@xen1=xen64:~ 0# xm info
host                   : xen1
release                : 2.6.32-ucs11-xen-amd64
version                : #1 SMP Sat Jul 31 07:49:13 UTC 2010
machine                : x86_64
hw_caps                : 
078bf3ff:ebd3fbff:00000000:00000010:00002001:0000001d:0000001d:00000000
virt_caps              : hvm
xen_major              : 3
xen_minor              : 4
xen_extra              : .3
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

> In 64-bit Xen, the pae flag indicates whether the CPU exposed supports
> long mode. So if you don't set the PAE flag on 64-bit Xen, you get a
> 32-bit PAE guest. If you do set the PAE flag, you get a 64-bit guest.
> Yes, you read that right, not setting PAE, gets you a PAE enabled guest
> just with 32 instead of 64 bits :-)
>
> In terms of the domain XML design, the choice between 32 and 64 bits is
> intended to be done based on the arch field:
>
>   <os>
>     <type arch='x86_64'...
>     ...
>   </os>

That is what I expected as well: neither for Windows 2k8 nor for Linux would I 
get a 64 bit guest. Only after adding the <pae/> feature it worked.

Perhaps related: Setting "arch=x86_64" for Xen domains never made a difference 
for me: On the next "virsh dumpxml" that attribute was gone again making it 
impossible to distinguish between 32 and 64 bit Xen domains.

> The pae flag in domain XML should be reflecting whether pae is enabled
> in the guest.

If I understand pae right, x86_64 used a page-table-layout very similar to 
x86_32+pae, which makes doing the Virtual Memory mapping between host and 
guests easy. For x86_32 without pae you'd need to do some heavy reshuffling, 
because the page tables would be totally different.

I noticed the pae problem during my testing: guests started via "xm 
create/start" ran fast, while guestss started via "virsh start" were very 
slow. As soon as one non-pae-guest was running, the whole system got 
unresponsive. It seemed to be related to the memory size, since running a 
guest with 128M or 512M made a huge difference.

> The capabilities XML should be reporting whether the guest ABI includes
> the PAE flag or not. So I think the 32bit capabilities shouldn't have
> included <nonpae/> there, and perhaps 64-bit should have had <pae/>.
> Ultimately though I think our mistake is in passing the <pae> flag from
> the domain XML, straight through to the hypervisor. I'm rather wary of
> changing this, because of the risk of regressions, but if you can supply
> the 3 files I asked for above, we can investigate whether its feasible

The missing <pae/> is translated to pae=0, which overwrites Xens default. 
Because of that my code currently tests for xen on x86_64 and than always 
adds <pae/> to make it work. My expectation would be that the capabilities 
XML should thus report <pae/>, if an application is supposed to add the 
<pae/> feature to get an 64 bit xen-fv domain.

Sincerely
Philipp
-- 
Philipp Hahn           Open Source Software Engineer      hahn@xxxxxxxxxxxxx   
Univention GmbH        Linux for Your Business        fon: +49 421 22 232- 0
Mary-Somerville-Str.1  28359 Bremen                   fax: +49 421 22 232-99
                                                    http://www.univention.de
****
Besuchen Sie unsere Praxis-Vorträge zu UCS@School auf der FIT-ÖV
am 23.09.2010 im Haus der Wissenschaft in Bremen
****
(domain
    (domid 7)
    (on_crash destroy)
    (uuid 23b87d01-7ba3-91f3-bf7b-d87b57a2893e)
    (bootloader_args )
    (vcpus 1)
    (name Windows2008r2_64)
    (on_poweroff destroy)
    (on_reboot restart)
    (cpus (()))
    (bootloader )
    (maxmem 512)
    (memory 512)
    (shadow_memory 5)
    (features )
    (on_xend_start ignore)
    (on_xend_stop ignore)
    (start_time 1282658955.15)
    (cpu_time 47.385983162)
    (online_vcpus 1)
    (image
        (hvm
            (kernel )
            (hpet 0)
            (loader /usr/lib/xen/boot/hvmloader)
            (serial none)
            (xen_platform_pci 1)
            (boot d)
            (rtc_timeoffset 0)
            (vpt_align 1)
            (viridian 0)
            (acpi 1)
            (timer_mode 1)
            (apic 1)
            (device_model /usr/lib/xen/bin/qemu-dm)
            (usb 1)
            (notes (SUSPEND_CANCEL 1))
        )
    )
    (status 2)
    (state ------)
    (store_mfn 1044476)
    (device
        (vbd
            (uuid 97bd2675-aea3-4188-581a-dd582f3ab07a)
            (bootable 1)
            (dev hdc:cdrom)
            (uname
                file:/mnt/omar/vmwares/iso-images/windows/server/windows2008-server-R2_x64.iso
            )
            (mode r)
            (backend 0)
            (bootable 1)
            (VDI )
        )
    )
    (device (vkbd (backend 0)))
    (device
        (vfb
            (vncunused 1)
            (vnc 1)
            (uuid 7a30ad9b-5602-25f3-830f-b0907ada3a9a)
            (vnclisten 0.0.0.0)
            (keymap de)
            (location 0.0.0.0:5901)
        )
    )
    (device
        (console
            (protocol vt100)
            (location 3)
            (uuid ac762039-ee53-c3db-04ee-8adce3eef48d)
        )
    )
)
<domain type='xen'>
  <name>Windows2008r2_64</name>
  <memory>524288</memory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='xenfv'>hvm</type>
    <loader>/usr/lib/xen/boot/hvmloader</loader>
    <boot dev='cdrom'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <!--pae/-->
  </features>
  <devices>
    <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
    <disk type='file' device='cdrom'>
      <driver name='file'/>
      <source file='/mnt/omar/vmwares/iso-images/windows/server/windows2008-server-R2_x64.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='de'/>
  </devices>
</domain>
name = "Windows2008r2_64"
uuid = "7d9dd677-8e0f-d6d9-361a-743731926b01"
maxmem = 512
memory = 512
vcpus = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
pae = 1
acpi = 1
apic = 1
localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "destroy"
device_model = "/usr/lib/xen/bin/qemu-dm"
vfb = [ "type=vnc,vncunused=1,vnclisten=0.0.0.0,keymap=de" ]
disk = [ "file:/mnt/omar/vmwares/iso-images/windows/server/windows2008-server-R2_x64.iso,hdc:cdrom,r" ]
parallel = "none"
serial = "none"

name = "Windows2008r2_64"
uuid = "29b2279b-e48d-dcfa-7f56-05f98ba67e03"
maxmem = 512
memory = 512
vcpus = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
pae = 0
acpi = 1
apic = 1
localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "destroy"
device_model = "/usr/lib/xen/bin/qemu-dm"
vfb = [ "type=vnc,vncunused=1,vnclisten=0.0.0.0,keymap=de" ]
disk = [ "file:/mnt/omar/vmwares/iso-images/windows/server/windows2008-server-R2_x64.iso,hdc:cdrom,r" ]
parallel = "none"
serial = "none"

(domain
    (domid 8)
    (on_crash destroy)
    (uuid f7947af3-cb0d-cbf5-d9d2-89c456c5b651)
    (bootloader_args )
    (vcpus 1)
    (name Windows2008r2_64)
    (on_poweroff destroy)
    (on_reboot restart)
    (cpus (()))
    (bootloader )
    (maxmem 512)
    (memory 512)
    (shadow_memory 5)
    (features )
    (on_xend_start ignore)
    (on_xend_stop ignore)
    (start_time 1282659343.81)
    (cpu_time 5.802432395)
    (online_vcpus 1)
    (image
        (hvm
            (kernel )
            (hpet 0)
            (loader /usr/lib/xen/boot/hvmloader)
            (serial none)
            (xen_platform_pci 1)
            (boot d)
            (rtc_timeoffset 0)
            (pae 1)
            (vpt_align 1)
            (viridian 0)
            (acpi 1)
            (timer_mode 1)
            (apic 1)
            (device_model /usr/lib/xen/bin/qemu-dm)
            (usb 1)
            (notes (SUSPEND_CANCEL 1))
        )
    )
    (status 2)
    (state ------)
    (store_mfn 1044476)
    (device
        (vbd
            (uuid e6799aba-4fe3-2201-d9ea-cf9cb4caeb80)
            (bootable 1)
            (dev hdc:cdrom)
            (uname
                file:/mnt/omar/vmwares/iso-images/windows/server/windows2008-server-R2_x64.iso
            )
            (mode r)
            (backend 0)
            (bootable 1)
            (VDI )
        )
    )
    (device (vkbd (backend 0)))
    (device
        (vfb
            (vncunused 1)
            (vnc 1)
            (uuid e47c5959-65a2-4648-35d0-af9a8daaa4ac)
            (vnclisten 0.0.0.0)
            (keymap de)
            (location 0.0.0.0:5901)
        )
    )
    (device
        (console
            (protocol vt100)
            (location 3)
            (uuid fc5ca1be-ea37-1f63-1fe8-87532a8e6444)
        )
    )
)
<domain type='xen'>
  <name>Windows2008r2_64</name>
  <memory>524288</memory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='xenfv'>hvm</type>
    <loader>/usr/lib/xen/boot/hvmloader</loader>
    <boot dev='cdrom'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <devices>
    <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
    <disk type='file' device='cdrom'>
      <driver name='file'/>
      <source file='/mnt/omar/vmwares/iso-images/windows/server/windows2008-server-R2_x64.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='de'/>
  </devices>
</domain>
(domain
    (domid 9)
    (on_crash destroy)
    (uuid 29b2279b-e48d-dcfa-7f56-05f98ba67e03)
    (bootloader_args )
    (vcpus 1)
    (name Windows2008r2_64)
    (on_poweroff destroy)
    (on_reboot restart)
    (cpus (()))
    (bootloader )
    (maxmem 512)
    (memory 512)
    (shadow_memory 5)
    (features )
    (on_xend_start ignore)
    (on_xend_stop ignore)
    (start_time 1282660093.77)
    (cpu_time 3.96672868)
    (online_vcpus 1)
    (image
        (hvm
            (kernel )
            (videoram 4)
            (hpet 0)
            (stdvga 0)
            (loader /usr/lib/xen/boot/hvmloader)
            (serial none)
            (vncunused 1)
            (xen_platform_pci 1)
            (boot d)
            (rtc_timeoffset 0)
            (pci ())
            (pae 1)
            (vpt_align 1)
            (hap 1)
            (viridian 0)
            (acpi 1)
            (localtime 0)
            (timer_mode 1)
            (nographic 0)
            (guest_os_type default)
            (pci_msitranslate 1)
            (apic 1)
            (monitor 0)
            (device_model /usr/lib/xen/bin/qemu-dm)
            (pci_power_mgmt 0)
            (usb 0)
            (xauthority /root/.Xauthority)
            (isa 0)
            (display localhost:11.0)
            (notes (SUSPEND_CANCEL 1))
        )
    )
    (status 2)
    (state ------)
    (store_mfn 1044476)
    (device
        (vbd
            (uuid eae8524b-dc52-9a0d-51b9-402ffa44d39b)
            (bootable 1)
            (dev hdc:cdrom)
            (uname
                file:/mnt/omar/vmwares/iso-images/windows/server/windows2008-server-R2_x64.iso
            )
            (mode r)
            (backend 0)
            (bootable 1)
            (VDI )
        )
    )
    (device (vkbd (backend 0)))
    (device
        (vfb
            (vncunused 1)
            (vnc 1)
            (xauthority /root/.Xauthority)
            (vnclisten 0.0.0.0)
            (keymap de)
            (location 0.0.0.0:5901)
            (display localhost:11.0)
            (uuid 36927cc7-2555-71d4-055b-fab7087132fd)
        )
    )
    (device
        (console
            (protocol vt100)
            (location 3)
            (uuid af0257cc-f976-96ac-fea1-f87e0a018ca3)
        )
    )
)
name = "Windows2008r2_64"
uuid = "29b2279b-e48d-dcfa-7f56-05f98ba67e03"
maxmem = 512
memory = 512
vcpus = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
acpi = 1
apic = 1
localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "destroy"
device_model = "/usr/lib/xen/bin/qemu-dm"
vfb = [ "type=vnc,vncunused=1,vnclisten=0.0.0.0,keymap=de" ]
disk = [ "file:/mnt/omar/vmwares/iso-images/windows/server/windows2008-server-R2_x64.iso,hdc:cdrom,r" ]
parallel = "none"
serial = "none"

Attachment: signature.asc
Description: This is a digitally signed message part.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]