[libvirt] [PATCH v5 02/16] qemu: Introduce qemuDomainDeviceDefValidateControllerAttributes

Ján Tomko jtomko at redhat.com
Mon Jan 29 17:53:41 UTC 2018

On Mon, Jan 29, 2018 at 12:43:14PM -0500, John Ferlan wrote:
>On 01/29/2018 04:18 AM, Ján Tomko wrote:
>> On Fri, Jan 05, 2018 at 06:47:25PM -0500, John Ferlan wrote:
>>> Move the checks that various attributes are not set on any controller
>>> other than SCSI controller using virtio-scsi model into the common
>>> controller validate checks.
>>> Need to also add a qemuDomainResetSCSIControllerModel call in order
>>> to ensure we get the "right" SCSI model if it's not set by default
>>> since it wouldn't be set during post parse processing.
>> So we should set it in post-parse processing once instead of adding this
>> second call.
>> Jan
>This is a point you raised in v3:
>to which I responded:
>and even carried into my v4:
>So, now that we're here again - the question becomes, do we really want
>post parse processing to set a default model if it's not set?

Yes, the used model should be recorded in the XML.

>that be part of this series? Should it be a followup? Should be
>something done before this one and then rework this one?

Ideally a prerequisite. If that's too much yak shaving for you,
at least add a comment to the validate function saying picking a default
model really does not belong in a validation function.

>Are there drawbacks to doing so?  One drawback that I kept coming back
>to is that LSI becomes the default qemu model instead of VIRTIO-SCSI
>(it's the order of setting *model in qemuDomainSetSCSIControllerModel).

When was virtio-scsi the default model? Now we'd just record the
picked default in XML.


>That drawback caused problems when setting the model if we create a new
>SCSI controller during something like hotplug because we had already
>filled the current controller or when adding one VIRTIO-SCSI controller
>but more than 7 disks (or hostdevs) that end up using that controller.
>Although I think that's at least partially resolved by other changes
>I've already made.
>Tks -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180129/db5cbb70/attachment-0001.sig>

More information about the libvir-list mailing list