From patchwork Thu Feb 4 15:27:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 77033 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o14FV3NP016508 for ; Thu, 4 Feb 2010 15:31:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932760Ab0BDPay (ORCPT ); Thu, 4 Feb 2010 10:30:54 -0500 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 Date: Thu, 4 Feb 2010 17:27:42 +0200 From: "Michael S. Tsirkin" To: kvm@vger.kernel.org Subject: [PATCH 04/20] qemu-kvm: fixup after merging memory notifiers Message-ID: <20100204152742.GE8461@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 04 Feb 2010 15:31:04 +0000 (UTC) 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();