Re: [libvirt PATCH 2/4] qemu: add support for setting host-phys-bits-limit

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

 



On Wed, Mar 01, 2023 at 13:34:33 +0100, Ján Tomko wrote:
> Translate <maxphysaddr limit='39'/> to:
> host-phys-bits-limit=39
> 
> https://gitlab.com/libvirt/libvirt/-/issues/450
> https://bugzilla.redhat.com/show_bug.cgi?id=2171860
> 
> Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
> ---
>  src/qemu/qemu_command.c                       |  3 ++
>  .../cpu-phys-bits-limit.x86_64-latest.args    | 34 +++++++++++++++++++
>  tests/qemuxml2argvtest.c                      |  1 +
>  3 files changed, 38 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/cpu-phys-bits-limit.x86_64-latest.args
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 4839d45a34..7eae858813 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -6450,6 +6450,9 @@ qemuBuildCpuCommandLine(virCommand *cmd,
>          switch (addr->mode) {
>          case VIR_CPU_MAX_PHYS_ADDR_MODE_PASSTHROUGH:
>              virBufferAddLit(&buf, ",host-phys-bits=on");
> +
> +            if (addr->limit > 0)
> +                virBufferAsprintf(&buf, ",host-phys-bits-limit=%d", addr->limit);
>              break;

Continuation from previous patch:
 - here you format it only when mode is _PASSTHROUGH
 - Value 0 is in a limbo state, parser accepts it but it doesn't get
   formatted on the commandline

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[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