Re: [libvirt PATCHv2 3/3] qemu: allow forcing emulated maxphysaddr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 24, 2023 at 03:40:04PM +0200, Ján Tomko wrote:
Treat:
 <maxphysaddr mode="emulate"/>
as a request not to take the maximum address size from the host.
This is useful if QEMU changes the default.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
docs/formatdomain.rst                         |  3 +-
src/qemu/qemu_command.c                       |  5 ++-
src/qemu/qemu_validate.c                      |  7 -----
...-phys-bits-emulate-bare.x86_64-latest.args | 13 ++++----
.../cpu-phys-bits-emulate-bare.xml            | 20 ++++++++++++
.../cpu-phys-bits-emulate3.err                |  1 -
.../cpu-phys-bits-emulate3.xml                | 20 ------------
tests/qemuxml2argvtest.c                      |  2 +-
...u-phys-bits-emulate-bare.x86_64-latest.xml | 31 +++++++++++++++++++
tests/qemuxml2xmltest.c                       |  1 +
10 files changed, 65 insertions(+), 38 deletions(-)
create mode 100644 tests/qemuxml2argvdata/cpu-phys-bits-emulate-bare.xml
delete mode 100644 tests/qemuxml2argvdata/cpu-phys-bits-emulate3.err
delete mode 100644 tests/qemuxml2argvdata/cpu-phys-bits-emulate3.xml
create mode 100644 tests/qemuxml2xmloutdata/cpu-phys-bits-emulate-bare.x86_64-latest.xml

diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index f5bbfdc20a..2e8d31dd74 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -1636,7 +1636,8 @@ In case no restrictions need to be put on CPU model and its features, a simpler
         passed through to the virtual CPUs
      ``emulate``
         The hypervisor will define a specific value for the number of bits
-         of physical addresses via the ``bits`` attribute, which is mandatory.
+         of physical addresses via the ``bits`` attribute, which is optional
+         :since:`since 9.2.0`

What does this `since` mean?  Attribute mode='emulate' was introduced
together with <maxphysaddr/> in 8.7.0, but the optional part (which I
presume you meant to be related to the `since`) will not be in 9.2.0,
AFAIK we are entering a freeze for 9.3.0 tomorrow.

It might look better like this maybe:

         of physical addresses via the ``bits`` attribute (optional
         :since:`since 9.2.0`)

but I guess both are fine, it's easy to check.

diff --git a/tests/qemuxml2argvdata/cpu-phys-bits-emulate-bare.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-phys-bits-emulate-bare.x86_64-latest.args
index 3fa8384ace..28578fac20 100644
--- a/tests/qemuxml2argvdata/cpu-phys-bits-emulate-bare.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/cpu-phys-bits-emulate-bare.x86_64-latest.args
@@ -1,16 +1,16 @@
LC_ALL=C \
PATH=/bin \
-HOME=/tmp/lib/domain--1-foo \
+HOME=/var/lib/libvirt/qemu/domain--1-foo \
USER=test \
LOGNAME=test \
-XDG_DATA_HOME=/tmp/lib/domain--1-foo/.local/share \
-XDG_CACHE_HOME=/tmp/lib/domain--1-foo/.cache \
-XDG_CONFIG_HOME=/tmp/lib/domain--1-foo/.config \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-foo/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-foo/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-foo/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=foo,debug-threads=on \
-S \
--object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-foo/master-key.aes"}' \
--machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-foo/master-key.aes"}' \
+-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
-accel kvm \
-cpu host,migratable=on,host-phys-bits=off \
-m 214 \
@@ -25,7 +25,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-foo/.config \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
--no-acpi \
-boot strict=on \
-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
-audiodev '{"id":"audio1","driver":"none"}' \

This should just be an addition once the file from 2/3 is merged with
this patch.

With this ^^ fixed

Reviewed-by: Martin Kletzander <mkletzan@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux