Commit Graph

8946 Commits

Author SHA1 Message Date
Boris Fiuczynski
02b57caf5e tests: Fix typo in README.rst of qemucapabilitiesdata
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2024-09-16 18:14:07 +02:00
Martin Kletzander
8cf7d0d457 tests: Add caps2xml and resctrl data from the wild
Add tests for two new system dumps which show various configurations
that were fixed in the previous commits.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-09-13 12:57:42 +02:00
Martin Kletzander
f3fd0664cf resctrl: Don't assume MBA availability in virResctrlAllocNewFromInfo
Weirdly, the existence of /sys/fs/resctrl/info/MB does not always mean
that MBA is available and used on the system.  Instead of assuming that
copy the values from the default (root) allocation.  This also makes it
nicer to use the proper values in case the system does not use
percentages or when the root allocation already limits the bandwidth.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-09-13 12:55:39 +02:00
Martin Kletzander
bc97a2c043 capabilities: Also report L2 caches
Since some systems support control for L2 caches as well as L3 caches it
would be useful to report their configuration in capabilities.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-09-13 12:55:39 +02:00
Richard W.M. Jones
94e8a5b650 vmx: Allow '*' to appear in VMX file keys
When connecting to a VMware server (eg using vpx://) we download and
try to parse the VMware metadata '*.vmx' file of a guest.  In this
case a VMX file was found which contained this key:

  pciPassthru*.present = "False"

The '*' character was not previously allowed in keys so this failed to
parse with the error:

  VIR_ERR_CONF_SYNTAX: VIR_FROM_CONF: configuration file syntax error:
  memory conf:74: expecting an assignment

Resolves: https://issues.redhat.com/browse/RHEL-58446
Thanks: Daniel Berrange
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-09-12 09:51:58 +02:00
Peter Krempa
d15b7c3859 qemuxmlconfttest: Add test case for invalid disk target
Add a test case that the numeric overflow when parsing disk target is
detected.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-09-10 14:26:52 +02:00
Peter Krempa
8e28f2c5c2 virBitmapShrink: Do not attempt to clear bits beyond end of buffer
'virBitmapShrink' clears the bits beyond the end of the bitmap when
shrinking and then reallocates to match the new size. As it uses the
address of the first bit beyond the bitmap to do the clearing it can
overrun the allocated buffer if we're not actually going to shrink it
and the last bit's address is on the chunk boundary.

Fix it by returning in that corner case and add few more tests to be
sure.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/673
Fixes: d6e582da80
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-09-10 14:25:37 +02:00
Tim Wiederhake
3afbb1644c cpu_map: Add SierraForest CPU model
This was added in qemu commit 6e82d3b6220777667968a04c87e1667f164ebe88.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-09-06 18:10:15 +02:00
Peter Krempa
2ccb213f94 virshtest: Add test case for script friendly options
Add a bunch of tests verifying that script-friendly options of certain
commands are not changed incompatibly thus potentially breaking user
scripts.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-09-05 15:24:55 +02:00
Peter Krempa
a35a355b09 tests: qemucapabilitiesdata: Add caps for 'caps_9.1.0_riscv64' (captured on x86_64)
Add a capability dump for 'riscv64' with 'qemu-9.1' release captured
on a x86_64 host as I don't have hardware.

The last dump for riscv64 was done with qemu-8.0 which didn't manifest
the newest features such as CPU type selection and ACPI support.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-09-05 15:24:55 +02:00
Peter Krempa
712b2c8f01 tests: qemucapabilities: Update 'caps_9.1.0_x86_64' for final release
QEMU-9.1 was released so update the capabilities to the final state.

Notable changes:

 - Machine types 'pc-q35-6.1' and 'pc-i440fx-6.1' were deprecated

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-09-05 15:24:55 +02:00
Andrea Bolognani
ad92468924 qemu: Use pvpanic by default on aarch64
pvpanic-pci is the only reasonable implementation of a panic
device for aarch64/virt guests. Right now we're asking users to
provide the model name manually, but we can be more helpful and
fill it in automatically instead.

With this change, the aarch64-panic-no-model test no longer
fails and so it's no longer useful to us. Instead, we can amend
the aarch64-virt-default-models test case to include panic
coverage, something that until now wasn't possible.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-09-03 14:08:34 +02:00
Andrea Bolognani
6d92185a49 qemu: Sometimes the default panic model doesn't exist
Right now the fallback behavior is to use MODEL_ISA if we
haven't been able to find a better match, but that's not very
useful as we're still going to hit an error later, when
QEMU_CAPS_DEVICE_PANIC is not found at Validate time.

Instead of doing that, allow MODEL_DEFAULT to get all the
way to Validate and report an error upon encountering it.

The reported error changes slightly, but other than that the
set of configurations that are allowed and blocked remains
the same.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-09-03 14:07:47 +02:00
Andrea Bolognani
f22583c6c4 tests: Add coverage for panic on riscv64
It merely duplicates the existing aarch64 coverage right now,
but it will become actually useful with the upcoming changes.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-09-03 14:06:08 +02:00
Andrea Bolognani
725afb4e7b qemu: Expose availability of PS/2 feature in domcaps
This advertises the feature only for the architectures and
machine types where it can actually be used.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-29 09:44:53 +02:00
Michal Privoznik
4d8ebbfee8 virschematest: Replace g_lstat() with virFileIsLink()
Inside of virschematest.c there's testSchemaDir() which iterates
over dentries in given directory but skips some files: those
without ".xml" suffix, hidden files, symlinks, etc.

Now, symlinks are detected as g_lstat() + S_ISLNK() combo which
works, except it fails to compile on mingw where is no concept of
symlinks. Replace the combo with a call to virFileIsLink() which
at least allows us to compile cleanly on mingw.

Fixes: f997fcca71
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-08-28 08:46:16 +02:00
Praveen K Paladugu
af87ee7927 hypervisor: Move domain interface mgmt methods
From: Praveen K Paladugu <prapal@linux.microsoft.com>

Move methods to connect domain interfaces to host bridges to hypervisor.
This is to allow reuse between qemu and ch drivers.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-26 16:10:04 +02:00
Tim Wiederhake
7b6702d516 hyperv: Support hv-xmm-input enlightenment
qemu supports this enlightenment since version 7.10.

From the qemu commit:
    Hyper-V specification allows to pass parameters for certain hypercalls
    using XMM registers ("XMM Fast Hypercall Input"). When the feature is
    in use, it allows for faster hypercalls processing as KVM can avoid
    reading guest's memory.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2024-08-26 11:48:15 +02:00
Tim Wiederhake
0313a500a9 hyperv: Support hv-emsr-bitmap enlightenment
qemu supports this enlightenment since version 7.10.

From the qemu commit:
    The newly introduced enlightenment allow L0 (KVM) and L1 (Hyper-V)
    hypervisors to collaborate to avoid unnecessary updates to L2
    MSR-Bitmap upon vmexits.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2024-08-26 11:48:15 +02:00
Kamil Szczęk
825516e6e3 qemuxmlconftest: Add test cases for the new 'ps2' feature
Introduce tests to verify that the 'ps2' feature is correctly parsed
when given either 'dirty' XML from a user or 'clean' canonical XML,
as produced by libvirt. This also tests the transformation from libvirt's
internal state to the aforementioned canonical form and to a QEMU
command line.

As a bonus, we also test some known bad configurations:
- When user explicitly adds ps2 bus inputs, but also explicitly disables
the 'ps2' feature.
- When user explicitly enables the 'vmport' feature, but also explicitly
disables the 'ps2' feature. This is not supported by QEMU and will
result in vmport device not being created without emitting any warning
or error.

Signed-off-by: Kamil Szczęk <kamil@szczek.dev>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-21 17:10:51 +02:00
Kamil Szczęk
9eb3c28323 qemu_capabilities: Introduce QEMU_CAPS_MACHINE_I8042_OPT
This capability tells us whether given QEMU binary supports the
'-machine xxx,i8042=on/off' toggle used to enable/disable PS/2
controller emulation.

A few facts:
- This option was introduced in QEMU 7.0 and defaults to 'on'
- QEMU versions before 7.0 enabled i8042 controller emulation implicitly
- This option (and i8042 controller emulation itself) is only supported
by descendants of the generic PC machine type (e.g. i440fx, q35, etc.)

Signed-off-by: Kamil Szczęk <kamil@szczek.dev>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-21 17:10:51 +02:00
Peter Krempa
62d6e8dcb2 qemu: validate: Reject empty USB disks
Attempting to start qemu with or hotplug an empty 'usb-storage' based
disk results in the following error:

 qemu-system-x86_64: -device {"driver":"usb-storage","bus":"usb.0","port":"2","id":"usb-disk1","removable":true}: drive property not set

Reject such config at validation step and adjust tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2024-08-21 15:49:36 +02:00
Ján Tomko
0290dbeac7 tests: json: relax some test cases
Some JSON parsers do not like bare types outside of objects or arrays
or do validation of object key uniqueness.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-08-16 13:11:57 +02:00
Tim Wiederhake
03852c85af cpu_map: Add GraniteRapids CPU model
This was added in qemu commit 6d5e9694ef.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-13 17:00:41 +02:00
Peter Krempa
71f14351f9 qemuxmlconftest: Add test cases for broken and missing XML files
Add test cases for few edge cases which excercise the XML reporting from
libxml2 in anticipation of upcoming changes of behaviour.

'virschematest' must skip parsing of the broken file altogether so this
patch adds infrastructure to allow that.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-09 16:34:33 +02:00
Peter Krempa
4dc889a626 testQemuConfXMLCommon: Strip 'abs_srcdir' paths from '.err' files in qemuxmlconftest
Upcoming patch will result in having the build directory path in some of
the output files. Replace it by a constant 'ABS_SRCDIR' to avoild
breaking tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-09 16:34:33 +02:00
Peter Krempa
14ca8ef256 qemucapabilitiesdata: Update data for qemu-9.1 dev cycle on x86_64
Update to v9.1.0-rc0-121-g75c7f57403.

Notable changes:
  - removed machine types:
     - i440fx: 2.0 - 2.3

  - deprecated machine types
     - q35 + i440fx: 2.4 - 6.0

  - GUEST_PVSHUTDOWN event added

  - migration
     - 'postcopy-recover-setup' state added
     - 'direct-io' parameter added

  - 'memory-backend-shm' qom object type added

  - 'emmc' device added

  - iommufd infrastructure added: 'host-iommu-device-iommufd-vfio',
    'host-iommu-device-legacy-vfio', 'vfio-iommu-iommufd',
    'vfio-iommu-legacy'

  - 'in_order' and 'x-pcie-pm-no-soft-reset' property added for various
    virtio-based devices

  - changed type of 'legacy-vm-type' field for 'sev-guest' object from
    boolean to 'on/off/auto'

  - 'memory-hotplug-support' property of 'ICH9-LPC' removed

  - 'migrate-emulated-scsi-request' property of 'scsi-hd' added

  - 'x-device-dirty-page-tracking' property of 'vfio-pci' added

  - 'cxl-add-dynamic-capacity' and 'cxl-release-dynamic-capacity'
     commands added (unstable for now)

  - 'x-query-interrupt-controllers' command added (unstable)

  - dropped unused 'detached-header' infra from 'blockdev-create' for 'luks'

  - design of 'deprecated-props' arg/value of 'query-cpu-model-expansion'
    cleaned up

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-09 14:42:07 +02:00
Peter Krempa
022457e748 qemuxmlconftest: Don't use soon-to-be-removed machine types
Latest qemu will be dropping some very old machine types (2.0 - 2.3) and
some of our tests use them. As in none of the cases the test actually
needs given machine type, switch them to 'pc' instead.

In one case 'numavcpus-topology-mismatch' this caused switch to a more
modern syntax for NUMA memory specification, but the test is testing a
different aspect, thus we can modernize this.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-09 14:42:07 +02:00
Peter Krempa
c122aa1021 qemuxmlconftest: Add test for old-style NUMA memory specification
This excercises the old-style NUMA memory commandline used with 5.0 and
older machine types:

 -smp 16,sockets=2,dies=1,clusters=1,cores=4,threads=2 \
 -numa node,nodeid=0,cpus=0-7,mem=107 \
 -numa node,nodeid=1,cpus=8-15,mem=107 \

in contrast to the modern syntax:

  -smp 16,sockets=2,dies=1,clusters=1,cores=4,threads=2 \
 -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":112197632}' \
 -numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
 -object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":112197632}' \
 -numa node,nodeid=1,cpus=8-15,memdev=ram-node1 \

which is tested by the 'cpu-numa1' test case where this was copied from.

This test is added so that other irrelevant test can be modernized.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-09 14:42:07 +02:00
Sandesh Patel
6d7dd09e8a qemu: format dma-translation on intel-iommu command line
Add dma-translation attribute to qemu command line if specified in
domain conf.

Signed-off-by: Sandesh Patel <sandesh.patel@nutanix.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-09 10:05:56 +02:00
Sandesh Patel
6866f958c1 conf: add dma_translation attribute to iommu
Add dma_translation attribute to iommu to enable/disable dma traslation
for intel-iommu

Signed-off-by: Sandesh Patel <sandesh.patel@nutanix.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-09 10:05:56 +02:00
Sandesh Patel
b2cc19e5fd qemu_capabilities: Introduce QEMU_CAPS_INTEL_IOMMU_DMA_TRANSLATION
This capability tracks whether intel-iommu device has
dma-translation attribute.

Signed-off-by: Sandesh Patel <sandesh.patel@nutanix.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-08-09 10:05:56 +02:00
Peter Krempa
432e442ca8 qemuxmlconftest: Add tests for the ACPI stripping hack on s390
Replace the 'misc-acpi' case by testing a bunch of architectures for how
ACPI is handled including a test for the s390 ACPI strip hack added in
previous commit.

The input files are adapted from the corresponding '-minimal.xml' files.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2024-08-06 15:12:14 +02:00
Adam Julis
30a71fd6a0 Revert "network: allow "modify" option for DNS-Srv records"
This reverts commit cf934c87cc.

The matching logic is flawed and it would complicate support of
this command.

Signed-off-by: Adam Julis <ajulis@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2024-08-05 11:42:35 +02:00
Michal Privoznik
bd11c753f3 virsysinfo: Calculate OEM string index better
As can be seen in earlier commits, there can be two OEM strings
with the same index. But since our parser
(virSysinfoParseOEMStrings()) doesn't expect that, it increments
index in each run and thus skips over these strings.
Fortunately, we have the right index at hand - we're just
skipping over it in a loop. Just reconstruct the index back
inside the loop.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-07-25 16:51:17 +02:00
Michal Privoznik
98a9dc532d tests: Add HPE Apollo test case to sysinfotest
Introduce a test case for sysinfotest. The data was obtained by
running dmidecode as libvirt would run it:

   dmidecode -q -t 0,1,2,3,4,11,17

Now, the expected output fits almost perfectly, except for OEM
strings where the third string looks nothing like in the
dmidecode output. This is because of testDMIDecodeDryRun() which
overwrites the third OEM string (see v6.5.0-rc1~214 for more
info). But that's okay for now.

Speaking of OEM strings, it's worth noticing two 'OEM Strings'
sections in the dmidecode output. This is causing some troubles
and will be fixed in next commit.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-07-25 16:49:45 +02:00
Michal Privoznik
185065b645 virsysinfo: Trim newline when decoding OEM strings
dmidecode always puts a newline character at the end of each
OEM string it prints. It's the dmi_oem_strings() function [1] that
iterates over strings and calls pr_attr() over each one which
puts "\n" at the end, unconditionally [2[.

Since it's not part of the string though, trim it.

1: https://git.savannah.nongnu.org/cgit/dmidecode.git/tree/dmidecode.c#n2431
2: https://git.savannah.nongnu.org/cgit/dmidecode.git/tree/dmioutput.c#n63

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-07-25 16:49:27 +02:00
Michal Privoznik
3cfe4caa0a qemu: Build cmd line for pstore device
Nothing special going on here.

Resolves: https://issues.redhat.com/browse/RHEL-24746
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
2024-07-25 16:04:50 +02:00
Michal Privoznik
90e50e67c6 conf: Introduce pstore device
The aim of pstore device is to provide a bit of NVRAM storage for
guest kernel to record oops/panic logs just before the it
crashes. Typical usage includes usage in combination with a
watchdog so that the logs can be inspected after the watchdog
rebooted the machine. While Linux kernel (and possibly Windows
too) support many backends, in QEMU there's just 'acpi-erst'
device so stick with that for now. The device must be attached to
a PCI bus and needs two additional values (well, corresponding
memory-backend-file needs them): size and path. Despite using
memory-backend-file this does NOT add any additional RAM to the
guest and thus I've decided to expose it as another device type
instead of memory model.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
2024-07-25 16:04:50 +02:00
Michal Privoznik
4a9c2d9bbe qemu_capabilities: Introduce QEMU_CAPS_DEVICE_ACPI_ERST
This capability tracks whether QEMU has acpi-erst device.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
2024-07-25 16:04:50 +02:00
Adam Julis
b53e9f834b virtiofs: rename member to 'openfiles' for clarity
New element 'openfiles' had confusing name. Since the patch with
this new element wasn't propagate yet, old name ('rlimit_nofile')
was changed.

...
<binary>
  <openfiles max='122333'/>
</binary>
...

Signed-off-by: Adam Julis <ajulis@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-07-24 12:48:16 +02:00
Andrea Bolognani
65b54e791f tests: Add test for UEFI autoselection on riscv64
This scenario is going to be ever more popular, especially now
that virt-manager has started using UEFI by default on riscv64
(see https://github.com/virt-manager/virt-manager/pull/670/).

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-07-19 15:18:41 +02:00
Andrea Bolognani
a4fbb7bcc7 tests: Add firmware descriptor for edk2 on riscv64
It's available as part of the edk2-riscv64 Fedora package.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-07-19 15:18:40 +02:00
Andrea Bolognani
47d34ffb26 qemu: ROM firmware images are always readonly
By definition. Accordingly, filter them out when looking for
a read/write image.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-07-19 15:18:39 +02:00
Andrea Bolognani
f13b3f8098 qemu: Filter firmware images by type
If the configuration explicitly requests a specific type of
firmware image, be it pflash or ROM, we should ignore all images
that are not of that type.

If no specific type has been requested, of course, any type is
considered a match and the selection will be based upon the
other attributes.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-07-19 15:18:38 +02:00
Andrea Bolognani
b14c97e007 tests: Add more firmware selection coverage
This new test case covers the scenario in which the user
specifically asked for a read/write pflash image.

From the output files, we can see that the firmware selection
algorithm has picked a ROM image, which demonstrates the
presence of another bug. We're going to fix it with an upcoming
commit.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-07-19 15:18:36 +02:00
Andrea Bolognani
79941dd3c9 tests: Update firmware descriptors
Sync with the edk2-20240524-4.fc39 package from Fedora.

The only notable change is that the inteltdx variant now declares
support for Secure Boot and is a ROM image instead of a stateless
pflash one.

The latter causes it to be considered eligible for the
configuration described by the firmware-auto-efi-rw test cases,
which now passes instead of failing.

Of course that doesn't make any sense, because a ROM image by
definition cannot be read/write. So this indicates the presence
of a bug in our firmware selection algorithm, which we're going
to address with an upcoming commit.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-07-19 15:18:16 +02:00
Adam Julis
562fc02ac1 conf: virtiofs: add rlimit_nofile element
Add an element to configure the rlimit nofile size:

...
<binary>
  <rlimit_nofile size='122333'/>
</binary>
...

Non-positive values are forbidden in 'domaincommon.rng'. Added separate
test file, created by modifying the 'vhost-user-fs-fd-memory.xml'.

Signed-off-by: Adam Julis <ajulis@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-07-17 13:17:13 +02:00
Andrea Bolognani
6690b01de2 tests: Add coverage for pauth Arm CPU feature
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-07-15 13:08:15 +02:00
Ján Tomko
730eaafaac qemu: fill capabilities for virtiofsd
Run the daemon with --print-capabilities first, to see what it supports.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-07-10 12:32:23 +02:00