[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/HVM: 32-bit IN result must be zero-extended to 64 bits (part 2)


  • To: Jan Beulich <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Wed, 13 Nov 2013 18:09:14 +0000
  • Delivery-date: Wed, 13 Nov 2013 18:09:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac7gm3W6Nj1rcChn/EargjjD2jnXEQ==
  • Thread-topic: [Xen-devel] [PATCH] x86/HVM: 32-bit IN result must be zero-extended to 64 bits (part 2)

On 13/11/2013 17:09, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> Just spotted a counterpart of what commit 9d89100b (same title) dealt
> with.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Keir Fraser <keir@xxxxxxx>

> --- 2013-10-16.orig/xen/arch/x86/hvm/io.c 2013-11-13 17:45:16.000000000 +0100
> +++ 2013-10-16/xen/arch/x86/hvm/io.c 2013-11-13 17:47:47.000000000 +0100
> @@ -290,8 +290,10 @@ void hvm_io_assist(void)
>          (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;
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.