clear-pkgs-linux-iot-lts2018/0483-sos-Update-the-common-...

104 lines
2.8 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mingqiang Chi <mingqiang.chi@intel.com>
Date: Fri, 31 Aug 2018 10:58:56 +0800
Subject: [PATCH] sos: Update the common head file
--remove unused data structures
--move data structure(vm_gpa2hpa) to acrn_hv_defs.h
--combine 2 data structures
vm_exit(dm) and vhm_requeset(hv sos) to vhm_request
and put it in acrn_common.h
Change-Id: Ice1f93bf7083b08001b2dfdea257aa7d58e9e751
Tracked-On:218445
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-on:
Reviewed-by: Dong, Eddie <eddie.dong@intel.com>
Tested-by: Dong, Eddie <eddie.dong@intel.com>
---
include/linux/vhm/acrn_common.h | 29 ++++++-----------------------
include/linux/vhm/acrn_hv_defs.h | 5 +++++
2 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/include/linux/vhm/acrn_common.h b/include/linux/vhm/acrn_common.h
index 2fa43a2..0e9293d 100644
--- a/include/linux/vhm/acrn_common.h
+++ b/include/linux/vhm/acrn_common.h
@@ -56,12 +56,6 @@
* Commmon structures for ACRN/VHM/DM
*/
-enum irq_mode {
- IRQ_PULSE,
- IRQ_ASSERT,
- IRQ_DEASSERT,
-} __attribute__((aligned(4)));
-
/* ISA type
* inject interrut to both PIC and IOAPIC
*/
@@ -114,14 +108,6 @@ struct msr_request {
long value;
} __attribute__((aligned(8)));
-struct cpuid_request {
- long eax_in;
- long ecx_in;
- long eax_out;
- long ebx_out;
- long ecx_out;
- long edx_out;
-} __attribute__((aligned(8)));
struct mmio_request {
enum request_direction direction;
@@ -151,13 +137,15 @@ struct pci_request {
/* vhm_request are 256Bytes aligned */
struct vhm_request {
/* offset: 0bytes - 63bytes */
- enum request_type type;
- int reserved0[15];
-
+ union {
+ int exitcode;
+ enum request_type type;
+ unsigned long rip;
+ int reserved0[16];
+ };
/* offset: 64bytes-127bytes */
union {
struct msr_request msr_request;
- struct cpuid_request cpuid_request;
struct io_request pio_request;
struct pci_request pci_request;
struct mmio_request mmio_request;
@@ -225,11 +213,6 @@ struct acrn_nmi_entry {
unsigned long vcpuid; /* IN: -1 means vcpu0 */
} __attribute__((aligned(8)));
-struct vm_gpa2hpa {
- unsigned long gpa; /* IN: gpa to translation */
- unsigned long hpa; /* OUT: -1 means invalid gpa */
-} __attribute__((aligned(8)));
-
struct acrn_ptdev_irq {
enum irq_type type;
unsigned short virt_bdf; /* IN: Device virtual BDF# */
diff --git a/include/linux/vhm/acrn_hv_defs.h b/include/linux/vhm/acrn_hv_defs.h
index 329c38b..1d21bf2 100644
--- a/include/linux/vhm/acrn_hv_defs.h
+++ b/include/linux/vhm/acrn_hv_defs.h
@@ -127,4 +127,9 @@ struct vm_set_memmap {
int prot;
} __attribute__((aligned(8)));
+struct vm_gpa2hpa {
+ unsigned long gpa; /* IN: gpa to translation */
+ unsigned long hpa; /* OUT: -1 means invalid gpa */
+} __attribute__((aligned(8)));
+
#endif /* ACRN_HV_DEFS_H */
--
https://clearlinux.org