Beth Kon wrote:
Signed-off-by: Beth Kon <eak@xxxxxxxxxx>
diff --git a/hw/hpet.c b/hw/hpet.c
index c7945ec..100abf5 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -30,6 +30,7 @@
#include "console.h"
#include "qemu-timer.h"
#include "hpet_emul.h"
+#include "qemu-kvm.h"
//#define HPET_DEBUG
#ifdef HPET_DEBUG
@@ -48,6 +49,28 @@ uint32_t hpet_in_legacy_mode(void)
return 0;
}
+static void hpet_legacy_enable(void)
+{
+ if (qemu_kvm_pit_in_kernel()) {
+ kvm_kpit_disable();
+ dprintf("qemu: hpet disabled kernel pit\n");
+ } else {
+ hpet_pit_disable();
+ dprintf("qemu: hpet disabled userspace pit\n");
+ }
+}
+
+static void hpet_legacy_disable(void)
+{
+ if (qemu_kvm_pit_in_kernel()) {
+ kvm_kpit_enable();
+ dprintf("qemu: hpet enabled kernel pit\n");
+ } else {
+ hpet_pit_enable();
+ dprintf("qemu: hpet enabled userspace pit\n");
+ }
+}
I think it's better to move these into hpet_pit_enable() and
hpet_pit_enable(). This avoids changing the calls below, and puts pit
stuff in i8254.c instead of hpet.c.
Might also need to be called from hpet_load(); probably a problem in
upstream as well.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html