From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: [PULL 28/29] hw/i386: Add 'vmport.h' local header
Date: Mon, 4 May 2020 10:30:20 -0400 [thread overview]
Message-ID: <20200504142814.157589-29-mst@redhat.com> (raw)
In-Reply-To: <20200504142814.157589-1-mst@redhat.com>
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Move 'vmport' related declarations in a target-specific header.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200504083342.24273-4-f4bug@amsat.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/vmport.h | 34 ++++++++++++++++++++++++++++++++++
include/hw/i386/pc.h | 3 ---
hw/i386/pc.c | 1 +
hw/i386/vmmouse.c | 1 +
hw/i386/vmport.c | 1 +
5 files changed, 37 insertions(+), 3 deletions(-)
create mode 100644 hw/i386/vmport.h
diff --git a/hw/i386/vmport.h b/hw/i386/vmport.h
new file mode 100644
index 0000000000..47eda7a22b
--- /dev/null
+++ b/hw/i386/vmport.h
@@ -0,0 +1,34 @@
+/*
+ * 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/pc.h b/include/hw/i386/pc.h
index 26e2a3d92b..de49a57506 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -130,9 +130,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);
-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);
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 84669ddc84..f6b8431c8b 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -91,6 +91,7 @@
#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 e8e62bd96b..78b36f6f5d 100644
--- a/hw/i386/vmmouse.c
+++ b/hw/i386/vmmouse.c
@@ -29,6 +29,7 @@
#include "hw/input/i8042.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
+#include "vmport.h"
/* debug only vmmouse */
//#define DEBUG_VMMOUSE
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index 114141c6f3..00d47e0c4c 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -26,6 +26,7 @@
#include "hw/i386/pc.h"
#include "sysemu/hw_accel.h"
#include "qemu/log.h"
+#include "vmport.h"
#include "trace.h"
#define VMPORT_CMD_GETVERSION 0x0a
--
MST
next prev parent reply other threads:[~2020-05-04 14:48 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 14:29 [PULL 00/29] virtio,acpi,pci,pc: backlog from pre-5.0 Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 01/29] hw/pci/pcie: Forbid hot-plug if it's disabled on the slot Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 02/29] hw/pci/pcie: Replace PCI_DEVICE() casts with existing variable Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 03/29] move 'typedef Aml' to qemu/types.h Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 04/29] acpi: add aml builder stubs Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 05/29] qtest: allow DSDT acpi table changes Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 06/29] acpi: drop pointless _STA method Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 07/29] acpi: add ISADeviceClass->build_aml() Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 08/29] rtc: add RTC_ISA_BASE Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 09/29] virtio-vga: fix virtio-vga bar ordering Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 10/29] virtio-pci: update virtio pci bar layout documentation Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 11/29] vhost-user-blk: fix invalid memory access Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 12/29] checkpatch: fix acpi check with multiple file name Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 13/29] checkpatch: ignore allowed diff list Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 14/29] acpi: DSDT without _STA Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 15/29] hw/acpi/nvdimm: Fix for NVDIMM incorrect DSM output buffer length Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 16/29] nvdimm: Use configurable ACPI IO base and size Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 17/29] hw/arm/virt: Add nvdimm hot-plug infrastructure Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 18/29] hw/arm/virt: Add nvdimm hotplug support Michael S. Tsirkin
2020-05-04 14:29 ` [PULL 19/29] tests: Update ACPI tables list for upcoming arm/virt test changes Michael S. Tsirkin
2020-05-04 14:30 ` [PULL 20/29] bios-tables-test: test pc-dimm and nvdimm coldplug for arm/virt Michael S. Tsirkin
2020-05-04 14:30 ` [PULL 21/29] tests/acpi: add expected tables for bios-tables-test Michael S. Tsirkin
2020-05-04 14:30 ` [PULL 22/29] Refactor vhost_user_set_mem_table functions Michael S. Tsirkin
2020-05-04 14:30 ` [PULL 23/29] acpi: unit-test: Ignore diff in WAET ACPI table Michael S. Tsirkin
2020-05-04 14:30 ` [PULL 24/29] acpi: Add Windows ACPI Emulated Device Table (WAET) Michael S. Tsirkin
2020-05-04 14:30 ` [PULL 25/29] acpi: unit-test: Update WAET ACPI Table expected binaries Michael S. Tsirkin
2020-05-04 14:30 ` [PULL 26/29] hw/i386/pc: Create 'vmport' device in place Michael S. Tsirkin
2020-05-04 14:30 ` [PULL 27/29] hw/i386/vmport: Remove unused 'hw/input/i8042.h' include Michael S. Tsirkin
2020-05-04 14:30 ` Michael S. Tsirkin [this message]
2020-05-04 14:30 ` [PULL 29/29] hw/i386: Make vmmouse helpers static Michael S. Tsirkin
2020-05-04 19:35 ` [PULL 00/29] virtio,acpi,pci,pc: backlog from pre-5.0 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200504142814.157589-29-mst@redhat.com \
--to=mst@redhat.com \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).