All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6)
@ 2009-06-12  1:46 Beth Kon
  2009-06-12  1:46 ` [PATCH 2/5] " Beth Kon
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Beth Kon @ 2009-06-12  1:46 UTC (permalink / raw)
  To: avi; +Cc: kvm, Beth Kon

These patches resolve the irq0->inti2 override issue, and get the hpet working
on kvm.

Override and HPET changes are sent as a series because HPET depends on the
override. Win2k8 expects the HPET interrupt on inti2, regardless of whether
an override exists in the BIOS. And the HPET spec states that in legacy mode,
timer interrupt is on inti2.

The irq0->inti2 override will always be used unless the kernel cannot do irq
routing (i.e., compatibility with old kernels). So if the kernel is capable,
userspace sets up irq0->inti2 via the irq routing interface, and adds the
irq0->inti2 override to the MADT interrupt source override table,
and the mp table (for the no-acpi case).

Changes from v3:

- changes based on comments from Avi and Gleb.
- corrected legacy enable/disable for in-kernel PIT. The code now best
  approximates a multiplexer that disables PIT interrupts when HPET is 
  in legacy mode (as described by HPET spec). Any changes to the PIT that 
  may occur while HPET is operating in legacy mode are saved, so if 
  HPET leaves legacy mode, the PIT is just reenabled, with mode set     
  to whatever the last setting from guest was. Legacy mode is disabled
  at least during crash and shutdown (in Linux), so this needs to be 
  handled properly.

Changes from v4:

- Modify mp_table entry count depending on whether irq_override is enabled.


Signed-off-by: Beth Kon <eak@us.ibm.com>
---
 kvm/bios/rombios32.c |   67 ++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 51 insertions(+), 16 deletions(-)

diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c
index 7db91d8..d6886ee 100755
--- a/kvm/bios/rombios32.c
+++ b/kvm/bios/rombios32.c
@@ -446,6 +446,9 @@ uint32_t cpuid_features;
 uint32_t cpuid_ext_features;
 unsigned long ram_size;
 uint64_t ram_end;
+#ifdef BX_QEMU
+uint8_t irq0_override;
+#endif
 #ifdef BX_USE_EBDA_TABLES
 unsigned long ebda_cur_addr;
 #endif
@@ -487,6 +490,7 @@ void wrmsr_smp(uint32_t index, uint64_t val)
 #define QEMU_CFG_ARCH_LOCAL     0x8000
 #define QEMU_CFG_ACPI_TABLES  (QEMU_CFG_ARCH_LOCAL + 0)
 #define QEMU_CFG_SMBIOS_ENTRIES  (QEMU_CFG_ARCH_LOCAL + 1)
+#define QEMU_CFG_IRQ0_OVERRIDE   (QEMU_CFG_ARCH_LOCAL + 2)
 
 int qemu_cfg_port;
 
@@ -555,6 +559,17 @@ uint64_t qemu_cfg_get64 (void)
 }
 #endif
 
+#ifdef BX_QEMU
+void irq0_override_probe(void)
+{
+    if(qemu_cfg_port) {
+        qemu_cfg_select(QEMU_CFG_IRQ0_OVERRIDE);
+        qemu_cfg_read(&irq0_override, 1);
+        return;
+    }
+}
+#endif
+
 void cpu_probe(void)
 {
     uint32_t eax, ebx, ecx, edx;
@@ -1153,7 +1168,14 @@ static void mptable_init(void)
     putstr(&q, "0.1         "); /* vendor id */
     putle32(&q, 0); /* OEM table ptr */
     putle16(&q, 0); /* OEM table size */
+#ifdef BX_QEMU
+    if (irq0_override)
+        putle16(&q, MAX_CPUS + 17); /* entry count */
+    else
+        putle16(&q, MAX_CPUS + 18); /* entry count */
+#else
     putle16(&q, MAX_CPUS + 18); /* entry count */
+#endif
     putle32(&q, 0xfee00000); /* local APIC addr */
     putle16(&q, 0); /* ext table length */
     putb(&q, 0); /* ext table checksum */
@@ -1197,6 +1219,13 @@ static void mptable_init(void)
 
     /* irqs */
     for(i = 0; i < 16; i++) {
+#ifdef BX_QEMU
+        /* One entry per ioapic interrupt destination. Destination 2 is covered
+         * by irq0->inti2 override (i == 0). Source IRQ 2 is unused
+         */
+        if (irq0_override && i == 2)
+            continue;
+#endif
         putb(&q, 3); /* entry type = I/O interrupt */
         putb(&q, 0); /* interrupt type = vectored interrupt */
         putb(&q, 0); /* flags: po=0, el=0 */
@@ -1204,7 +1233,12 @@ static void mptable_init(void)
         putb(&q, 0); /* source bus ID = ISA */
         putb(&q, i); /* source bus IRQ */
         putb(&q, ioapic_id); /* dest I/O APIC ID */
-        putb(&q, i); /* dest I/O APIC interrupt in */
+#ifdef BX_QEMU
+        if (irq0_override && i == 0)
+            putb(&q, 2); /* dest I/O APIC interrupt in */
+        else
+#endif
+            putb(&q, i); /* dest I/O APIC interrupt in */
     }
     /* patch length */
     len = q - mp_config_table;
@@ -1760,23 +1794,21 @@ void acpi_bios_init(void)
         io_apic->io_apic_id = smp_cpus;
         io_apic->address = cpu_to_le32(0xfec00000);
         io_apic->interrupt = cpu_to_le32(0);
-#ifdef BX_QEMU
-#ifdef HPET_WORKS_IN_KVM
         io_apic++;
-
-        int_override = (void *)io_apic;
-        int_override->type = APIC_XRUPT_OVERRIDE;
-        int_override->length = sizeof(*int_override);
-        int_override->bus = cpu_to_le32(0);
-        int_override->source = cpu_to_le32(0);
-        int_override->gsi = cpu_to_le32(2);
-        int_override->flags = cpu_to_le32(0);
-#endif
+        int_override = (struct madt_int_override*)(io_apic);
+#ifdef BX_QEMU
+        if (irq0_override) {
+            memset(int_override, 0, sizeof(*int_override));
+            int_override->type = APIC_XRUPT_OVERRIDE;
+            int_override->length = sizeof(*int_override);
+            int_override->source = 0;
+            int_override->gsi = 2;
+            int_override->flags = 0; /* conforms to bus specifications */
+            int_override++;
+        }
 #endif
-
-        int_override = (struct madt_int_override*)(io_apic + 1);
-        for ( i = 0; i < 16; i++ ) {
-            if ( PCI_ISA_IRQ_MASK & (1U << i) ) {
+        for (i = 0; i < 16; i++) {
+            if (PCI_ISA_IRQ_MASK & (1U << i)) {
                 memset(int_override, 0, sizeof(*int_override));
                 int_override->type   = APIC_XRUPT_OVERRIDE;
                 int_override->length = sizeof(*int_override);
@@ -2700,6 +2732,9 @@ void rombios32_init(uint32_t *s3_resume_vector, uint8_t *shutdown_flag)
 
     if (bios_table_cur_addr != 0) {
 
+#ifdef BX_QEMU
+        irq0_override_probe();
+#endif
         mptable_init();
 
         smbios_init();

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

* [PATCH 2/5] Userspace changes for configuring irq0->inti2 override (v6)
  2009-06-12  1:46 [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Beth Kon
@ 2009-06-12  1:46 ` Beth Kon
  2009-06-12  1:46 ` [PATCH 3/5] BIOS changes for KVM HPET (v6) Beth Kon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Beth Kon @ 2009-06-12  1:46 UTC (permalink / raw)
  To: avi; +Cc: kvm, Beth Kon

Signed-off-by: Beth Kon <eak@us.ibm.com>

---
 hw/ioapic.c    |    6 +++---
 hw/pc.c        |    2 ++
 qemu-kvm-x86.c |    6 +++++-
 qemu-kvm.h     |    2 ++
 sysemu.h       |    1 +
 vl.c           |   11 +++++++++--
 6 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/hw/ioapic.c b/hw/ioapic.c
index 6c178c7..a67b766 100644
--- a/hw/ioapic.c
+++ b/hw/ioapic.c
@@ -23,6 +23,7 @@
 
 #include "hw.h"
 #include "pc.h"
+#include "sysemu.h"
 #include "qemu-timer.h"
 #include "host-utils.h"
 
@@ -95,14 +96,13 @@ void ioapic_set_irq(void *opaque, int vector, int level)
 {
     IOAPICState *s = opaque;
 
-#if 0
     /* ISA IRQs map to GSI 1-1 except for IRQ0 which maps
      * to GSI 2.  GSI maps to ioapic 1-1.  This is not
      * the cleanest way of doing it but it should work. */
 
-    if (vector == 0)
+    if (vector == 0 && irq0override) {
         vector = 2;
-#endif
+    }
 
     if (vector >= 0 && vector < IOAPIC_NUM_PINS) {
         uint32_t mask = 1 << vector;
diff --git a/hw/pc.c b/hw/pc.c
index 66f4635..1c068fb 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -55,6 +55,7 @@
 #define BIOS_CFG_IOPORT 0x510
 #define FW_CFG_ACPI_TABLES (FW_CFG_ARCH_LOCAL + 0)
 #define FW_CFG_SMBIOS_ENTRIES (FW_CFG_ARCH_LOCAL + 1)
+#define FW_CFG_IRQ0_OVERRIDE (FW_CFG_ARCH_LOCAL + 2)
 
 #define MAX_IDE_BUS 2
 
@@ -476,6 +477,7 @@ static void bochs_bios_init(void)
     fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);
     fw_cfg_add_bytes(fw_cfg, FW_CFG_ACPI_TABLES, (uint8_t *)acpi_tables,
                      acpi_tables_len);
+    fw_cfg_add_bytes(fw_cfg, FW_CFG_IRQ0_OVERRIDE, &irq0override, 1);
 
     smbios_table = smbios_get_table(&smbios_len);
     if (smbios_table)
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 5526d8f..89337e9 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -909,7 +909,11 @@ int kvm_arch_init_irq_routing(void)
                 return r;
         }
         for (i = 0; i < 24; ++i) {
-            r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i);
+            if (i == 0) {
+                r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2);
+            } else if (i != 2) {
+                r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i);
+            }
             if (r < 0)
                 return r;
         }
diff --git a/qemu-kvm.h b/qemu-kvm.h
index fa40542..6bbafbc 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -169,6 +169,7 @@ int handle_tpr_access(void *opaque, kvm_vcpu_context_t vcpu,
 #define kvm_enabled() (kvm_allowed)
 #define qemu_kvm_irqchip_in_kernel() kvm_irqchip_in_kernel(kvm_context)
 #define qemu_kvm_pit_in_kernel() kvm_pit_in_kernel(kvm_context)
+#define qemu_kvm_has_gsi_routing() kvm_has_gsi_routing(kvm_context)
 #define kvm_has_sync_mmu() qemu_kvm_has_sync_mmu()
 void kvm_init_vcpu(CPUState *env);
 void kvm_load_tsc(CPUState *env);
@@ -177,6 +178,7 @@ void kvm_load_tsc(CPUState *env);
 #define kvm_nested 0
 #define qemu_kvm_irqchip_in_kernel() (0)
 #define qemu_kvm_pit_in_kernel() (0)
+#define qemu_kvm_has_gsi_routing() (0)
 #define kvm_has_sync_mmu() (0)
 #define kvm_load_registers(env) do {} while(0)
 #define kvm_save_registers(env) do {} while(0)
diff --git a/sysemu.h b/sysemu.h
index 47d001e..f78e974 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -108,6 +108,7 @@ extern int xenfb_enabled;
 extern int graphic_width;
 extern int graphic_height;
 extern int graphic_depth;
+extern uint8_t irq0override;
 extern DisplayType display_type;
 extern const char *keyboard_layout;
 extern int win2k_install_hack;
diff --git a/vl.c b/vl.c
index 2fda17b..9b1d1ab 100644
--- a/vl.c
+++ b/vl.c
@@ -253,6 +253,7 @@ int no_reboot = 0;
 int no_shutdown = 0;
 int cursor_hide = 1;
 int graphic_rotate = 0;
+uint8_t irq0override = 1;
 #ifndef _WIN32
 int daemonize = 0;
 #endif
@@ -6054,8 +6055,14 @@ int main(int argc, char **argv, char **envp)
 
     module_call_init(MODULE_INIT_DEVICE);
 
-    if (kvm_enabled())
-	kvm_init_ap();
+    if (kvm_enabled()) {
+       kvm_init_ap();
+#ifdef USE_KVM
+        if (kvm_irqchip && !qemu_kvm_has_gsi_routing()) {
+            irq0override = 0;
+        }
+#endif
+    }
 
     machine->init(ram_size, boot_devices,
                   kernel_filename, kernel_cmdline, initrd_filename, cpu_model);

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

* [PATCH 3/5] BIOS changes for KVM HPET (v6)
  2009-06-12  1:46 [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Beth Kon
  2009-06-12  1:46 ` [PATCH 2/5] " Beth Kon
