[PATCH 4/5] qemuDomainRemoveChrDevice: Deal with qemuDomainChrRemove() failure

2023-04-12 Thread Michal Privoznik
When cleaning up after removed device, qemuDomainChrRemove() is called. But this may fail, in which case we successfully ignore the failure and virDomainChrDefFree() the device anyway. While it decreases our memory consumption, it's a bit too far, especially if the next step is 'virsh dumpxml'.

[PATCH 1/5] qemuDomainChrInsertPreAlloced: Fix adding implicit console

2023-04-12 Thread Michal Privoznik
When hotpluging a device, we might need to add a device with it (because of some crazy backcompat). Now, hotplugging is done in several phases. In one of them, qemuDomainChrPreInsert() allocates space for both devices, and then qemuDomainChrInsertPreAlloced() actually inserts the device into

[PATCH 3/5] qemuAssignDeviceChrAlias: Fix a crasher during hotplug

2023-04-12 Thread Michal Privoznik
For a running guest, a device can be hotunplugged. This will then remove also aliased . Trying to hotplug a device then, libvirtd crashed because it dereferences def->consoles while there's none. Fixes: 42d53ac799a1d7f1414737caa4deb73871876992 Signed-off-by: Michal Privoznik ---

[PATCH 2/5] qemuDomainChrRemove: Don't leak vmdef->consoles[0]

2023-04-12 Thread Michal Privoznik
When removing the compat console from domain defintion, removing it from the vmdef->consoles array is good, but not sufficient. The console definition might have been fully allocated (after daemon restarted and reloaded the status XML). Use virDomainChrDefFree() to free also the definition.

[PATCH 5/5] qemu_hotplug: Deny live detach of

2023-04-12 Thread Michal Privoznik
I've tried, then I've tried even harder, but still wasn't able to make sense of our console backcompat code in all its fine details. Since I value my sanity, let's just forbid hotunplug of , especially since detaching of corresponding works. Signed-off-by: Michal Privoznik ---

[PATCH 0/5] qemu: Fix chardev hotplug and deny live detach

2023-04-12 Thread Michal Privoznik
While trying to make live detach of work, I've accumulated couple of patches. The most reasonable ones made it into this patch set as paches 1-4. And after nearly losing my sanity, I've decided it's not worth supporting live detach of since works just fine. And that's what patch 5 does. If

Re: [PATCH] conf: Introduce igb model for

2023-04-12 Thread Michal Prívozník
On 4/10/23 07:48, Akihiko Odaki wrote: > igb is a new network device which will be introduced with QEMU 8.0.0. > It is a successor of e1000e so it has PCIe interface and is understands > virtio-net headers as e1000e does. > > Signed-off-by: Akihiko Odaki > --- > src/conf/domain_conf.c |

Re: [PATCH 1/3] util: Introduce virAcpi module

2023-04-12 Thread Andrea Bolognani
On Wed, Apr 12, 2023 at 12:37:39PM +0200, Jiri Denemark wrote: > On Thu, Apr 06, 2023 at 02:20:31 -0700, Andrea Bolognani wrote: > > On Thu, Apr 06, 2023 at 10:20:46AM +0200, Michal Prívozník wrote: > > > On 4/5/23 19:21, Andrea Bolognani wrote: > > > > On Wed, Apr 05, 2023 at 01:30:17PM +0200,

Re: [libvirt PATCH 2/2] conf: Fix migration in some firmware autoselection scenarios

