From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: [PATCH 04/20] qemu-kvm: fixup after merging memory notifiers Date: Thu, 4 Feb 2010 17:27:42 +0200 Message-ID: <20100204152742.GE8461@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:45481 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932221Ab0BDPay (ORCPT ); Thu, 4 Feb 2010 10:30:54 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o14FUrQv031461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Feb 2010 10:30:53 -0500 Received: from redhat.com (vpn2-9-138.ams2.redhat.com [10.36.9.138]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id o14FUpda024620 for ; Thu, 4 Feb 2010 10:30:52 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: qemu-kvm.c must register notifier as well Signed-off-by: Michael S. Tsirkin --- kvm-all.c | 4 ++++ qemu-kvm.c | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index f31585e..51273e4 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -536,6 +536,8 @@ void kvm_set_phys_mem(target_phys_addr_t start_addr, } } +#endif + static void kvm_client_set_memory(struct CPUPhysMemoryClient *client, target_phys_addr_t start_addr, ram_addr_t size, @@ -563,6 +565,8 @@ static CPUPhysMemoryClient kvm_cpu_phys_memory_client = { .migration_log = kvm_client_migration_log, }; +#ifdef KVM_UPSTREAM + int kvm_init(int smp_cpus) { static const char upgrade_note[] = diff --git a/qemu-kvm.c b/qemu-kvm.c index a305907..f7b2dda 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -406,6 +406,7 @@ int kvm_init(int smp_cpus) for (i = gsi_count; i < gsi_bits; i++) set_gsi(kvm_context, i); } + cpu_register_phys_memory_client(&kvm_cpu_phys_memory_client); pthread_mutex_lock(&qemu_mutex); return kvm_create_context(); -- 1.6.6.144.g5c3af