[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/HVM: correct last address emulation acceptance check
commit 276da2785e3797885aadb135a957279b73ecf076 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Apr 26 13:47:02 2016 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Apr 26 13:47:02 2016 +0200 x86/HVM: correct last address emulation acceptance check For REPeated memory access instructions the repeat count also needs to be considered. Utilize that "last" already takes this into account. Also defer computing "last" until we really know we need it. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx> Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/arch/x86/hvm/intercept.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/hvm/intercept.c b/xen/arch/x86/hvm/intercept.c index d5cb96c..fc757d0 100644 --- a/xen/arch/x86/hvm/intercept.c +++ b/xen/arch/x86/hvm/intercept.c @@ -34,16 +34,16 @@ static bool_t hvm_mmio_accept(const struct hvm_io_handler *handler, const ioreq_t *p) { - paddr_t first = hvm_mmio_first_byte(p); - paddr_t last = hvm_mmio_last_byte(p); + paddr_t first = hvm_mmio_first_byte(p), last; BUG_ON(handler->type != IOREQ_TYPE_COPY); if ( !handler->mmio.ops->check(current, first) ) return 0; - /* Make sure the handler will accept the whole access */ - if ( p->size > 1 && + /* Make sure the handler will accept the whole access. */ + last = hvm_mmio_last_byte(p); + if ( last != first && !handler->mmio.ops->check(current, last) ) domain_crash(current->domain); -- 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 |