From: "Glauber Costa" Subject: Re: [PATCH 6/9] move kvm_cpu_register_memory_area into qemu's Date: Wed, 13 Aug 2008 11:33:29 -0300 Message-ID: <5d6222a80808130733t2cd51b12hcb617074366a984f@mail.gmail.com> References: <1218588489-17182-1-git-send-email-gcosta@redhat.com> <1218588489-17182-2-git-send-email-gcosta@redhat.com> <1218588489-17182-3-git-send-email-gcosta@redhat.com> <1218588489-17182-4-git-send-email-gcosta@redhat.com> <1218588489-17182-5-git-send-email-gcosta@redhat.com> <1218588489-17182-6-git-send-email-gcosta@redhat.com> <1218588489-17182-7-git-send-email-gcosta@redhat.com> <48A2EB9F.6070009@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Glauber Costa" , kvm@vger.kernel.org, avi@qumranet.com To: "Anthony Liguori" Return-path: Received: from rv-out-0506.google.com ([209.85.198.237]:35025 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756844AbYHMOda (ORCPT ); Wed, 13 Aug 2008 10:33:30 -0400 Received: by rv-out-0506.google.com with SMTP id k40so13707rvb.1 for ; Wed, 13 Aug 2008 07:33:29 -0700 (PDT) In-Reply-To: <48A2EB9F.6070009@us.ibm.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Aug 13, 2008 at 11:11 AM, Anthony Liguori wrote: > Glauber Costa wrote: >> >> Turn the explicit calls to kvm_cpu_register_memoy_area() >> an empty function. Provide a __kvm_cpu_register_memory_area() >> that is called from within cpu_register_memory_area(). >> To avoid registering mmio regions to the hypervisor, since we depend on >> them faulting, we keep track of what regions are mmio regions too. >> >> This is to be bisection friendly. Direct calls are to be removed >> in a later commit. >> >> diff --git a/qemu/exec.c b/qemu/exec.c >> index 7a68062..14c3852 100644 >> --- a/qemu/exec.c >> +++ b/qemu/exec.c >> @@ -2196,6 +2196,9 @@ void cpu_register_physical_memory(target_phys_addr_t >> start_addr, >> kqemu_set_phys_mem(start_addr, size, phys_offset); >> } >> #endif >> + >> + __kvm_cpu_register_physical_memory(start_addr, size, phys_offset); >> >> > > This is a great place to add a callback of some sort (like QEMUAccel). Then > it can be shared by both kqemu and kvm. The current QEMUAccel patchset already has a callback for this exactly here. If we set up on this, I'll rebase QEMUAccel to include a kvm callback. > > Regards, > > Anthony Liguori > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."