mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 01:54:44 +00:00
hv: bugfix - MMIO access size was not properly initialized.
- MMIO access size is not initialized before instruction emulation. - rename 'analyze_instruction()' to 'decode_instruction()' Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -339,10 +339,6 @@ static int dm_emulate_mmio_pre(struct vcpu *vcpu, uint64_t exit_qual)
|
||||
{
|
||||
int status;
|
||||
|
||||
status = analyze_instruction(vcpu, &vcpu->mmio);
|
||||
if (status != 0)
|
||||
return status;
|
||||
|
||||
if (vcpu->mmio.read_write == HV_MEM_IO_WRITE) {
|
||||
status = emulate_instruction(vcpu, &vcpu->mmio);
|
||||
if (status != 0)
|
||||
@@ -404,6 +400,9 @@ int ept_violation_vmexit_handler(struct vcpu *vcpu)
|
||||
*/
|
||||
mmio->paddr = gpa;
|
||||
|
||||
if (decode_instruction(vcpu, mmio) != 0)
|
||||
goto out;
|
||||
|
||||
list_for_each(pos, &vcpu->vm->mmio_list) {
|
||||
mmio_handler = list_entry(pos, struct mem_io_node, list);
|
||||
if ((mmio->paddr + mmio->access_size <=
|
||||
@@ -419,9 +418,6 @@ int ept_violation_vmexit_handler(struct vcpu *vcpu)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (analyze_instruction(vcpu, mmio) != 0)
|
||||
goto out;
|
||||
|
||||
if (mmio->read_write == HV_MEM_IO_WRITE) {
|
||||
if (emulate_instruction(vcpu, mmio) != 0)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user