From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Jan Beulich' <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>
Subject: Re: [PATCH] x86/HVM: correct repeat count update in linear->phys translation
Date: Thu, 7 Sep 2017 10:50:34 +0000 [thread overview]
Message-ID: <9f3cabbe2f774e60a34dc20a2efee667@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <59B13E9102000078001783E2@prv-mh.provo.novell.com>
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 07 September 2017 11:42
> To: xen-devel <xen-devel@lists.xenproject.org>
> Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>; Paul Durrant
> <Paul.Durrant@citrix.com>
> Subject: [PATCH] x86/HVM: correct repeat count update in linear->phys
> translation
>
> For the insn emulator's fallback logic in REP MOVS/STOS/INS/OUTS
> handling to work correctly, *reps must not be set to zero when
> returning X86EMUL_UNHANDLEABLE.
Does it really need to be zero when returning X86EMUL_EXCEPTION?
Paul
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/xen/arch/x86/hvm/emulate.c
> +++ b/xen/arch/x86/hvm/emulate.c
> @@ -566,15 +566,16 @@ static int hvmemul_linear_to_phys(
> if ( pfec & (PFEC_page_paged | PFEC_page_shared) )
> return X86EMUL_RETRY;
> done /= bytes_per_rep;
> - *reps = done;
> if ( done == 0 )
> {
> ASSERT(!reverse);
> if ( npfn != gfn_x(INVALID_GFN) )
> return X86EMUL_UNHANDLEABLE;
> + *reps = 0;
> x86_emul_pagefault(pfec, addr & PAGE_MASK, &hvmemul_ctxt-
> >ctxt);
> return X86EMUL_EXCEPTION;
> }
> + *reps = done;
> break;
> }
>
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-09-07 10:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-07 10:41 [PATCH] x86/HVM: correct repeat count update in linear->phys translation Jan Beulich
2017-09-07 10:50 ` Paul Durrant [this message]
2017-09-07 11:20 ` Jan Beulich
2017-09-07 11:15 ` Andrew Cooper
2017-09-07 11:24 ` Jan Beulich
2017-09-07 11:35 ` Andrew Cooper
2017-09-07 11:41 ` Jan Beulich
2017-09-07 11:27 ` Jan Beulich
2017-09-08 12:31 ` Paul Durrant
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=9f3cabbe2f774e60a34dc20a2efee667@AMSPEX02CL03.citrite.net \
--to=paul.durrant@citrix.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=JBeulich@suse.com \
--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).