Re: [libvirt PATCH 1/5] conf: define a new "maximum" CPU mode

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

 



On Tue, Feb 09, 2021 at 01:58:57PM +0000, Daniel P. Berrangé wrote:
> For hardware virtualization this is functionally identical to the
> existing host-passthrough mode so the same caveats apply.
> 
> For emulated guest this exposes the maximum featureset supported by
> the emulator. Note that despite being emulated this is not guaranteed
> to be migration safe, especially if different emulator software versions
> are used on each host.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  docs/formatdomain.rst        | 24 ++++++++++++++++++++++++
>  src/conf/cpu_conf.c          | 13 +++++++++----
>  src/conf/cpu_conf.h          |  1 +
>  src/cpu/cpu.c                |  1 +
>  src/qemu/qemu_capabilities.c |  1 +
>  src/qemu/qemu_command.c      |  1 +
>  src/qemu/qemu_domain.c       |  1 +
>  src/qemu/qemu_validate.c     |  1 +
>  8 files changed, 39 insertions(+), 4 deletions(-)

[...]

> diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
> index f98b0a0eb3..eb4bfbbcfa 100644
> --- a/src/conf/cpu_conf.c
> +++ b/src/conf/cpu_conf.c
> @@ -402,10 +403,11 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt,
>      if ((migratable = virXMLPropString(ctxt->node, "migratable"))) {
>          int val;
>  
> -        if (def->mode != VIR_CPU_MODE_HOST_PASSTHROUGH) {
> +        if (def->mode != VIR_CPU_MODE_HOST_PASSTHROUGH &&
> +            def->mode != VIR_CPU_MODE_MAXIMUM) {
>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
>                             _("Attribute migratable is only allowed for "
> -                             "host-passthrough CPU"));
> +                             "'host-passthrough' / 'maximum' CPU mode"));

Since you are modifying the error message I would reformat it to single
line.

Reviewed-by: Pavel Hrdina <phrdina@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