> -----Original Message----- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 13 November 2018 10:14 > To: xen-devel <xen-devel@lists.xenproject.org> > Cc: Andrew Cooper <andrew.coop...@citrix.com>; Paul Durrant > <paul.durr...@citrix.com>; Wei Liu <wei.l...@citrix.com> > Subject: [PATCH 1/3] x86/HVM: __hvm_copy() should not write to > p2m_ioreq_server pages > > Commit 3bdec530a5 ("x86/HVM: split page straddling emulated accesses in > more cases") introduced a hvm_copy_to_guest_linear() attempt before > falling back to hvmemul_linear_mmio_write(). This is wrong for the > p2m_ioreq_server special case. That change widened a pre-existing issue > though: Other writes to such pages also need to be failed (or forced > through emulation), in particular hypercall buffer writes. > > Reported-by: ??? <???@citrix.com>
I think this should be: Igor Druzhinin <igor.druzhi...@citrix.com> > Signed-off-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Paul Durrant <paul.durr...@citrix.com> > > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -3202,6 +3202,12 @@ static enum hvm_translation_result __hvm > if ( res != HVMTRANS_okay ) > return res; > > + if ( (flags & HVMCOPY_to_guest) && p2mt == p2m_ioreq_server ) > + { > + put_page(page); > + return HVMTRANS_bad_gfn_to_mfn; > + } > + > p = (char *)__map_domain_page(page) + (addr & ~PAGE_MASK); > > if ( flags & HVMCOPY_to_guest ) > _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel