hv: refine the function pointer type of port I/O request handlers

In the definition of port i/o handler, struct acrn_vm * pointer
 is redundant as input, as context of acrn_vm is aleady linked
 in struct acrn_vcpu * by vcpu->vm, 'vm' is not required as input.

 this patch removes argument '*vm' from 'io_read_fn_t' &
 'io_write_fn_t', use '*vcpu' for them instead.

Tracked-On: #861
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Yonghua Huang
2019-08-09 11:21:16 +08:00
committed by ACRN System Integration
parent 866935a53f
commit f791574f0e
8 changed files with 126 additions and 56 deletions

View File

@@ -49,10 +49,10 @@ struct acrn_vm;
struct acrn_vcpu;
typedef
bool (*io_read_fn_t)(struct acrn_vm *vm, struct acrn_vcpu *vcpu, uint16_t port, size_t size);
bool (*io_read_fn_t)(struct acrn_vcpu *vcpu, uint16_t port, size_t size);
typedef
bool (*io_write_fn_t)(struct acrn_vm *vm, uint16_t port, size_t size, uint32_t val);
bool (*io_write_fn_t)(struct acrn_vcpu *vcpu, uint16_t port, size_t size, uint32_t val);
/**
* @brief Describes a single IO handler description entry.