[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 031/115] hw/i386/vmport: Introduce vmport.h
From: |
Paolo Bonzini |
Subject: |
[PULL 031/115] hw/i386/vmport: Introduce vmport.h |
Date: |
Thu, 11 Jun 2020 15:43:25 -0400 |
From: Liran Alon <liran.alon@oracle.com>
No functional change. This is mere refactoring.
Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200312165431.82118-8-liran.alon@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i386/pc.c | 2 +-
hw/i386/vmmouse.c | 2 +-
hw/i386/vmport.c | 2 +-
hw/i386/vmport.h | 34 ----------------------------------
include/hw/i386/vmport.h | 16 ++++++++++++++++
5 files changed, 19 insertions(+), 37 deletions(-)
delete mode 100644 hw/i386/vmport.h
create mode 100644 include/hw/i386/vmport.h
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2128f3d6fe..b9961b1035 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"
@@ -91,7 +92,6 @@
#include "qapi/qmp/qerror.h"
#include "config-devices.h"
#include "e820_memory_layout.h"
-#include "vmport.h"
#include "fw_cfg.h"
#include "trace.h"
diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
index b3aef41327..b73f076753 100644
--- a/hw/i386/vmmouse.c
+++ b/hw/i386/vmmouse.c
@@ -25,10 +25,10 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "ui/console.h"
+#include "hw/i386/vmport.h"
#include "hw/input/i8042.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
-#include "vmport.h"
#include "cpu.h"
/* debug only vmmouse */
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index dabb443367..e6d169566d 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -30,10 +30,10 @@
#include "qemu/osdep.h"
#include "hw/isa/isa.h"
+#include "hw/i386/vmport.h"
#include "hw/qdev-properties.h"
#include "sysemu/hw_accel.h"
#include "qemu/log.h"
-#include "vmport.h"
#include "cpu.h"
#include "trace.h"
diff --git a/hw/i386/vmport.h b/hw/i386/vmport.h
deleted file mode 100644
index 47eda7a22b..0000000000
--- a/hw/i386/vmport.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * QEMU VMPort emulation
- *
- * Copyright (C) 2007 Hervé Poussineau
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef HW_I386_VMPORT_H
-#define HW_I386_VMPORT_H
-
-#define TYPE_VMPORT "vmport"
-
-typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address);
-
-void vmport_register(unsigned char command, VMPortReadFunc *func, void
*opaque);
-
-#endif
diff --git a/include/hw/i386/vmport.h b/include/hw/i386/vmport.h
new file mode 100644
index 0000000000..efbe3e0e3f
--- /dev/null
+++ b/include/hw/i386/vmport.h
@@ -0,0 +1,16 @@
+#ifndef HW_VMPORT_H
+#define HW_VMPORT_H
+
+#include "hw/isa/isa.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);
+
+#endif
--
2.26.2
- [PULL 067/115] vfio/pci: Use kvm_irqchip_add_irqfd_notifier_gsi() for irqfds, (continued)
- [PULL 067/115] vfio/pci: Use kvm_irqchip_add_irqfd_notifier_gsi() for irqfds, Paolo Bonzini, 2020/06/11
- [PULL 035/115] hw/i386/vmport: Allow x2apic without IR, Paolo Bonzini, 2020/06/11
- [PULL 030/115] hw/i386/vmport: Report vmware-vmx-type in CMD_GETVERSION, Paolo Bonzini, 2020/06/11
- [PULL 064/115] target/i386: fix fisttpl, fisttpll handling of out-of-range values, Paolo Bonzini, 2020/06/11
- [PULL 024/115] target/i386: fix phadd* with identical destination and source register, Paolo Bonzini, 2020/06/11
- [PULL 048/115] megasas: use unsigned type for reply_queue_head and check index, Paolo Bonzini, 2020/06/11
- [PULL 060/115] target/i386: fix floating-point load-constant rounding, Paolo Bonzini, 2020/06/11
- [PULL 019/115] vmbus: vmbus implementation, Paolo Bonzini, 2020/06/11
- [PULL 022/115] vmbus: add infrastructure to save/load vmbus requests, Paolo Bonzini, 2020/06/11
- [PULL 057/115] exec: Propagate cpu_memory_rw_debug() error, Paolo Bonzini, 2020/06/11
- [PULL 031/115] hw/i386/vmport: Introduce vmport.h,
Paolo Bonzini <=
- [PULL 047/115] i386/kvm: fix a use-after-free when vcpu plug/unplug, Paolo Bonzini, 2020/06/11
- [PULL 040/115] qom: remove index from object_resolve_abs_path(), Paolo Bonzini, 2020/06/11
- [PULL 070/115] chardev/char-socket: Properly make qio connections non blocking, Paolo Bonzini, 2020/06/11
- [PULL 072/115] hw/i386/amd_iommu: Fix the reserved bits definition of IOMMU commands, Paolo Bonzini, 2020/06/11
- [PULL 068/115] KVM: Pass EventNotifier into kvm_irqchip_assign_irqfd, Paolo Bonzini, 2020/06/11
- [PULL 076/115] util/oslib: Returns the real thread identifier on FreeBSD and NetBSD, Paolo Bonzini, 2020/06/11
- [PULL 079/115] configure: Do not ignore malloc value, Paolo Bonzini, 2020/06/11
- [PULL 075/115] target/i386: define a new MSR based feature word - FEAT_PERF_CAPABILITIES, Paolo Bonzini, 2020/06/11
- [PULL 074/115] i386: Remove unused define's from hax and hvf, Paolo Bonzini, 2020/06/11
- [PULL 077/115] memory: Make 'info mtree' not display disabled regions by default, Paolo Bonzini, 2020/06/11