mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-06 11:20:32 +00:00
HV: HV: make io_read_fn_t return true or false
This patch makes io_read_fn_t return true or false instead of void. Returning true means that the handler in HV process the request completely. Returning false means that we need to re-inject the request to DM after processing it in HV. Tracked-On: #2865 Signed-off-by: Kaige Fu <kaige.fu@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
3b2ad67788
commit
1c0d7f78d0
@@ -43,19 +43,20 @@ static uint8_t cmos_get_reg_val(uint8_t addr)
|
||||
return reg;
|
||||
}
|
||||
|
||||
static uint32_t vrtc_read(struct acrn_vm *vm, uint16_t addr, __unused size_t width)
|
||||
static bool vrtc_read(struct acrn_vm *vm, struct acrn_vcpu *vcpu, uint16_t addr, __unused size_t width)
|
||||
{
|
||||
uint8_t reg;
|
||||
uint8_t offset;
|
||||
struct pio_request *pio_req = &vcpu->req.reqs.pio;
|
||||
|
||||
offset = vm->vrtc_offset;
|
||||
|
||||
if (addr == CMOS_ADDR_PORT) {
|
||||
return vm->vrtc_offset;
|
||||
pio_req->value = vm->vrtc_offset;
|
||||
} else {
|
||||
pio_req->value = cmos_get_reg_val(offset);
|
||||
}
|
||||
|
||||
reg = cmos_get_reg_val(offset);
|
||||
return reg;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool vrtc_write(struct acrn_vm *vm, uint16_t addr, size_t width,
|
||||
|
Reference in New Issue
Block a user