xen-devel
[Xen-devel] Re: [PATCH 5/7] mm: New XENMEM space, XENMAPSPACE_gmfn_range
To: |
<Jean.Guyader@xxxxxxxxxx>, "Jean Guyader" <jean.guyader@xxxxxxxxxxxxx> |
Subject: |
[Xen-devel] Re: [PATCH 5/7] mm: New XENMEM space, XENMAPSPACE_gmfn_range |
From: |
"Jan Beulich" <JBeulich@xxxxxxxx> |
Date: |
Fri, 11 Nov 2011 08:09:33 +0000 |
Cc: |
George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, "Keir \(Xen.org\)" <keir@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "allen.m.kay@xxxxxxxxx" <allen.m.kay@xxxxxxxxx>, "Tim\(Xen.org\)" <tim@xxxxxxx> |
Delivery-date: |
Fri, 11 Nov 2011 00:13:04 -0800 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<20111110173720.GA29605@xxxxxxxxxxxxxxxxxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<4EBBD5F602000078000602EE@xxxxxxxxxxxxxxxxxxxx> <20111110173720.GA29605@xxxxxxxxxxxxxxxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
>>> On 10.11.11 at 18:37, Jean Guyader <jean.guyader@xxxxxxxxxxxxx> wrote:
> On 10/11 12:47, Jan Beulich wrote:
>> >>> On 10.11.11 at 12:35, Jean Guyader <jean.guyader@xxxxxxxxxxxxx> wrote:
>> >@@ -4716,6 +4748,17 @@ long arch_memory_op(int op, XEN_GUEST_HANDLE(void)
> arg)
>> > }
>> >
>> > rc = xenmem_add_to_physmap(d, &xatp);
>> >+ if ( rc == -EAGAIN )
>>
>> if ( rc )
>>
>> >+ {
>> >+ if ( copy_to_guest(arg, &xatp, 1) )
>> >+ {
>> >+ rcu_unlock_domain(d);
>> >+ return -EFAULT;
>> >+ }
>>
>> }
>> if ( rc == -EAGAIN )
>>
>> (with some room for further simplification). Without that (or the minimal
>> alternative of copying back just .size or yet some other mechanism), as
>> pointed out before, the caller won't have a way to know how far into
>> the batch things succeeded.
>>
>
> In xenmem_add_to_physmap I modify xatp in place so when I exit this
> function xatp will contain the updated value (new start value in
> .gpfn and .idx, how far do I need to go in .size).
>
> The idea here was to call the copy_to_guest only when we got preempted.
> If I copy xatp back to the guest I should get the updated value
> in xatp from the copy_from_guest when I'll be called by the continuation.
I understand the continuation aspect. But you appear to have not read
my comments completely: I'm asking how your caller, in the event of
failure, would know how much of the batch was processed successfully.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 2/7] iommu: Introduce iommu_flush and iommu_flush_all., (continued)
- [Xen-devel] Re: [PATCH 5/7] mm: New XENMEM space, XENMAPSPACE_gmfn_range, Jean Guyader
- [Xen-devel] Re: [PATCH 5/7] mm: New XENMEM space, XENMAPSPACE_gmfn_range,
Jan Beulich <=
- Re: [Xen-devel] Re: [PATCH 5/7] mm: New XENMEM space, XENMAPSPACE_gmfn_range, Ian Campbell
- Re: [Xen-devel] Re: [PATCH 5/7] mm: New XENMEM space, XENMAPSPACE_gmfn_range, Jan Beulich
- Re: [Xen-devel] Re: [PATCH 5/7] mm: New XENMEM space, XENMAPSPACE_gmfn_range, Jean Guyader
- Re: [Xen-devel] Re: [PATCH 5/7] mm: New XENMEM space, XENMAPSPACE_gmfn_range, Jan Beulich
- [Xen-devel] Re: [PATCH 4/7] mm: xenmem_add_to_physmap now takes a pointer on xatp, Jan Beulich
- [Xen-devel] Re: [PATCH 4/7] mm: xenmem_add_to_physmap now takes a pointer on xatp, Jean Guyader
- [Xen-devel] Re: [PATCH 4/7] mm: xenmem_add_to_physmap now takes a pointer on xatp, Jean Guyader
|
|
|