mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-28 12:05:59 +00:00
HV: io: unify vhm_request req and mem_io in vcpu
The current struct vcpu has two members, namely 'struct vhm_request req' and 'struct mem_io mmio', that hold similar info, including the address, direction, size, value and status of mmio reqeusts. As a step towards a unified framework for both MMIO/PIO, this patch unifies these two members by a tailored version of vhm_reqeust, mostly with the reserved fields dropped. The definitions to request types, directions and process status are reused. Handling errors during emulations will be revisited after the I/O emulation paths are unified. Thus for this patch the mmio.mmio_status in inherited by io_req.processed which is not yet properly processed. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -83,6 +83,13 @@ struct pci_request {
|
||||
int32_t reg;
|
||||
} __aligned(8);
|
||||
|
||||
union vhm_io_request {
|
||||
struct pio_request pio;
|
||||
struct pci_request pci;
|
||||
struct mmio_request mmio;
|
||||
int64_t reserved1[8];
|
||||
};
|
||||
|
||||
/* vhm_request are 256Bytes aligned */
|
||||
struct vhm_request {
|
||||
/* offset: 0bytes - 63bytes */
|
||||
@@ -90,12 +97,7 @@ struct vhm_request {
|
||||
int32_t reserved0[15];
|
||||
|
||||
/* offset: 64bytes-127bytes */
|
||||
union {
|
||||
struct pio_request pio_request;
|
||||
struct pci_request pci_request;
|
||||
struct mmio_request mmio_request;
|
||||
int64_t reserved1[8];
|
||||
} reqs;
|
||||
union vhm_io_request reqs;
|
||||
|
||||
/* True: valid req which need VHM to process.
|
||||
* ACRN write, VHM read only
|
||||
|
Reference in New Issue
Block a user