@ 2009-06-12  1:46 ` Beth Kon
  2009-06-12  1:46 ` [PATCH 4/5] Userspace " Beth Kon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Beth Kon @ 2009-06-12  1:46 UTC (permalink / raw)
  To: avi; +Cc: kvm, Beth Kon

Signed-off-by: Beth Kon <eak@us.ibm.com>

---
 kvm/bios/acpi-dsdt.dsl |    2 --
 kvm/bios/rombios32.c   |   11 +++--------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/kvm/bios/acpi-dsdt.dsl b/kvm/bios/acpi-dsdt.dsl
index db57307..71d0a5e 100755
--- a/kvm/bios/acpi-dsdt.dsl
+++ b/kvm/bios/acpi-dsdt.dsl
@@ -296,7 +296,6 @@ DefinitionBlock (
             })
         }
 #ifdef BX_QEMU
-#ifdef HPET_WORKS_IN_KVM
         Device(HPET) {
             Name(_HID,  EISAID("PNP0103"))
             Name(_UID, 0)
@@ -316,7 +315,6 @@ DefinitionBlock (
             })
         }
 #endif
-#endif
     }
 
     Scope(\_SB.PCI0) {
diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c
index 9d6910e..1106f38 100755
--- a/kvm/bios/rombios32.c
+++ b/kvm/bios/rombios32.c
@@ -1518,8 +1518,8 @@ struct acpi_20_generic_address {
 } __attribute__((__packed__));
 
 /*
- *  * HPET Description Table
- *   */
+ *  HPET Description Table
+ */
 struct acpi_20_hpet {
     ACPI_TABLE_HEADER_DEF                           /* ACPI common table header */
     uint32_t           timer_block_id;
@@ -1703,13 +1703,11 @@ void acpi_bios_init(void)
     addr += madt_size;
 
 #ifdef BX_QEMU
-#ifdef HPET_WORKS_IN_KVM
     addr = (addr + 7) & ~7;
     hpet_addr = addr;
     hpet = (void *)(addr);
     addr += sizeof(*hpet);
 #endif
-#endif
 
     /* RSDP */
     memset(rsdp, 0, sizeof(*rsdp));
@@ -1883,7 +1881,6 @@ void acpi_bios_init(void)
     }
 
     /* HPET */
-#ifdef HPET_WORKS_IN_KVM
     memset(hpet, 0, sizeof(*hpet));
     /* Note timer_block_id value must be kept in sync with value advertised by
      * emulated hpet
@@ -1892,7 +1889,6 @@ void acpi_bios_init(void)
     hpet->addr.address = cpu_to_le32(ACPI_HPET_ADDRESS);
     acpi_build_table_header((struct  acpi_table_header *)hpet,
                              "HPET", sizeof(*hpet), 1);
-#endif
 
     acpi_additional_tables(); /* resets cfg to required entry */
     for(i = 0; i < external_tables; i++) {
@@ -1912,8 +1908,7 @@ void acpi_bios_init(void)
     /* kvm has no ssdt (processors are in dsdt) */
 //  rsdt->table_offset_entry[nb_rsdt_entries++] = cpu_to_le32(ssdt_addr);
 #ifdef BX_QEMU
-    /* No HPET (yet) */
-//  rsdt->table_offset_entry[nb_rsdt_entries++] = cpu_to_le32(hpet_addr);
+    rsdt->table_offset_entry[nb_rsdt_entries++] = cpu_to_le32(hpet_addr);
     if (nb_numa_nodes > 0)
         rsdt->table_offset_entry[nb_rsdt_entries++] = cpu_to_le32(srat_addr);
 #endif

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

* [PATCH 4/5] Userspace changes for KVM HPET (v6)
  2009-06-12  1:46 [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Beth Kon
  2009-06-12  1:46 ` [PATCH 2/5] " Beth Kon
  2009-06-12  1:46 ` [PATCH 3/5] BIOS changes for KVM HPET (v6) Beth Kon
@ 2009-06-12  1:46 ` Beth Kon
  2009-06-14  8:55   ` Avi Kivity
  2009-06-12  1:46 ` [PATCH 5/5] HPET interaction with in-kernel PIT (v6) Beth Kon
  2009-06-14  8:50 ` [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Avi Kivity
  4 siblings, 1 reply; 13+ messages in thread
From: Beth Kon @ 2009-06-12  1:46 UTC (permalink / raw)
  To: avi; +Cc: kvm, Beth Kon

The big change here is handling of enabling/disabling of hpet legacy mode. When hpet enters
legacy mode, the spec says that the pit stops generating interrupts. In practice, we want to 
stop the pit periodic timer from running because it is wasteful in a virtual environment. 

We also have to worry about the hpet leaving legacy mode (which, at least in linux, happens
only during a shutdown or crash). At this point, according to the hpet spec, PIT interrupts
need to be reenabled. For us, it means the PIT timer needs to be restarted.  

This patch handles this situation better than the previous version by coming closer to 
just disabling PIT interrupts. It allows the PIT state to change if the OS modifies it,
even while PIT is disabled, but does not allow a pit timer to start. Then if HPET
legacy mode is disabled, whatever the PIT state is at that point, the PIT timer is 
restarted accordingly.

Signed-off-by: Beth Kon <eak@us.ibm.com>
---

diff --git a/hw/hpet.c b/hw/hpet.c
index 29db325..043b92b 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -206,6 +206,9 @@ static int hpet_load(QEMUFile *f, void *opaque, int version_id)
             qemu_get_timer(f, s->timer[i].qemu_timer);
         }
     }
+    if (hpet_in_legacy_mode()) {
+        hpet_disable_pit();
+    }
     return 0;
 }
 
@@ -475,9 +478,11 @@ static void hpet_ram_writel(void *opaque, target_phys_addr_t addr,
                 }
                 /* i8254 and RTC are disabled when HPET is in legacy mode */
                 if (activating_bit(old_val, new_val, HPET_CFG_LEGACY)) {
-                    hpet_pit_disable();
+                    hpet_disable_pit();
+                    dprintf("qemu: hpet disabled pit\n");
                 } else if (deactivating_bit(old_val, new_val, HPET_CFG_LEGACY)) {
-                    hpet_pit_enable();
+                    hpet_enable_pit();
+                    dprintf("qemu: hpet enabled pit\n");
                 }
                 break;
             case HPET_CFG + 4:
@@ -554,13 +559,15 @@ static void hpet_reset(void *opaque) {
     /* 64-bit main counter; 3 timers supported; LegacyReplacementRoute. */
     s->capability = 0x8086a201ULL;
     s->capability |= ((HPET_CLK_PERIOD) << 32);
-    if (count > 0)
+    if (count > 0) {
         /* we don't enable pit when hpet_reset is first called (by hpet_init)
          * because hpet is taking over for pit here. On subsequent invocations,
          * hpet_reset is called due to system reset. At this point control must
          * be returned to pit until SW reenables hpet.
          */
-        hpet_pit_enable();
+        hpet_enable_pit();
+        dprintf("qemu: hpet enabled pit\n");
+    }
     count = 1;
 }
 
diff --git a/hw/i8254.c b/hw/i8254.c
index 2f229f9..8c8076f 100644
--- a/hw/i8254.c
+++ b/hw/i8254.c
@@ -25,6 +25,7 @@
 #include "pc.h"
 #include "isa.h"
 #include "qemu-timer.h"
+#include "qemu-kvm.h"
 #include "i8254.h"
 
 //#define DEBUG_PIT
@@ -198,6 +199,9 @@ int pit_get_mode(PITState *pit, int channel)
 
 static inline void pit_load_count(PITChannelState *s, int val)
 {
+    if (s->channel == 0 && pit_state.hpet_legacy_mode) {
+        return;
+    }
     if (val == 0)
         val = 0x10000;
     s->count_load_time = qemu_get_clock(vm_clock);
@@ -371,10 +375,11 @@ static void pit_irq_timer_update(PITChannelState *s, int64_t current_time)
            (double)(expire_time - current_time) / ticks_per_sec);
 #endif
     s->next_transition_time = expire_time;
-    if (expire_time != -1)
+    if (expire_time != -1) {
         qemu_mod_timer(s->irq_timer, expire_time);
-    else
+    } else {
         qemu_del_timer(s->irq_timer);
+    }
 }
 
 static void pit_irq_timer(void *opaque)