2023-04-12 Thread Ján Tomko
On a Wednesday in 2023, Andrea Bolognani wrote: On Wed, Apr 12, 2023 at 04:52:16AM -0700, Andrea Bolognani wrote: On Wed, Apr 12, 2023 at 12:55:51PM +0200, Ján Tomko wrote: > On a Tuesday in 2023, Andrea Bolognani wrote: > > static int > > virDomainDefParseBootFirmwareOptions(virDomainDef *def,

Re: [PATCH] conf: Introduce igb model for

2023-04-12 Thread Akihiko Odaki
On 2023/04/13 1:23, Michal Prívozník wrote: On 4/10/23 07:48, Akihiko Odaki wrote: igb is a new network device which will be introduced with QEMU 8.0.0. It is a successor of e1000e so it has PCIe interface and is understands virtio-net headers as e1000e does. Signed-off-by: Akihiko Odaki ---

Re: [libvirt PATCH 2/2] conf: Fix migration in some firmware autoselection scenarios

2023-04-12 Thread Andrea Bolognani
On Wed, Apr 12, 2023 at 04:52:16AM -0700, Andrea Bolognani wrote: > On Wed, Apr 12, 2023 at 12:55:51PM +0200, Ján Tomko wrote: > > On a Tuesday in 2023, Andrea Bolognani wrote: > > > static int > > > virDomainDefParseBootFirmwareOptions(virDomainDef *def, > > > -

Re: [libvirt PATCH v4] Conf: Move validation of virDomainGraphicsListenDef out of Parser

2023-04-12 Thread Michal Prívozník
On 4/6/23 18:23, K Shiva wrote: > From: K Shiva Kiran > > In an effort to separate the validation steps from the Parse stage, > a few validation checks of virDomainGraphicsListenDef have been moved from > virDomainGraphicsListenDefParseXML() in domain_conf.c to >

Re: [libvirt PATCH 2/2] conf: Fix migration in some firmware autoselection scenarios

2023-04-12 Thread Ján Tomko
On a Tuesday in 2023, Andrea Bolognani wrote: Introduce a small kludge in the parser to avoid unnecessarily blocking incoming migration from a range of recent libvirt releases. https://bugzilla.redhat.com/show_bug.cgi?id=2184966 Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c

Re: [libvirt PATCH 2/2] conf: Fix migration in some firmware autoselection scenarios

2023-04-12 Thread Andrea Bolognani
On Wed, Apr 12, 2023 at 12:55:51PM +0200, Ján Tomko wrote: > On a Tuesday in 2023, Andrea Bolognani wrote: > > static int > > virDomainDefParseBootFirmwareOptions(virDomainDef *def, > > - xmlXPathContextPtr ctxt) > > +

[PATCH] conf: Introduce igb model for

2023-04-12 Thread Akihiko Odaki
igb is a new network device which will be introduced with QEMU 8.0.0. It is a successor of e1000e so it has PCIe interface and is understands virtio-net headers as e1000e does. Signed-off-by: Akihiko Odaki --- src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 +

Re: [PATCH 1/3] util: Introduce virAcpi module

2023-04-12 Thread Jiri Denemark
On Thu, Apr 06, 2023 at 02:20:31 -0700, Andrea Bolognani wrote: > On Thu, Apr 06, 2023 at 10:20:46AM +0200, Michal Prívozník wrote: > > On 4/5/23 19:21, Andrea Bolognani wrote: > > > On Wed, Apr 05, 2023 at 01:30:17PM +0200, Michal Privoznik wrote: > > >> +if (nodeHeader->len <

Re: [libvirt PATCH 1/2] tests: Tweak input file

2023-04-12 Thread Ján Tomko
On a Tuesday in 2023, Andrea Bolognani wrote: The canonical order for child elements is then . Signed-off-by: Andrea Bolognani --- tests/qemuxml2argvdata/firmware-manual-efi-features.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc

Re: [PATCH] qemu-options.hx: Update descriptions of memory options for NUMA node

2023-04-12 Thread Yohei Kojima
ping This patch updates an outdated description in qemu-options.hx . The patch reflects the changes in qemu behavior already described in another documentation, and it also changes paragraph structure for further readability. The original patch is:

Re: [PATCH] qemu: Fix potential crash during driver cleanup

2023-04-12 Thread Martin Kletzander
On Tue, Apr 11, 2023 at 09:47:28AM -0600, Jim Fehlig wrote: During qemu driver shutdown, objects are freed in qemuStateCleanup that could still be used by active worker threads, resulting in crashes. E.g. a worker thread could be processing a monitor EOF event after the security manager is