Re: [PATCH] qemu: Allow memAccess for hugepages again

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

 



On 06/06/2017 11:42 AM, Michal Privoznik wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1458638
> 
> Historically, we've always supported memAccess for domains backed
> by hugepages. However, somewhere along the way we've regressed
> and stopped allowing such configuration. Fix it.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/qemu/qemu_command.c                            |  4 +-
>  .../qemuxml2argv-hugepages-memaccess.args          | 38 ++++++++++++++++++
>  .../qemuxml2argv-hugepages-memaccess.xml           | 45 ++++++++++++++++++++++
>  tests/qemuxml2argvtest.c                           |  1 +
>  4 files changed, 87 insertions(+), 1 deletion(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-memaccess.args
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-memaccess.xml
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 015af1036..2a076301f 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -3361,7 +3361,9 @@ qemuBuildMemoryBackendStr(virJSONValuePtr *backendProps,
>          return -1;
>  
>      if (pagesize || mem->nvdimmPath ||
> -        def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE) {
> +        def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE ||
> +        (memAccess == VIR_DOMAIN_MEMORY_ACCESS_SHARED &&
> +         def->mem.nhugepages)) {
>          *backendType = "memory-backend-file";
>  
>          if (mem->nvdimmPath) {


Self NACK. We need a better fix. Basically, whenever memAccess is
something else than default, we have to use memory-backend-file as
that's the only device that allows setting `share` attribute.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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