Re: [PATCH v4] vfio/pci: Propagate ACPI notifications to user-space via eventfd

2023-05-25 Thread Alex Williamson
On Mon, 22 May 2023 16:58:11 + Grzegorz Jaszczyk wrote: > To allow pass-through devices receiving ACPI notifications, permit to > register ACPI notify handler (via VFIO_DEVICE_SET_IRQS) for a given > device. The handler role is to receive and propagate such ACPI > notifications to the user-sp

Re: [PATCH v5 04/10] scripts/qapi: document the tool that generated the file

2023-05-25 Thread Stefan Hajnoczi
On Wed, May 24, 2023 at 02:39:46PM +0100, Alex Bennée wrote: > This makes it a little easier for developers to find where things > where being generated. > > Reviewed-by: Richard Henderson > Signed-off-by: Alex Bennée > Message-Id: <20230523125000.3674739-5-alex.ben...@linaro.org> > --- > scrip

Re: [PATCH 03/18] virRaiseErrorLog: Don't skip error printing when enabling debug logging env variable

2023-05-25 Thread Jonathon Jongsma
On 5/25/23 10:13 AM, Peter Krempa wrote: When a user requests debug logging by setting the environment variable: LIBVIRT_DEBUG=1 we should log any errors regardless of the setting of e.g. 'LIBVIRT_LOG_OUTPUTS' as the code will log every 'debug' and 'info' level message to stderr but will skip '

[PATCH 18/18] testQEMUSchemaValidateObjectMember: validate QMP object member deprecation

2023-05-25 Thread Peter Krempa
The QMP schema validator wasn't adapted to consider features of 'object' members and thus we didn't catch the deprecation of 'device' in 'block_set_io_throttle'. Signed-off-by: Peter Krempa --- tests/testutilsqemuschema.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/testutilsqem

[PATCH 13/18] qemuDiskConfigBlkdeviotuneEnabled: Make 'disk' argument const

2023-05-25 Thread Peter Krempa
The function doesn't modify it. Fix the argument declaration so that the function can be used in a context where we have a 'const' disk definition. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_command.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) di

Re: [libvirt PATCH 2/2] sync_qemu_models_i386.py: Add missing features

2023-05-25 Thread Michal Prívozník
On 5/24/23 13:00, Tim Wiederhake wrote: > This brings the tool's list of features in sync with qemu > commit 886c0453cbf10eebd42a9ccf89c3e46eb389c357. > > Signed-off-by: Tim Wiederhake > --- > src/cpu_map/sync_qemu_models_i386.py | 8 > 1 file changed, 8 insertions(+) > > diff --git a/

[PATCH 17/18] qemuMonitorSetBlockIoThrottle: Drop 'diskalias' argument

2023-05-25 Thread Peter Krempa
Every caller will pass 'qdevid' as it's populated in the data madatorily with qemu-4.2 and onwards due to mandatory -blockdev use. Thus we can drop compatibility with the old way of matching the disk via alias. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 13 +++-- src/

[PATCH 14/18] qemu: Refuse setting for 'SD' disks

2023-05-25 Thread Peter Krempa
Historically this didn't work with any supported qemu version as we don't set the alias of the device, and thus qemu uses a different alias resulting in a failure to startup the VM: internal error: unable to execute QEMU command 'block_set_io_throttle': Device 'drive-sd-disk0' not found Refuse

[PATCH 11/18] Drop unused qemuMonitorTestAddItemParams

2023-05-25 Thread Peter Krempa
Using qemuMonitorTestAddItemVerbatim is more universal and that helper also does QMP schema validation. Remove the now unused helper. Signed-off-by: Peter Krempa --- tests/qemumonitortestutils.c | 132 --- tests/qemumonitortestutils.h | 7 -- 2 files changed, 13

[PATCH 08/18] testQemuAgentFSTrim: Rewrite using qemuMonitorTestAddItemVerbatim

