aboutsummaryrefslogtreecommitdiff
path: root/include/hw/i386/x86.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-12-12 14:14:40 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2019-12-17 19:33:50 +0100
commit89a289c7e9fa857f8b0af0c5f060efa7c0ebe6ba (patch)
tree30bc787854cfdcf3feb46cba922d61723966fd4f /include/hw/i386/x86.h
parent4ca8dabdb8b58349c309cfd9624d3f96172a752b (diff)
x86: move more x86-generic functions out of PC files
These are needed by microvm too, so move them outside of PC-specific files. With this patch, microvm.c need not include pc.h anymore. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/i386/x86.h')
-rw-r--r--include/hw/i386/x86.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
index 97d1575e63..41fe37b8a3 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -23,6 +23,8 @@
#include "hw/boards.h"
#include "hw/nmi.h"
+#include "hw/isa/isa.h"
+#include "hw/i386/ioapic.h"
typedef struct {
/*< private >*/
@@ -100,4 +102,20 @@ void x86_load_linux(X86MachineState *x86ms,
bool x86_machine_is_smm_enabled(X86MachineState *x86ms);
+/* Global System Interrupts */
+
+#define GSI_NUM_PINS IOAPIC_NUM_PINS
+
+typedef struct GSIState {
+ qemu_irq i8259_irq[ISA_NUM_IRQS];
+ qemu_irq ioapic_irq[IOAPIC_NUM_PINS];
+} GSIState;
+
+qemu_irq x86_allocate_cpu_irq(void);
+void gsi_handler(void *opaque, int n, int level);
+void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name);
+
+/* hpet.c */
+extern int no_hpet;
+
#endif