Re: libvirt-guests configurability regression

2022-11-08 Thread Laszlo Ersek
On 11/08/22 19:07, Andrea Bolognani wrote:
> On Tue, Nov 08, 2022 at 04:58:37PM +0100, Olaf Hering wrote:
>> Tue, 8 Nov 2022 08:46:34 +0100 Laszlo Ersek :
>>> Can you at least include the previously shipped *documented* config file
>>> as a template in a contrib or docs directory or something?
>>
>> This is up to the maintainers of libvirt.git to decide.
>>
>> If I were in charge, nothing would be installed into /etc.
>> What needs to go there, in case it is required, is already reasonably well 
>> documented.
> 
> Laszlo,
> 
> I feel your frustration.
> 
> I don't think a revert to the previous situation is going to happen,
> because there are some real advantages resulting from not shipping
> admin-owned files in our packages.
> 
> That said, the current situation is clearly not ideal either, so
> let's try to find a way to make things at least a bit better :)
> 
> I think a reasonable compromise would be to add
> 
>   Environment=URIS="default"
>   Environment=ON_BOOT="start"
>   ...
> 
> to libvirt-guests.service. Maybe instead of having the extended
> documentation that was originally in the defaults file we could have
> a shorter, one-line version? Maybe a pointer to the manual page?
> 
> Whatever comments we put there will show up when running 'systemctl
> edit libvirt-guests', which makes them fairly discoverable IMO.
> That's really the key point, because even today you can change the
> behavior both with a defaults file and a systemd unit override.
> 
> What do you think? Would that work for you?

I'd prefer an (otherwise initially inactive) file somewhere in the
distribution that followed the style of (say) "/etc/libvirt/qemu.conf".
I could copy that in-place, and then edit it.

If this still counts as duplication, then let's stick with the status quo.

Thanks,
Laszlo



Re: libvirt-guests configurability regression

2022-11-08 Thread Laszlo Ersek
On 11/08/22 18:36, Daniel P. Berrangé wrote:
> On Tue, Nov 08, 2022 at 08:46:34AM +0100, Laszlo Ersek wrote:
>> On 11/07/22 18:01, Olaf Hering wrote:
>>> Mon, 7 Nov 2022 14:17:00 +0100 Laszlo Ersek :
>>>
 The (a) well-documented and (b) easily editable config file
 "/etc/sysconfig/libvirt-guests" is now gone.
>>>
>>> Right, these admin-owned files are not installed anymore.
>>> The runtime code still uses the files, in case they are created by the 
>>> admin.
>>>
 The message on commit 8eb4461645c5 says,
 Remove the sysconfig file and place the current desired default into
 the service file.
>>>
>>> Yes, and right in the next paragraph the commit messages states the files
>>> are (still) recognized.
>>>
>>> As of f8b6c7e5, libvirt-guests.sh initializes some internal defaults, then
>>> it loads the admin-owned sysconfig file, in case it was created.
>>>
>>> The documentation about this specific tool (libvirt-guests(1)) states what
>>> values from  /etc/sysconfig/libvirt-guests will be recognized.
>>>
>>>
>>> While browsing various user mailing lists in the past years I often saw
>>> messages like "system was upgraded to new version, and as a result an
>>> expected file somewhere in /etc does not exist anymore. What now?".
>>> Apparently some folks expect files to be present before they can be edited.
>>> In my experience it is always possible to create the required files and
>>> fill them with the desired content, based on available documentation.
>>
>> It's obviously possible; the question is how comfortable it is, how much
>> time the user now needs to spend on something that used to be much
>> easier / faster before.
>>
>> Can you at least include the previously shipped *documented* config file
>> as a template in a contrib or docs directory or something?
> 
> That would just be duplicating information already provideed in the
> manpage, where there is much more detailed description, so I don't
> think that would be useful.

The following files:

/etc/libvirt/libvirt-admin.conf
/etc/libvirt/libvirt.conf
/etc/libvirt/libvirtd.conf
/etc/libvirt/libxl.conf
/etc/libvirt/libxl-lockd.conf
/etc/libvirt/lxc.conf
/etc/libvirt/qemu.conf
/etc/libvirt/qemu-lockd.conf
/etc/libvirt/virtinterfaced.conf
/etc/libvirt/virtlockd.conf
/etc/libvirt/virtlogd.conf
/etc/libvirt/virtlxcd.conf
/etc/libvirt/virtnetworkd.conf
/etc/libvirt/virtnodedevd.conf
/etc/libvirt/virtnwfilterd.conf
/etc/libvirt/virtproxyd.conf
/etc/libvirt/virtqemud.conf
/etc/libvirt/virtsecretd.conf
/etc/libvirt/virtstoraged.conf
/etc/libvirt/virtvboxd.conf
/etc/libvirt/virtxend.conf

all exist out of the box too, and follow the style that I'm requesting
(= they are heavily documented in-line).

Laszlo



[PATCH] maint: fix "mixing declarations and code" errors

2022-11-08 Thread Roman Bogorodskiy
clang 14.0.5 complains:

../src/bhyve/bhyve_device.c:42:29: error: mixing declarations and code
is incompatible with standards before C99
[-Werror,-Wdeclaration-after-statement]
virDomainPCIAddressSet *addrs = opaque;
^
1 error generated.

And a few similar errors in some other places, mainly bhyve related.
Apply a trivial fix to resolve that.

Signed-off-by: Roman Bogorodskiy 
---
 src/bhyve/bhyve_device.c|  6 --
 tests/bhyvexml2argvmock.c   |  4 ++--
 tests/domaincapstest.c  |  3 ++-
 tests/networkxml2conftest.c | 16 +---
 4 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/src/bhyve/bhyve_device.c b/src/bhyve/bhyve_device.c
index 5654028ca5..e4d14c4102 100644
--- a/src/bhyve/bhyve_device.c
+++ b/src/bhyve/bhyve_device.c
@@ -36,11 +36,13 @@ bhyveCollectPCIAddress(virDomainDef *def G_GNUC_UNUSED,
virDomainDeviceInfo *info,
void *opaque)
 {
+virDomainPCIAddressSet *addrs = NULL;
+virPCIDeviceAddress *addr = NULL;
 if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE)
 return 0;
 
