[PATCH v2] virsh: Require --xpath for *dumpxml

2022-07-08 Thread Michal Privoznik
Historically, the dumpxml command reject any unknown arguments, for instance: virsh dumpxml fedora xxx However, after v8.5.0-rc1~31 the second argument ('xxx') is treated as an XPath, but it's not that clearly visible. Therefore, require the --xpath switch, like this: virsh dumpxml fedor

[PATCH] vircpi: Add PCIe 5.0 and 6.0 link speeds

2022-07-08 Thread Michal Privoznik
The PCIe 5.0 and PCIe 6.0 standards define new link speeds: 32GT/s and 64GT/s, respectively. Update our internal enum to include these new speeds. Otherwise we format incorrect XML: Like all "good" specifications, these are also locked behind a login portal. But we can look at pci

Re: [PATCH] virsh: Require --xpath for dumpxml

2022-07-08 Thread Daniel P . Berrangé
On Fri, Jul 08, 2022 at 01:58:08PM +0200, Michal Prívozník wrote: > On 7/8/22 13:23, Daniel P. Berrangé wrote: > > On Fri, Jul 08, 2022 at 12:49:13PM +0200, Michal Privoznik wrote: > >> Historically, the dumpxml command reject any unknown arguments, > >> for instance: > >> > >> virsh dumpxml fe

Re: [PATCH] virsh: Require --xpath for dumpxml

2022-07-08 Thread Michal Prívozník
On 7/8/22 13:23, Daniel P. Berrangé wrote: > On Fri, Jul 08, 2022 at 12:49:13PM +0200, Michal Privoznik wrote: >> Historically, the dumpxml command reject any unknown arguments, >> for instance: >> >> virsh dumpxml fedora xxx >> >> However, after v8.5.0-rc1~31 the second argument ('xxx') is >>

Re: [PATCH] virsh: Require --xpath for dumpxml

2022-07-08 Thread Daniel P . Berrangé
On Fri, Jul 08, 2022 at 12:49:13PM +0200, Michal Privoznik wrote: > Historically, the dumpxml command reject any unknown arguments, > for instance: > > virsh dumpxml fedora xxx > > However, after v8.5.0-rc1~31 the second argument ('xxx') is > treated as an XPath, but it's not that clearly vis

[PATCH] virsh: Require --xpath for dumpxml

2022-07-08 Thread Michal Privoznik
Historically, the dumpxml command reject any unknown arguments, for instance: virsh dumpxml fedora xxx However, after v8.5.0-rc1~31 the second argument ('xxx') is treated as an XPath, but it's not that clearly visible. Therefore, require the --xpath switch, like this: virsh dumpxml fedor

[PATCH] qemu: support hotplug cdrom with usb/scsi bus

2022-07-08 Thread minglei.liu
Qemu support hotplug cdrom device with usb or scsi bus, just unblock these devices in qemuDomainAttachDeviceDiskLiveInternal and qemuDomainDetachPrepDisk. Fixes: #261 Signed-off-by: minglei.liu --- src/qemu/qemu_hotplug.c | 13 +++- tests/qemuhotplugtest.c

[PATCH 4/5] qemuDomainSetIOThreadParams: Accept VIR_DOMAIN_AFFECT_CONFIG flag

2022-07-08 Thread Michal Privoznik
It was always possible to modify the inactive XML, because VIR_DOMAIN_AFFECT_CURRENT (= 0) is accepted implicitly. But now that the logic when changing both config and live XMLs is more robust we can accept VIR_DOMAIN_AFFECT_CONFIG flag too. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driv

[PATCH 3/5] qemu: Make IOThread changing more robust

2022-07-08 Thread Michal Privoznik
There are three APIs that allow changing IOThreads: virDomainAddIOThread() virDomainDelIOThread() virDomainSetIOThreadParams() In case of QEMU driver these are handled by qemuDomainChgIOThread() which attempts to be versatile enough to work on both inactive and live domain definitions at th

[PATCH 0/5] Follow up fixes for IOThreads

2022-07-08 Thread Michal Privoznik
Couple of issues were found with my recent work on IOThread and its pool size limits. Here are fixes. Michal Prívozník (5): domain_conf: Format more often domain_conf: Format iothread IDs more often qemu: Make IOThread changing more robust qemuDomainSetIOThreadParams: Accept VIR_DOMAIN_AF

[PATCH 5/5] virsh: Implement --config for iothreadset

2022-07-08 Thread Michal Privoznik
Our man page already documents that iothreadset has --config argument. Well, it doesn't really. Normally, I'd just fix the man page, but with recent work on the API it's possible to tweak values for inactive XML too. Therefore, implement the --config argument for the command. Signed-off-by: Michal

[PATCH 2/5] domain_conf: Format iothread IDs more often

2022-07-08 Thread Michal Privoznik
When formatting IOThreads (in virDomainDefIOThreadsFormat()), we may only output the number of IOThreads, or the full list of IOThreads too: 4 Now, the deciding factor here is whether those individual IOThreads were so called 'autofill-ed' or user provided. Well, we ne

[PATCH 1/5] domain_conf: Format more often

2022-07-08 Thread Michal Privoznik
The element is formatted inside virDomainDefaultIOThreadDefFormat() which is called only from virDomainDefIOThreadsFormat() (so that IOThread related stuff is formatted calling one function). However, when there are no defined (or only autoallocated ones are present), then the outer formatting fu