Re: [Xen-devel] [PATCH v5 5/9] x86/hvm: add vcpu parameter to guest memory copy function

2017-01-27 Thread Roger Pau Monne
On Thu, Jan 26, 2017 at 06:33:11AM -0700, Jan Beulich wrote: > >>> On 19.01.17 at 18:29, wrote: > > --- a/xen/include/asm-x86/hvm/support.h > > +++ b/xen/include/asm-x86/hvm/support.h > > @@ -71,6 +71,8 @@ enum hvm_copy_result hvm_copy_to_guest_phys( > > paddr_t paddr,

Re: [Xen-devel] [PATCH v5 5/9] x86/hvm: add vcpu parameter to guest memory copy function

2017-01-26 Thread Jan Beulich
>>> On 19.01.17 at 18:29, wrote: > --- a/xen/include/asm-x86/hvm/support.h > +++ b/xen/include/asm-x86/hvm/support.h > @@ -71,6 +71,8 @@ enum hvm_copy_result hvm_copy_to_guest_phys( > paddr_t paddr, void *buf, int size); > enum hvm_copy_result hvm_copy_from_guest_phys(

Re: [Xen-devel] [PATCH v5 5/9] x86/hvm: add vcpu parameter to guest memory copy function

2017-01-26 Thread Jan Beulich
>>> On 19.01.17 at 18:29, wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -3077,15 +3077,16 @@ void hvm_task_switch( > #define HVMCOPY_linear (1u<<2) > static enum hvm_copy_result __hvm_copy( > void *buf, paddr_t addr, int size, unsigned

Re: [Xen-devel] [PATCH v5 5/9] x86/hvm: add vcpu parameter to guest memory copy function

2017-01-23 Thread Roger Pau Monne
On Fri, Jan 20, 2017 at 07:45:35PM +, Andrew Cooper wrote: > On 19/01/17 17:29, Roger Pau Monne wrote: > > @@ -3172,9 +3173,9 @@ static enum hvm_copy_result __hvm_copy( > > { > > static unsigned long lastpage; > > if ( xchg(, gfn) != gfn ) > > -

Re: [Xen-devel] [PATCH v5 5/9] x86/hvm: add vcpu parameter to guest memory copy function

2017-01-20 Thread Andrew Cooper
On 19/01/17 17:29, Roger Pau Monne wrote: > @@ -3172,9 +3173,9 @@ static enum hvm_copy_result __hvm_copy( > { > static unsigned long lastpage; > if ( xchg(, gfn) != gfn ) > -gdprintk(XENLOG_DEBUG, "guest attempted write to >

[Xen-devel] [PATCH v5 5/9] x86/hvm: add vcpu parameter to guest memory copy function

2017-01-19 Thread Roger Pau Monne
Current __hvm_copy assumes that the destination memory belongs to the current vcpu, but this is not always the case since for PVHv2 Dom0 build hvm copy functions are used with current being the idle vcpu. Add a new vcpu parameter to hvm copy in order to solve that. Note that only