-virDomainPCIAddressSet *addrs = opaque;
-virPCIDeviceAddress *addr = &info->addr.pci;
+addrs = opaque;
+addr = &info->addr.pci;
 
 if (addr->domain == 0 && addr->bus == 0 && addr->slot == 0) {
 return 0;
diff --git a/tests/bhyvexml2argvmock.c b/tests/bhyvexml2argvmock.c
index 9b77f97e5f..fe76564d51 100644
--- a/tests/bhyvexml2argvmock.c
+++ b/tests/bhyvexml2argvmock.c
@@ -25,10 +25,10 @@ init_syms(void)
 DIR *
 opendir(const char *path)
 {
-init_syms();
-
 g_autofree char *path_override = NULL;
 
+init_syms();
+
 if (STREQ(path, "fakefirmwaredir")) {
 path_override = g_strdup(FAKEFIRMWAREDIR);
 } else if (STREQ(path, "fakefirmwareemptydir")) {
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index b4cb1894c2..b3cf4426f3 100644
--- a/tests/domaincapstest.c
+++ b/tests/domaincapstest.c
@@ -397,8 +397,9 @@ mymain(void)
 #define DO_TEST_BHYVE(Name, Emulator, BhyveCaps, Type) \
 do { \
 g_autofree char *name = NULL; \
+struct testData data; \
 name = g_strdup_printf("bhyve_%s.x86_64", Name); \
-struct testData data = { \
+data = (struct testData) { \
 .name = name, \
 .emulator = Emulator, \
 .arch = "x86_64", \
diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c
index 726f073ddc..d18985e060 100644
--- a/tests/networkxml2conftest.c
+++ b/tests/networkxml2conftest.c
@@ -50,14 +50,16 @@ testCompareXMLToConfFiles(const char *inxml, const char 
*outconf,
 
 /* Any changes to this function ^^ should be reflected here too. */
 #ifndef __linux__
-char * tmp;
+{
+char * tmp;
 
-if (!(tmp = virStringReplace(confactual,
- "except-interface=lo0\n",
- "except-interface=lo\n")))
-goto fail;
-VIR_FREE(confactual);
-confactual = g_steal_pointer(&tmp);
+if (!(tmp = virStringReplace(confactual,
+ "except-interface=lo0\n",
+ "except-interface=lo\n")))
+goto fail;
+VIR_FREE(confactual);
+confactual = g_steal_pointer(&tmp);
+}
 #endif
 
 if (virTestCompareToFile(confactual, outconf) < 0)
-- 
2.38.0



Re: [libvirt PATCH v5 2/6] conf: switch to virXMLProp* functions for parsing video

2022-11-08 Thread Peter Krempa
On Tue, Nov 08, 2022 at 12:04:49 -0600, Jonathon Jongsma wrote:
> On 11/7/22 1:45 AM, Ján Tomko wrote:
> > On a Friday in 2022, Jonathon Jongsma wrote:
> > > In virDomainVideoModelDefParseXML(), use the virXMLProp* functions
> > > rather than reimplementing them with virXPath* functions.
> > > 
> > > Signed-off-by: Jonathon Jongsma 
> > > ---
> > > src/conf/domain_conf.c | 78 +-
> > > 1 file changed, 23 insertions(+), 55 deletions(-)
> > > 
> > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> > > index 2e153db94f..552936c8b7 100644
> > > --- a/src/conf/domain_conf.c
> > > +++ b/src/conf/domain_conf.c
> > > -    if ((heads = virXPathString("string(./@heads)", ctxt))) {
> > > -    if (virStrToLong_uip(heads, NULL, 10, &def->heads) < 0) {
> > > -    virReportError(VIR_ERR_INTERNAL_ERROR,
> > > -   _("cannot parse video heads '%s'"), heads);
> > > -    return -1;
> > > -    }
> > > -    }
> > > +    if ((rc = virXMLPropUInt(node, "heads", 10, VIR_XML_PROP_NONE,
> > > &def->heads)) < 0)
> > > +    return -1;
> > 
> > > +    else if (rc == 0)
> > > +    def->heads = 1;
> > 
> > This branch is not necessary - just like the previous code, def->heads
> > is untouched if the attribute is not present.
> 
> This is unfortunately not true. virXMLPropUInt() actually sets *result = 0
> at the very beginning of the function. So this branch is necessary unless we
> change the implementation of virXMLPropUInt().

Changing the impl is out of question, but you can factor out the
implementation and provide a version which sets the default value to
something else than 0. We have these for signed integer parsing helpers
and for enums as virXMLPropEnumDefault.



Re: libvirt-guests configurability regression

2022-11-08 Thread Olaf Hering
Tue, 8 Nov 2022 10:07:21 -0800 Andrea Bolognani :

> I think a reasonable compromise would be to add
>   Environment=URIS="default"
>   Environment=ON_BOOT="start"
> to libvirt-guests.service.

The script needs to be adjusted to recognize existing environment variables.


Olaf


pgpvjwpBXZwMm.pgp
Description: Digitale Signatur von OpenPGP


Re: libvirt-guests configurability regression

2022-11-08 Thread Andrea Bolognani
On Tue, Nov 08, 2022 at 04:58:37PM +0100, Olaf Hering wrote:
> Tue, 8 Nov 2022 08:46:34 +0100 Laszlo Ersek :
> > Can you at least include the previously shipped *documented* config file
> > as a template in a contrib or docs directory or something?
>
> This is up to the maintainers of libvirt.git to decide.
>
> If I were in charge, nothing would be installed into /etc.
> What needs to go there, in case it is required, is already reasonably well 
> documented.

Laszlo,

I feel your frustration.

I don't think a revert to the previous situation is going to happen,
because there are some real advantages resulting from not shipping
admin-owned files in our packages.

That said, the current situation is clearly not ideal either, so
let's try to find a way to make things at least a bit better :)

I think a reasonable compromise would be to add

  Environment=URIS="default"
  Environment=ON_BOOT="start"
  ...

to libvirt-guests.service. Maybe instead of having the extended
documentation that was originally in the defaults file we could have
a shorter, one-line version? Maybe a pointer to the manual page?

Whatever comments we put there will show up when running 'systemctl
edit libvirt-guests', which makes them fairly discoverable IMO.
That's really the key point, because even today you can change the
behavior both with a defaults file and a systemd unit override.

What do you think? Would that work for you?

-- 
Andrea Bolognani / Red Hat / Virtualization



Re: [libvirt PATCH v5 2/6] conf: switch to virXMLProp* functions for parsing video

2022-11-08 Thread Jonathon Jongsma

On 11/7/22 1:45 AM, Ján Tomko wrote:

On a Friday in 2022, Jonathon Jongsma wrote:

In virDomainVideoModelDefParseXML(), use the virXMLProp* functions
rather than reimplementing them with virXPath* functions.

Signed-off-by: Jonathon Jongsma 
---
src/conf/domain_conf.c | 78 +-
1 file changed, 23 insertions(+), 55 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2e153db94f..552936c8b7 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
-    if ((heads = virXPathString("string(./@heads)", ctxt))) {
-    if (virStrToLong_uip(heads, NULL, 10, &def->heads) < 0) {
-    virReportError(VIR_ERR_INTERNAL_ERROR,
-   _("cannot parse video heads '%s'"), heads);
-    return -1;
-    }
-    }
+    if ((rc = virXMLPropUInt(node, "heads", 10, VIR_XML_PROP_NONE, 
&def->heads)) < 0)

+    return -1;



+    else if (rc == 0)
+    def->heads = 1;


This branch is not necessary - just like the previous code, def->heads
is untouched if the attribute is not present.


This is unfortunately not true. virXMLPropUInt() actually sets *result = 
0 at the very beginning of the function. So this branch is necessary 
unless we change the implementation of virXMLPropUInt().




Reviewed-by: Ján Tomko 

Jano





Re: libvirt-guests configurability regression

2022-11-08 Thread Daniel P . Berrangé
On Tue, Nov 08, 2022 at 08:46:34AM +0100, Laszlo Ersek wrote:
> On 11/07/22 18:01, Olaf Hering wrote:
> > Mon, 7 Nov 2022 14:17:00 +0100 Laszlo Ersek :
> > 
> >> The (a) well-documented and (b) easily editable config file
> >> "/etc/sysconfig/libvirt-guests" is now gone.
> > 
> > Right, these admin-owned files are not installed anymore.
> > The runtime code still uses the files, in case they are created by the 
> > admin.
> > 
> >> The message on commit 8eb4461645c5 says,
> >> Remove the sysconfig file and place the current desired default into
> >> the service file.
> > 
> > Yes, and right in the next paragraph the commit messages states the files
> > are (still) recognized.
> > 
> > As of f8b6c7e5, libvirt-guests.sh initializes some internal defaults, then
> > it loads the admin-owned sysconfig file, in case it was created.
> > 
> > The documentation about this specific tool (libvirt-guests(1)) states what
> > values from  /etc/sysconfig/libvirt-guests will be recognized.
> > 
> > 
> > While browsing various user mailing lists in the past years I often saw
> > messages like "system was upgraded to new version, and as a result an
> > expected file somewhere in /etc does not exist anymore. What now?".
> > Apparently some folks expect files to be present before they can be edited.
> > In my experience it is always possible to create the required files and
> > fill them with the desired content, based on available documentation.
> 
> It's obviously possible; the question is how comfortable it is, how much
> time the user now needs to spend on something that used to be much
> easier / faster before.
> 
> Can you at least include the previously shipped *documented* config file
> as a template in a contrib or docs directory or something?

That would just be duplicating information already provideed in the
manpage, where there is much more detailed description, so I don't
think that would be useful.


With regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|



Re: libvirt-guests configurability regression

2022-11-08 Thread Olaf Hering
Tue, 8 Nov 2022 08:46:34 +0100 Laszlo Ersek :

> Can you at least include the previously shipped *documented* config file
> as a template in a contrib or docs directory or something?

This is up to the maintainers of libvirt.git to decide.

If I were in charge, nothing would be installed into /etc.
What needs to go there, in case it is required, is already reasonably well 
documented.

Olaf


pgpoxBNHmXIEK.pgp
Description: Digitale Signatur von OpenPGP


Re: [PATCH v4 0/7] qemu: tpm: Add support for migration across shared storage

2022-11-08 Thread Stefan Berger




On 11/7/22 03:31, Michal Prívozník wrote:

On 10/24/22 12:28, Stefan Berger wrote:

This series of patches adds support for migrating vTPMs across hosts whose
storage has been set up to share the directory structure holding the state
of the TPM (swtpm). The existence of share storage influences the
management of the directory structure holding the TPM state, which for
example is only removed when a domain is undefined and not when a VM is
removed on the migration source host. Further, when shared storage is used
then security labeling on the destination side is skipped assuming that the
labeling was already done on the source side.

I have tested this with an NFS setup where I had to turn SELinux off on
the hosts since the SELinux MLS range labeling is not supported by NFS.

For shared storage support to work properly both sides of the migration
need to be clients of the shared storage setup, meaning that they both have
to have /var/lib/libvirt/swtpm mounted as shared storage, because other-
wise the virFileIsSharedFS() may not detect shared storage and in the
worst case may cause the TPM emulator (swtpm) to malfunction if for
example the source side removed the TPM state directory structure.

Shared storage migration requires (upcoming) swtpm v0.8.

Stefan

v4:
   - Fixed long-standing bug regarding offline migration that now blocks if
 no shared storage is set up
   - Addressed Michal's concerns

v3:
   - Relying entirely on virFileIsSharedFS() on migration source and
 destination sides to detect whether shared storage is set up between
 hosts; no more hint about shared storage from user via flag
   - Added support for virDomainTPMPrivate structure to store and persist
 TPM-related private data

Stefan Berger (7):
   util: Add parsing support for swtpm's cmdarg-migration capability
   qemu: tpm: Allow offline migration with TPM_EMULATOR only with shared
 storage
   qemu: tpm: Conditionally create storage on incoming migration
   qemu: tpm: Add support for storing private TPM-related data
   qemu: tpm: Pass --migration option to swtpm if supported and needed
   qemu: tpm: Avoid security labels on incoming migration with shared
 storage
   qemu: tpm: Never remove state on outgoing migration and shared storage

  src/conf/domain_conf.c|  63 ++--
  src/conf/domain_conf.h|   9 +++
  src/qemu/qemu_domain.c|  85 --
  src/qemu/qemu_domain.h|  17 +-
  src/qemu/qemu_driver.c|  20 +++
  src/qemu/qemu_extdevice.c |  10 ++--
  src/qemu/qemu_extdevice.h |   6 +-
  src/qemu/qemu_migration.c |  28 +++--
  src/qemu/qemu_process.c   |   9 ++-
  src/qemu/qemu_snapshot.c  |   4 +-
  src/qemu/qemu_tpm.c   | 122 ++
  src/qemu/qemu_tpm.h   |  14 -
  src/util/virtpm.c |   1 +
  src/util/virtpm.h |   1 +
  14 files changed, 339 insertions(+), 50 deletions(-)



Hey, sorry for late review. I just have to small nits. I surely want to
avoid making you send another version. My suggestions are trivial


How is it going to work without another version. I am fine with you making the 
changes but I can also send another version...

   Stefan


(moving a few lines of code into a different function or dropping it)
and as such I can squash them in before pushing.

Tentatively-ACKed-by: me

Michal





Re: [PATCH v4 5/7] qemu: tpm: Pass --migration option to swtpm if supported and needed

2022-11-08 Thread Stefan Berger




On 11/7/22 03:31, Michal Prívozník wrote:

On 10/24/22 12:28, Stefan Berger wrote:

Pass the --migration option to swtpm if swptm supports it (starting
with v0.8) and if the TPM's state is written on shared storage. If this
is the case apply the 'release-lock-outgoing' parameter with this
option and apply the 'incoming' parameter for incoming migration so that
swtpm releases the file lock on the source side when the state is migrated
and locks the file on the destination side when the state is received.

If a started swtpm instance is running with the necessary options of
migrating with share storage then remember this with a flag in the
virDomainTPMPrivateDef.

Report an error if swtpm does not support the --migration option and an
incoming migration across shared storage is requested.

Signed-off-by: Stefan Berger 
---
  src/qemu/qemu_migration.c | 10 
  src/qemu/qemu_tpm.c   | 48 +--
  src/qemu/qemu_tpm.h   |  3 +++
  3 files changed, 59 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 16bf7ac178..2aa0b6e89e 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2786,6 +2786,7 @@ qemuMigrationSrcBegin(virConnectPtr conn,
  g_autofree char *xml = NULL;
  char *ret = NULL;
  virDomainAsyncJob asyncJob;
+int rc;
  
  if (cfg->migrateTLSForce &&

  !(flags & VIR_MIGRATE_TUNNELLED) &&
@@ -2795,6 +2796,15 @@ qemuMigrationSrcBegin(virConnectPtr conn,
  goto cleanup;
  }
  
+rc = qemuTPMHasSharedStorage(driver, vm->def);

+if (rc < 0)
+goto cleanup;
+if (rc == 1 && !qemuTPMCanMigrateSharedStorage(vm->def)) {
+virReportError(VIR_ERR_NO_SUPPORT, "%s",
+   _("the running swtpm does not support migration with shared 
storage"));
+goto cleanup;
+}
+


This check is correct, but as I said in my other reply, I think it
should live in qemuMigrationSrcIsAllowed().


I can move it.

Stefan



Michal





Re: [PATCH v4 2/7] qemu: tpm: Allow offline migration with TPM_EMULATOR only with shared storage

2022-11-08 Thread Stefan Berger




On 11/7/22 03:31, Michal Prívozník wrote:

On 10/24/22 12:28, Stefan Berger wrote:

Allow migration with TPM_EMULATOR (swtpm) only if shared storage has been
set up for the TPM state directory.

Signed-off-by: Stefan Berger 
---
  src/qemu/qemu_migration.c |  6 ++
  src/qemu/qemu_tpm.c   | 28 
  src/qemu/qemu_tpm.h   |  5 +
  3 files changed, 39 insertions(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 33105cf07b..16bf7ac178 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -38,6 +38,7 @@
  #include "qemu_security.h"
  #include "qemu_slirp.h"
  #include "qemu_block.h"
+#include "qemu_tpm.h"
  
  #include "domain_audit.h"

  #include "virlog.h"
@@ -2579,6 +2580,11 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver,
 _("tunnelled offline migration does not make 
sense"));
  return NULL;
  }
+if (qemuTPMHasSharedStorage(driver, vm->def) != 1) {
+virReportError(VIR_ERR_OPERATION_INVALID, "%s",
+   _("offline migration requires TPM state directory to be 
on shared storage"));


Does it though? We don't have such requirement for say domain disks. I
believe the point of --offline is to merely just get domain XML an
define it on the destination. That's why --offline requires --persistent
and why a lot of checks are skipped when --offline.

I mean, for disks we just assume users will copy them onto destination
(or use a shared FS). We can assume the same for TPM, can't we? This
would also allow us to simplify qemuTPMHasSharedStorage() because it no
longer needs to call qemuTPMEmulatorInitPaths() because for running
guests the paths were already initialized.

And if we chose to keep this check in, then I think it should live in
qemuMigrationSrcIsAllowed() which is the places where similar checks are
performed.


I don't mind dropping the patch then.

  Stefan



Michal





Re: [libvirt][PATCH v16 5/9] conf: Introduce SGX EPC element into device memory xml

2022-11-08 Thread Peter Krempa
On Tue, Nov 08, 2022 at 12:25:26 +, Daniel P. Berrangé wrote:
> On Fri, Oct 14, 2022 at 01:12:28PM +0200, Michal Prívozník wrote:
> > On 10/8/22 06:00, Lin Yang wrote:

[...]

> > 
> > # ./qemu-system-x86_64 -S -nographic -nodefaults -m 128 \
> > -machine pc,sgx-epc.0.memdev=memepc0,sgx-epc.0.node=0 \
> > -object 
> > '{"qom-type":"memory-backend-epc","id":"memepc0","prealloc":true,"size":67108864,"host-nodes":[0],"policy":"bind"}'
> >  \
> > -monitor stdio
> > QEMU 7.1.50 monitor - type 'help' for more information
> > (qemu) info memory-devices 
> > Memory device [sgx-epc]: ""
> >   memaddr: 0x1
> >   size: 67108864
> >   node: 0
> >   memdev: /objects/memepc0
> > (qemu) info memory_size_summary 
> > base memory: 134217728
> > plugged memory: 0
> > (qemu)
> 
> I'm not sure this check is showing us the truth.
> 
> In backends/hostmem-epc.c, sgx_epc_backend_memory_alloc is
> opening /dev/sgx_vepc and mmap()ing the requested size from
> that file. IOW that's clearly in addition to whatever has
> been mapped as the main RAM.
> 
> In hw/i386/sgx-epc.c, sgx_epc_md_get_plugged_size is  hardcoded
> to always return 0, which is why 'plugged memory' is reported
> as zero above. I don't know what it is reporting zero.
> 
> Is this because the SGX RAM is not accessible to the guest OS
> as "normal" RAM perhaps, and thus to be reported differently.

So even if the memory is not accessible as normal RAM, but still is
usable by the guest OS, the use of an  element is okay,
but the total memory size of a VM should account for it.

So in fact all the hacks which exclude it from the total memory size
should be removed.



Re: [PATCH 0/4] Add support for 'hv-avic' hyperv enlightenment

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Peter Krempa wrote:

Peter Krempa (4):
 conf: virDomainDefFormatFeatures: Realign line
 cpu: x86: Group and order hyperv enlightenment features by leaf and
   register
 cpu: x86: Introduce the 'hv-avic' feature
 conf: Introduce support for 'hv-avic' Hyper-V enlightenment

docs/formatdomain.rst| 1 +
src/conf/domain_conf.c   | 7 +--
src/conf/domain_conf.h   | 1 +
src/conf/schemas/domaincommon.rng| 5 +
src/cpu/cpu_x86.c| 9 +++--
src/cpu/cpu_x86_data.h   | 1 +
src/qemu/qemu_command.c  | 1 +
src/qemu/qemu_process.c  | 1 +
tests/qemuxml2argvdata/hyperv.x86_64-latest.args | 2 +-
tests/qemuxml2argvdata/hyperv.xml| 1 +
tests/qemuxml2xmloutdata/hyperv.xml  | 1 +
11 files changed, 25 insertions(+), 5 deletions(-)



Reviewed-by: Ján Tomko 

Jano



[PATCH 1/4] conf: virDomainDefFormatFeatures: Realign line

2022-11-08 Thread Peter Krempa
Don't break line after opening bracket of a funtion call.

Signed-off-by: Peter Krempa 
---
 src/conf/domain_conf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index fda1c6caa6..dc2281b2bd 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -26440,8 +26440,7 @@ virDomainDefFormatFeatures(virBuffer *buf,

 virBufferAsprintf(&childBuf, "<%s state='%s'",
   virDomainHypervTypeToString(j),
-  virTristateSwitchTypeToString(
-  def->hyperv_features[j]));
+  
virTristateSwitchTypeToString(def->hyperv_features[j]));

 switch ((virDomainHyperv) j) {
 case VIR_DOMAIN_HYPERV_RELAXED:
-- 
2.37.3



[PATCH 0/4] Add support for 'hv-avic' hyperv enlightenment

2022-11-08 Thread Peter Krempa
Peter Krempa (4):
  conf: virDomainDefFormatFeatures: Realign line
  cpu: x86: Group and order hyperv enlightenment features by leaf and
register
  cpu: x86: Introduce the 'hv-avic' feature
  conf: Introduce support for 'hv-avic' Hyper-V enlightenment

 docs/formatdomain.rst| 1 +
 src/conf/domain_conf.c   | 7 +--
 src/conf/domain_conf.h   | 1 +
 src/conf/schemas/domaincommon.rng| 5 +
 src/cpu/cpu_x86.c| 9 +++--
 src/cpu/cpu_x86_data.h   | 1 +
 src/qemu/qemu_command.c  | 1 +
 src/qemu/qemu_process.c  | 1 +
 tests/qemuxml2argvdata/hyperv.x86_64-latest.args | 2 +-
 tests/qemuxml2argvdata/hyperv.xml| 1 +
 tests/qemuxml2xmloutdata/hyperv.xml  | 1 +
 11 files changed, 25 insertions(+), 5 deletions(-)

-- 
2.37.3



[PATCH 4/4] conf: Introduce support for 'hv-avic' Hyper-V enlightenment

2022-11-08 Thread Peter Krempa
qemu-6.2 introduced support for the hv-avic enlightenment which allows
to use Hyper-V SynIC with hardware APICv/AVIC enabled.

Implement the libvirt support for it.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/402
Signed-off-by: Peter Krempa 
---
 docs/formatdomain.rst| 1 +
 src/conf/domain_conf.c   | 4 
 src/conf/domain_conf.h   | 1 +
 src/conf/schemas/domaincommon.rng| 5 +
 src/qemu/qemu_command.c  | 1 +
 src/qemu/qemu_process.c  | 1 +
 tests/qemuxml2argvdata/hyperv.x86_64-latest.args | 2 +-
 tests/qemuxml2argvdata/hyperv.xml| 1 +
 tests/qemuxml2xmloutdata/hyperv.xml  | 1 +
 9 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index acb318520c..488b6be862 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -2016,6 +2016,7 @@ are:
tlbflushEnable PV TLB flush support 
   on, off  :since:`4.7.0 (QEMU 
3.0)`
ipi Enable PV IPI support   
   on, off  :since:`4.10.0 (QEMU 
3.1)`
evmcs   Enable Enlightened VMCS 
   on, off  :since:`4.10.0 (QEMU 
3.1)`
+   avicEnable use Hyper-V SynIC with hardware APICv/AVIC   
   on, off  :since:`8.10.0 (QEMU 
6.2)`
=== 
== 
 
===

:since:`Since 8.0.0` , the hypervisor can be configured further by setting
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index dc2281b2bd..2643f62e03 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -206,6 +206,7 @@ VIR_ENUM_IMPL(virDomainHyperv,
   "tlbflush",
   "ipi",
   "evmcs",
+  "avic",
 );

 VIR_ENUM_IMPL(virDomainKVM,
@@ -15814,6 +15815,7 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def,
 case VIR_DOMAIN_HYPERV_TLBFLUSH:
 case VIR_DOMAIN_HYPERV_IPI:
 case VIR_DOMAIN_HYPERV_EVMCS:
+case VIR_DOMAIN_HYPERV_AVIC:
 break;

 case VIR_DOMAIN_HYPERV_STIMER:
@@ -20134,6 +20136,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef *src,
 case VIR_DOMAIN_HYPERV_TLBFLUSH:
 case VIR_DOMAIN_HYPERV_IPI:
 case VIR_DOMAIN_HYPERV_EVMCS:
+case VIR_DOMAIN_HYPERV_AVIC:
 if (src->hyperv_features[i] != dst->hyperv_features[i]) {
 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("State of HyperV enlightenment "
@@ -26454,6 +26457,7 @@ virDomainDefFormatFeatures(virBuffer *buf,
 case VIR_DOMAIN_HYPERV_TLBFLUSH:
 case VIR_DOMAIN_HYPERV_IPI:
 case VIR_DOMAIN_HYPERV_EVMCS:
+case VIR_DOMAIN_HYPERV_AVIC:
 virBufferAddLit(&childBuf, "/>\n");
 break;

diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 54dc9098df..a05d4d4b1c 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2149,6 +2149,7 @@ typedef enum {
 VIR_DOMAIN_HYPERV_TLBFLUSH,
 VIR_DOMAIN_HYPERV_IPI,
 VIR_DOMAIN_HYPERV_EVMCS,
+VIR_DOMAIN_HYPERV_AVIC,

 VIR_DOMAIN_HYPERV_LAST
 } virDomainHyperv;
diff --git a/src/conf/schemas/domaincommon.rng 
b/src/conf/schemas/domaincommon.rng
index cefe818044..03703148df 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -7461,6 +7461,11 @@
 
   
 
+
+  
+
+  
+
   
 
   
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 256ef4912c..513ff7624f 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6237,6 +6237,7 @@ qemuBuildCpuCommandLine(virCommand *cmd,
 case VIR_DOMAIN_HYPERV_TLBFLUSH:
 case VIR_DOMAIN_HYPERV_IPI:
 case VIR_DOMAIN_HYPERV_EVMCS:
+case VIR_DOMAIN_HYPERV_AVIC:
 if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON)
 virBufferAsprintf(&buf, ",hv-%s=on",
   virDomainHypervTypeToString(i));
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e7f92228f5..0ced2d88ab 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4245,6 +4245,7 @@ qemuProcessVerifyHypervFeatures(virDomainDef *def,
 case VIR_DOMAIN_HYPERV_TLBFLUSH:
 case VIR_DOMAIN_HY

[PATCH 3/4] cpu: x86: Introduce the 'hv-avic' feature

2022-11-08 Thread Peter Krempa
Based on qemu commit e1f9a8e8c90ae54387922e33e5ac4fd759747d01 introduce
the hv-avic feature in leaf 0x4004, EAX 0x0200 (1 << 9).

Signed-off-by: Peter Krempa 
---
 src/cpu/cpu_x86.c  | 3 +++
 src/cpu/cpu_x86_data.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 034d25bf60..b3f76f3d79 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -100,6 +100,8 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER_DIRECT,

 KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH,
 0x4004, 0x0004, 0x0);
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_AVIC,
+0x4004, 0x0200, 0x0);
 KVM_FEATURE_DEF(VIR_CPU_x86_HV_IPI,
 0x4004, 0x0400, 0x0);
 KVM_FEATURE_DEF(VIR_CPU_x86_HV_EVMCS,
@@ -118,6 +120,7 @@ static virCPUx86Feature x86_kvm_features[] =
 KVM_FEATURE(VIR_CPU_x86_HV_FREQUENCIES),
 KVM_FEATURE(VIR_CPU_x86_HV_REENLIGHTENMENT),
 KVM_FEATURE(VIR_CPU_x86_HV_TLBFLUSH),
+KVM_FEATURE(VIR_CPU_x86_HV_AVIC),
 KVM_FEATURE(VIR_CPU_x86_HV_IPI),
 KVM_FEATURE(VIR_CPU_x86_HV_EVMCS),
 KVM_FEATURE(VIR_CPU_x86_HV_STIMER_DIRECT),
diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h
index 9a4333bf2b..d1ca63db6d 100644
--- a/src/cpu/cpu_x86_data.h
+++ b/src/cpu/cpu_x86_data.h
@@ -61,6 +61,7 @@ struct _virCPUx86MSR {
 #define VIR_CPU_x86_HV_TLBFLUSH  "hv-tlbflush"
 #define VIR_CPU_x86_HV_IPI   "hv-ipi"
 #define VIR_CPU_x86_HV_EVMCS "hv-evmcs"
+#define VIR_CPU_x86_HV_AVIC  "hv-avic"

 /* Hyper-V Synthetic Timer option */
 #define VIR_CPU_x86_HV_STIMER_DIRECT "hv-stimer-direct"
-- 
2.37.3



[PATCH 2/4] cpu: x86: Group and order hyperv enlightenment features by leaf and register

2022-11-08 Thread Peter Krempa
'VIR_CPU_x86_HV_STIMER_DIRECT' is reported under leaf 0x4003,
but the data is in the EDX register. Create a new group for such
features and move them after the 0x4003 EAX group.

Signed-off-by: Peter Krempa 
---
 src/cpu/cpu_x86.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 4d2379803c..034d25bf60 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -94,14 +94,16 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_FREQUENCIES,
 0x4003, 0x0800, 0x0);
 KVM_FEATURE_DEF(VIR_CPU_x86_HV_REENLIGHTENMENT,
 0x4003, 0x2000, 0x0);
+
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER_DIRECT,
+0x4003, 0x0, 0x0008);
+
 KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH,
 0x4004, 0x0004, 0x0);
 KVM_FEATURE_DEF(VIR_CPU_x86_HV_IPI,
 0x4004, 0x0400, 0x0);
 KVM_FEATURE_DEF(VIR_CPU_x86_HV_EVMCS,
 0x4004, 0x4000, 0x0);
-KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER_DIRECT,
-0x4003, 0x0, 0x0008);

 static virCPUx86Feature x86_kvm_features[] =
 {
-- 
2.37.3



Re: [libvirt][PATCH v16 5/9] conf: Introduce SGX EPC element into device memory xml

2022-11-08 Thread Daniel P . Berrangé
On Fri, Oct 14, 2022 at 01:12:28PM +0200, Michal Prívozník wrote:
> On 10/8/22 06:00, Lin Yang wrote:
> > With NUMA config:
> > 
> > 
> >   ...
> >   
> > 
> >   0-1
> > 
> > 
> >   512
> >   0
> > 
> >   
> >   ...
> > 
> > 
> > Without NUMA config:
> > 
> > 
> >   ...
> >   
> > 
> >   512
> > 
> >   
> >   ...
> > 
> 
> 
> Patches look good to me. And I'd like to merge them. However, in one of
> previous iterations Peter raised a concern whether this should be
> exposed as something else than . One fact that
> would support this is that SGX 'cuts' from guest memory. I mean, memory
> backend-epc does not add more RAM into the guest:
> 
> # ./qemu-system-x86_64 -S -nographic -nodefaults -m 128 \
> -machine pc,sgx-epc.0.memdev=memepc0,sgx-epc.0.node=0 \
> -object 
> '{"qom-type":"memory-backend-epc","id":"memepc0","prealloc":true,"size":67108864,"host-nodes":[0],"policy":"bind"}'
>  \
> -monitor stdio
> QEMU 7.1.50 monitor - type 'help' for more information
> (qemu) info memory-devices 
> Memory device [sgx-epc]: ""
>   memaddr: 0x1
>   size: 67108864
>   node: 0
>   memdev: /objects/memepc0
> (qemu) info memory_size_summary 
> base memory: 134217728
> plugged memory: 0
> (qemu)

I'm not sure this check is showing us the truth.

In backends/hostmem-epc.c, sgx_epc_backend_memory_alloc is
opening /dev/sgx_vepc and mmap()ing the requested size from
that file. IOW that's clearly in addition to whatever has
been mapped as the main RAM.

In hw/i386/sgx-epc.c, sgx_epc_md_get_plugged_size is  hardcoded
to always return 0, which is why 'plugged memory' is reported
as zero above. I don't know what it is reporting zero.

Is this because the SGX RAM is not accessible to the guest OS
as "normal" RAM perhaps, and thus to be reported differently.

With regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|



Re: [libvirt][PATCH v16 5/9] conf: Introduce SGX EPC element into device memory xml

2022-11-08 Thread Michal Prívozník
On 10/14/22 13:12, Michal Prívozník wrote:
> On 10/8/22 06:00, Lin Yang wrote:
>> With NUMA config:
>>
>> 
>>   ...
>>   
>> 
>>   0-1
>> 
>> 
>>   512
>>   0
>> 
>>   
>>   ...
>> 
>>
>> Without NUMA config:
>>
>> 
>>   ...
>>   
>> 
>>   512
>> 
>>   
>>   ...
>> 
> 
> 
> Patches look good to me. And I'd like to merge them. However, in one of
> previous iterations Peter raised a concern whether this should be
> exposed as something else than . One fact that
> would support this is that SGX 'cuts' from guest memory. I mean, memory
> backend-epc does not add more RAM into the guest:
> 
> # ./qemu-system-x86_64 -S -nographic -nodefaults -m 128 \
> -machine pc,sgx-epc.0.memdev=memepc0,sgx-epc.0.node=0 \
> -object 
> '{"qom-type":"memory-backend-epc","id":"memepc0","prealloc":true,"size":67108864,"host-nodes":[0],"policy":"bind"}'
>  \
> -monitor stdio
> QEMU 7.1.50 monitor - type 'help' for more information
> (qemu) info memory-devices 
> Memory device [sgx-epc]: ""
>   memaddr: 0x1
>   size: 67108864
>   node: 0
>   memdev: /objects/memepc0
> (qemu) info memory_size_summary 
> base memory: 134217728
> plugged memory: 0
> (qemu) 
> 
> 
> Which is also the reason why we need to special case
> VIR_DOMAIN_MEMORY_MODEL_SGX_EPC so much.
> 
> On the other hand, the fact that QEMU exposes it as a memory backend
> means, that it kind of falls into  category.
> 
> So my question then is, Peter, are you okay with leaving this under
>  or do you have other suggestion?
> 

Maybe Dan can help us here?

Michal



Re: [libvirt PATCH v3 00/24] Synchronize x86 cpu features from qemu

2022-11-08 Thread Jiri Denemark
On Fri, Nov 04, 2022 at 16:43:20 +0100, Tim Wiederhake wrote:
> V1: https://listman.redhat.com/archives/libvir-list/2022-October/235007.html
> V2: https://listman.redhat.com/archives/libvir-list/2022-October/235247.html
> 
> Changes since V2:
> * Added explanation where the currently ignored "alias" names will be used
>   in the future to the commit message (patch 1).
> * Added "source" attribute to "alias" tags (patch 2).
> 
> Patches not reviewed yet:
> * #4: Add script to sync from QEMU i386 cpu features
> * #10: Add missing x86 feature "sgx1"
> * #11: Add missing x86 feature "sgx2"

Reviewed-by: Jiri Denemark 

But see my notes I sent to a few individual patches.



Re: [libvirt PATCH v3 03/24] cpu: make x86 feature alias names machine readable

2022-11-08 Thread Jiri Denemark
On Fri, Nov 04, 2022 at 16:43:23 +0100, Tim Wiederhake wrote:
> Signed-off-by: Tim Wiederhake 
> Reviewed-by: Jiri Denemark 
> ---
>  src/cpu_map/x86_features.xml | 55 +---
>  1 file changed, 38 insertions(+), 17 deletions(-)
> 
> diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
> index 4cf3ff0804..925185f2f6 100644
> --- a/src/cpu_map/x86_features.xml
> +++ b/src/cpu_map/x86_features.xml
...
> @@ -353,7 +363,9 @@
>
>  
>
> -   
> +  
> +
> +

We can just drop this ancient downstream-only alias.

Jirka



Re: [libvirt PATCH v3 19/24] cpu_map: Add missing x86 feature "arch-lbr"

2022-11-08 Thread Jiri Denemark
On Fri, Nov 04, 2022 at 16:43:39 +0100, Tim Wiederhake wrote:
> Signed-off-by: Tim Wiederhake 
> Reviewed-by: Jiri Denemark 
> ---
>  src/cpu_map/x86_features.xml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
> index fd4a499b22..3cef2822a0 100644
> --- a/src/cpu_map/x86_features.xml
> +++ b/src/cpu_map/x86_features.xml
> @@ -378,6 +378,9 @@
>
>  
>
> +  
> +
> +  
>
>  
>

Again, trivial conflict with recent e528717d903 commit.

Jirka



Re: [libvirt PATCH v3 16/24] cpu_map: Add missing x86 feature "avx512-fp16"

2022-11-08 Thread Jiri Denemark
On Fri, Nov 04, 2022 at 16:43:36 +0100, Tim Wiederhake wrote:
> Signed-off-by: Tim Wiederhake 
> Reviewed-by: Jiri Denemark 
> ---
>  src/cpu_map/x86_features.xml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
> index 08694edbf5..eb1b2728aa 100644
> --- a/src/cpu_map/x86_features.xml
> +++ b/src/cpu_map/x86_features.xml
> @@ -372,6 +372,9 @@
>
>  
>
> +  
> +
> +  
>
>  
>

This patch conflicts with recently pushed e528717d903. The conflict
resolution is trivial, just mind the placement. The new avx512-fp16
feature should go between amx-bf16 and amx-tile which were both added by
the conflicting commit.

Jirka



Re: [PATCH 08/48] qemu_agent: Drop @singleSync from _qemuAgent

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Historically, before sending any guest agent command we would
send 'guest-sync' command to make guest agent reset its internal
state and flush any partially read command (json). This was
because there was no event emitted when the agent
(dis-)connected.

But now that we have the event we can execute the sync command
just once - the first time after we've connected. Should agent
disconnect in the middle of reading a command, and then connect
back again we would get the event and disconnect and connect back
again, resulting in the sync command being executed again.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_agent.c| 7 ++-
src/qemu/qemu_agent.h| 3 +--
src/qemu/qemu_process.c  | 3 +--
tests/qemumonitortestutils.c | 3 +--
4 files changed, 5 insertions(+), 11 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 03/48] tests: Make qemuAgent single sync

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

The qemuAgent has option to issue guest-sync command before each
intended command or issue the sync commend just once, right after
the socked is opened and before the first intended command is
issued. The latter is referred to as single sync agent and is
enabled by VSERPORT_CHANGED event which allows us to detect
when the agent (dis-)connects in the guest.

Now, every QEMU that we support (4.2.0 or newer) has the event
and thus will use single sync agent. Therefore, adjust
qemuagenttest to make it test what's used in the real world,
rather than old approach.

Signed-off-by: Michal Privoznik 
---
tests/qemuagenttest.c| 50 +++-
tests/qemumonitortestutils.c |  2 +-
2 files changed, 4 insertions(+), 48 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 48/48] qemu: Retire QEMU_CAPS_DISK_WRITE_CACHE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 47/48] qemu_capabilities: Stop detecting QEMU_CAPS_DISK_WRITE_CACHE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 4 
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
29 files changed, 32 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 46/48] qemu: Assume QEMU_CAPS_DISK_WRITE_CACHE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v2.7.0-rc0~32^2~5 the .write-cache
attribute of virtio-blk dvice is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

The change in some .args is justified, because the qemuxml2argvdatatest
runs these test caseses with very minimalistic set of capabilities,
that's nowhere near real life scenario.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_command.c  | 3 +--
tests/qemuxml2argvdata/controller-order.args | 2 +-
tests/qemuxml2argvdata/video-device-pciaddr-default.args | 2 +-
tests/qemuxml2argvdata/video-qxl-device-vgamem.args  | 2 +-
tests/qemuxml2argvdata/video-qxl-device.args | 2 +-
tests/qemuxml2argvdata/video-qxl-sec-device-vgamem.args  | 2 +-
tests/qemuxml2argvdata/video-qxl-sec-device.args | 2 +-
tests/qemuxml2argvdata/video-vga-device-vgamem.args  | 2 +-
tests/qemuxml2argvdata/video-vga-device.args | 2 +-
tests/qemuxml2argvdata/video-virtio-gpu-device.args  | 2 +-
tests/qemuxml2argvdata/video-virtio-gpu-sdl-gl.args  | 2 +-
tests/qemuxml2argvdata/video-virtio-gpu-spice-gl.args| 2 +-
tests/qemuxml2argvdata/video-virtio-gpu-virgl.args   | 2 +-
tests/qemuxml2argvdata/video-virtio-vga.args | 2 +-
14 files changed, 14 insertions(+), 15 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 45/48] qemu: Retire QEMU_CAPS_DISK_SHARE_RW

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 44/48] qemu_capabilities: Stop detecting QEMU_CAPS_DISK_SHARE_RW

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 4 
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
29 files changed, 32 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 43/48] qemu: Assume QEMU_CAPS_DISK_SHARE_RW

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v2.9.0-rc0~48^2~25 the .share-rw
attribute of virtio-blk device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

The change in controller-order.args is justified, because the
qemuxml2argvdatatest runs the test case with very minimalistic
set of capabilities, that's nowhere near real life scenario.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_command.c  | 3 +--
tests/qemuxml2argvdata/controller-order.args | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 42/48] qemu: Retire QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 41/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
28 files changed, 28 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 40/48] qemu: Assume QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v2.7.0-rc0~83^2 the .num-queues
attribute of virtio-blk device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_validate.c | 7 ---
1 file changed, 7 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 39/48] qemu: Retire QEMU_CAPS_BLOCKIO

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 38/48] qemu_capabilities: Stop detecting QEMU_CAPS_BLOCKIO

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
28 files changed, 28 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 37/48] qemu: Assume QEMU_CAPS_BLOCKIO

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v0.13.0-rc0~1072 the
.logical_block_size attribute of virtio-blk device is always
available for all QEMU versions we support (4.2.0, currently).
Therefore, we can assume the capability is always set and thus
doesn't need to be checked for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_command.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 36/48] qemu: Retire QEMU_CAPS_VIRTIO_NET_FAILOVER

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 35/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_FAILOVER

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
27 files changed, 27 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 34/48] qemu: Assume QEMU_CAPS_VIRTIO_NET_FAILOVER

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v4.2.0-rc0~23^2~4 the .failover
attribute of virtio-net device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_validate.c  | 6 --
tests/qemuxml2argvdata/net-virtio-teaming.err | 1 -
tests/qemuxml2argvtest.c  | 3 ---
tests/qemuxml2xmltest.c   | 3 ---
4 files changed, 13 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/net-virtio-teaming.err



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 33/48] qemu: Retire QEMU_CAPS_VIRTIO_NET_HOST_MTU

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 32/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_HOST_MTU

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
28 files changed, 28 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 31/48] qemu: Assume QEMU_CAPS_VIRTIO_NET_HOST_MTU

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v2.9.0-rc0~162^2~10 the .host_mtu
attribute of virtio-net device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_validate.c | 8 
tests/qemuxml2xmltest.c  | 2 +-
2 files changed, 1 insertion(+), 9 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 30/48] qemu: Retire QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 29/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
28 files changed, 28 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 28/48] qemu: Assume QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v2.10.0-rc0~95^2~20 the
.tx_queue_size attribute of virtio-net device is always available
for all QEMU versions we support (4.2.0, currently). Therefore,
we can assume the capability is always set and thus doesn't need
to be checked for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_validate.c | 6 --
tests/qemuxml2argvtest.c | 3 +--
tests/qemuxml2xmltest.c  | 3 +--
3 files changed, 2 insertions(+), 10 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 27/48] qemu: Retire QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 26/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
28 files changed, 28 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 25/48] qemu: Assume QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v2.8.0-rc0~116^2~26 the
.rx_queue_size attribute of virtio-net device is always available
for all QEMU versions we support (4.2.0, currently). Therefore,
we can assume the capability is always set and thus doesn't need
to be checked for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_validate.c | 6 --
tests/qemuxml2argvtest.c | 4 +---
tests/qemuxml2xmltest.c  | 1 -
3 files changed, 1 insertion(+), 10 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 24/48] qemu: Retire QEMU_CAPS_QUERY_DISPLAY_OPTIONS

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 23/48] qemu_capabilities: Stop detecting QEMU_CAPS_QUERY_DISPLAY_OPTIONS

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
29 files changed, 29 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 22/48] qemu: Assume QEMU_CAPS_QUERY_DISPLAY_OPTIONS

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v3.1.0-rc3~8^2 the
query-display-options command is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 7 ---
1 file changed, 7 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 21/48] qemu: Retire QEMU_CAPS_BITMAP_MERGE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 20/48] qemu_capabilities: Stop detecting QEMU_CAPS_BITMAP_MERGE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
29 files changed, 29 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 19/48] qemu: Retire QEMU_CAPS_QUERY_CURRENT_MACHINE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 18/48] qemu_capabilities: Stop detecting QEMU_CAPS_QUERY_CURRENT_MACHINE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
29 files changed, 29 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 00/48] Retire more capabilities

