qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] Permit -mem-path without sync mmu
@ 2011-08-05  4:02 David Gibson
  2011-08-05  6:16 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2011-08-05  4:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, agraf

At present, an explicit test disallows use of -mem-path when kvm is enabled
but KVM_CAP_SYNC_MMU is not set.  In particular, this prevents the user
from using hugetlbfs to back the guest memory.

I can see no reason for this check, and when I asked about it previously,
the only theory offered was that this was a limitation of the very early
days of kvm which only happened to match the SYNC_MMU flag by accident.

This patch, therefore, removes the check.  This is of particular use to
us on POWER, where we haven't yet implement SYNC_MMU, but where backing
the guest with hugepages is possible, and in fact mandatory (for now).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 exec.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/exec.c b/exec.c
index 476b507..041637c 100644
--- a/exec.c
+++ b/exec.c
@@ -2818,11 +2818,6 @@ static void *file_ram_alloc(RAMBlock *block,
         return NULL;
     }
 
-    if (kvm_enabled() && !kvm_has_sync_mmu()) {
-        fprintf(stderr, "host lacks kvm mmu notifiers, -mem-path unsupported\n");
-        return NULL;
-    }
-
     if (asprintf(&filename, "%s/qemu_back_mem.XXXXXX", path) == -1) {
         return NULL;
     }
-- 
1.7.5.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-trivial] [PATCH] Permit -mem-path without sync mmu
  2011-08-05  4:02 [Qemu-trivial] [PATCH] Permit -mem-path without sync mmu David Gibson
@ 2011-08-05  6:16 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2011-08-05  6:16 UTC (permalink / raw)
  To: David Gibson; +Cc: Avi Kivity, Marcelo Tosatti, qemu-devel, kvm, agraf

[-- Attachment #1: Type: text/plain, Size: 1562 bytes --]

On 2011-08-05 06:02, David Gibson wrote:
> At present, an explicit test disallows use of -mem-path when kvm is enabled
> but KVM_CAP_SYNC_MMU is not set.  In particular, this prevents the user
> from using hugetlbfs to back the guest memory.
> 
> I can see no reason for this check, and when I asked about it previously,
> the only theory offered was that this was a limitation of the very early
> days of kvm which only happened to match the SYNC_MMU flag by accident.
> 
> This patch, therefore, removes the check.  This is of particular use to
> us on POWER, where we haven't yet implement SYNC_MMU, but where backing
> the guest with hugepages is possible, and in fact mandatory (for now).
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>  exec.c |    5 -----
>  1 files changed, 0 insertions(+), 5 deletions(-)
> 
> diff --git a/exec.c b/exec.c
> index 476b507..041637c 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -2818,11 +2818,6 @@ static void *file_ram_alloc(RAMBlock *block,
>          return NULL;
>      }
>  
> -    if (kvm_enabled() && !kvm_has_sync_mmu()) {
> -        fprintf(stderr, "host lacks kvm mmu notifiers, -mem-path unsupported\n");
> -        return NULL;
> -    }
> -
>      if (asprintf(&filename, "%s/qemu_back_mem.XXXXXX", path) == -1) {
>          return NULL;
>      }

This is nothing trivial, see ce9a92411d in qemu-kvm or
http://thread.gmane.org/gmane.comp.emulators.kvm.devel/27380. And it
should rather target uq/master. CCing Avi, Marcelo, and the kvm list.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-06 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-05  4:02 [Qemu-trivial] [PATCH] Permit -mem-path without sync mmu David Gibson
2011-08-05  6:16 ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).