All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Ulrich Obergfell <uobergfe@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org,
	jan.kiszka@siemens.com, gcosta@redhat.com, avi@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/5] hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only)
Date: Fri, 08 Apr 2011 10:46:30 -0500	[thread overview]
Message-ID: <4D9F2DD6.9080400@codemonkey.ws> (raw)
In-Reply-To: <1302276042-3497-2-git-send-email-uobergfe@redhat.com>

On 04/08/2011 10:20 AM, Ulrich Obergfell wrote:
> '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<uobergfe@redhat.com>
> ---
>   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);

It's a bit nicer to use a registration function instead of setting a 
global function pointer directly.

Regards,

Anthony Liguori

> +
>   /* 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 {


WARNING: multiple messages have this Message-ID (diff)
From: Anthony Liguori <anthony@codemonkey.ws>
To: Ulrich Obergfell <uobergfe@redhat.com>
Cc: jan.kiszka@siemens.com, avi@redhat.com, qemu-devel@nongnu.org,
	kvm@vger.kernel.org, gcosta@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/5] hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only)
Date: Fri, 08 Apr 2011 10:46:30 -0500	[thread overview]
Message-ID: <4D9F2DD6.9080400@codemonkey.ws> (raw)
In-Reply-To: <1302276042-3497-2-git-send-email-uobergfe@redhat.com>

On 04/08/2011 10:20 AM, Ulrich Obergfell wrote:
> '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<uobergfe@redhat.com>
> ---
>   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);

It's a bit nicer to use a registration function instead of setting a 
global function pointer directly.

Regards,

Anthony Liguori

> +
>   /* 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 {

  reply	other threads:[~2011-04-08 15:46 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 15:20 [PATCH v2 0/5] hpet 'driftfix': alleviate time drift with HPET periodic timers Ulrich Obergfell
2011-04-08 15:20 ` [Qemu-devel] " Ulrich Obergfell
2011-04-08 15:20 ` [PATCH v2 1/5] hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only) Ulrich Obergfell
2011-04-08 15:20   ` [Qemu-devel] " Ulrich Obergfell
2011-04-08 15:46   ` Anthony Liguori [this message]
2011-04-08 15:46     ` Anthony Liguori
2011-04-08 15:51   ` Jan Kiszka
2011-04-08 15:51     ` [Qemu-devel] " Jan Kiszka
2011-04-08 15:20 ` [PATCH v2 2/5] hpet 'driftfix': add driftfix property to HPETState and DeviceInfo Ulrich Obergfell
2011-04-08 15:20   ` [Qemu-devel] " Ulrich Obergfell
2011-04-08 15:20 ` [PATCH v2 3/5] hpet 'driftfix': add fields to HPETTimer and VMStateDescription Ulrich Obergfell
2011-04-08 15:20   ` [Qemu-devel] " Ulrich Obergfell
2011-04-08 15:47   ` Anthony Liguori
2011-04-08 15:47     ` Anthony Liguori
2011-04-11  8:24     ` Ulrich Obergfell
2011-04-11  8:24       ` Ulrich Obergfell
2011-04-11  9:06       ` Ulrich Obergfell
2011-04-11  9:06         ` Ulrich Obergfell
2011-04-11  9:08         ` Avi Kivity
2011-04-11  9:08           ` Avi Kivity
2011-04-11 13:10           ` Anthony Liguori
2011-04-11 13:10             ` Anthony Liguori
2011-04-11 13:39             ` Glauber Costa
2011-04-11 13:39               ` Glauber Costa
2011-04-11 13:43               ` Avi Kivity
2011-04-11 13:43                 ` Avi Kivity
2011-04-11 13:47               ` Anthony Liguori
2011-04-11 13:47                 ` Anthony Liguori
2011-04-11 13:57                 ` Glauber Costa
2011-04-11 13:57                   ` Glauber Costa
2011-04-11 13:10       ` Anthony Liguori
2011-04-11 13:10         ` Anthony Liguori
2011-04-08 15:20 ` [PATCH v2 4/5] hpet 'driftfix': add code in update_irq() to detect coalesced interrupts (x86 apic only) Ulrich Obergfell
2011-04-08 15:20   ` [Qemu-devel] " Ulrich Obergfell
2011-04-08 15:20 ` [PATCH v2 5/5] hpet 'driftfix': add code in hpet_timer() to compensate delayed callbacks and coalesced interrupts Ulrich Obergfell
2011-04-08 15:20   ` [Qemu-devel] " Ulrich Obergfell
2011-04-08 15:54   ` Jan Kiszka
2011-04-08 15:54     ` [Qemu-devel] " Jan Kiszka
2011-04-08 16:08     ` Glauber Costa
2011-04-08 16:08       ` [Qemu-devel] " Glauber Costa
2011-04-08 16:12       ` Jan Kiszka
2011-04-08 16:12         ` [Qemu-devel] " Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D9F2DD6.9080400@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=gcosta@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=uobergfe@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.