mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: rework the MMIO handler callback hv_mem_io_handler_t arguments
commit 026ae83bd5
("hv: include: fix 'Unused procedure parameter'")
removed the then unused parameter handler_private_data from
hv_mem_io_handler_t because MISRA-C requires that there should be no
unused parameters in functions.
This patch removes vcpu from the parameter list as well since this may
not be used by all users. Also it brings back handler_private_data which
is more flexible. For example, vioapic_mmio_access_handler() can use it
to pass vcpu pointer.
Tracked-On: #861
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -60,8 +60,7 @@ void vioapic_update_tmr(struct vcpu *vcpu);
|
||||
uint32_t vioapic_pincount(const struct vm *vm);
|
||||
void vioapic_process_eoi(struct vm *vm, uint32_t vector);
|
||||
void vioapic_get_rte(struct vm *vm, uint32_t pin, union ioapic_rte *rte);
|
||||
int vioapic_mmio_access_handler(struct vcpu *vcpu,
|
||||
struct io_request *io_req);
|
||||
int vioapic_mmio_access_handler(struct io_request *io_req, void *handler_private_data);
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
void get_vioapic_info(char *str_arg, size_t str_max, uint16_t vmid);
|
||||
|
@@ -94,8 +94,7 @@ struct vm_io_handler {
|
||||
|
||||
/* Typedef for MMIO handler and range check routine */
|
||||
struct mmio_request;
|
||||
typedef int (*hv_mem_io_handler_t)(struct vcpu *vcpu,
|
||||
struct io_request *io_req);
|
||||
typedef int (*hv_mem_io_handler_t)(struct io_request *io_req, void *handler_private_data);
|
||||
|
||||
/* Structure for MMIO handler node */
|
||||
struct mem_io_node {
|
||||
|
Reference in New Issue
Block a user