xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86/HVM: 32-bit IN result must be zero-extended to 64 bits (part 2)
Date: Wed, 13 Nov 2013 17:12:29 +0000	[thread overview]
Message-ID: <5283B2FD.7070101@citrix.com> (raw)
In-Reply-To: <5283C05E0200007800102F78@nat28.tlf.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 1037 bytes --]

On 13/11/13 17:09, Jan Beulich wrote:
> Just spotted a counterpart of what commit 9d89100b (same title) dealt
> with.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

>
> --- 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@lists.xen.org
> http://lists.xen.org/xen-devel


[-- Attachment #1.2: Type: text/html, Size: 1964 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2013-11-13 17:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 17:09 [PATCH] x86/HVM: 32-bit IN result must be zero-extended to 64 bits (part 2) Jan Beulich
2013-11-13 17:12 ` Andrew Cooper [this message]
2013-11-13 18:09 ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5283B2FD.7070101@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).