2022-11-08 Thread Peter Krempa
On Tue, Nov 08, 2022 at 09:59:00 +0100, Peter Krempa wrote:
> On Tue, Nov 08, 2022 at 09:29:02 +0100, Michal Privoznik wrote:
> > Chop chop. More capabilities can be retired.
> > 
> > https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/688345136
> > 
> > Michal Prívozník (48):

[...]

> The following two are excluded:
> 
> >   tests: Make qemuAgent single sync
> >   qemu_agent: Drop @singleSync from _qemuAgent

Reviewed-by: Peter Krempa 



Re: [PATCH 17/48] qemu: Assume QEMU_CAPS_QUERY_CURRENT_MACHINE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v4.0.0-rc0~202^2~3 the
query-current-machine command is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_driver.c | 11 ---
1 file changed, 11 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index bcdd55b089..d793c0f52d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16307,12 +16307,8 @@ static int
qemuDomainQueryWakeupSuspendSupport(virDomainObj *vm,
bool *wakeupSupported)
{
-qemuDomainObjPrivate *priv = vm->privateData;
int ret = -1;

-if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_QUERY_CURRENT_MACHINE))
-return -1;
-
if (virDomainObjBeginJob(vm, VIR_JOB_QUERY) < 0)
return -1;

@@ -16389,13 +16385,6 @@ qemuDomainPMSuspendForDuration(virDomainPtr dom,
if (!qemuDomainAgentAvailable(vm, true))
goto cleanup;

-/*
- * The case we want to handle here is when QEMU has the API (i.e.
- * QEMU_CAPS_QUERY_CURRENT_MACHINE is set). Otherwise, do not interfere
- * with the suspend process. This means that existing running domains,
- * that don't know about this cap, will keep their old behavior of
- * suspending 'in the dark'.
- */
if (qemuDomainQueryWakeupSuspendSupport(vm, &wakeupSupported) == 0) {


If query-current-machine is supported by all QEMUs, then we should error
out if this cannot be probed.

Jano


if (!wakeupSupported) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
--
2.37.4





Re: [PATCH 00/48] Retire more capabilities

2022-11-08 Thread Peter Krempa
On Tue, Nov 08, 2022 at 09:29:02 +0100, Michal Privoznik wrote:
> Chop chop. More capabilities can be retired.
> 
> https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/688345136
> 
> Michal Prívozník (48):

[...]

>   qemu: Drop misleading comment for
> qemuDomainQueryWakeupSuspendSupport()
>   qemu: Acquire QUERY job in qemuDomainQueryWakeupSuspendSupport()
>   qemu: Assume QEMU_CAPS_NUMA
>   qemu_capabilities: Stop detecting QEMU_CAPS_NUMA
>   qemu: Retire QEMU_CAPS_NUMA
>   qemu: Assume QEMU_CAPS_VSERPORT_CHANGE
>   qemu_capabilities: Stop detecting QEMU_CAPS_VSERPORT_CHANGE
>   qemu: Retire QEMU_CAPS_VSERPORT_CHANGE
>   qemu: Assume QEMU_CAPS_DUMP_COMPLETED
>   qemu_capabilities: Stop detecting QEMU_CAPS_DUMP_COMPLETED
>   qemu: Retire QEMU_CAPS_DUMP_COMPLETED
>   qemu: Assume QEMU_CAPS_QOM_LIST_PROPERTIES
>   qemu_capabilities: Stop detecting QEMU_CAPS_QOM_LIST_PROPERTIES
>   qemu: Retire QEMU_CAPS_QOM_LIST_PROPERTIES
>   qemu: Assume QEMU_CAPS_QUERY_CURRENT_MACHINE
>   qemu_capabilities: Stop detecting QEMU_CAPS_QUERY_CURRENT_MACHINE
>   qemu: Retire QEMU_CAPS_QUERY_CURRENT_MACHINE
>   qemu_capabilities: Stop detecting QEMU_CAPS_BITMAP_MERGE
>   qemu: Retire QEMU_CAPS_BITMAP_MERGE
>   qemu: Assume QEMU_CAPS_QUERY_DISPLAY_OPTIONS
>   qemu_capabilities: Stop detecting QEMU_CAPS_QUERY_DISPLAY_OPTIONS
>   qemu: Retire QEMU_CAPS_QUERY_DISPLAY_OPTIONS
>   qemu: Assume QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE
>   qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE
>   qemu: Retire QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE
>   qemu: Assume QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE
>   qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE
>   qemu: Retire QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE
>   qemu: Assume QEMU_CAPS_VIRTIO_NET_HOST_MTU
>   qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_HOST_MTU
>   qemu: Retire QEMU_CAPS_VIRTIO_NET_HOST_MTU
>   qemu: Assume QEMU_CAPS_VIRTIO_NET_FAILOVER
>   qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_FAILOVER
>   qemu: Retire QEMU_CAPS_VIRTIO_NET_FAILOVER
>   qemu: Assume QEMU_CAPS_BLOCKIO
>   qemu_capabilities: Stop detecting QEMU_CAPS_BLOCKIO
>   qemu: Retire QEMU_CAPS_BLOCKIO
>   qemu: Assume QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES
>   qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE
>   qemu: Retire QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES
>   qemu: Assume QEMU_CAPS_DISK_SHARE_RW
>   qemu_capabilities: Stop detecting QEMU_CAPS_DISK_SHARE_RW
>   qemu: Retire QEMU_CAPS_DISK_SHARE_RW
>   qemu: Assume QEMU_CAPS_DISK_WRITE_CACHE
>   qemu_capabilities: Stop detecting QEMU_CAPS_DISK_WRITE_CACHE
>   qemu: Retire QEMU_CAPS_DISK_WRITE_CACHE

For the above patches:

Reviewed-by: Peter Krempa 

The following two are excluded:

>   tests: Make qemuAgent single sync
>   qemu_agent: Drop @singleSync from _qemuAgent

First one breaks test-suite, second one can't be applied without first one.



Re: [PATCH 16/48] qemu: Retire QEMU_CAPS_QOM_LIST_PROPERTIES

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 15/48] qemu_capabilities: Stop detecting QEMU_CAPS_QOM_LIST_PROPERTIES

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
29 files changed, 29 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 14/48] qemu: Assume QEMU_CAPS_QOM_LIST_PROPERTIES

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v2.12.0-rc0~48^2~25 the
qom-list-properties command is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 6 --
1 file changed, 6 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 13/48] qemu: Retire QEMU_CAPS_DUMP_COMPLETED

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 12/48] qemu_capabilities: Stop detecting QEMU_CAPS_DUMP_COMPLETED

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 13 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml |  1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   |  1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   |  1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  |  1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml |  1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   |  1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml |  1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  |  1 -
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   |  1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  |  1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml |  1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   |  1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml |  1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   |  1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  |  1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml |  1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   |  1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  |  1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  |  1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml |  1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   |  1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  |  1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml |  1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   |  1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  |  1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   |  1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  |  1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  |  1 -
29 files changed, 41 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 11/48] qemu: Assume QEMU_CAPS_DUMP_COMPLETED

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v2.6.0-rc0~74^2~6 the
DUMP_COMPLETED event is always available for all QEMU versions we
support (4.2.0, currently). Therefore, we can assume the
capability is always set and thus doesn't need to be checked for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_driver.c | 26 --
1 file changed, 8 insertions(+), 18 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 03/48] tests: Make qemuAgent single sync

