mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
qemu: Implement GIC
The only version that's supported in QEMU is version 2, currently. Fortunately, it is enabled by aarch64 automatically, so there's nothing for us that needs to be put onto command line. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
921c52b0db
commit
608c95c76c
@ -7202,6 +7202,19 @@ qemuBuildCpuArgStr(virQEMUDriverPtr driver,
|
||||
have_cpu = true;
|
||||
}
|
||||
|
||||
if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON) {
|
||||
if (def->gic_version && def->gic_version != 2) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("gic version '%u' is not supported"),
|
||||
def->gic_version);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* There's no command line argument currently to turn on/off GIC. It's
|
||||
* done automatically by qemu-system-aarch64. But if this changes, lets
|
||||
* put the code here. */
|
||||
}
|
||||
|
||||
if (virBufferCheckError(&buf) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
6
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.args
Normal file
6
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.args
Normal file
@ -0,0 +1,6 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu-system-aarch64 -S -M virt -no-kvm -cpu cortex-a53 -m 1024 -smp 1 \
|
||||
-nographic -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -boot c \
|
||||
-kernel /aarch64.kernel -initrd /aarch64.initrd -append console=ttyAMA0 -usb \
|
||||
-net nic,macaddr=52:54:00:09:a4:37,vlan=0,model=virtio,name=net0 \
|
||||
-net user,vlan=0,name=hostnet0
|
26
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml
Normal file
26
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<domain type="qemu">
|
||||
<name>aarch64test</name>
|
||||
<uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
|
||||
<memory>1048576</memory>
|
||||
<currentMemory>1048576</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<features>
|
||||
<acpi/>
|
||||
<gic version='2'/>
|
||||
</features>
|
||||
<cpu match='exact'>
|
||||
<model>cortex-a53</model>
|
||||
</cpu>
|
||||
<os>
|
||||
<type arch="aarch64" machine="virt">hvm</type>
|
||||
<kernel>/aarch64.kernel</kernel>
|
||||
<initrd>/aarch64.initrd</initrd>
|
||||
<cmdline>console=ttyAMA0</cmdline>
|
||||
</os>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
<interface type='user'>
|
||||
<mac address='52:54:00:09:a4:37'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
@ -1541,6 +1541,8 @@ mymain(void)
|
||||
DO_TEST("aarch64-cpu-model-host", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE,
|
||||
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
||||
QEMU_CAPS_CPU_HOST, QEMU_CAPS_KVM);
|
||||
DO_TEST("aarch64-gic", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE,
|
||||
QEMU_CAPS_KVM);
|
||||
|
||||
DO_TEST("kvm-pit-device", QEMU_CAPS_KVM_PIT_TICK_POLICY);
|
||||
DO_TEST("kvm-pit-delay", QEMU_CAPS_NO_KVM_PIT);
|
||||
|
Loading…
Reference in New Issue
Block a user