Re: [Xen-devel] [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with hvm guests

2015-05-06 Thread Jan Beulich
On 06.05.15 at 14:32, roger@citrix.com wrote: El 06/05/15 a les 14.10, Jan Beulich ha escrit: On 06.05.15 at 13:55, roger@citrix.com wrote: El 14/04/15 a les 14.14, Jan Beulich ha escrit: On 10.04.15 at 19:29, roger@citrix.com wrote: +BUG_ON(((pages 3) %

Re: [Xen-devel] [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with hvm guests

2015-05-06 Thread Roger Pau Monné
El 06/05/15 a les 14.10, Jan Beulich ha escrit: On 06.05.15 at 13:55, roger@citrix.com wrote: El 14/04/15 a les 14.14, Jan Beulich ha escrit: On 10.04.15 at 19:29, roger@citrix.com wrote: +BUG_ON(((pages 3) % PAGE_SIZE) + bytes PAGE_SIZE); I don't seem to be

Re: [Xen-devel] [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with hvm guests

2015-05-06 Thread Jan Beulich
On 06.05.15 at 13:55, roger@citrix.com wrote: El 14/04/15 a les 14.14, Jan Beulich ha escrit: On 10.04.15 at 19:29, roger@citrix.com wrote: +BUG_ON(((pages 3) % PAGE_SIZE) + bytes PAGE_SIZE); I don't seem to be able to spot the original for this one. If there

Re: [Xen-devel] [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with hvm guests

2015-05-06 Thread Roger Pau Monné
Hello, I think I've fixed the rest of the comments, this one however is not easy to deal with. El 14/04/15 a les 14.14, Jan Beulich ha escrit: On 10.04.15 at 19:29, roger@citrix.com wrote: +BUG_ON(((pages 3) % PAGE_SIZE) + bytes PAGE_SIZE); I don't seem to be able

Re: [Xen-devel] [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with hvm guests

2015-04-16 Thread Jan Beulich
On 16.04.15 at 11:11, t...@xen.org wrote: At 13:14 +0100 on 14 Apr (1429017287), Jan Beulich wrote: This won't work: The paging lock protects all of d-arch.paging.preempt.log_dirty, of which you hold cached values in local variables. ... so how about reusing the existing restart code

Re: [Xen-devel] [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with hvm guests

2015-04-16 Thread Tim Deegan
At 13:14 +0100 on 14 Apr (1429017287), Jan Beulich wrote: This won't work: The paging lock protects all of d-arch.paging.preempt.log_dirty, of which you hold cached values in local variables. ... so how about reusing the existing restart code instead? We could either move the label

Re: [Xen-devel] [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with hvm guests

2015-04-14 Thread Jan Beulich
On 10.04.15 at 19:29, roger@citrix.com wrote: --- a/xen/arch/x86/mm/paging.c +++ b/xen/arch/x86/mm/paging.c @@ -397,6 +397,53 @@ int paging_mfn_is_dirty(struct domain *d, mfn_t gmfn) return rv; } +static inline void *map_dirty_bitmap(XEN_GUEST_HANDLE_64(uint8) dirty_bitmap, +

Re: [Xen-devel] [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with hvm guests

2015-04-11 Thread Roger Pau Monné
El 10/04/15 a les 19.29, Roger Pau Monne ha escrit: When the caller of paging_log_dirty_op is a hvm guest Xen would choke when trying to copy the dirty bitmap to the guest because the paging lock is already held. Fix this by independently mapping each page of the guest bitmap as needed