Re: [PATCH] qemuDomainAttachDeviceLive: Check provided disk address

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

 



On 25.09.2015 11:36, Martin Kletzander wrote:
> On Thu, Sep 24, 2015 at 05:43:08PM +0200, Michal Privoznik wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1257844
>>
>> Imagine an user who is trying to attach a disk to a domain with
>> the following XML:
>>
>>  <disk type='block' device='disk'>
>>    <driver name='qemu' type='raw'/>
>>    <source dev='/dev/sr0'/>
>>    <target dev='vde' bus='virtio'/>
>>    <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>>  </disk>
>>
>> The XML is obviously wrong. It's trying to attach a virtio disk
>> onto non-PCI bus. We should forbid that.
>>
>> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
>> ---
>> src/qemu/qemu_hotplug.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
> 
> How come this is not handled in qemuDomainAssignAddresses(), it
> doesn't get called?  There's a check for exactly that in
> qemuAssignDevicePCISlots().

Exactly! qemuAssignDevicePCISlots() is called only in case of --config.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



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