On Tue, Feb 12, 2019 at 02:44:05PM +0000, Nikolay Shirokovskiy wrote:
On 12.02.2019 17:37, Ján Tomko wrote:
> On Thu, Feb 07, 2019 at 02:31:47PM +0300, Nikolay Shirokovskiy wrote:
>> Diff from v1 [1]:
>> =================
>> - expose the device as serial device instead of channel in config
>>
>> I use isa-debugcon name becase libvirt passes these names to qemu as-is
>> so I don't want to make exception for this device.
>>
>
> There should be no pressure to maintain the 1:1 mapping.
> For QEMU, the devices need to be represented in single namespace, so
> they have to include the bus. In libvirt, we already have the serial
> type and the <address> element. It does not have to be duplicated in the
> model name as well.
>
Yeah. But we already have models like isa-serial, usb-serial etc. And thus
we don't need map libvirt models to qemu models i.e. internally
we use virDomainChrSerialTargetModelTypeToString to generates names for
qemu. It would be odd if I start to use map just for debugcon now.
My point is that the internal implementation is not relevant here
(we do map XML attributes to QEMU devices elsewhere, see
qemuDeviceVideo), it's the XML that matters.
The 'usb-serial', 'pci-serial', 'isa-serial' models are all a
generic
repetition of the target type, all of those are IMO better than
<model name='serial'/> or <model name='generic'/>
However
<target type='isa-serial'>
<model name='debugcon'/>
</target>
looks better to me than
<target type='isa-serial'>
<model name='isa-debugcon'/>
</target>
Jano
Nikolay