2022-11-08 Thread Michal Prívozník
On 11/8/22 09:44, Peter Krempa wrote:
> On Tue, Nov 08, 2022 at 09:29:05 +0100, Michal Privoznik wrote:
>> The qemuAgent has option to issue guest-sync command before each
>> intended command or issue the sync commend just once, right after
>> the socked is opened and before the first intended command is
>> issued. The latter is referred to as single sync agent and is
>> enabled by VSERPORT_CHANGED event which allows us to detect
>> when the agent (dis-)connects in the guest.
>>
>> Now, every QEMU that we support (4.2.0 or newer) has the event
>> and thus will use single sync agent. Therefore, adjust
>> qemuagenttest to make it test what's used in the real world,
>> rather than old approach.
>>
>> Signed-off-by: Michal Privoznik 
>> ---
>>  tests/qemuagenttest.c| 50 +++-
>>  tests/qemumonitortestutils.c |  2 +-
>>  2 files changed, 4 insertions(+), 48 deletions(-)
> 
> The 'qemuagenttest' is broken after this commit:
> 
>  1) FSFreeze  ...
> expected command 'guest-fsfreeze-freeze' got 'guest-sync'
> 

You have to fetch current master. It requires fix to a regression I've
merged just before sending these.

  qemu_agent: Bring back single sync

