From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH v2 1/6] x86: PIT connects to pin 2 of IOAPIC Date: Wed, 28 Nov 2012 12:50:04 +0200 Message-ID: <20121128105003.GY25516@redhat.com> References: <1353485379-6823-1-git-send-email-yang.z.zhang@intel.com> <1353485379-6823-2-git-send-email-yang.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, mtosatti@redhat.com To: Yang Zhang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:61163 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754036Ab2K1Lch (ORCPT ); Wed, 28 Nov 2012 06:32:37 -0500 Content-Disposition: inline In-Reply-To: <1353485379-6823-2-git-send-email-yang.z.zhang@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Nov 21, 2012 at 04:09:34PM +0800, Yang Zhang wrote: > When PIT connects to IOAPIC, it route to pin 2 not pin 0. > > Signed-off-by: Yang Zhang > --- > virt/kvm/ioapic.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c > index cfb7e4d..166c450 100644 > --- a/virt/kvm/ioapic.c > +++ b/virt/kvm/ioapic.c > @@ -181,7 +181,7 @@ static int ioapic_deliver(struct kvm_ioapic *ioapic, int irq) > > #ifdef CONFIG_X86 > /* Always delivery PIT interrupt to vcpu 0 */ > - if (irq == 0) { > + if (irq == 2) { Hmm, this means all this time the code didn't work correctly which makes me wonder if we need this hack at all. > irqe.dest_mode = 0; /* Physical mode. */ > /* need to read apic_id from apic regiest since > * it can be rewritten */ > -- > 1.7.1 -- Gleb.