Re: [PATCH v3 3/4] qemu: Generate command line for tb-cache feature

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

 



On Thu, Dec 02, 2021 at 09:53:35 +0100, Michal Privoznik wrote:
> Generating command line is pretty easy - just put tb-size=XXX
> onto -accel tcg part. Note, that QEMU expects the size in MiB.
> 
> Resolves: https://gitlab.com/libvirt/libvirt/-/issues/229
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> Tested-by: Kashyap Chamarthy <kchamart@xxxxxxxxxx>
> ---
>  src/qemu/qemu_command.c                       |  5 +++
>  ...efault-cpu-tcg-features.x86_64-latest.args | 36 +++++++++++++++++++
>  tests/qemuxml2argvtest.c                      |  1 +
>  3 files changed, 42 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/x86_64-default-cpu-tcg-features.x86_64-latest.args
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index c47998aabd..4b2b558aba 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -7282,6 +7282,11 @@ qemuBuildAccelCommandLine(virCommand *cmd,
>      switch ((virDomainVirtType)def->virtType) {
>      case VIR_DOMAIN_VIRT_QEMU:
>          virBufferAddLit(&buf, "tcg");
> +
> +        if (def->features[VIR_DOMAIN_FEATURE_TCG] == VIR_TRISTATE_SWITCH_ON) {

&&
tb-size > 0) {

> +            virBufferAsprintf(&buf, ",tb-size=%llu",
> +                              def->tcg_features->tb_cache >> 10);
> +        }
>          break;
>  
>      case VIR_DOMAIN_VIRT_KVM::




[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