From 3543f1b9b602cf248c51668441929651bd5c46f2 Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Wed, 10 Sep 2008 16:20:56 -0300 Subject: [PATCH] Remove tests of user memory from vl.c kvm_qemu_create_context() will fail if we don't have userspace memory capability, so no need to check it here. Signed-off-by: Glauber Costa Signed-off-by: Avi Kivity --- vl.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/vl.c b/vl.c index b34a114388..0484a3b931 100644 --- a/vl.c +++ b/vl.c @@ -9934,20 +9934,11 @@ int main(int argc, char **argv) fprintf(stderr, "Could not create KVM context\n"); exit(1); } -#ifdef KVM_CAP_USER_MEMORY -{ - int ret; - - ret = kvm_qemu_check_extension(KVM_CAP_USER_MEMORY); - if (ret) { - phys_ram_base = qemu_alloc_physram(phys_ram_size); - if (!phys_ram_base) { - fprintf(stderr, "Could not allocate physical memory\n"); - exit(1); - } - } -} -#endif + phys_ram_base = qemu_alloc_physram(phys_ram_size); + if (!phys_ram_base) { + fprintf(stderr, "Could not allocate physical memory\n"); + exit(1); + } } else { phys_ram_base = qemu_vmalloc(phys_ram_size); if (!phys_ram_base) { -- 2.11.4.GIT