mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: Introduce QEMU memory locking limit tests
These tests cover a number of scenarios where we care about the memory locking limit being set correctly for the guest to work properly.
This commit is contained in:
20
tests/qemumemlockdata/qemumemlock-pc-hardlimit+hostdev.xml
Normal file
20
tests/qemumemlockdata/qemumemlock-pc-hardlimit+hostdev.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memtune>
|
||||
<hard_limit unit='KiB'>2097152</hard_limit>
|
||||
</memtune>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<driver name='vfio'/>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x04' slot='0x02' function='0x0'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
</devices>
|
||||
</domain>
|
||||
@@ -0,0 +1,23 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memtune>
|
||||
<hard_limit unit='KiB'>2097152</hard_limit>
|
||||
</memtune>
|
||||
<memoryBacking>
|
||||
<locked/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<driver name='vfio'/>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x04' slot='0x02' function='0x0'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
</devices>
|
||||
</domain>
|
||||
17
tests/qemumemlockdata/qemumemlock-pc-hardlimit+locked.xml
Normal file
17
tests/qemumemlockdata/qemumemlock-pc-hardlimit+locked.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memtune>
|
||||
<hard_limit unit='KiB'>2097152</hard_limit>
|
||||
</memtune>
|
||||
<memoryBacking>
|
||||
<locked/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
</devices>
|
||||
</domain>
|
||||
14
tests/qemumemlockdata/qemumemlock-pc-hardlimit.xml
Normal file
14
tests/qemumemlockdata/qemumemlock-pc-hardlimit.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memtune>
|
||||
<hard_limit unit='KiB'>2097152</hard_limit>
|
||||
</memtune>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
</devices>
|
||||
</domain>
|
||||
17
tests/qemumemlockdata/qemumemlock-pc-hostdev.xml
Normal file
17
tests/qemumemlockdata/qemumemlock-pc-hostdev.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<driver name='vfio'/>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x04' slot='0x02' function='0x0'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
</devices>
|
||||
</domain>
|
||||
11
tests/qemumemlockdata/qemumemlock-pc-kvm.xml
Normal file
11
tests/qemumemlockdata/qemumemlock-pc-kvm.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
</devices>
|
||||
</domain>
|
||||
20
tests/qemumemlockdata/qemumemlock-pc-locked+hostdev.xml
Normal file
20
tests/qemumemlockdata/qemumemlock-pc-locked+hostdev.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memoryBacking>
|
||||
<locked/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<driver name='vfio'/>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x04' slot='0x02' function='0x0'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
</devices>
|
||||
</domain>
|
||||
14
tests/qemumemlockdata/qemumemlock-pc-locked.xml
Normal file
14
tests/qemumemlockdata/qemumemlock-pc-locked.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memoryBacking>
|
||||
<locked/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
</devices>
|
||||
</domain>
|
||||
11
tests/qemumemlockdata/qemumemlock-pc-tcg.xml
Normal file
11
tests/qemumemlockdata/qemumemlock-pc-tcg.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<domain type='qemu'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
</devices>
|
||||
</domain>
|
||||
@@ -0,0 +1,20 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memtune>
|
||||
<hard_limit unit='KiB'>2097152</hard_limit>
|
||||
</memtune>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<driver name='vfio'/>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x04' slot='0x02' function='0x0'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
</devices>
|
||||
</domain>
|
||||
@@ -0,0 +1,23 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memtune>
|
||||
<hard_limit unit='KiB'>2097152</hard_limit>
|
||||
</memtune>
|
||||
<memoryBacking>
|
||||
<locked/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<driver name='vfio'/>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x04' slot='0x02' function='0x0'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
</devices>
|
||||
</domain>
|
||||
@@ -0,0 +1,17 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memtune>
|
||||
<hard_limit unit='KiB'>2097152</hard_limit>
|
||||
</memtune>
|
||||
<memoryBacking>
|
||||
<locked/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
</devices>
|
||||
</domain>
|
||||
14
tests/qemumemlockdata/qemumemlock-pseries-hardlimit.xml
Normal file
14
tests/qemumemlockdata/qemumemlock-pseries-hardlimit.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memtune>
|
||||
<hard_limit unit='KiB'>2097152</hard_limit>
|
||||
</memtune>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
</devices>
|
||||
</domain>
|
||||
17
tests/qemumemlockdata/qemumemlock-pseries-hostdev.xml
Normal file
17
tests/qemumemlockdata/qemumemlock-pseries-hostdev.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<driver name='vfio'/>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x04' slot='0x02' function='0x0'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
</devices>
|
||||
</domain>
|
||||
11
tests/qemumemlockdata/qemumemlock-pseries-kvm.xml
Normal file
11
tests/qemumemlockdata/qemumemlock-pseries-kvm.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
</devices>
|
||||
</domain>
|
||||
20
tests/qemumemlockdata/qemumemlock-pseries-locked+hostdev.xml
Normal file
20
tests/qemumemlockdata/qemumemlock-pseries-locked+hostdev.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memoryBacking>
|
||||
<locked/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
<driver name='vfio'/>
|
||||
<source>
|
||||
<address domain='0x0000' bus='0x04' slot='0x02' function='0x0'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
</devices>
|
||||
</domain>
|
||||
14
tests/qemumemlockdata/qemumemlock-pseries-locked.xml
Normal file
14
tests/qemumemlockdata/qemumemlock-pseries-locked.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<domain type='kvm'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<memoryBacking>
|
||||
<locked/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
</devices>
|
||||
</domain>
|
||||
11
tests/qemumemlockdata/qemumemlock-pseries-tcg.xml
Normal file
11
tests/qemumemlockdata/qemumemlock-pseries-tcg.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<domain type='qemu'>
|
||||
<name>guest</name>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
</devices>
|
||||
</domain>
|
||||
Reference in New Issue
Block a user