qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] hpet: entitle more irq pins for hpet
@ 2013-08-25  2:16 Liu Ping Fan
  2013-08-25  2:16 ` [Qemu-devel] [PATCH 2/2] hpet: inverse polarity when pin above ISA_NUM_IRQS Liu Ping Fan
  2013-08-25  6:45 ` [Qemu-devel] [PATCH 1/2] hpet: entitle more irq pins for hpet Paolo Bonzini
  0 siblings, 2 replies; 8+ messages in thread
From: Liu Ping Fan @ 2013-08-25  2:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, Anthony Liguori, Paolo Bonzini

On PC, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 of
ioapic can be dynamically assigned to hpet as guest chooses.

Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
---
 hw/timer/hpet.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index 648b383..cd95d39 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -41,6 +41,8 @@
 #endif
 
 #define HPET_MSI_SUPPORT        0
+/* Hpet can use non-legacy IRQ16~23, and an IRQ2 ,IRQ8 */
+#define HPET_TN_INT_CAP (0xff0104ULL << 32)
 
 #define TYPE_HPET "hpet"
 #define HPET(obj) OBJECT_CHECK(HPETState, (obj), TYPE_HPET)
@@ -653,8 +655,8 @@ static void hpet_reset(DeviceState *d)
         if (s->flags & (1 << HPET_MSI_SUPPORT)) {
             timer->config |= HPET_TN_FSB_CAP;
         }
-        /* advertise availability of ioapic inti2 */
-        timer->config |=  0x00000004ULL << 32;
+        /* advertise availability of ioapic int */
+        timer->config |=  HPET_TN_INT_CAP;
         timer->period = 0ULL;
         timer->wrap_flag = 0;
     }
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-08-26  8:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-25  2:16 [Qemu-devel] [PATCH 1/2] hpet: entitle more irq pins for hpet Liu Ping Fan
2013-08-25  2:16 ` [Qemu-devel] [PATCH 2/2] hpet: inverse polarity when pin above ISA_NUM_IRQS Liu Ping Fan
2013-08-25  6:44   ` Paolo Bonzini
2013-08-26  2:49     ` liu ping fan
2013-08-25  6:45 ` [Qemu-devel] [PATCH 1/2] hpet: entitle more irq pins for hpet Paolo Bonzini
2013-08-26  2:53   ` liu ping fan
2013-08-26  7:59     ` Paolo Bonzini
2013-08-26  8:30       ` liu ping fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).