From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [PATCH 3/3] Add KVM support to QEMU Date: Tue, 28 Oct 2008 16:10:20 -0500 Message-ID: <49077FBC.60208@codemonkey.ws> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, Glauber Costa , Avi Kivity , kvm-devel , Anthony Liguori , kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Hollis Blanchard Return-path: In-Reply-To: Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html