From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KuwHW-0000NL-56 for qemu-devel@nongnu.org; Tue, 28 Oct 2008 17:39:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KuwHU-0000M7-Mj for qemu-devel@nongnu.org; Tue, 28 Oct 2008 17:39:17 -0400 Received: from [199.232.76.173] (port=50303 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuwHU-0000M4-Hx for qemu-devel@nongnu.org; Tue, 28 Oct 2008 17:39:16 -0400 Received: from rn-out-0910.google.com ([64.233.170.190]:63819) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KuwHU-0003VZ-Ht for qemu-devel@nongnu.org; Tue, 28 Oct 2008 17:39:16 -0400 Received: by rn-out-0910.google.com with SMTP id m61so1395853rnd.8 for ; Tue, 28 Oct 2008 14:39:14 -0700 (PDT) Message-ID: <49077FBC.60208@codemonkey.ws> Date: Tue, 28 Oct 2008 16:10:20 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/3] Add KVM support to QEMU References: <1225224814-9875-1-git-send-email-aliguori@us.ibm.com> <1225224814-9875-2-git-send-email-aliguori@us.ibm.com> <1225224814-9875-3-git-send-email-aliguori@us.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hollis Blanchard Cc: Anthony Liguori , kvm-devel , Glauber Costa , qemu-devel@nongnu.org, kvm-ppc@vger.kernel.org, Avi Kivity Hollis Blanchard wrote: > Just a quick skim... > > On Tue, Oct 28, 2008 at 3:13 PM, Anthony Liguori wrote: > >> +int kvm_cpu_exec(CPUState *env) >> +{ >> + struct kvm_run *run = env->kvm_run; >> + int ret; >> + >> + dprintf("kvm_cpu_exec()\n"); >> + >> + do { >> + kvm_arch_pre_run(env, run); >> + >> + if ((env->interrupt_request & CPU_INTERRUPT_EXIT)) { >> + dprintf("interrupt exit requested\n"); >> + ret = 0; >> + break; >> + } >> + >> + dprintf("setting tpr\n"); >> + run->cr8 = cpu_get_apic_tpr(env); >> > > This belongs in the arch_pre_run hook above. > Good catch, I've updated the patch. > How did you decide which exit handlers should go into > architecture-specific code? Looking at just the KVM architecture set: > Based on whether the implementation required target-specific code. > IO: x86 and ia64, not PowerPC or s390 > cpu_{in,out}[bwl] are defined in vl.c and are available for all architectures. They are no-ops on most architectures because they are never used. > MMIO: everybody except s390 > cpu_physical_memory_rw() is defined by everyone. > DCRs: PowerPC only > This will have to be an architecture specific handler. > IRQ window: not sure > It's a no-op implementation. I would think that this would be needed on PPC. If you want to inject an interrupt, but the guest is unable to handle an interrupt, you need to exit to userspace when the guest re-enables interrupts. Otherwise, you may never return to userspace for the interrupt to be injected. How do you handle that now? Does PPC have something that makes this unnecessary? Regards, Anthony Liguori > -Hollis > -- > 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 >