From patchwork Thu Feb 24 21:48:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 84494 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 33897B6F10 for ; Fri, 25 Feb 2011 08:51:57 +1100 (EST) Received: from localhost ([127.0.0.1]:54983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Psj6I-0005Md-4d for incoming@patchwork.ozlabs.org; Thu, 24 Feb 2011 16:51:54 -0500 Received: from [140.186.70.92] (port=38525 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Psj2W-0003LJ-5T for qemu-devel@nongnu.org; Thu, 24 Feb 2011 16:48:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Psj2U-00042t-Vk for qemu-devel@nongnu.org; Thu, 24 Feb 2011 16:48:00 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:53063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Psj2U-00042o-S6 for qemu-devel@nongnu.org; Thu, 24 Feb 2011 16:47:58 -0500 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e7.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p1OLRfpB015274 for ; Thu, 24 Feb 2011 16:27:41 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p1OLlvlv2670652 for ; Thu, 24 Feb 2011 16:47:57 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p1OLlvnx032083 for ; Thu, 24 Feb 2011 16:47:57 -0500 Received: from localhost.localdomain (sig-9-65-47-229.mts.ibm.com [9.65.47.229]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p1OLlsLO031906; Thu, 24 Feb 2011 16:47:56 -0500 From: Anthony Liguori To: kvm@vger.kernel.org Date: Thu, 24 Feb 2011 15:48:04 -0600 Message-Id: <1298584085-13129-3-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1298584085-13129-1-git-send-email-aliguori@us.ibm.com> References: <1298584085-13129-1-git-send-email-aliguori@us.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 32.97.182.137 Cc: Anthony Liguori , qemu-devel@nongnu.org, Avi Kivity Subject: [Qemu-devel] [PATCH 2/3] kvm-unit-tests: do not set level sensitive irq when initializing the PIC X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org I'm not sure if this was intentional but the QEMU i8259 does not support this flag. I haven't observed any issues with this but I'll happily admit that I'm not very aware of what I'm doing here. Signed-off-by: Anthony Liguori diff --git a/lib/x86/apic.c b/lib/x86/apic.c index 7bb98ed..2c2afb7 100644 --- a/lib/x86/apic.c +++ b/lib/x86/apic.c @@ -1,5 +1,6 @@ #include "libcflat.h" #include "apic.h" +#include "io.h" static void *g_apic = (void *)0xfee00000; static void *g_ioapic = (void *)0xfec00000; @@ -11,11 +12,6 @@ struct apic_ops { u32 (*id)(void); }; -static void outb(unsigned char data, unsigned short port) -{ - asm volatile ("out %0, %1" : : "a"(data), "d"(port)); -} - static u32 xapic_read(unsigned reg) { return *(volatile u32 *)(g_apic + reg); @@ -133,7 +129,7 @@ void ioapic_write_redir(unsigned line, ioapic_redir_entry_t e) void enable_apic(void) { printf("enabling apic\n"); - xapic_write(0xf0, 0x1ff); /* spurious vector register */ + xapic_write(0xf0, 0x1f7); /* spurious vector register */ } void mask_pic_interrupts(void)