Michal



Re: [PATCH 10/48] qemu: Retire QEMU_CAPS_VSERPORT_CHANGE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 09/48] qemu_capabilities: Stop detecting QEMU_CAPS_VSERPORT_CHANGE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
29 files changed, 29 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [libvirt] conf: Allow > UINT_MAX of cache for NUMA nodes

2022-11-08 Thread Michal Prívozník
On 11/5/22 01:20, Lin Yang wrote:
> The high-bandwidth memory (HBM) in cache mode might be greater than
> UINT_MAX of cache per NUMA node, so change to unsigned long long.
> 
> Signed-off-by: Lin Yang 
> ---
>  src/conf/capabilities.c | 70 +++--
>  src/conf/numa_conf.c|  2 +-
>  src/conf/numa_conf.h|  2 +-
>  3 files changed, 48 insertions(+), 26 deletions(-)
> 
> diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
> index e498c77efc..85c06f0d2b 100644
> --- a/src/conf/capabilities.c
> +++ b/src/conf/capabilities.c
> @@ -1549,10 +1549,10 @@ virCapabilitiesGetNUMAPagesInfo(int node,
>  
>  
>  static int
> -virCapabilitiesGetNodeCacheReadFile(const char *prefix,
> -const char *dir,
> -const char *file,
> -unsigned int *value)
> +virCapabilitiesGetNodeCacheReadFileUint(const char *prefix,
> +const char *dir,
> +const char *file,
> +unsigned int *value)
>  {
>  g_autofree char *path = g_build_filename(prefix, dir, file, NULL);
>  int rv = virFileReadValueUint(value, "%s", path);
> @@ -1570,6 +1570,28 @@ virCapabilitiesGetNodeCacheReadFile(const char *prefix,
>  }
>  
>  
> +static int
> +virCapabilitiesGetNodeCacheReadFileUllong(const char *prefix,
> +  const char *dir,
> +  const char *file,
> +  unsigned long long *value)
> +{
> +g_autofree char *path = g_build_filename(prefix, dir, file, NULL);
> +int rv = virFileReadValueUllong(value, "%s", path);
> +
> +if (rv < 0) {
> +if (rv == -2) {
> +virReportError(VIR_ERR_INTERNAL_ERROR,
> +   _("File '%s' does not exist"),
> +   path);
> +}
> +return -1;
> +}
> +
> +return 0;
> +}
> +
> +
>  static int
>  virCapsHostNUMACellCacheComparator(const void *a,
> const void *b)
> @@ -1612,18 +1634,18 @@ virCapabilitiesGetNodeCache(int node,
>  return -1;
>  }
>  
> -if (virCapabilitiesGetNodeCacheReadFile(path, entry->d_name,
> -"size", &cache.size) < 0)
> +if (virCapabilitiesGetNodeCacheReadFileUllong(path, entry->d_name,
> +  "size", &cache.size) < 
> 0)

Ah, correct. Even kernel formats this as %llu (from drivers/base/node.c):

CACHE_ATTR(size, "%llu")
CACHE_ATTR(line_size, "%u")
CACHE_ATTR(indexing, "%u")
CACHE_ATTR(write_policy, "%u")

Reviewed-by: Michal Privoznik 

and pushed.

Michal



Re: [PATCH 07/48] qemu: Assume QEMU_CAPS_VSERPORT_CHANGE

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v2.1.0-rc0~18^2~2 the
VSERPORT_CHANGE event is always available for all QEMU versions
we support (4.2.0, currently). Therefore, we can assume the
capability is always set and thus doesn't need to be checked for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_process.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 06/48] qemu: Retire QEMU_CAPS_NUMA

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 05/48] qemu_capabilities: Stop detecting QEMU_CAPS_NUMA

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_capabilities.c  | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
29 files changed, 29 deletions(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 04/48] qemu: Assume QEMU_CAPS_NUMA

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

Introduced in QEMU's commit of v3.0.0-rc0~124^2~1 the
set-numa-node command is always available for all QEMU versions
we support (4.2.0, currently). Therefore, we can assume the
capability is always set and thus doesn't need to be checked for.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_domain.c| 10 +++--
src/qemu/qemu_validate.c  | 21 ---
tests/qemuxml2argvdata/cpu-numa-disjoint.err  |  1 -
.../fd-memory-numa-topology2.args |  2 +-
.../fd-memory-numa-topology2.xml  |  2 +-
.../fd-memory-numa-topology3.args |  2 +-
.../fd-memory-numa-topology3.xml  |  2 +-
tests/qemuxml2argvdata/numatune-memnode.err   |  1 -
tests/qemuxml2argvtest.c  | 21 +++
tests/qemuxml2xmltest.c   | 12 +--
10 files changed, 21 insertions(+), 53 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/cpu-numa-disjoint.err
delete mode 100644 tests/qemuxml2argvdata/numatune-memnode.err



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 02/48] qemu: Acquire QUERY job in qemuDomainQueryWakeupSuspendSupport()

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