@@ -451,6 +456,7 @@ void pit_reset(void *opaque)
     PITChannelState *s;
     int i;
 
+    pit->hpet_legacy_mode = 0;
     for(i = 0;i < 3; i++) {
         s = &pit->channels[i];
         s->mode = 3;
@@ -460,32 +466,43 @@ void pit_reset(void *opaque)
 }
 
 /* When HPET is operating in legacy mode, i8254 timer0 is disabled */
-void hpet_pit_disable(void) {
-    PITChannelState *s;
-    s = &pit_state.channels[0];
-    if (s->irq_timer)
-        qemu_del_timer(s->irq_timer);
+
+void hpet_disable_pit(void)
+{
+    PITChannelState *s = &pit_state.channels[0];
+    if (qemu_kvm_pit_in_kernel()) {
+        kvm_hpet_disable_kpit();
+    } else {
+        if (s->irq_timer) {
+            qemu_del_timer(s->irq_timer);
+        }
+    }
 }
 
 /* When HPET is reset or leaving legacy mode, it must reenable i8254
  * timer 0
  */
 
-void hpet_pit_enable(void)
+void hpet_enable_pit(void)
 {
     PITState *pit = &pit_state;
-    PITChannelState *s;
-    s = &pit->channels[0];
-    s->mode = 3;
-    s->gate = 1;
-    pit_load_count(s, 0);
+    PITChannelState *s = &pit->channels[0];
+    if (qemu_kvm_pit_in_kernel()) {
+        kvm_hpet_enable_kpit();
+    } else {
+        pit_load_count(s, s->count);
+    }
 }
 
 PITState *pit_init(int base, qemu_irq irq)
 {
     PITState *pit = &pit_state;
     PITChannelState *s;
+    int i;
 
+    for (i = 0; i <3 ; i++) {
+        pit->channels[i].channel = i;
+    }
     s = &pit->channels[0];
     /* the timer 0 is connected to an IRQ */
     s->irq_timer = qemu_new_timer(vm_clock, pit_irq_timer, s);
diff --git a/hw/i8254.h b/hw/i8254.h
index ee68ab5..9efd4ab 100644
--- a/hw/i8254.h
+++ b/hw/i8254.h
@@ -35,6 +35,7 @@
 
 typedef struct PITChannelState {
     int count; /* can be 65536 */
+    uint8_t channel;
     uint16_t latched_count;
     uint8_t count_latched;
     uint8_t status_latched;
@@ -55,6 +56,7 @@ typedef struct PITChannelState {
 
 struct PITState {
     PITChannelState channels[3];
+    uint8_t hpet_legacy_mode;
 };
 
 void pit_save(QEMUFile *f, void *opaque);
diff --git a/hw/pc.h b/hw/pc.h
index 3af22f2..abac8d8 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -74,8 +74,8 @@ int pit_get_out(PITState *pit, int channel, int64_t current_time);
 
 PITState *kvm_pit_init(int base, qemu_irq irq);
 
-void hpet_pit_disable(void);
-void hpet_pit_enable(void);
+void hpet_disable_pit(void);
+void hpet_enable_pit(void);
 
 /* vmport.c */
 void vmport_init(void);
diff --git a/kvm/include/x86/asm/kvm.h b/kvm/include/x86/asm/kvm.h
index dc90c47..df8d846 100644
--- a/kvm/include/x86/asm/kvm.h
+++ b/kvm/include/x86/asm/kvm.h
@@ -274,6 +274,7 @@ struct kvm_guest_debug_arch {
 
 struct kvm_pit_state {
 	struct kvm_pit_channel_state channels[3];
+    __u8 hpet_legacy_mode;
 };
 
 struct kvm_reinject_control {
diff --git a/qemu-kvm.c b/qemu-kvm.c
index 7acc0ef..98bd117 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -467,6 +467,26 @@ int kvm_vcpu_inited(CPUState *env)
     return env->kvm_cpu_state.created;
 }
 
+void kvm_hpet_disable_kpit(void)
+{
+    struct kvm_pit_state ps;
+    if (qemu_kvm_pit_in_kernel()) {
+        kvm_get_pit(kvm_context, &ps);
+        ps.hpet_legacy_mode = 1;
+        kvm_set_pit(kvm_context, &ps);
+    }
+}
+
+void kvm_hpet_enable_kpit(void)
+{
+    struct kvm_pit_state ps;
+    if (qemu_kvm_pit_in_kernel()) {
+        kvm_get_pit(kvm_context, &ps);
+        ps.hpet_legacy_mode = 0;
+        kvm_set_pit(kvm_context, &ps);
+    }
+}
+
 int kvm_init_ap(void)
 {
 #ifdef TARGET_I386
diff --git a/qemu-kvm.h b/qemu-kvm.h
index 6bbafbc..c094107 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -34,7 +34,8 @@ int kvm_qemu_check_extension(int ext);
 void kvm_apic_init(CPUState *env);
 /* called from vcpu initialization */
 void qemu_kvm_load_lapic(CPUState *env);
-
+void kvm_hpet_enable_kpit(void);
+void kvm_hpet_disable_kpit(void);
 int kvm_set_irq(int irq, int level, int *status);
 
 int kvm_physical_memory_set_dirty_tracking(int enable);
diff --git a/vl.c b/vl.c
index 9b1d1ab..485b091 100644
--- a/vl.c
+++ b/vl.c
@@ -6056,10 +6056,15 @@ int main(int argc, char **argv, char **envp)
     module_call_init(MODULE_INIT_DEVICE);
 
     if (kvm_enabled()) {
-       kvm_init_ap();
+        kvm_init_ap();
 #ifdef USE_KVM
         if (kvm_irqchip && !qemu_kvm_has_gsi_routing()) {
             irq0override = 0;
+            /* if kernel can't do irq routing, interrupt source
+             * override 0->2 can not be set up as required by hpet,
+             * so disable hpet.
+             */
+            no_hpet=1;
         }
 #endif
     }

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

* [PATCH 5/5] HPET interaction with in-kernel PIT (v6)
  2009-06-12  1:46 [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Beth Kon
                   ` (2 preceding siblings ...)
  2009-06-12  1:46 ` [PATCH 4/5] Userspace " Beth Kon
@ 2009-06-12  1:46 ` Beth Kon
  2009-06-14  8:53   ` Avi Kivity
  2009-06-14  8:50 ` [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Avi Kivity
  4 siblings, 1 reply; 13+ messages in thread
From: Beth Kon @ 2009-06-12  1:46 UTC (permalink / raw)
  To: avi; +Cc: kvm, Beth Kon


Signed-off-by: Beth Kon <eak@us.ibm.com>

---
 arch/x86/include/asm/kvm.h |    1 +
 arch/x86/kvm/i8254.c       |   24 +++++++++++++++++++-----
 arch/x86/kvm/i8254.h       |    3 ++-
 arch/x86/kvm/x86.c         |    5 ++++-
 4 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
index 708b9c3..3c44923 100644
--- a/arch/x86/include/asm/kvm.h
+++ b/arch/x86/include/asm/kvm.h
@@ -235,6 +235,7 @@ struct kvm_guest_debug_arch {
 
 struct kvm_pit_state {
 	struct kvm_pit_channel_state channels[3];
+	u8 hpet_legacy_mode;
 };
 
 struct kvm_reinject_control {
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 331705f..bb8382b 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -340,10 +340,20 @@ static void pit_load_count(struct kvm *kvm, int channel, u32 val)
 	}
 }
 
-void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val)
+void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val, int hpet_legacy_start)
 {
+	u8 saved_mode;
 	mutex_lock(&kvm->arch.vpit->pit_state.lock);
-	pit_load_count(kvm, channel, val);
+	if (hpet_legacy_start) {
+		/* save existing mode for later reenablement */
+		saved_mode = kvm->arch.vpit->pit_state.channels[0].mode;
+		kvm->arch.vpit->pit_state.channels[0].mode = 0xff; /* disable timer */
+		pit_load_count(kvm, channel, val);
+		kvm->arch.vpit->pit_state.channels[0].mode = saved_mode;
+	} else {
+			if (!(channel == 0 && kvm->arch.vpit->pit_state.hpet_legacy_mode))
+			pit_load_count(kvm, channel, val);
+	}
 	mutex_unlock(&kvm->arch.vpit->pit_state.lock);
 }
 
@@ -411,17 +421,20 @@ static void pit_ioport_write(struct kvm_io_device *this,
 		switch (s->write_state) {
 		default:
 		case RW_STATE_LSB:
-			pit_load_count(kvm, addr, val);
+			if (!(addr == 0 && pit_state->hpet_legacy_mode))
+				pit_load_count(kvm, addr, val);
 			break;
 		case RW_STATE_MSB:
-			pit_load_count(kvm, addr, val << 8);
+			if (!(addr == 0 && pit_state->hpet_legacy_mode))
+				pit_load_count(kvm, addr, val << 8);
 			break;
 		case RW_STATE_WORD0:
 			s->write_latch = val;
 			s->write_state = RW_STATE_WORD1;
 			break;
 		case RW_STATE_WORD1:
-			pit_load_count(kvm, addr, s->write_latch | (val << 8));
+			if (!(addr == 0 && pit_state->hpet_legacy_mode))
+				pit_load_count(kvm, addr, s->write_latch | (val << 8));
 			s->write_state = RW_STATE_WORD0;
 			break;
 		}
@@ -548,6 +561,7 @@ void kvm_pit_reset(struct kvm_pit *pit)
 	struct kvm_kpit_channel_state *c;
 
 	mutex_lock(&pit->pit_state.lock);
+	pit->pit_state.hpet_legacy_mode = 0;
 	for (i = 0; i < 3; i++) {
 		c = &pit->pit_state.channels[i];
 		c->mode = 0xff;
diff --git a/arch/x86/kvm/i8254.h b/arch/x86/kvm/i8254.h
index b267018..b5967ca 100644
--- a/arch/x86/kvm/i8254.h
+++ b/arch/x86/kvm/i8254.h
@@ -21,6 +21,7 @@ struct kvm_kpit_channel_state {
 
 struct kvm_kpit_state {
 	struct kvm_kpit_channel_state channels[3];
+	u8 hpet_legacy_mode;
 	struct kvm_timer pit_timer;
 	bool is_periodic;
 	u32    speaker_data_on;
@@ -49,7 +50,7 @@ struct kvm_pit {
 #define KVM_PIT_CHANNEL_MASK	    0x3
 
 void kvm_inject_pit_timer_irqs(struct kvm_vcpu *vcpu);
-void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val);
+void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val, int hpet_legacy_start);
 struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags);
 void kvm_free_pit(struct kvm *kvm);
 void kvm_pit_reset(struct kvm_pit *pit);
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1b91ea7..3c70545 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1948,9 +1948,12 @@ static int kvm_vm_ioctl_get_pit(struct kvm *kvm, struct kvm_pit_state *ps)
 static int kvm_vm_ioctl_set_pit(struct kvm *kvm, struct kvm_pit_state *ps)
 {
 	int r = 0;
+	int hpet_legacy_start = 0;
 
+	if (ps->hpet_legacy_mode && !kvm->arch.vpit->pit_state.hpet_legacy_mode)
+		hpet_legacy_start = 1;
 	memcpy(&kvm->arch.vpit->pit_state, ps, sizeof(struct kvm_pit_state));
-	kvm_pit_load_count(kvm, 0, ps->channels[0].count);
+	kvm_pit_load_count(kvm, 0, ps->channels[0].count, hpet_legacy_start);
 	return r;
 }
 

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

* Re: [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6)
  2009-06-12  1:46 [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Beth Kon
                   ` (3 preceding siblings ...)
  2009-06-12  1:46 ` [PATCH 5/5] HPET interaction with in-kernel PIT (v6) Beth Kon
@ 2009-06-14  8:50 ` Avi Kivity
  4 siblings, 0 replies; 13+ messages in thread
From: Avi Kivity @ 2009-06-14  8:50 UTC (permalink / raw)
  To: Beth Kon; +Cc: kvm

Beth Kon wrote:
> These patches resolve the irq0->inti2 override issue, and get the hpet working
> on kvm.
>
> Override and HPET changes are sent as a series because HPET depends on the
> override. Win2k8 expects the HPET interrupt on inti2, regardless of whether
> an override exists in the BIOS. And the HPET spec states that in legacy mode,
> timer interrupt is on inti2.
>
> The irq0->inti2 override will always be used unless the kernel cannot do irq
> routing (i.e., compatibility with old kernels). So if the kernel is capable,
> userspace sets up irq0->inti2 via the irq routing interface, and adds the
> irq0->inti2 override to the MADT interrupt source override table,
> and the mp table (for the no-acpi case).
>
>   

Applied the first four patches; thanks.  See separate reply about patch 5.

-- 
error compiling committee.c: too many arguments to function


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

* Re: [PATCH 5/5] HPET interaction with in-kernel PIT (v6)
  2009-06-12  1:46 ` [PATCH 5/5] HPET interaction with in-kernel PIT (v6) Beth Kon
@ 2009-06-14  8:53   ` Avi Kivity
  2009-06-14  9:10     ` Jan Kiszka
  0 siblings, 1 reply; 13+ messages in thread
From: Avi Kivity @ 2009-06-14  8:53 UTC (permalink / raw)
  To: Beth Kon; +Cc: kvm

Beth Kon wrote:
> Signed-off-by: Beth Kon <eak@us.ibm.com>
>
>   

Please write a few words on what this patch does and why.

> ---
>  arch/x86/include/asm/kvm.h |    1 +
>  arch/x86/kvm/i8254.c       |   24 +++++++++++++++++++-----
>  arch/x86/kvm/i8254.h       |    3 ++-
>  arch/x86/kvm/x86.c         |    5 ++++-
>  4 files changed, 26 insertions(+), 7 deletions(-)
>
> diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
> index 708b9c3..3c44923 100644
> --- a/arch/x86/include/asm/kvm.h
> +++ b/arch/x86/include/asm/kvm.h
> @@ -235,6 +235,7 @@ struct kvm_guest_debug_arch {
>  
>  struct kvm_pit_state {
>  	struct kvm_pit_channel_state channels[3];
> +	u8 hpet_legacy_mode;
>  };
>   

This changes the ABI, breaking older binaries running on newer kernels, 
or newer binaries running on older kernels.

> @@ -340,10 +340,20 @@ static void pit_load_count(struct kvm *kvm, int channel, u32 val)
>  	}
>  }
>  
> -void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val)
> +void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val, int hpet_legacy_start)
>  {
> +	u8 saved_mode;
>  	mutex_lock(&kvm->arch.vpit->pit_state.lock);
> -	pit_load_count(kvm, channel, val);
> +	if (hpet_legacy_start) {
> +		/* save existing mode for later reenablement */
> +		saved_mode = kvm->arch.vpit->pit_state.channels[0].mode;
> +		kvm->arch.vpit->pit_state.channels[0].mode = 0xff; /* disable timer */
> +		pit_load_count(kvm, channel, val);
> +		kvm->arch.vpit->pit_state.channels[0].mode = saved_mode;
> +	} else {
> +			if (!(channel == 0 && kvm->arch.vpit->pit_state.hpet_legacy_mode))
> +			pit_load_count(kvm, channel, val);
>   

Overindented.



-- 
error compiling committee.c: too many arguments to function


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

* Re: [PATCH 4/5] Userspace changes for KVM HPET (v6)
  2009-06-12  1:46 ` [PATCH 4/5] Userspace " Beth Kon
@ 2009-06-14  8:55   ` Avi Kivity
  2009-06-14  9:00     ` Avi Kivity
  0 siblings, 1 reply; 13+ messages in thread
From: Avi Kivity @ 2009-06-14  8:55 UTC (permalink / raw)
  To: Beth Kon; +Cc: kvm

Beth Kon wrote:
> The big change here is handling of enabling/disabling of hpet legacy mode. When hpet enters
> legacy mode, the spec says that the pit stops generating interrupts. In practice, we want to 
> stop the pit periodic timer from running because it is wasteful in a virtual environment. 
>
> We also have to worry about the hpet leaving legacy mode (which, at least in linux, happens
> only during a shutdown or crash). At this point, according to the hpet spec, PIT interrupts
> need to be reenabled. For us, it means the PIT timer needs to be restarted.  
>
> This patch handles this situation better than the previous version by coming closer to 
> just disabling PIT interrupts. It allows the PIT state to change if the OS modifies it,
> even while PIT is disabled, but does not allow a pit timer to start. Then if HPET
> legacy mode is disabled, whatever the PIT state is at that point, the PIT timer is 
> restarted accordingly.
>
>   

Given that this depends on the ABI-breaking patch 5, I've dropped it too.

-- 
error compiling committee.c: too many arguments to function


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

* Re: [PATCH 4/5] Userspace changes for KVM HPET (v6)
  2009-06-14  8:55   ` Avi Kivity
@ 2009-06-14  9:00     ` Avi Kivity
  0 siblings, 0 replies; 13+ messages in thread
From: Avi Kivity @ 2009-06-14  9:00 UTC (permalink / raw)
  To: Beth Kon; +Cc: kvm

Avi Kivity wrote:
> Beth Kon wrote:
>> The big change here is handling of enabling/disabling of hpet legacy 
>> mode. When hpet enters
>> legacy mode, the spec says that the pit stops generating interrupts. 
>> In practice, we want to stop the pit periodic timer from running 
>> because it is wasteful in a virtual environment.
>> We also have to worry about the hpet leaving legacy mode (which, at 
>> least in linux, happens
>> only during a shutdown or crash). At this point, according to the 
>> hpet spec, PIT interrupts
>> need to be reenabled. For us, it means the PIT timer needs to be 
>> restarted. 
>> This patch handles this situation better than the previous version by 
>> coming closer to just disabling PIT interrupts. It allows the PIT 
>> state to change if the OS modifies it,
>> even while PIT is disabled, but does not allow a pit timer to start. 
>> Then if HPET
>> legacy mode is disabled, whatever the PIT state is at that point, the 
>> PIT timer is restarted accordingly.
>>
>>   
>
> Given that this depends on the ABI-breaking patch 5, I've dropped it too.
>

Actually, I got nervous about applying a partial patchset (which is 
likely to be untested), so I dropped everything else.  I pushed the 
three patches to an 'hpet' branch of qemu-kvm.git, so you don't have to 
redo the rebasing I did.

-- 
error compiling committee.c: too many arguments to function


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

* Re: [PATCH 5/5] HPET interaction with in-kernel PIT (v6)
  2009-06-14  8:53   ` Avi Kivity
@ 2009-06-14  9:10     ` Jan Kiszka
  2009-06-14  9:18       ` Avi Kivity
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2009-06-14  9:10 UTC (permalink / raw)
  To: Avi Kivity, Beth Kon; +Cc: kvm

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

Avi Kivity wrote:
> Beth Kon wrote:
>> Signed-off-by: Beth Kon <eak@us.ibm.com>
>>
>>   
> 
> Please write a few words on what this patch does and why.
> 
>> ---
>>  arch/x86/include/asm/kvm.h |    1 +
>>  arch/x86/kvm/i8254.c       |   24 +++++++++++++++++++-----
>>  arch/x86/kvm/i8254.h       |    3 ++-
>>  arch/x86/kvm/x86.c         |    5 ++++-
>>  4 files changed, 26 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
>> index 708b9c3..3c44923 100644
>> --- a/arch/x86/include/asm/kvm.h
>> +++ b/arch/x86/include/asm/kvm.h
>> @@ -235,6 +235,7 @@ struct kvm_guest_debug_arch {
>>  
>>  struct kvm_pit_state {
>>      struct kvm_pit_channel_state channels[3];
>> +    u8 hpet_legacy_mode;
>>  };
>>   
> 
> This changes the ABI, breaking older binaries running on newer kernels,
> or newer binaries running on older kernels.

As we have KVM_CREATE_PIT2 now, which includes struct kvm_pit_config
with a lot of unused flags, it should be straightforward to negotiate
the kvm_pit_state format between kernel and user space: kernel
advertises support for the new one via capability, user space requests
it via a bit in kvm_pit_state.flags.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: [PATCH 5/5] HPET interaction with in-kernel PIT (v6)
  2009-06-14  9:10     ` Jan Kiszka
@ 2009-06-14  9:18       ` Avi Kivity
  2009-06-14  9:26         ` Jan Kiszka
  0 siblings, 1 reply; 13+ messages in thread
From: Avi Kivity @ 2009-06-14  9:18 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Beth Kon, kvm

Jan Kiszka wrote:
>>>  
>>>  struct kvm_pit_state {
>>>      struct kvm_pit_channel_state channels[3];
>>> +    u8 hpet_legacy_mode;
>>>  };
>>>   
>>>       
>> This changes the ABI, breaking older binaries running on newer kernels,
>> or newer binaries running on older kernels.
>>     
>
> As we have KVM_CREATE_PIT2 now, which includes struct kvm_pit_config
> with a lot of unused flags, it should be straightforward to negotiate
> the kvm_pit_state format between kernel and user space: kernel
> advertises support for the new one via capability, user space requests
> it via a bit in kvm_pit_state.flags.
>   

We still need a new ioctl.  The structure size is embedded in the ioctl 
number, so any additions automatically cause version mismatches.

I sent patches some time ago to have the kernel automatically adjust for 
this, but they weren't well received.

-- 
error compiling committee.c: too many arguments to function


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

* Re: [PATCH 5/5] HPET interaction with in-kernel PIT (v6)
  2009-06-14  9:18       ` Avi Kivity
@ 2009-06-14  9:26         ` Jan Kiszka
  2009-06-14  9:35           ` Avi Kivity
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2009-06-14  9:26 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Beth Kon, kvm

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

Avi Kivity wrote:
> Jan Kiszka wrote:
>>>>  
>>>>  struct kvm_pit_state {
>>>>      struct kvm_pit_channel_state channels[3];
>>>> +    u8 hpet_legacy_mode;
>>>>  };
>>>>         
>>> This changes the ABI, breaking older binaries running on newer kernels,
>>> or newer binaries running on older kernels.
>>>     
>>
>> As we have KVM_CREATE_PIT2 now, which includes struct kvm_pit_config
>> with a lot of unused flags, it should be straightforward to negotiate
>> the kvm_pit_state format between kernel and user space: kernel
>> advertises support for the new one via capability, user space requests
>> it via a bit in kvm_pit_state.flags.
>>   
> 
> We still need a new ioctl.  The structure size is embedded in the ioctl
> number, so any additions automatically cause version mismatches.
> 
> I sent patches some time ago to have the kernel automatically adjust for
> this, but they weren't well received.

Unfortunate. But on the one hand, nothing technically prevents defining
the IOCTL base on existing kvm_pit_state, but passing down extended
kvm_pit_state2 if that negotiation took place. On the other hand, we are
not yet running out of IOCTL numbers...

However, I guess kvm_pit_state2 will also need some flags field and a
bit tail room for potential future extensions.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: [PATCH 5/5] HPET interaction with in-kernel PIT (v6)
  2009-06-14  9:26         ` Jan Kiszka
@ 2009-06-14  9:35           ` Avi Kivity
  0 siblings, 0 replies; 13+ messages in thread
From: Avi Kivity @ 2009-06-14  9:35 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Beth Kon, kvm

Jan Kiszka wrote:
> Unfortunate. But on the one hand, nothing technically prevents defining
> the IOCTL base on existing kvm_pit_state, but passing down extended
> kvm_pit_state2 if that negotiation took place. On the other hand, we are
> not yet running out of IOCTL numbers...
>   

Right, and we are not in any competition for most obfuscated interface 
yet (though we'd probably get an honourable mention if we were to apply).

> However, I guess kvm_pit_state2 will also need some flags field and a
> bit tail room for potential future extensions.
>   

Yes, it's a common pattern in kvm.

-- 
error compiling committee.c: too many arguments to function


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

end of thread, other threads:[~2009-06-14  9:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-12  1:46 [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Beth Kon
2009-06-12  1:46 ` [PATCH 2/5] " Beth Kon
2009-06-12  1:46 ` [PATCH 3/5] BIOS changes for KVM HPET (v6) Beth Kon
2009-06-12  1:46 ` [PATCH 4/5] Userspace " Beth Kon
2009-06-14  8:55   ` Avi Kivity
2009-06-14  9:00     ` Avi Kivity
2009-06-12  1:46 ` [PATCH 5/5] HPET interaction with in-kernel PIT (v6) Beth Kon
2009-06-14  8:53   ` Avi Kivity
2009-06-14  9:10     ` Jan Kiszka
2009-06-14  9:18       ` Avi Kivity
2009-06-14  9:26         ` Jan Kiszka
2009-06-14  9:35           ` Avi Kivity
2009-06-14  8:50 ` [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Avi Kivity

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.