[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 07/16] hw/i386/vmport: Introduce vmport.h
From: |
Liran Alon |
Subject: |
[PATCH v2 07/16] hw/i386/vmport: Introduce vmport.h |
Date: |
Tue, 10 Mar 2020 18:53:23 +0200 |
No functional change. This is mere refactoring.
Suggested-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Liran Alon <address@hidden>
---
hw/i386/pc.c | 1 +
hw/i386/vmmouse.c | 1 +
hw/i386/vmport.c | 1 +
include/hw/i386/pc.h | 13 -------------
include/hw/i386/vmport.h | 16 ++++++++++++++++
5 files changed, 19 insertions(+), 13 deletions(-)
create mode 100644 include/hw/i386/vmport.h
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 6ab4acb0c62e..6ac71e1af32b 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -31,6 +31,7 @@
#include "hw/i386/apic.h"
#include "hw/i386/topology.h"
#include "hw/i386/fw_cfg.h"
+#include "hw/i386/vmport.h"
#include "sysemu/cpus.h"
#include "hw/block/fdc.h"
#include "hw/ide.h"
diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
index e8e62bd96b8c..49a546fd3bb6 100644
--- a/hw/i386/vmmouse.c
+++ b/hw/i386/vmmouse.c
@@ -26,6 +26,7 @@
#include "qapi/error.h"
#include "ui/console.h"
#include "hw/i386/pc.h"
+#include "hw/i386/vmport.h"
#include "hw/input/i8042.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index 973f3f6448e9..7723d37a0657 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "hw/isa/isa.h"
#include "hw/i386/pc.h"
+#include "hw/i386/vmport.h"
#include "hw/input/i8042.h"
#include "hw/qdev-properties.h"
#include "sysemu/hw_accel.h"
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index d5ac76d54e1f..60c988c4a5aa 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -134,19 +134,6 @@ typedef struct PCMachineClass {
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled);
-/* vmport.c */
-#define TYPE_VMPORT "vmport"
-typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address);
-
-static inline void vmport_init(ISABus *bus)
-{
- isa_create_simple(bus, TYPE_VMPORT);
-}
-
-void vmport_register(unsigned char command, VMPortReadFunc *func, void
*opaque);
-void vmmouse_get_data(uint32_t *data);
-void vmmouse_set_data(const uint32_t *data);
-
/* pc.c */
extern int fd_bootchk;
diff --git a/include/hw/i386/vmport.h b/include/hw/i386/vmport.h
new file mode 100644
index 000000000000..f0c1e985ca08
--- /dev/null
+++ b/include/hw/i386/vmport.h
@@ -0,0 +1,16 @@
+#ifndef HW_VMPORT_H
+#define HW_VMPORT_H
+
+#define TYPE_VMPORT "vmport"
+typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address);
+
+static inline void vmport_init(ISABus *bus)
+{
+ isa_create_simple(bus, TYPE_VMPORT);
+}
+
+void vmport_register(unsigned char command, VMPortReadFunc *func, void
*opaque);
+void vmmouse_get_data(uint32_t *data);
+void vmmouse_set_data(const uint32_t *data);
+
+#endif
--
2.20.1
- [PATCH v2 00/16]: hw/i386/vmport: Bug fixes and improvements, Liran Alon, 2020/03/10
- [PATCH v2 01/16] hw/i386/vmport: Add device properties, Liran Alon, 2020/03/10
- [PATCH v2 02/16] hw/i386/vmport: Add compatability version field, Liran Alon, 2020/03/10
- [PATCH v2 04/16] hw/i386/vmport: Set EAX to -1 on failed and unsupported commands, Liran Alon, 2020/03/10
- [PATCH v2 03/16] hw/i386/vmport: Propagate IOPort read to vCPU EAX register, Liran Alon, 2020/03/10
- [PATCH v2 05/16] hw/i386/vmport: Introduce vmx-version property, Liran Alon, 2020/03/10
- [PATCH v2 06/16] hw/i386/vmport: Report VMX type in CMD_GETVERSION, Liran Alon, 2020/03/10
- [PATCH v2 07/16] hw/i386/vmport: Introduce vmport.h,
Liran Alon <=
- [PATCH v2 09/16] hw/i386/vmport: Add support for CMD_GETBIOSUUID, Liran Alon, 2020/03/10
- [PATCH v2 10/16] hw/i386/vmport: Add support for CMD_GETTIME, Liran Alon, 2020/03/10
- [PATCH v2 11/16] hw/i386/vmport: Add support for CMD_GETTIMEFULL, Liran Alon, 2020/03/10
- [PATCH v2 12/16] hw/i386/vmport: Add support for CMD_GET_VCPU_INFO, Liran Alon, 2020/03/10
- [PATCH v2 13/16] hw/i386/vmport: Allow x2apic without IR, Liran Alon, 2020/03/10
- [PATCH v2 14/16] i386/cpu: Store LAPIC bus frequency in CPU structure, Liran Alon, 2020/03/10
- [PATCH v2 15/16] hw/i386/vmport: Add support for CMD_GETHZ, Liran Alon, 2020/03/10
- [PATCH v2 16/16] hw/i386/vmport: Assert vmport initialized before registering commands, Liran Alon, 2020/03/10
- [PATCH v2 08/16] hw/i386/vmport: Define enum for all commands, Liran Alon, 2020/03/10
- Re: [PATCH v2 00/16]: hw/i386/vmport: Bug fixes and improvements, Michael S. Tsirkin, 2020/03/10