mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
ioreq: only clear vcpu->req when io request needed
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
@@ -103,8 +103,6 @@ int io_instr_handler(struct vcpu *vcpu)
|
||||
direction = VM_EXIT_IO_INSTRUCTION_ACCESS_DIRECTION(exit_qual);
|
||||
mask = 0xfffffffful >> (32 - 8 * sz);
|
||||
|
||||
memset(&vcpu->req, 0, sizeof(struct vhm_request));
|
||||
|
||||
TRACE_4I(TRC_VMEXIT_IO_INSTRUCTION, port, direction, sz,
|
||||
cur_context_idx);
|
||||
|
||||
@@ -149,6 +147,7 @@ int io_instr_handler(struct vcpu *vcpu)
|
||||
if (status != 0) {
|
||||
uint64_t *rax = &cur_context->guest_cpu_regs.regs.rax;
|
||||
|
||||
memset(&vcpu->req, 0, sizeof(struct vhm_request));
|
||||
dm_emulate_pio_pre(vcpu, exit_qual, sz, *rax);
|
||||
status = acrn_insert_request_wait(vcpu, &vcpu->req);
|
||||
}
|
||||
|
Reference in New Issue
Block a user