[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86emul: correct behavior for single iteration REP INS/OUTS
commit 061cd0f0e5c41335150e0d234d8ad0aff7b6da11 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Feb 2 12:48:59 2017 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Feb 2 12:48:59 2017 +0100 x86emul: correct behavior for single iteration REP INS/OUTS The initial operation done on these paths may raise an exception (for ->read_io() that's possible only on the PV path, when the I/O port access check has been deferred). We have to suppress put_rep_prefix() updating rCX in that case. From an abstract perspective this also applies to RETRY being returned. Reported-by: Wei Liu <wei.liu2@xxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> Tested-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/x86_emulate/x86_emulate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 21dd98c..dbda4b3 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -3134,7 +3134,7 @@ x86_emulate( if ( nr_reps == 1 && ops->read_io && ops->write ) { rc = ops->read_io(port, dst.bytes, &dst.val, ctxt); - if ( rc == X86EMUL_OKAY ) + if ( rc != X86EMUL_UNHANDLEABLE ) nr_reps = 0; } if ( (nr_reps > 1 || rc == X86EMUL_UNHANDLEABLE) && ops->rep_ins ) @@ -3175,7 +3175,7 @@ x86_emulate( { rc = read_ulong(ea.mem.seg, ea.mem.off, &dst.val, dst.bytes, ctxt, ops); - if ( rc == X86EMUL_OKAY ) + if ( rc != X86EMUL_UNHANDLEABLE ) nr_reps = 0; } if ( (nr_reps > 1 || rc == X86EMUL_UNHANDLEABLE) && ops->rep_outs ) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |