[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/HVM: 32-bit IN result must be zero-extended to 64 bits (part 2)
commit 1e521eddeb51a9f1bf0e4dd1d17efc873eafae41 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Nov 15 11:01:49 2013 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Nov 15 11:01:49 2013 +0100 x86/HVM: 32-bit IN result must be zero-extended to 64 bits (part 2) Just spotted a counterpart of what commit 9d89100b (same title) dealt with. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> --- xen/arch/x86/hvm/io.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index deb7b92..15e0b4c 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -290,8 +290,10 @@ void hvm_io_assist(ioreq_t *p) (void)handle_mmio(); break; case HVMIO_handle_pio_awaiting_completion: - memcpy(&guest_cpu_user_regs()->eax, - &p->data, vio->io_size); + if ( vio->io_size == 4 ) /* Needs zero extension. */ + guest_cpu_user_regs()->rax = (uint32_t)p->data; + else + memcpy(&guest_cpu_user_regs()->rax, &p->data, vio->io_size); break; default: break; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |