On Fri, Jun 11, 2021 at 17:04:53 +0200, Michal Privoznik wrote:
> The most important patch is 7/7, IMO. The rest is just prep work.
>
> Michal Prívozník (7):
> qemuDomainSupportsVideoVga: Fix const correctness
> qemuBuildDeviceVideoStr: Separate out video module selection
> qemuDeviceVideoGe
On Fri, Jun 11, 2021 at 17:05:00 +0200, Michal Privoznik wrote:
> Now we have everything prepared so that @model doesn't have to be
> rewritten. The correct model can be chosen right from the
> beginning.
>
> Signed-off-by: Michal Privoznik
> ---
> src/qemu/qemu_command.c | 27 --
On Fri, Jun 11, 2021 at 17:04:58 +0200, Michal Privoznik wrote:
> This may look like a step backwards, but it isn't. The point is
> that in near future the chosen model will depend on more than
> just video type.
>
> Signed-off-by: Michal Privoznik
> ---
> src/qemu/qemu_command.c | 41 ++
On Fri, Jun 11, 2021 at 17:04:57 +0200, Michal Privoznik wrote:
> This may look like a step backwards, but it isn't. The point is
> that in near future the chosen model will depend on more than
> just video type.
>
> Signed-off-by: Michal Privoznik
> ---
> src/qemu/qemu_command.c | 56 ++
This function doesn't modify passed video definition. Make the
argument const.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_domain.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 7f
The code that decides video card model is going to be reworked
and expanded. Separate it out into a function.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_command.c | 32 ++--
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_command.c
Now we have everything prepared so that @model doesn't have to be
rewritten. The correct model can be chosen right from the
beginning.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_command.c | 27 ---
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/src
We want to call qemuBuildVirtioDevStr() from
qemuBuildDeviceVideoStr() but only for some models (currently
"virtio-gpu" and "vhost-user-gpu"), not all of them. Move this
logic into qemuDeviceVideoGetModel() because this logic will be
refined.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_com
This may look like a step backwards, but it isn't. The point is
that in near future the chosen model will depend on more than
just video type.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_command.c | 41 +
1 file changed, 21 insertions(+), 20 deletion
This may look like a step backwards, but it isn't. The point is
that in near future the chosen model will depend on more than
just video type.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_command.c | 56 +
1 file changed, 34 insertions(+), 22 deletion
There is the same check written twice (whether given video card
is primary one and whether it supports VGA mode). Write it just
once and store it in a boolean variable.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_command.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff
The most important patch is 7/7, IMO. The rest is just prep work.
Michal Prívozník (7):
qemuDomainSupportsVideoVga: Fix const correctness
qemuBuildDeviceVideoStr: Separate out video module selection
qemuDeviceVideoGetModel: Deduplicate a check
qemu_command: Switch from VIR_ENUM_IMPL(qemuDe
QEMU_CAPS_VIRTIO_S390 can never be asserted any more, add an explicit
check that will reject the 'virtio-s390' address type and remove the
code which would auto-fill them.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain_address.c | 5 -
src/qemu/qemu_validate.c | 6 +-
2 files
The 's390-virtio' machine was removed from qemu in the 2.6 release.
Modernize the test for sclp console since there isn't any other test for
it.
Signed-off-by: Peter Krempa
---
tests/qemuxml2argvdata/console-sclp.args | 28 ---
.../console-sclp.s390x-latest.args| 36
The 's390-virtio' machine was removed from qemu in the 2.6 release.
Use the more modern s390-ccw-virtio machine type and use
VIR_TEST_CAPS_ARCH_LATEST to invoke it.
Signed-off-by: Peter Krempa
---
.../s390-allow-bogus-usb-none.args| 31 ---
...390-allow-bogus-usb-none.s39
We don't support any qemu which would support the 'virtio-s390'
addressing, thus we can drop all code related to it.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c| 6 +-
src/qemu/qemu_domain_address.c | 5 +
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a
IOThreads are supported with all 3 currently supported buses which can
have virtio devices (PCI, CCW, MMIO) , so there's no need for this check.
Additionally this check was buggy in the current location as on e.g.
hotplug cases the address may not yet be assigned for the disk and thus
a bogus erro
QEMU commit 7b3fdbd9a826791bd98e649cf44c0a6129a44179 released in 2.6
dropped the legacy s390 virtio machine and it's devices. Remove our
probing based on the devices.
The probing of properties of the appropriate devices will be removed
subsequently.
Signed-off-by: Peter Krempa
---
src/qemu/qemu
The flag isn't used by the code in any way so it can be dropped from the
legacy test cases.
Signed-off-by: Peter Krempa
---
tests/qemuxml2argvtest.c | 92 ++--
tests/qemuxml2xmltest.c | 24 ---
2 files changed, 41 insertions(+), 75 deletions(-)
diff
qemuDomainDefAddDefaultDevices skipped adding the memballoon for the
's390-virtio' machine type, but since it was removed in qemu 2.6 we can
remove the hack now.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c | 4
1 file changed, 4 deletions(-)
diff --git a/src/qemu/qemu_domain.c b
Don't use the 's390-virtio' machine which was removed in qemu 2.6 and
use real capabilities for the test.
Signed-off-by: Peter Krempa
---
tests/qemuxml2argvdata/s390-defaultconsole.xml| 2 +-
...efaultconsole.xml => s390-defaultconsole.s390x-latest.xml} | 4 +++-
tests/qemuxml2xm
Remove the console, disk, and network test for the legacy s390 machine
which was removed in qemu 2.6. All of these have 'ccw' equivalents.
Signed-off-by: Peter Krempa
---
.../qemuxml2argvdata/console-virtio-s390.args | 29 ---
.../qemuxml2argvdata/console-virtio-s390.xml | 24 --
The switch to internal linebreaking of arguments caused a problem when
generating .args files with VIR_TEST_REGENERATE_OUTPUT as the last
argument isn't terminated with a newline.
Switch to using virCommandToStringBuf and append a newline.
Fixes: 0046e0b1c26c8e0167de4a35be2902b9327b0c51
Signed-of
Give the test QEMU_CAPS_CCW instead of QEMU_CAPS_VIRTIO_S390 since the
latter can never be asserted any more. This preserves what the tests
wants to check so that QEMU_CAPS_VIRTIO_S390 can be removed.
Signed-off-by: Peter Krempa
---
tests/qemuxml2argvtest.c | 3 +--
1 file changed, 1 insertion(+
Base the check on the logic from qemuDomainCheckCCWS390AddressSupport,
which will be removed later.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_validate.c | 20 ++--
tests/qemuxml2argvtest.c | 2 +-
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 94f2fad05a..27af11d0b8 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@
The machine type was removed in qemu 2.6 and no tests now depend on it.
Remove the faking of the machine type support and the capabilities test
for it.
Signed-off-by: Peter Krempa
---
tests/testutilsqemu.c | 2 +-
tests/vircapstest.c | 4
2 files changed, 1 insertion(+), 5 deletions(-)
d
Modify the code in the last two instances in the code to behave as if
the flag is not asserted.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c | 10 --
src/qemu/qemu_hotplug.c | 4
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src
For validation of explicitly configured addresses we already ported the
same style of checks to qemuValidateDomainDeviceDefAddress and implicit
address assignment should do the right thing in the first place, thus
the function is redundant and can be removed.
Signed-off-by: Peter Krempa
---
src/
The 's390-virtio' machine was removed from qemu in the 2.6 release.
Modernize the test for diag288 since there isn't any other test for it.
Signed-off-by: Peter Krempa
---
tests/qemuxml2argvdata/watchdog-diag288.args | 28 ---
.../watchdog-diag288.s390x-latest.args| 36 +
The 's390-virtio' machine was removed from qemu in the 2.6 release.
Use the more modern s390-ccw-virtio machine type and use
VIR_TEST_CAPS_ARCH_LATEST to invoke it.
Signed-off-by: Peter Krempa
---
.../s390-allow-bogus-usb-controller.args | 31 ---
...low-bogus-usb-controller.s39
The new version allows passing a virBuffer to format the string into.
This will be helpful in solving a memory lean in wrong usage of
virCommandToString and also in tests where we need to add a newline
after the command in certain cases.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms |
virCommandToString returns an allocated buffer, so using it directly as
argument of virBufferAdd which doesn't consume the string causes it to
be leaked. Switch to virBufferToStringBuf since we are already using a
buffer.
Signed-off-by: Peter Krempa
---
src/bhyve/bhyve_driver.c | 4 ++--
1 file
This series consists of 3 parts:
Part 1, patches 1-3:
These are fixes to the virCommand->string conversion, namely two bugs:
- VIR_TEST_REGENERATE_OUTPUT would produce new files with missing end
newline
- memleak in bhyves xml->native conversion
Part 2, patches 4 - 21:
Removal
On Fri, Jun 11, 2021 at 15:24:13 +0200, Pavel Hrdina wrote:
> QEMU 6.0.0 introduced `confidential-guest-support` -machine option as
> a replacement for `memory-encryption`. In order to test it use latest
> capabilities as well.
>
> Signed-off-by: Pavel Hrdina
> ---
> .../launch-security-sev.x86_
On Fri, Jun 11, 2021 at 15:24:12 +0200, Pavel Hrdina wrote:
> The pc-1.0 machine type was deprecated in QEMU 6.0.0. In our tests we
> use 2.12.0 and 6.1.0 replies so switch to pc-i440fx-2.12 type.
>
> Signed-off-by: Pavel Hrdina
> ---
> tests/qemuxml2argvdata/launch-security-sev.x86_64-2.12.0.ar
On Fri, Jun 11, 2021 at 15:24:10 +0200, Pavel Hrdina wrote:
> Signed-off-by: Pavel Hrdina
> ---
> src/qemu/qemu_command.c | 9 +++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
Reviewed-by: Peter Krempa
On Fri, Jun 11, 2021 at 15:24:09 +0200, Pavel Hrdina wrote:
> In libvirt we already use `query-command-line-options` QMP command but
> that is useless as it doesn't provide correct data for `-machine`
> option. So we need a new and better way to get that data.
>
> We already use `qom-list-properti
On Fri, Jun 11, 2021 at 15:24:11 +0200, Pavel Hrdina wrote:
> Currently we only have AMD SEV bits in qemu-2.12.0 replies which is way
> too old to test new features that require AMD SEV as well.
>
> Signed-off-by: Pavel Hrdina
> ---
> tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 5 +++
The pc-1.0 machine type was deprecated in QEMU 6.0.0. In our tests we
use 2.12.0 and 6.1.0 replies so switch to pc-i440fx-2.12 type.
Signed-off-by: Pavel Hrdina
---
tests/qemuxml2argvdata/launch-security-sev.x86_64-2.12.0.args | 2 +-
tests/qemuxml2argvdata/launch-security-sev.xml
Signed-off-by: Pavel Hrdina
---
src/qemu/qemu_command.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 4b676fe8fc..1e75828bfc 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6935,8 +6935,1
Currently we only have AMD SEV bits in qemu-2.12.0 replies which is way
too old to test new features that require AMD SEV as well.
Signed-off-by: Pavel Hrdina
---
tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 5 -
tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 5 -
tes
QEMU 6.0.0 introduced `confidential-guest-support` -machine option as
a replacement for `memory-encryption`. In order to test it use latest
capabilities as well.
Signed-off-by: Pavel Hrdina
---
.../launch-security-sev.x86_64-latest.args| 36 +++
tests/qemuxml2argvtest.c
Pavel Hrdina (5):
qemu_capabilities: detect if confidential-guest-support is available
qemu_command: use confidential-guest-support if available
tests: add AMD SEV bits into qemu-6.1.0 replies
tests: use newer machine in qemuxml2argv launch-security-sev
tests: add launch-security-sev test
Hi Everyone,
We find migration capabilities is not reset after restarting libvirtd, it would
cause problem in the following scene:
Version: libvirt release 7.4.0
Step 1. create a VM and query migration capabilities, mark the return content
as "Cap A".
Step 2. stop the source libvirtd service
When using firmware auto-selection and user enables AMD SEV-ES we need
to pick correct firmware that actually supports it. This can be detected
by having `amd-sev-es` in the firmware JSON description.
Signed-off-by: Pavel Hrdina
---
src/qemu/qemu_firmware.c | 28
1 f
On 6/11/21 12:49 PM, Han Han wrote:
> On Fri, Jun 11, 2021 at 4:55 PM Michal Prívozník
> wrote:
>
>> On 6/9/21 10:32 AM, Han Han wrote:
>>> Diff from v1:
>>> - Leave qemuBuildVirtioDevStr() unmodified
>>> - New patch: qemu_validate: Validate virtio*gl* devices for 3d
>>> accerlation
>>> - Use D
On Fri, Jun 11, 2021 at 4:55 PM Michal Prívozník
wrote:
> On 6/9/21 10:32 AM, Han Han wrote:
> > Diff from v1:
> > - Leave qemuBuildVirtioDevStr() unmodified
> > - New patch: qemu_validate: Validate virtio*gl* devices for 3d
> > accerlation
> > - Use DO_TEST_CAPS_LATEST instead of DO_TEST
> > -
On Fri, Jun 11, 2021 at 4:55 PM Michal Prívozník
wrote:
> On 6/9/21 10:32 AM, Han Han wrote:
> > QEMU 6.1 will add virtio-gpu-gl-pci device to replace the virgl property
> > of virtio-gpu-pci device. Adapt to that change.
> >
> > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1967356
> >
>
On Fri, Jun 11, 2021 at 4:55 PM Michal Prívozník
wrote:
> On 6/9/21 10:32 AM, Han Han wrote:
> > QEMU 6.1 will replace the virgl property of virtio-vga device to
> > virtio-vga-gl device. Adapt to that update.
> >
> > Resolves: https://gitlab.com/libvirt/libvirt/-/issues/167
> >
> > Signed-off-by
On 6/9/21 10:32 AM, Han Han wrote:
> Diff from v1:
> - Leave qemuBuildVirtioDevStr() unmodified
> - New patch: qemu_validate: Validate virtio*gl* devices for 3d
> accerlation
> - Use DO_TEST_CAPS_LATEST instead of DO_TEST
> - Save video-virtio-vga-gpu-gl.x86_64-latest.xml as the sym link of
> te
On 6/9/21 10:32 AM, Han Han wrote:
> QEMU 6.1 will add virtio-gpu-gl-pci device to replace the virgl property
> of virtio-gpu-pci device. Adapt to that change.
>
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1967356
>
> Signed-off-by: Han Han
> ---
> src/qemu/qemu_command.c | 5 +
On 6/9/21 10:32 AM, Han Han wrote:
> QEMU 6.1 will replace the virgl property of virtio-vga device to
> virtio-vga-gl device. Adapt to that update.
>
> Resolves: https://gitlab.com/libvirt/libvirt/-/issues/167
>
> Signed-off-by: Han Han
> ---
> src/qemu/qemu_command.c | 3 +++
> 1 file changed,
On 6/10/21 9:45 AM, Tim Wiederhake wrote:
> "avx-vvni" was introduced to qemu in commit
> c1826ea6a052084f2e6a0bae9dd5932a727df039, adding it Cooperlake.
>
> This feature is currently not used by any libvirt CPU models, but its
> addition silences a warning from sync_qemu_i386.py:
>
> ```
> warni
54 matches
Mail list logo