The qemuDomainQueryWakeupSuspendSupport() does not change state
of the domain as it just runs 'query-current-machine' QMP
command. Therefore, there's no need for it to acquire MODIFY job,
QUERY job is perfectly okay.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 01/48] qemu: Drop misleading comment for qemuDomainQueryWakeupSuspendSupport()

2022-11-08 Thread Ján Tomko

On a Tuesday in 2022, Michal Privoznik wrote:

The was an attempt to document the retvals for
qemuDomainQueryWakeupSuspendSupport(). However, it's misleading
because in reality, the function can return nothing but 0 or -1,
but the comment implies retval of 1 too.

Since the set of possible return values complies with our
unwritten rule (0 for success, -1 for error), there's no real
value in having the comment and as such can be dropped.

Signed-off-by: Michal Privoznik 
---
src/qemu/qemu_driver.c | 1 -
1 file changed, 1 deletion(-)



Reviewed-by: Ján Tomko 

Jano



Re: [PATCH 03/48] tests: Make qemuAgent single sync

2022-11-08 Thread Peter Krempa
On Tue, Nov 08, 2022 at 09:29:05 +0100, Michal Privoznik wrote:
> The qemuAgent has option to issue guest-sync command before each
> intended command or issue the sync commend just once, right after
> the socked is opened and before the first intended command is
> issued. The latter is referred to as single sync agent and is
> enabled by VSERPORT_CHANGED event which allows us to detect
> when the agent (dis-)connects in the guest.
> 
> Now, every QEMU that we support (4.2.0 or newer) has the event
> and thus will use single sync agent. Therefore, adjust
> qemuagenttest to make it test what's used in the real world,
> rather than old approach.
> 
> Signed-off-by: Michal Privoznik 
> ---
>  tests/qemuagenttest.c| 50 +++-
>  tests/qemumonitortestutils.c |  2 +-
>  2 files changed, 4 insertions(+), 48 deletions(-)

The 'qemuagenttest' is broken after this commit:

 1) FSFreeze  ...
expected command 'guest-fsfreeze-freeze' got 'guest-sync'



Re: [PATCH 03/48] tests: Make qemuAgent single sync

2022-11-08 Thread Peter Krempa
On Tue, Nov 08, 2022 at 09:29:05 +0100, Michal Privoznik wrote:
> The qemuAgent has option to issue guest-sync command before each
> intended command or issue the sync commend just once, right after
> the socked is opened and before the first intended command is

*socket

> issued. The latter is referred to as single sync agent and is
> enabled by VSERPORT_CHANGED event which allows us to detect
> when the agent (dis-)connects in the guest.
> 
> Now, every QEMU that we support (4.2.0 or newer) has the event
> and thus will use single sync agent. Therefore, adjust
> qemuagenttest to make it test what's used in the real world,
> rather than old approach.
> 
> Signed-off-by: Michal Privoznik 
> ---
>  tests/qemuagenttest.c| 50 +++-
>  tests/qemumonitortestutils.c |  2 +-
>  2 files changed, 4 insertions(+), 48 deletions(-)



[PATCH 31/48] qemu: Assume QEMU_CAPS_VIRTIO_NET_HOST_MTU

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v2.9.0-rc0~162^2~10 the .host_mtu
attribute of virtio-net device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_validate.c | 8 
 tests/qemuxml2xmltest.c  | 2 +-
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 88f2aa8c49..c01bc6f8b5 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -1889,14 +1889,6 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef 
*net,
_("virtio rss hash report is not supported with 
this QEMU binary"));
 return -1;
 }