2023-05-25 Thread Peter Krempa
Replace qemuMonitorTestAddItemParams by qemuMonitorTestAddItemVerbatim Signed-off-by: Peter Krempa --- tests/qemuagenttest.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c index 04faf7b83a..3c24a3139f 100644 --- a/tests/

[PATCH 10/18] testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle: Rewrite using qemuMonitorTestAddItemVerbatim

2023-05-25 Thread Peter Krempa
Replace qemuMonitorTestAddItemParams by qemuMonitorTestAddItemVerbatim Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 49 +++-- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c

[PATCH 04/18] testQemuMonitorJSONAttachChardev: Move all setup code under virTestRun

2023-05-25 Thread Peter Krempa
Any failure which happens outside is hard to debug as errors will be reset and not raised. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 60 ++--- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/q

[PATCH 00/18] QMP schema validation fixes

2023-05-25 Thread Peter Krempa
Turns out we still had wired up use of 'device' argument of block_set_io_throttle which got deprecated and our valiator didn't catch it due to multiple reasons. Address all of that. Peter Krempa (18): qemuMonitorTestAddItemVerbatim: Simplify cleanup qemuMonitorTestAddHandler: Remove return val

[PATCH 02/18] qemuMonitorTestAddHandler: Remove return value

2023-05-25 Thread Peter Krempa
The function always returns 0. Remove the return value and fix callers. Signed-off-by: Peter Krempa --- tests/qemuagenttest.c| 39 -- tests/qemumonitortestutils.c | 54 +--- tests/qemumonitortestutils.h | 2 +- 3 files changed, 49

[PATCH 15/18] qemumonitorjsontest: Use 'id' instead of deprecated 'device' argument of 'block_set_io_throttle'

2023-05-25 Thread Peter Krempa
The 'device' argument is deprecated. All real usage in the qemu driver already uses 'id' as we populate the 'qomName' for everything except for SD cards where throttling didn't work with libvirt for a very long time. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 4 ++-- 1 file ch

[PATCH 09/18] testQemuMonitorJSONqemuMonitorJSONSendKeyHoldtime: Rewrite using qemuMonitorTestAddItemVerbatim

2023-05-25 Thread Peter Krempa
Replace qemuMonitorTestAddItemParams by qemuMonitorTestAddItemVerbatim Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index f6b6da372c..c

[PATCH 07/18] testQemuAgentCPU: Rewrite using qemuMonitorTestAddItemVerbatim

2023-05-25 Thread Peter Krempa
Replace qemuMonitorTestAddItemParams by qemuMonitorTestAddItemVerbatim Signed-off-by: Peter Krempa --- tests/qemuagenttest.c | 48 +-- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c index 7d8c6

[PATCH 06/18] qemuMonitorTestAddItemExpect: Remove unused helper

2023-05-25 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tests/qemumonitortestutils.c | 95 tests/qemumonitortestutils.h | 7 --- 2 files changed, 102 deletions(-) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 40ef057271..9e6da78a8b 100644 --- a/test

[PATCH 03/18] virRaiseErrorLog: Don't skip error printing when enabling debug logging env variable

2023-05-25 Thread Peter Krempa
When a user requests debug logging by setting the environment variable: LIBVIRT_DEBUG=1 we should log any errors regardless of the setting of e.g. 'LIBVIRT_LOG_OUTPUTS' as the code will log every 'debug' and 'info' level message to stderr but will skip 'error' level messages. This obviously make

[PATCH 05/18] qemuMonitorJSONTestAttachOneChardev: Rewrite using qemuMonitorTestAddItemVerbatim

2023-05-25 Thread Peter Krempa
'qemuMonitorTestAddItemExpect' doesn't do QMP schema validation. Since it's the only use we can reimplement it using 'qemuMonitorTestAddItemVerbatim' which does schema validation and remove the old code instead. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 13 +++-- 1 fi

[PATCH 16/18] qemuMonitorGetBlockIoThrottle: Drop 'diskalias' argument

