Re: [PATCH libvirt v1] conf: verify for duplicate hostdevs

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

 



On 7/1/21 10:31 AM, Shalini Chellathurai Saroja wrote:
> 
> On 6/30/21 4:49 PM, Michal Prívozník wrote:
>> On 6/18/21 12:46 PM, Shalini Chellathurai Saroja wrote:
>>> It is possible to define/edit(in shut off state) a domain XML with
>>> same hostdev device repeated more than once, as shown below. This
>>> behavior is not expected. So, this patch fixes it.
>>>
>>> vser1:
>>> <domain type='kvm'>
>>> [...]
>>>    <devices>
>>>   [...]
>>>      <hostdev mode='subsystem' type='mdev' managed='no'
>>> model='vfio-ccw'>
>>>        <source>
>>>          <address uuid='8e782fea-e5f4-45fa-a0f9-024cf66e5009'/>
>>>        </source>
>>>        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0005'/>
>>>      </hostdev>
>>>      <hostdev mode='subsystem' type='mdev' managed='no'
>>> model='vfio-ccw'>
>>>        <source>
>>>          <address uuid='8e782fea-e5f4-45fa-a0f9-024cf66e5009'/>
>>>        </source>
>>>        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0006'/>
>>>      </hostdev>
>>> [...]
>>>    </devices>
>>> </domain>
>>>
>>> $ virsh define vser1
>>> Domain 'vser1' defined from vser1
>>>
>>> Signed-off-by: Shalini Chellathurai Saroja <shalini@xxxxxxxxxxxxx>
>>> Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxx>
>>> Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx>
>>> ---
>>>   src/conf/domain_conf.c                        |  2 +-
>>>   src/conf/domain_conf.h                        |  2 +
>>>   src/conf/domain_validate.c                    | 21 ++++++++++
>>>   src/libvirt_private.syms                      |  1 +
>>>   .../hostdev-mdev-duplicate.err                |  1 +
>>>   .../hostdev-mdev-duplicate.xml                | 41 +++++++++++++++++++
>>>   .../hostdev-pci-duplicate.err                 |  1 +
>>>   .../hostdev-pci-duplicate.xml                 | 40 ++++++++++++++++++
>>>   .../hostdev-scsi-duplicate.err                |  1 +
>>>   .../hostdev-scsi-duplicate.xml                | 40 ++++++++++++++++++
>>>   .../hostdev-usb-duplicate.err                 |  1 +
>>>   .../hostdev-usb-duplicate.xml                 | 40 ++++++++++++++++++
>>>   tests/qemuxml2argvtest.c                      |  8 ++++
>>>   13 files changed, 198 insertions(+), 1 deletion(-)
>>>   create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-duplicate.err
>>>   create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-duplicate.xml
>>>   create mode 100644 tests/qemuxml2argvdata/hostdev-pci-duplicate.err
>>>   create mode 100644 tests/qemuxml2argvdata/hostdev-pci-duplicate.xml
>>>   create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-duplicate.err
>>>   create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-duplicate.xml
>>>   create mode 100644 tests/qemuxml2argvdata/hostdev-usb-duplicate.err
>>>   create mode 100644 tests/qemuxml2argvdata/hostdev-usb-duplicate.xml

<snip/>

>> So let's do the following, I'll merge it
>> tomorrow, after the release so that we give users the longest window
>> possible to complain.
>>
>> Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ok, thank you Michal.

Pushed now.

Michal




[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]

  Powered by Linux