From b16565b396dbbb4c99899dbea599b22f4e0658d6 Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Wed, 4 Feb 2015 17:43:51 +0200 Subject: kvm: add machine state to kvm_arch_init Needed to query machine's properties. Signed-off-by: Marcel Apfelbaum Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini --- target-i386/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-i386/kvm.c') diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 40d6a14..ce554e4 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -840,7 +840,7 @@ static int kvm_get_supported_msrs(KVMState *s) return ret; } -int kvm_arch_init(KVMState *s) +int kvm_arch_init(MachineState *ms, KVMState *s) { uint64_t identity_base = 0xfffbc000; uint64_t shadow_mem; -- cgit v1.1 From 4689b77bda5187d4e2aac78bf21cc1a86502652d Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Wed, 4 Feb 2015 17:43:52 +0200 Subject: machine: query kvm-shadow-mem machine property Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed the global option descriptions and moved them to MachineState's QOM properties. Query kvm-shadow-mem by accessing machine properties through designated wrappers. Signed-off-by: Marcel Apfelbaum Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini --- target-i386/kvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'target-i386/kvm.c') diff --git a/target-i386/kvm.c b/target-i386/kvm.c index ce554e4..acb6831 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -890,8 +890,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s) } qemu_register_reset(kvm_unpoison_all, NULL); - shadow_mem = qemu_opt_get_size(qemu_get_machine_opts(), - "kvm_shadow_mem", -1); + shadow_mem = machine_kvm_shadow_mem(ms); if (shadow_mem != -1) { shadow_mem /= 4096; ret = kvm_vm_ioctl(s, KVM_SET_NR_MMU_PAGES, shadow_mem); -- cgit v1.1