From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/9] in-kernel APIC v9 (kernel side) Date: Sun, 03 Jun 2007 18:39:19 +0300 Message-ID: <4662E0A7.7040208@qumranet.com> References: <20070531180005.1810.23884.stgit@ghaskins-t60p.haskins.net> <466289A4.9000201@qumranet.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040109040507010104030708" Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Gregory Haskins Return-path: In-Reply-To: <466289A4.9000201-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --------------040109040507010104030708 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Avi Kivity wrote: > Gregory Haskins wrote: >> Incorporates v8 plus the following changes: >> >> 1) Fix for hang on AMD >> 2) Fixes issue where irq-windows are inaccurately reported to userspace >> 3) Fixed issue where irq-window-exiting requests can be ignored in >> some cases >> >> > > FC6 x86_64 hangs on this (AMD) after 'Detected 62.502 MHz APIC > Timer.'. At least it doesn't kill the machine -- just the guest. > I'll try to see what's wrong. > > Note that this is with just the kernel patches applied. > > The patchset is available as the lapic branch in kvm.git (with some > whitespace damage fixed). > Things are a little better with the attached patch. On AMD, to detect the interrupt window opening, we queue an interrupt and then ask for an intercept immediately before interrupt disaptching. Effectively that means an intercept after sti, as on vmx. The problem occurs when we want to inject an interrupt _and_ request an interrupt window. Using the current code, we loop immediately because we queue the requested interrupt, then ask for an intercept when it is dispatched. A complex way to spin. The fix is to inject the interrupt instead of queueing it. Injected events are not intercepted, so we can ask for an interrupt window concurrently with injecting an interrupt. However, there are still problems (like Windows spontaneously rebooting). Will investigate further. -- error compiling committee.c: too many arguments to function --------------040109040507010104030708 Content-Type: text/x-patch; name="lapic-amd-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lapic-amd-fix.patch" diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index bdc5d98..651c860 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -1425,13 +1425,18 @@ static void do_intr_requests(struct kvm_vcpu *vcpu, if (ack.flags & KVM_IRQACKDATA_VECTOR_VALID) { control = &vcpu->svm->vmcb->control; +#if 0 control->int_vector = ack.vector; control->int_ctl &= ~V_INTR_PRIO_MASK; control->int_ctl |= V_IRQ_MASK | ((/*control->int_vector >> 4*/ 0xf) << V_INTR_PRIO_SHIFT); +#endif + control->event_inj = ack.vector + | SVM_EVTINJ_VALID + | SVM_EVTINJ_TYPE_INTR; ++vcpu->stat.irq_accepted; } } --------------040109040507010104030708 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --------------040109040507010104030708 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --------------040109040507010104030708--