mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-06 16:15:00 +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:
@@ -250,8 +250,7 @@ struct vcpu {
|
||||
uint32_t running; /* vcpu is picked up and run? */
|
||||
uint32_t ioreq_pending; /* ioreq is ongoing or not? */
|
||||
|
||||
struct vhm_request req; /* used by io/ept emulation */
|
||||
struct mem_io mmio; /* used by io/ept emulation */
|
||||
struct io_request req; /* used by io/ept emulation */
|
||||
|
||||
/* save guest msr tsc aux register.
|
||||
* Before VMENTRY, save guest MSR_TSC_AUX to this fields.
|
||||
|
||||
@@ -52,7 +52,7 @@ void vioapic_mmio_read(struct vm *vm, uint64_t gpa, uint32_t *rval);
|
||||
uint8_t vioapic_pincount(struct vm *vm);
|
||||
void vioapic_process_eoi(struct vm *vm, uint32_t vector);
|
||||
bool vioapic_get_rte(struct vm *vm, uint8_t pin, union ioapic_rte *rte);
|
||||
int vioapic_mmio_access_handler(struct vcpu *vcpu, struct mem_io *mmio,
|
||||
int vioapic_mmio_access_handler(struct vcpu *vcpu, struct io_request *io_req,
|
||||
void *handler_private_data);
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
|
||||
@@ -111,7 +111,7 @@ void vlapic_set_tmr_one_vec(struct vlapic *vlapic, uint32_t delmode,
|
||||
void
|
||||
vlapic_apicv_batch_set_tmr(struct vlapic *vlapic);
|
||||
|
||||
int vlapic_mmio_access_handler(struct vcpu *vcpu, struct mem_io *mmio,
|
||||
int vlapic_mmio_access_handler(struct vcpu *vcpu, struct io_request *io_req,
|
||||
void *handler_private_data);
|
||||
|
||||
uint32_t vlapic_get_id(struct vlapic *vlapic);
|
||||
|
||||
Reference in New Issue
Block a user