[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/10] i386: hvf: simplify and fix in/out handling
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 09/10] i386: hvf: simplify and fix in/out handling |
Date: |
Tue, 3 Oct 2017 15:45:39 +0200 |
Reading a 32-bit port should clear the upper 32-bits of the register.
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/hvf/hvf.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 5194b94591..35e39afefd 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -748,16 +748,16 @@ int hvf_vcpu_exec(CPUState *cpu)
} else if (size == 2) {
AX(env) = val;
} else if (size == 4) {
- RAX(env) = (uint32_t)val;
+ RRX(env) = (uint32_t)val;
} else {
- VM_PANIC("size");
+ RRX(env) = (uint64_t)val;
}
RIP(env) += ins_len;
store_regs(cpu);
break;
} else if (!string && !in) {
- RAX(env) = rreg(cpu->hvf_fd, HV_X86_RAX);
- hvf_handle_io(env, port, &RAX(env), 1, size, 1);
+ RRX(env) = rreg(cpu->hvf_fd, HV_X86_RAX);
+ hvf_handle_io(env, port, &RRX(env), 1, size, 1);
macvm_set_rip(cpu, rip + ins_len);
break;
}
--
2.13.6
- [Qemu-devel] [RFH PATCH 00/10] i386: hvf: miscellaneous cleanups, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PATCH 01/10] i386: hvf: move all hvf files in the same directory, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PATCH 02/10] i386: hvf: header cleanup, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PATCH 06/10] i386: hvf: abort on decoding error, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PATCH 04/10] i386: hvf: remove more dead emulator code, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PATCH 05/10] i386: hvf: remove ZERO_INIT macro, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PATCH 10/10] i386: hvf: cleanup x86_gen.h, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PATCH 09/10] i386: hvf: simplify and fix in/out handling,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 03/10] i386: hvf: unify register enums between HVF and the rest, Paolo Bonzini, 2017/10/03
- Re: [Qemu-devel] [RFH PATCH 00/10] i386: hvf: miscellaneous cleanups, Alex Bligh, 2017/10/03