2023-05-25 Thread Peter Krempa
Every caller will pass 'qdevid' as it's populated in the data madatorily with qemu-4.2 and onwards due to mandatory -blockdev use. Thus we can drop compatibility with the old way of matching the disk via alias. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 10 +- src/qem

[PATCH 12/18] qemumonitorjsontest: Drop 'schema-meta' case

2023-05-25 Thread Peter Krempa
The test case is validating the QMP schema against itself. This was useful when I was developing the validator but at this point it's no longer needed. Additionally the QMP schema has few deprecated members now, which our validator doesn't catch yet, so this test would start failing once I fix the

[PATCH 01/18] qemuMonitorTestAddItemVerbatim: Simplify cleanup

2023-05-25 Thread Peter Krempa
Reformat the JSON string before allocating the test data structure so that we don't have to free it if the reformatting fails. Signed-off-by: Peter Krempa --- tests/qemumonitortestutils.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/qemumonitortestutils

Re: [libvirt PATCH 00/15] Sync cpu features with qemu

2023-05-25 Thread Michal Prívozník
On 5/24/23 10:54, Tim Wiederhake wrote: > This brings libvirt in sync qith qemu commit > 886c0453cbf10eebd42a9ccf89c3e46eb389c357. > > Tim Wiederhake (15): > cpu_map: Add missing feature "amd-psfd" > cpu_map: Add missing feature "amx-fp16" > cpu_map: Add missing feature "auto-ibrs" > cpu_m

Re: [PATCH v5 05/10] qapi: make the vcpu parameters deprecated for 8.1

2023-05-25 Thread Alex Bennée
Markus Armbruster writes: > Alex Bennée writes: > >> I don't think I can remove the parameters directly but certainly mark >> them as deprecated. >> >> Reviewed-by: Stefan Hajnoczi >> Reviewed-by: Richard Henderson >> Reviewed-by: Philippe Mathieu-Daudé >> Signed-off-by: Alex Bennée >> Mes

Re: [PATCH v5 05/10] qapi: make the vcpu parameters deprecated for 8.1

2023-05-25 Thread Markus Armbruster
Alex Bennée writes: > I don't think I can remove the parameters directly but certainly mark > them as deprecated. > > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Richard Henderson > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Alex Bennée > Message-Id: <20230523125000.3674739-6-alex.b

Re: [PATCH v5 04/10] scripts/qapi: document the tool that generated the file

2023-05-25 Thread Markus Armbruster
Alex Bennée writes: > This makes it a little easier for developers to find where things > where being generated. > > Reviewed-by: Richard Henderson > Signed-off-by: Alex Bennée > Message-Id: <20230523125000.3674739-5-alex.ben...@linaro.org> > --- > scripts/qapi/gen.py | 8 ++-- > 1 file ch

Re: [PATCH 3/3] docs: Clarify values reported by virDomainMemoryStats()

2023-05-25 Thread Peter Krempa
On Wed, May 24, 2023 at 18:21:07 +0200, Michal Privoznik wrote: > I was approached by a KubeVirt developer to clarify what value > does VIR_DOMAIN_MEMORY_STAT_DISK_CACHES report, whether it's from > the guest or the host POV. And since I didn't know the answer > even after reading the docs I think

Re: [PATCH 2/3] docs: newapi.xsl: Generate overall docs for enums too

2023-05-25 Thread Peter Krempa
On Wed, May 24, 2023 at 18:21:06 +0200, Michal Privoznik wrote: > There are/can be overall docs for enums (e.g. > virDomainModificationImpact) not just individual values. But > these never make it into the generated HTML which is a bit > unfortunate as they can contain valuable information for user

Re: [PATCH 1/3] docs: newapi.xsl: Generate docs on generic typedefs

2023-05-25 Thread Peter Krempa
On Wed, May 24, 2023 at 18:21:05 +0200, Michal Privoznik wrote: > We have plenty of generic typedefs (that basically just alias a > struct, or our popular virXXXPtr). Because we do not generate > HTML docs for it, the documentation is placed at random places, > e.g.: comment from virDomainPtr typed