From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amos Kong Subject: Re: [PATCH] kvm-unittests: Fix apic unittest for latest qemu-kvm Date: Wed, 09 May 2012 09:56:49 +0800 Message-ID: <4FA9CEE1.3030200@redhat.com> References: <1336490230-22411-1-git-send-email-joerg.roedel@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org, Jan Kiszka To: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51832 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753787Ab2EIB45 (ORCPT ); Tue, 8 May 2012 21:56:57 -0400 In-Reply-To: <1336490230-22411-1-git-send-email-joerg.roedel@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/05/12 23:17, Joerg Roedel wrote: > Since commit b334ec56 in qemu-kvm the use of irqlines> 15 > is not supported anymore. This causes the apic unittest to > fail since this commit. Since the commit-msg explicitly > states that potential users of this needs to be fixed, here > is the fix which uses irq lines 14 and 15 instead in the > unittest. > > Cc: Jan Kiszka > Signed-off-by: Joerg Roedel Looks correct. Reviewed-by: Amos Kong > --- > x86/apic.c | 12 ++++++------ > 1 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/x86/apic.c b/x86/apic.c > index 2725b9a..50e77fc 100644 > --- a/x86/apic.c > +++ b/x86/apic.c > @@ -139,8 +139,8 @@ static void ioapic_isr_77(isr_regs_t *regs) > static void test_ioapic_intr(void) > { > handle_irq(0x77, ioapic_isr_77); > - set_ioapic_redir(0x10, 0x77); > - toggle_irq_line(0x10); > + set_ioapic_redir(0x0e, 0x77); > + toggle_irq_line(0x0e); > asm volatile ("nop"); > report("ioapic interrupt", g_isr_77 == 1); > } > @@ -168,11 +168,11 @@ static void test_ioapic_simultaneous(void) > { > handle_irq(0x78, ioapic_isr_78); > handle_irq(0x66, ioapic_isr_66); > - set_ioapic_redir(0x10, 0x78); > - set_ioapic_redir(0x11, 0x66); > + set_ioapic_redir(0x0e, 0x78); > + set_ioapic_redir(0x0f, 0x66); > irq_disable(); > - toggle_irq_line(0x11); > - toggle_irq_line(0x10); > + toggle_irq_line(0x0f); > + toggle_irq_line(0x0e); > irq_enable(); > asm volatile ("nop"); > report("ioapic simultaneous interrupt", -- Amos.