[PATCH v2 4/4] qemu: add support for 'multidevs' option

Ján Tomko jtomko at redhat.com
Mon Mar 30 14:45:08 UTC 2020


On a Monday in 2020, Christian Schoenebeck wrote:
>On Freitag, 27. März 2020 18:16:37 CEST Ján Tomko wrote:
>> On a Friday in 2020, Christian Schoenebeck wrote:
>> >This option prevents misbehaviours on guest if a qemu 9pfs export
>> >contains multiple devices, due to the potential file ID collisions
>> >this otherwise may cause.
>> >
>> >Signed-off-by: Christian Schoenebeck <qemu_oss at crudebyte.com>
>> >---
>> >
>> > src/qemu/qemu_command.c |  7 +++++++
>> > src/qemu/qemu_domain.c  | 12 ++++++++++++
>> > 2 files changed, 19 insertions(+)
>>
>> A change to qemuxml2argvtest is needed.
>>
>> If you already added the XML file to qemuxml2argvdata in the previous
>> commit, all you need to to to generate the output file is:
>> * add a new DO_TEST_CAPS_LATEST line to qemuxml2argvtest.c
>
>Looking at the existing test cases, it probably makes sense to extend
>qemuxml2argvdata/virtio-options.xml instead of adding a separate XML file,
>that is:

That one is aiming at testing the iommu and ats options common for
virtio devices.

The 'fs9p' test would be a better candidate for adding these,
but I'd still rather add a new file - to show that the command line
for the old config remains unchanged.

Jano

>
>diff --git a/tests/qemuxml2argvdata/virtio-options.xml b/tests/
>qemuxml2argvdata/virtio-options.xml
>index dd9a4f4a01..7ea624dfad 100644
>--- a/tests/qemuxml2argvdata/virtio-options.xml
>+++ b/tests/qemuxml2argvdata/virtio-options.xml
>@@ -47,6 +47,21 @@
>       <target dir='fs2'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
>function='0x0'/>
>     </filesystem>
>+    <filesystem type='mount' accessmode='mapped' multidevs='remap'>
>+      <source dir='/export/fs3'/>
>+      <target dir='fs3'/>
>+      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
>function='0x0'/>
>+    </filesystem>
>+    <filesystem type='mount' accessmode='mapped' multidevs='forbid'>
>+      <source dir='/export/fs4'/>
>+      <target dir='fs4'/>
>+      <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
>function='0x0'/>
>+    </filesystem>
>+    <filesystem type='mount' accessmode='mapped' multidevs='warn'>
>+      <source dir='/export/fs5'/>
>+      <target dir='fs5'/>
>+      <address type='pci' domain='0x0000' bus='0x00' slot='0x13'
>function='0x0'/>
>+    </filesystem>
>     <interface type='user'>
>       <mac address='52:54:56:58:5a:5c'/>
>       <model type='virtio'/>
>
>> * run the test with VIR_TEST_REGENERATE_OUTPUT=1
>
>Ah, that's the one! :) I was already wondering whether other people are auto
>generating the files I manually changed so far.
>
>I'll post a rebased v3 with the things discussed so far. Thanks Ján!
>
>Best regards,
>Christian Schoenebeck
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200330/41e87b27/attachment-0001.sig>


More information about the libvir-list mailing list