-
-if (net->mtu &&
-!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_HOST_MTU)) {
-virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-   _("setting MTU is not supported with this "
- "QEMU binary"));
-return -1;
-}
 }
 
 if (net->mtu &&
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index e8261b7e8c..3a117ff137 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -493,7 +493,7 @@ mymain(void)
 DO_TEST_NOCAPS("watchdog");
 DO_TEST("net-bandwidth", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC);
 DO_TEST("net-bandwidth2", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC);
-DO_TEST("net-mtu", QEMU_CAPS_VIRTIO_NET_HOST_MTU);
+DO_TEST_NOCAPS("net-mtu");
 DO_TEST_NOCAPS("net-coalesce");
 DO_TEST_NOCAPS("net-many-models");
 DO_TEST("net-vdpa", QEMU_CAPS_NETDEV_VHOST_VDPA);
-- 
2.37.4



[PATCH 21/48] qemu: Retire QEMU_CAPS_BITMAP_MERGE

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_capabilities.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index a16abbd02a..5393764844 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -528,7 +528,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
   "machine.virt.iommu", /* QEMU_CAPS_MACHINE_VIRT_IOMMU */
 
   /* 330 */
-  "bitmap-merge", /* QEMU_CAPS_BITMAP_MERGE */
+  "bitmap-merge", /* X_QEMU_CAPS_BITMAP_MERGE */
   "nbd-bitmap", /* QEMU_CAPS_NBD_BITMAP */
   "x86-max-cpu", /* QEMU_CAPS_X86_MAX_CPU */
   "cpu-unavailable-features", /* 
QEMU_CAPS_CPU_UNAVAILABLE_FEATURES */
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index cccb6bad83..813b300838 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -507,7 +507,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for 
syntax-check */
 QEMU_CAPS_MACHINE_VIRT_IOMMU, /* -machine virt,iommu */
 
 /* 330 */
-QEMU_CAPS_BITMAP_MERGE, /* block-dirty-bitmap-merge */
+X_QEMU_CAPS_BITMAP_MERGE, /* block-dirty-bitmap-merge */
 QEMU_CAPS_NBD_BITMAP, /* nbd-server-add supports bitmap */
 QEMU_CAPS_X86_MAX_CPU, /* max-x86_64-cpu type exists */
 QEMU_CAPS_CPU_UNAVAILABLE_FEATURES, /* "unavailable-features" CPU property 
*/
-- 
2.37.4



[PATCH 48/48] qemu: Retire QEMU_CAPS_DISK_WRITE_CACHE

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_capabilities.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 0b267e4f30..4c301c3638 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -469,7 +469,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
   "pcie-pci-bridge", /* QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE */
   "seccomp-blacklist", /* X_QEMU_CAPS_SECCOMP_BLACKLIST */
   "query-cpus-fast", /* X_QEMU_CAPS_QUERY_CPUS_FAST */
-  "disk-write-cache", /* QEMU_CAPS_DISK_WRITE_CACHE */
+  "disk-write-cache", /* X_QEMU_CAPS_DISK_WRITE_CACHE */
 
   /* 290 */
   "nbd-tls", /* QEMU_CAPS_NBD_TLS */
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index ead8ef45d9..c79bc7cd24 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -448,7 +448,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for 
syntax-check */
 QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, /* -device pcie-pci-bridge */
 X_QEMU_CAPS_SECCOMP_BLACKLIST, /* -sandbox.elevateprivileges */
 X_QEMU_CAPS_QUERY_CPUS_FAST, /* query-cpus-fast command */
-QEMU_CAPS_DISK_WRITE_CACHE, /* qemu block frontends support write-cache 
param */
+X_QEMU_CAPS_DISK_WRITE_CACHE, /* qemu block frontends support write-cache 
param */
 
 /* 290 */
 QEMU_CAPS_NBD_TLS, /* NBD server supports TLS transport */
-- 
2.37.4



[PATCH 41/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c  | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
 28 files changed, 28 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 538ebe0ede..8202e1ecca 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1415,7 +1415,6 @@ virQEMUCapsDevicePropsVirtioBlkSCSIDefault(virJSONValue 
*props,
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioBlk[] = {
 { "scsi", QEMU_CAPS_VIRTIO_BLK_SCSI, 
virQEMUCapsDevicePropsVirtioBlkSCSIDefault },
-{ "num-queues", QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES, NULL },
 { "queue-size", QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE, NULL },
 { "share-rw", QEMU_CAPS_DISK_SHARE_RW, NULL },
 { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL },
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index be96f5e31e..483e1a5d32 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -76,7 +76,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index 3210276ed1..a3eabbd66d 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -74,7 +74,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
index 0503b343d0..8f9b7f8e6c 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
@@ -41,7 +41,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index bbf40d403f..9e92ac61d7 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -105,7 +105,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index c47a2f5375..bd8a49c98a 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -78,7 +78,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index c3f4da9f18..3f250c17d9 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -76,7 +76,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
index 2f34912311..381f2cb84a 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
@@ -77,7 +77,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
index ba60c52251..d207ed6e30 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -105,7 +105,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
index 349139c1db..654088af75 1

[PATCH 29/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c  | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
 28 files changed, 28 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index e511c279c4..7091cc3a25 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1424,7 +1424,6 @@ static struct virQEMUCapsDevicePropsFlags 
virQEMUCapsDevicePropsVirtioBlk[] = {
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = {
-{ "tx_queue_size", QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE, NULL },
 { "host_mtu", QEMU_CAPS_VIRTIO_NET_HOST_MTU, NULL },
 { "failover", QEMU_CAPS_VIRTIO_NET_FAILOVER, NULL },
 { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index 89f64801f9..dee48940c2 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -76,7 +76,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index 76cd22ca55..a3a0cd6f6f 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -74,7 +74,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
index 80845b2eff..6e93dffe7d 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
@@ -41,7 +41,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index 773575996f..fab759da81 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -105,7 +105,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index b3a415db32..8eb16fb09f 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -78,7 +78,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index 5ec1468373..2a9d308ede 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -76,7 +76,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
index cc54899152..8f6bdc9138 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
@@ -77,7 +77,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
index 6d07593242..554c04ed11 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -105,7 +105,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
index af6d109c6e..dd5d19f836 100644
--- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
+++ b/t

[PATCH 46/48] qemu: Assume QEMU_CAPS_DISK_WRITE_CACHE

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v2.7.0-rc0~32^2~5 the .write-cache
attribute of virtio-blk dvice is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

The change in some .args is justified, because the qemuxml2argvdatatest
runs these test caseses with very minimalistic set of capabilities,
that's nowhere near real life scenario.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_command.c  | 3 +--
 tests/qemuxml2argvdata/controller-order.args | 2 +-
 tests/qemuxml2argvdata/video-device-pciaddr-default.args | 2 +-
 tests/qemuxml2argvdata/video-qxl-device-vgamem.args  | 2 +-
 tests/qemuxml2argvdata/video-qxl-device.args | 2 +-
 tests/qemuxml2argvdata/video-qxl-sec-device-vgamem.args  | 2 +-
 tests/qemuxml2argvdata/video-qxl-sec-device.args | 2 +-
 tests/qemuxml2argvdata/video-vga-device-vgamem.args  | 2 +-
 tests/qemuxml2argvdata/video-vga-device.args | 2 +-
 tests/qemuxml2argvdata/video-virtio-gpu-device.args  | 2 +-
 tests/qemuxml2argvdata/video-virtio-gpu-sdl-gl.args  | 2 +-
 tests/qemuxml2argvdata/video-virtio-gpu-spice-gl.args| 2 +-
 tests/qemuxml2argvdata/video-virtio-gpu-virgl.args   | 2 +-
 tests/qemuxml2argvdata/video-virtio-vga.args | 2 +-
 14 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f775170e32..3236196c14 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1900,8 +1900,7 @@ qemuBuildDiskDeviceProps(const virDomainDef *def,
 if (disk->cachemode != VIR_DOMAIN_DISK_CACHE_DEFAULT) {
 /* VIR_DOMAIN_DISK_DEVICE_LUN translates into 'scsi-block'
  * where any caching setting makes no sense. */
-if (disk->device != VIR_DOMAIN_DISK_DEVICE_LUN &&
-virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISK_WRITE_CACHE)) {
+if (disk->device != VIR_DOMAIN_DISK_DEVICE_LUN) {
 bool wb;
 
 if (qemuDomainDiskCachemodeFlags(disk->cachemode, &wb, NULL,
diff --git a/tests/qemuxml2argvdata/controller-order.args 
b/tests/qemuxml2argvdata/controller-order.args
index c0ba064bec..242639591c 100644
--- a/tests/qemuxml2argvdata/controller-order.args
+++ b/tests/qemuxml2argvdata/controller-order.args
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fdr/.config \
 -device usb-ccid,id=ccid0,bus=usb.0,port=1.1 \
 -blockdev 
'{"driver":"file","filename":"/tmp/fdr.img","aio":"native","node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}'
 \
 -blockdev 
'{"node-name":"libvirt-2-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"raw","file":"libvirt-2-storage"}'
 \
--device 
virtio-blk-pci,bus=pci.0,addr=0x5,share-rw=on,drive=libvirt-2-format,id=virtio-disk0,bootindex=1
 \
+-device 
virtio-blk-pci,bus=pci.0,addr=0x5,share-rw=on,drive=libvirt-2-format,id=virtio-disk0,bootindex=1,write-cache=on
 \
 -blockdev 
'{"driver":"file","filename":"/tmp/Fedora-17-x86_64-Live-Desktop.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'
 \
 -blockdev 
'{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}'
 \
 -device ide-cd,bus=ide.1,unit=0,drive=libvirt-1-format,id=ide0-1-0 \
diff --git a/tests/qemuxml2argvdata/video-device-pciaddr-default.args 
b/tests/qemuxml2argvdata/video-device-pciaddr-default.args
index e216aacc64..9b421c012d 100644
--- a/tests/qemuxml2argvdata/video-device-pciaddr-default.args
+++ b/tests/qemuxml2argvdata/video-device-pciaddr-default.args
@@ -27,7 +27,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -usb \
 -blockdev 
'{"driver":"file","filename":"/var/lib/libvirt/images/QEMUGuest1","node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}'
 \
 -blockdev 
'{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage"}'
 \
--device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 
\
+-device 
ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1,write-cache=on
 \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -vnc 127.0.0.1:0,audiodev=audio1 \
 -device 
qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x3
 \
diff --git a/tests/qemuxml2argvdata/video-qxl-device-vgamem.args 
b/tests/qemuxml2argvdata/video-qxl-device-vgamem.args
index 1332f798da..14b3931140 100644
--- a/tests/qemuxml2argvdata/video-qxl-device-vgamem.args
+++ b/tests/qemuxml2argvdata/video-qxl-device-vgamem.args
@@ -28,7 +28,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -usb \
 -blockdev 
'{"driver":"file","filename":"/var/lib/libvirt/images/QEMUGuest1","node-name":"libvirt-1-storage","cache":{"direct":true,"

[PATCH 32/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_HOST_MTU

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c  | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
 28 files changed, 28 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 33bedbb7e5..c91ffe4936 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1424,7 +1424,6 @@ static struct virQEMUCapsDevicePropsFlags 
virQEMUCapsDevicePropsVirtioBlk[] = {
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = {
-{ "host_mtu", QEMU_CAPS_VIRTIO_NET_HOST_MTU, NULL },
 { "failover", QEMU_CAPS_VIRTIO_NET_FAILOVER, NULL },
 { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
 { "rss", QEMU_CAPS_VIRTIO_NET_RSS, NULL },
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index dee48940c2..0ca14c0c8a 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -72,7 +72,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index a3a0cd6f6f..d1f129e082 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -68,7 +68,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
index 6e93dffe7d..0219143b00 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
@@ -38,7 +38,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index fab759da81..5cf91a2e82 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -94,7 +94,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index 8eb16fb09f..2e06e7db5e 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -74,7 +74,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index 2a9d308ede..ca835b9d4f 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -69,7 +69,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
index 8f6bdc9138..c1ffd75173 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
@@ -73,7 +73,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
index 554c04ed11..354a03d898 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -94,7 +94,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
index dd5d19f836..3ea4f6bd87 100644
--- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdat

[PATCH 20/48] qemu_capabilities: Stop detecting QEMU_CAPS_BITMAP_MERGE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c  | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
 29 files changed, 29 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 93a9275196..a16abbd02a 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1211,7 +1211,6 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
 { "query-hotpluggable-cpus", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS },
 { "query-cpu-model-expansion", QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION },
 { "query-cpu-definitions", QEMU_CAPS_QUERY_CPU_DEFINITIONS },
-{ "block-dirty-bitmap-merge", QEMU_CAPS_BITMAP_MERGE },
 { "query-cpu-model-baseline", QEMU_CAPS_QUERY_CPU_MODEL_BASELINE },
 { "query-cpu-model-comparison", QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON },
 { "block-export-add", QEMU_CAPS_BLOCK_EXPORT_ADD },
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index ccb2c48947..d00ebaa0aa 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -100,7 +100,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index f9e6fa70d2..3d4b99246e 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -100,7 +100,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
index 5f813be761..05539c5822 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
@@ -68,7 +68,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index 48dc757437..6a16855793 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -134,7 +134,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index 1b5efa794b..2f19631357 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -103,7 +103,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index 1048ca36f6..3bde244867 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -104,7 +104,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
index 18f2f64b6f..a7b2645933 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
@@ -98,7 +98,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
index 2685aef4a1..28a67ce62f 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -134,7 +134,6 @@
   
   
   
-  
   
   
   
diff --git a/

[PATCH 18/48] qemu_capabilities: Stop detecting QEMU_CAPS_QUERY_CURRENT_MACHINE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c  | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
 29 files changed, 29 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 4223d0e1fe..42f2c77061 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1211,7 +1211,6 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
 { "query-hotpluggable-cpus", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS },
 { "query-cpu-model-expansion", QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION },
 { "query-cpu-definitions", QEMU_CAPS_QUERY_CPU_DEFINITIONS },
-{ "query-current-machine", QEMU_CAPS_QUERY_CURRENT_MACHINE },
 { "block-dirty-bitmap-merge", QEMU_CAPS_BITMAP_MERGE },
 { "query-cpu-model-baseline", QEMU_CAPS_QUERY_CPU_MODEL_BASELINE },
 { "query-cpu-model-comparison", QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON },
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index 4981fd2f2b..ccb2c48947 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -99,7 +99,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index eb6d221822..f9e6fa70d2 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -100,7 +100,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
index 5999e3b610..5f813be761 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
@@ -68,7 +68,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index 246d2ca3d4..48dc757437 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -134,7 +134,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index 21f7e48fd3..1b5efa794b 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -102,7 +102,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index ccd3cab037..1048ca36f6 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -104,7 +104,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
index adf9837944..18f2f64b6f 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
@@ -98,7 +98,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
index a8835e3f96..2685aef4a1 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -134,7 +134,6 @@
   
   
   
-  
   
   
   
diff 

[PATCH 44/48] qemu_capabilities: Stop detecting QEMU_CAPS_DISK_SHARE_RW

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c  | 4 
 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
 29 files changed, 32 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 322c002e84..6b9b4e96de 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1416,7 +1416,6 @@ virQEMUCapsDevicePropsVirtioBlkSCSIDefault(virJSONValue 
*props,
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioBlk[] = {
 { "scsi", QEMU_CAPS_VIRTIO_BLK_SCSI, 
virQEMUCapsDevicePropsVirtioBlkSCSIDefault },
 { "queue-size", QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE, NULL },
-{ "share-rw", QEMU_CAPS_DISK_SHARE_RW, NULL },
 { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL },
 { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
 };
@@ -1450,14 +1449,12 @@ static struct virQEMUCapsDevicePropsFlags 
virQEMUCapsDevicePropsVfioPCI[] = {
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsSCSIDisk[] = {
 { "channel", QEMU_CAPS_SCSI_DISK_CHANNEL, NULL },
 { "wwn", QEMU_CAPS_SCSI_DISK_WWN, NULL },
-{ "share-rw", QEMU_CAPS_DISK_SHARE_RW, NULL },
 { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL },
 { "rotation_rate", QEMU_CAPS_ROTATION_RATE, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsIDEDrive[] = {
 { "wwn", QEMU_CAPS_IDE_DRIVE_WWN, NULL },
-{ "share-rw", QEMU_CAPS_DISK_SHARE_RW, NULL },
 { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL },
 };
 
@@ -1473,7 +1470,6 @@ static struct virQEMUCapsDevicePropsFlags 
virQEMUCapsDevicePropsUSBRedir[] = {
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBStorage[] = 
{
 { "removable", QEMU_CAPS_USB_STORAGE_REMOVABLE, NULL },
-{ "share-rw", QEMU_CAPS_DISK_SHARE_RW, NULL },
 { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL },
 };
 
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index 483e1a5d32..d36f3ff6ab 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -77,7 +77,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index a3eabbd66d..7afd35f5ac 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -75,7 +75,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
index 8f9b7f8e6c..92486c7a4b 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
@@ -42,7 +42,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index 9e92ac61d7..04e8fc40dd 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -106,7 +106,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index bd8a49c98a..551eded1a5 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch6

[PATCH 10/48] qemu: Retire QEMU_CAPS_VSERPORT_CHANGE

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_capabilities.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 6d5d994594..17c1e7fefc 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -356,7 +356,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
   "chardev-file-append", /* X_QEMU_CAPS_CHARDEV_FILE_APPEND */
   "ich9-disable-s3", /* QEMU_CAPS_ICH9_DISABLE_S3 */
   "ich9-disable-s4", /* QEMU_CAPS_ICH9_DISABLE_S4 */
-  "vserport-change-event", /* QEMU_CAPS_VSERPORT_CHANGE */
+  "vserport-change-event", /* X_QEMU_CAPS_VSERPORT_CHANGE */
   "virtio-balloon-pci.deflate-on-oom", /* 
QEMU_CAPS_VIRTIO_BALLOON_AUTODEFLATE */
 
   /* 210 */
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index dbfa5cc1d8..884c512265 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -334,7 +334,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for 
syntax-check */
 X_QEMU_CAPS_CHARDEV_FILE_APPEND, /* -chardev file,append=on|off */
 QEMU_CAPS_ICH9_DISABLE_S3, /* -M q35 S3 BIOS Advertisement on/off */
 QEMU_CAPS_ICH9_DISABLE_S4, /* -M q35 S4 BIOS Advertisement on/off */
-QEMU_CAPS_VSERPORT_CHANGE, /* VSERPORT_CHANGE event */
+X_QEMU_CAPS_VSERPORT_CHANGE, /* VSERPORT_CHANGE event */
 QEMU_CAPS_VIRTIO_BALLOON_AUTODEFLATE, /* virtio-balloon-{device,pci,ccw}.
* deflate-on-oom */
 
-- 
2.37.4



[PATCH 42/48] qemu: Retire QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_capabilities.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 8202e1ecca..322c002e84 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -441,7 +441,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
   "chardev-reconnect", /* QEMU_CAPS_CHARDEV_RECONNECT */
   "virtio-gpu.max_outputs", /* X_QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS 
*/
   "vxhs", /* QEMU_CAPS_VXHS */
-  "virtio-blk.num-queues", /* QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES */
+  "virtio-blk.num-queues", /* X_QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES */
 
   /* 270 */
   "machine.pseries.resize-hpt", /* 
X_QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT */
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 46ff416eb1..0a62765a04 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -420,7 +420,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for 
syntax-check */
 QEMU_CAPS_CHARDEV_RECONNECT, /* -chardev reconnect */
 X_QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS, /* -device 
virtio-(vga|gpu-*),max-outputs= */
 QEMU_CAPS_VXHS, /* -drive file.driver=vxhs via query-qmp-schema */
-QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES, /* virtio-blk-*.num-queues */
+X_QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES, /* virtio-blk-*.num-queues */
 
 /* 270 */
 X_QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT, /* -machine pseries,resize-hpt */
-- 
2.37.4



[PATCH 43/48] qemu: Assume QEMU_CAPS_DISK_SHARE_RW

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v2.9.0-rc0~48^2~25 the .share-rw
attribute of virtio-blk device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

The change in controller-order.args is justified, because the
qemuxml2argvdatatest runs the test case with very minimalistic
set of capabilities, that's nowhere near real life scenario.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_command.c  | 3 +--
 tests/qemuxml2argvdata/controller-order.args | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b0c9fb7059..f775170e32 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1871,8 +1871,7 @@ qemuBuildDiskDeviceProps(const virDomainDef *def,
 if (qemuBuildDeviceAddressProps(props, def, &disk->info) < 0)
 return NULL;
 
-if (disk->src->shared &&
-virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISK_SHARE_RW))
+if (disk->src->shared)
 shareRW = VIR_TRISTATE_SWITCH_ON;
 
 if (virStorageSourceGetActualType(disk->src) == 
VIR_STORAGE_TYPE_VHOST_USER) {
diff --git a/tests/qemuxml2argvdata/controller-order.args 
b/tests/qemuxml2argvdata/controller-order.args
index fd9eba459a..c0ba064bec 100644
--- a/tests/qemuxml2argvdata/controller-order.args
+++ b/tests/qemuxml2argvdata/controller-order.args
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fdr/.config \
 -device usb-ccid,id=ccid0,bus=usb.0,port=1.1 \
 -blockdev 
'{"driver":"file","filename":"/tmp/fdr.img","aio":"native","node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}'
 \
 -blockdev 
'{"node-name":"libvirt-2-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"raw","file":"libvirt-2-storage"}'
 \
--device 
virtio-blk-pci,bus=pci.0,addr=0x5,drive=libvirt-2-format,id=virtio-disk0,bootindex=1
 \
+-device 
virtio-blk-pci,bus=pci.0,addr=0x5,share-rw=on,drive=libvirt-2-format,id=virtio-disk0,bootindex=1
 \
 -blockdev 
'{"driver":"file","filename":"/tmp/Fedora-17-x86_64-Live-Desktop.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'
 \
 -blockdev 
'{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}'
 \
 -device ide-cd,bus=ide.1,unit=0,drive=libvirt-1-format,id=ide0-1-0 \
-- 
2.37.4



[PATCH 26/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c  | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
 28 files changed, 28 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 1f28c7c772..29a2cf6aaa 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1424,7 +1424,6 @@ static struct virQEMUCapsDevicePropsFlags 
virQEMUCapsDevicePropsVirtioBlk[] = {
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = {
-{ "rx_queue_size", QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE, NULL },
 { "tx_queue_size", QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE, NULL },
 { "host_mtu", QEMU_CAPS_VIRTIO_NET_HOST_MTU, NULL },
 { "failover", QEMU_CAPS_VIRTIO_NET_FAILOVER, NULL },
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index d240a0da7d..89f64801f9 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -68,7 +68,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index c766c0cf4a..76cd22ca55 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -64,7 +64,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
index 2bd0530e5e..80845b2eff 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
@@ -36,7 +36,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index 919f6363ba..773575996f 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -89,7 +89,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index e380e137fb..b3a415db32 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -70,7 +70,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index 9a689e43f6..5ec1468373 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -65,7 +65,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
index b6bf1b0509..cc54899152 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
@@ -70,7 +70,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
index 6fb38e874e..6d07593242 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -89,7 +89,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
index 3f5577d84f..af6d109c6e 100644
--- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_6

[PATCH 39/48] qemu: Retire QEMU_CAPS_BLOCKIO

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_capabilities.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index caa988a478..538ebe0ede 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -207,7 +207,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
 
   /* 100 */
   "virtio-scsi-pci", /* QEMU_CAPS_VIRTIO_SCSI */
-  "blockio", /* QEMU_CAPS_BLOCKIO */
+  "blockio", /* X_QEMU_CAPS_BLOCKIO */
   "disable-s3", /* QEMU_CAPS_PIIX_DISABLE_S3 */
   "disable-s4", /* QEMU_CAPS_PIIX_DISABLE_S4 */
   "usb-redir.filter", /* QEMU_CAPS_USB_REDIR_FILTER */
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 606731a641..46ff416eb1 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -185,7 +185,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for 
syntax-check */
 
 /* 100 */
 QEMU_CAPS_VIRTIO_SCSI, /* -device virtio-scsi-* */
-QEMU_CAPS_BLOCKIO, /* -device ...logical_block_size & co */
+X_QEMU_CAPS_BLOCKIO, /* -device ...logical_block_size & co */
 QEMU_CAPS_PIIX_DISABLE_S3, /* -M pc S3 BIOS Advertisement on/off */
 QEMU_CAPS_PIIX_DISABLE_S4, /* -M pc S4 BIOS Advertisement on/off */
 QEMU_CAPS_USB_REDIR_FILTER, /* usb-redir.filter */
-- 
2.37.4



[PATCH 47/48] qemu_capabilities: Stop detecting QEMU_CAPS_DISK_WRITE_CACHE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c  | 4 
 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
 29 files changed, 32 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 6520f52c40..0b267e4f30 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1416,7 +1416,6 @@ virQEMUCapsDevicePropsVirtioBlkSCSIDefault(virJSONValue 
*props,
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioBlk[] = {
 { "scsi", QEMU_CAPS_VIRTIO_BLK_SCSI, 
virQEMUCapsDevicePropsVirtioBlkSCSIDefault },
 { "queue-size", QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE, NULL },
-{ "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL },
 { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
 };
 
@@ -1449,13 +1448,11 @@ static struct virQEMUCapsDevicePropsFlags 
virQEMUCapsDevicePropsVfioPCI[] = {
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsSCSIDisk[] = {
 { "channel", QEMU_CAPS_SCSI_DISK_CHANNEL, NULL },
 { "wwn", QEMU_CAPS_SCSI_DISK_WWN, NULL },
-{ "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL },
 { "rotation_rate", QEMU_CAPS_ROTATION_RATE, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsIDEDrive[] = {
 { "wwn", QEMU_CAPS_IDE_DRIVE_WWN, NULL },
-{ "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPiix4PM[] = {
@@ -1470,7 +1467,6 @@ static struct virQEMUCapsDevicePropsFlags 
virQEMUCapsDevicePropsUSBRedir[] = {
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBStorage[] = 
{
 { "removable", QEMU_CAPS_USB_STORAGE_REMOVABLE, NULL },
-{ "write-cache", QEMU_CAPS_DISK_WRITE_CACHE, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsKVMPit[] = {
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index d36f3ff6ab..1f42ff6cf9 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -79,7 +79,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index 7afd35f5ac..047abcee8c 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -77,7 +77,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
index 92486c7a4b..0baeeccb9b 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
@@ -46,7 +46,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index 04e8fc40dd..438927aad0 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -108,7 +108,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index 551eded1a5..ff989e0878 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -81,7 +81,6 @@
   
   
   
-  
   
   
 

[PATCH 36/48] qemu: Retire QEMU_CAPS_VIRTIO_NET_FAILOVER

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_capabilities.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index b51a0a2767..693ce98b3d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -558,7 +558,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
   /* 350 */
   "i8042", /* QEMU_CAPS_DEVICE_I8042 */
   "rng-builtin", /* QEMU_CAPS_OBJECT_RNG_BUILTIN */
-  "virtio-net.failover", /* QEMU_CAPS_VIRTIO_NET_FAILOVER */
+  "virtio-net.failover", /* X_QEMU_CAPS_VIRTIO_NET_FAILOVER */
   "tpm-spapr", /* QEMU_CAPS_DEVICE_TPM_SPAPR */
   "cpu.kvm-no-adjvtime", /* QEMU_CAPS_CPU_KVM_NO_ADJVTIME */
 
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index ff67f58e11..606731a641 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -537,7 +537,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for 
syntax-check */
 /* 350 */
 QEMU_CAPS_DEVICE_I8042, /* PS/2 controller */
 QEMU_CAPS_OBJECT_RNG_BUILTIN, /* -object rng-builtin */
-QEMU_CAPS_VIRTIO_NET_FAILOVER, /* virtio-net-*.failover */
+X_QEMU_CAPS_VIRTIO_NET_FAILOVER, /* virtio-net-*.failover */
 QEMU_CAPS_DEVICE_TPM_SPAPR, /* -device tpm-spapr */
 QEMU_CAPS_CPU_KVM_NO_ADJVTIME, /* cpu.kvm-no-adjvtime */
 
-- 
2.37.4



[PATCH 35/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_FAILOVER

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c  | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml   | 1 -
 tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml  | 1 -
 tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml  | 1 -
 27 files changed, 27 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index a8e4b29349..b51a0a2767 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1424,7 +1424,6 @@ static struct virQEMUCapsDevicePropsFlags 
virQEMUCapsDevicePropsVirtioBlk[] = {
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = {
-{ "failover", QEMU_CAPS_VIRTIO_NET_FAILOVER, NULL },
 { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
 { "rss", QEMU_CAPS_VIRTIO_NET_RSS, NULL },
 };
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index 0ca14c0c8a..06dce09fa9 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -106,7 +106,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
index 0219143b00..43834e1275 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
@@ -73,7 +73,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index 5cf91a2e82..3a9a89d90a 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -144,7 +144,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index 2e06e7db5e..e283e96c2c 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -110,7 +110,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index ca835b9d4f..a7c8d88f9f 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -112,7 +112,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
index c1ffd75173..37a14068d0 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
@@ -103,7 +103,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
index 354a03d898..06913257ef 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -145,7 +145,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
index 3ea4f6bd87..fc11c8a70d 100644
--- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
@@ -144,7 +144,6 @@
   
   
   
-  
   
   
   
diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml 
b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml
index 82f3d77d62..4beb567146 100644
--- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml
@@ -110,7 +110,6 @@
   
   
   
-  
   
   
   
diff --git a/test

[PATCH 14/48] qemu: Assume QEMU_CAPS_QOM_LIST_PROPERTIES

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v2.12.0-rc0~48^2~25 the
qom-list-properties command is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index abb7bb09fd..cfde657394 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -2634,9 +2634,6 @@ virQEMUCapsProbeQMPObjectProperties(virQEMUCaps *qemuCaps,
 {
 size_t i;
 
-if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QOM_LIST_PROPERTIES))
-return 0;
-
 for (i = 0; i < G_N_ELEMENTS(virQEMUCapsObjectProps); i++) {
 virQEMUCapsObjectTypeProps *props = virQEMUCapsObjectProps + i;
 g_auto(GStrv) values = NULL;
@@ -2859,9 +2856,6 @@ virQEMUCapsProbeQMPMachineProps(virQEMUCaps *qemuCaps,
 {
 size_t i;
 
-if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QOM_LIST_PROPERTIES))
-return 0;
-
 for (i = 0; i < G_N_ELEMENTS(virQEMUCapsMachineProps); i++) {
 virQEMUCapsObjectTypeProps props = virQEMUCapsMachineProps[i];
 const char *canon = virQEMUCapsGetCanonicalMachine(qemuCaps, virtType, 
props.type);
-- 
2.37.4



[PATCH 19/48] qemu: Retire QEMU_CAPS_QUERY_CURRENT_MACHINE

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_capabilities.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 42f2c77061..93a9275196 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -524,7 +524,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
   "scsi-disk.device_id", /* X_QEMU_CAPS_SCSI_DISK_DEVICE_ID */
   "virtio-pci-non-transitional", /* 
QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL */
   "overcommit", /* X_QEMU_CAPS_OVERCOMMIT */
-  "query-current-machine", /* QEMU_CAPS_QUERY_CURRENT_MACHINE */
+  "query-current-machine", /* X_QEMU_CAPS_QUERY_CURRENT_MACHINE */
   "machine.virt.iommu", /* QEMU_CAPS_MACHINE_VIRT_IOMMU */
 
   /* 330 */
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 83994be86b..cccb6bad83 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -503,7 +503,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for 
syntax-check */
 X_QEMU_CAPS_SCSI_DISK_DEVICE_ID, /* 'device_id' property of scsi disk */
 QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, /* virtio *-pci-{non-}transitional 
devices */
 X_QEMU_CAPS_OVERCOMMIT, /* -overcommit */
-QEMU_CAPS_QUERY_CURRENT_MACHINE, /* query-current-machine command */
+X_QEMU_CAPS_QUERY_CURRENT_MACHINE, /* query-current-machine command */
 QEMU_CAPS_MACHINE_VIRT_IOMMU, /* -machine virt,iommu */
 
 /* 330 */
-- 
2.37.4



[PATCH 06/48] qemu: Retire QEMU_CAPS_NUMA

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik 
---
 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_capabilities.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index db918952ac..aa771564e3 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -301,7 +301,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
   "active-commit", /* X_QEMU_CAPS_ACTIVE_COMMIT */
   "change-backing-file", /* X_QEMU_CAPS_CHANGE_BACKING_FILE */
   "memory-backend-ram", /* X_QEMU_CAPS_OBJECT_MEMORY_RAM */
-  "numa", /* QEMU_CAPS_NUMA */
+  "numa", /* X_QEMU_CAPS_NUMA */
 
   /* 170 */
   "memory-backend-file", /* X_QEMU_CAPS_OBJECT_MEMORY_FILE */
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 0e0034663c..dbfa5cc1d8 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -279,7 +279,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for 
syntax-check */
 X_QEMU_CAPS_ACTIVE_COMMIT, /* block-commit works without 'top' */
 X_QEMU_CAPS_CHANGE_BACKING_FILE, /* change name of backing file in 
metadata */
 X_QEMU_CAPS_OBJECT_MEMORY_RAM, /* -object memory-backend-ram */
-QEMU_CAPS_NUMA, /* newer -numa handling with disjoint cpu ranges */
+X_QEMU_CAPS_NUMA, /* newer -numa handling with disjoint cpu ranges */
 
 /* 170 */
 X_QEMU_CAPS_OBJECT_MEMORY_FILE, /* -object memory-backend-file */
-- 
2.37.4



  1   2   >