From patchwork Fri Apr 8 15:20:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Obergfell X-Patchwork-Id: 694901 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p38FKxkL009694 for ; Fri, 8 Apr 2011 15:20:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932200Ab1DHPUx (ORCPT ); Fri, 8 Apr 2011 11:20:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48970 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932194Ab1DHPUw (ORCPT ); Fri, 8 Apr 2011 11:20:52 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p38FKllL009709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Apr 2011 11:20:47 -0400 Received: from localhost.localdomain (vpn1-4-212.ams2.redhat.com [10.36.4.212]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p38FKgc1018813; Fri, 8 Apr 2011 11:20:45 -0400 From: Ulrich Obergfell To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, uobergfe@redhat.com, gcosta@redhat.com, avi@redhat.com, aliguori@us.ibm.com, jan.kiszka@siemens.com Subject: [PATCH v2 1/5] hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only) Date: Fri, 8 Apr 2011 17:20:38 +0200 Message-Id: <1302276042-3497-2-git-send-email-uobergfe@redhat.com> In-Reply-To: <1302276042-3497-1-git-send-email-uobergfe@redhat.com> References: <1302276042-3497-1-git-send-email-uobergfe@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 08 Apr 2011 15:20:59 +0000 (UTC) 'target_get_irq_delivered' and 'target_reset_irq_delivered' contain entry addresses of functions that are utilized by update_irq() to detect coalesced interrupts. apic code loads these pointers during initialization. Signed-off-by: Ulrich Obergfell --- hw/apic.c | 4 ++++ sysemu.h | 3 +++ vl.c | 3 +++ 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 00907e0..44d8cb3 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -24,6 +24,7 @@ #include "sysbus.h" #include "trace.h" #include "kvm.h" +#include "sysemu.h" /* APIC Local Vector Table */ #define APIC_LVT_TIMER 0 @@ -1143,6 +1144,9 @@ static SysBusDeviceInfo apic_info = { static void apic_register_devices(void) { + target_get_irq_delivered = apic_get_irq_delivered; + target_reset_irq_delivered = apic_reset_irq_delivered; + sysbus_register_withprop(&apic_info); } diff --git a/sysemu.h b/sysemu.h index 3f7e17e..b5d4f90 100644 --- a/sysemu.h +++ b/sysemu.h @@ -96,6 +96,9 @@ int qemu_savevm_state_complete(Monitor *mon, QEMUFile *f); void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f); int qemu_loadvm_state(QEMUFile *f); +extern int (*target_get_irq_delivered)(void); +extern void (*target_reset_irq_delivered)(void); + /* SLIRP */ void do_info_slirp(Monitor *mon); diff --git a/vl.c b/vl.c index 8bcf2ae..548912a 100644 --- a/vl.c +++ b/vl.c @@ -231,6 +231,9 @@ const char *prom_envs[MAX_PROM_ENVS]; const char *nvram = NULL; int boot_menu; +int (*target_get_irq_delivered)(void) = 0; +void (*target_reset_irq_delivered)(void) = 0; + typedef struct FWBootEntry FWBootEntry; struct FWBootEntry {