Add pcihole64 element to root PCI controllers

<controller type='pci' index='0' model='pci-root'>
  <pcihole64 unit='KiB'>1048576</pcihole64>
</controller>

It can be used to adjust (or disable) the size of the 64-bit
PCI hole. The size attribute is in kilobytes (different unit
can be specified on input), but it gets rounded up to
the nearest GB by QEMU.

Disabling it will be needed for guests that crash with the
64-bit PCI hole (like Windows XP), see:
https://bugzilla.redhat.com/show_bug.cgi?id=990418
This commit is contained in:
Ján Tomko committed 2013-08-27 17:42:29 +02:00
1 parent 4582bc2e78
commit 01cda91809
10 files changed
+195 -10

No files matched your search

@@ -0,0 +1,23 @@
<domain type='qemu'>
<name>foo</name>
<uuid>c84fc647-6198-4ff9-bf81-d65a1f8f5ec0</uuid>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static' cpuset='0-1'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-1.2'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<controller type='pci' index='0' model='pci-root'>
<pcihole64 unit='GiB'>1</pcihole64>
</controller>
<controller type='usb' index='0'/>
<memballoon model='virtio'/>
</devices>
</domain>
@@ -0,0 +1,23 @@
<domain type='qemu'>
<name>foo</name>
<uuid>c84fc647-6198-4ff9-bf81-d65a1f8f5ec0</uuid>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static' cpuset='0-1'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-1.2'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<controller type='pci' index='0' model='pci-root'>
<pcihole64 unit='KiB'>0</pcihole64>
</controller>
<controller type='usb' index='0'/>
<memballoon model='virtio'/>
</devices>
</domain>
@@ -0,0 +1,33 @@
<domain type='qemu'>
<name>q35-test</name>
<uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static' cpuset='0-1'>2</vcpu>
<os>
<type arch='x86_64' machine='q35'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='sda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='pci' index='0' model='pcie-root'>
<pcihole64 unit='KiB'>1048576</pcihole64>
</controller>
<controller type='pci' index='1' model='dmi-to-pci-bridge'/>
<controller type='pci' index='2' model='pci-bridge'/>
<controller type='sata' index='0'/>
<video>
<model type='qxl' ram='65536' vram='18432' heads='1'/>
</video>
<memballoon model='none'/>
</devices>
</domain>
@@ -0,0 +1,23 @@
<domain type='qemu'>
<name>foo</name>
<uuid>3c7c30b5-7866-4b05-8a29-efebccba52a0</uuid>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static' cpuset='0-1'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-1.2'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<controller type='pci' index='0' model='pci-root'>
<pcihole64 unit='KiB'>1048576</pcihole64>
</controller>
<controller type='usb' index='0'/>
<memballoon model='virtio'/>
</devices>
</domain>
@@ -0,0 +1,23 @@
<domain type='qemu'>
<name>foo</name>
<uuid>c84fc647-6198-4ff9-bf81-d65a1f8f5ec0</uuid>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static' cpuset='0-1'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-1.2'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<controller type='pci' index='0' model='pci-root'>
<pcihole64 unit='KiB'>1048576</pcihole64>
</controller>
<controller type='usb' index='0'/>
<memballoon model='virtio'/>
</devices>
</domain>
+5
View File
@@ -311,6 +311,11 @@ mymain(void)
DO_TEST_DIFFERENT("s390-defaultconsole");
DO_TEST("pcihole64");
DO_TEST_DIFFERENT("pcihole64-gib");
DO_TEST("pcihole64-none");
DO_TEST("pcihole64-q35");
virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt);