Ian Campbell
2013-Jan-04 14:03 UTC
[PATCH] xen: return a per-mapping error from XENMEM_add_to_physmap_range.
Since ARM and PVH dom0 kernel use this to map foreign domain pages they could in the future hit paged out or shared pages etc and therefore need to propagate which frames are -ENOENT and which failed for some other reason. We have not yet released a version of Xen with this particular hypercall subop so we can change the interface without worrying about compatibility (I think/hope). This would be used by the privcmd driver, in particular it relates to Mats'' patch "improve performance of MMAPBATCH_V2." NB I have only implemented the ARM side since the PVH side isn''t in tree yet. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Mats Petersson <mats.petersson@citrix.com> Cc: Mukesh Rathor <mukesh.rathor@oracle.com> Cc: Jan Beulich <JBeulich@suse.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: tim@xen.org Cc: stefano.stabellini@citrix.com Cc: keir@xen.org --- xen/arch/arm/mm.c | 4 ++++ xen/include/public/memory.h | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index d97b3ea..945e7ac 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -612,6 +612,10 @@ static int xenmem_add_to_physmap_range(struct domain *d, xatpr->foreign_domid, idx, gpfn); + rc = copy_to_guest_offset(xatpr->errs, xatpr->size-1, &rc, 1); + if ( rc < 0 ) + goto out; + xatpr->size--; /* Check for continuation if it''s not the last interation */ diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h index 3ee2902..62acabd 100644 --- a/xen/include/public/memory.h +++ b/xen/include/public/memory.h @@ -236,6 +236,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t); /* A batched version of add_to_physmap. */ #define XENMEM_add_to_physmap_range 23 struct xen_add_to_physmap_range { + /* IN */ /* Which domain to change the mapping for. */ domid_t domid; uint16_t space; /* => enum phys_map_space */ @@ -247,8 +248,13 @@ struct xen_add_to_physmap_range { /* Indexes into space being mapped. */ XEN_GUEST_HANDLE(xen_ulong_t) idxs; - /* GPFN in domdwhere the source mapping page should appear. */ + /* GPFN in domid where the source mapping page should appear. */ XEN_GUEST_HANDLE(xen_pfn_t) gpfns; + + /* OUT */ + + /* Per index error code. */ + XEN_GUEST_HANDLE(int) errs; }; typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t; DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t); -- 1.7.9.1
Ian Campbell
2013-Jan-04 14:04 UTC
Re: [PATCH] xen: return a per-mapping error from XENMEM_add_to_physmap_range.
On Fri, 2013-01-04 at 14:03 +0000, Ian Campbell wrote:> Since ARM and PVH dom0 kernel use this to map foreign domain pages > they could in the future hit paged out or shared pages etc and > therefore need to propagate which frames are -ENOENT and which failed > for some other reason.And the Linux side: 8<----------------- From ccf21a20c014e416f8cf747d284cf33492151da5 Mon Sep 17 00:00:00 2001 From: Ian Campbell <ian.campbell@citrix.com> Date: Fri, 4 Jan 2013 13:58:29 +0000 Subject: [PATCH] xen: implement updated XENMEM_add_to_physmap_range ABI Allows for more fine grained error reporting. Only used by PVH and ARM both of which are marked EXPERIMENTAL precisely because the ABI is not yet stable Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- arch/arm/xen/enlighten.c | 8 +++++--- arch/x86/xen/mmu.c | 8 +++++--- include/xen/interface/memory.h | 6 ++++++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index f28fc1a..31e4ae3 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -59,14 +59,16 @@ static int map_foreign_page(unsigned long lpfn, unsigned long fgmfn, }; xen_ulong_t idx = fgmfn; xen_pfn_t gpfn = lpfn; + int err = 0; set_xen_guest_handle(xatp.idxs, &idx); set_xen_guest_handle(xatp.gpfns, &gpfn); + set_xen_guest_handle(xatp.errs, &err); rc = HYPERVISOR_memory_op(XENMEM_add_to_physmap_range, &xatp); - if (rc) { - pr_warn("Failed to map pfn to mfn rc:%d pfn:%lx mfn:%lx\n", - rc, lpfn, fgmfn); + if (rc || err) { + pr_warn("Failed to map pfn to mfn rc:%d:%d pfn:%lx mfn:%lx\n", + rc, err, lpfn, fgmfn); return 1; } return 0; diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index fee34fe..41f6de4 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -2508,14 +2508,16 @@ static int pvh_add_to_xen_p2m(unsigned long lpfn, unsigned long fgmfn, }; xen_ulong_t idx = fgmfn; xen_pfn_t gpfn = lpfn; + int err = 0; set_xen_guest_handle(xatp.idxs, &idx); set_xen_guest_handle(xatp.gpfns, &gpfn); + set_xen_guest_handle(xatp.errs, &err); rc = HYPERVISOR_memory_op(XENMEM_add_to_physmap_range, &xatp); - if (rc) - pr_warn("d0: Failed to map pfn (0x%lx) to mfn (0x%lx) rc:%d\n", - lpfn, fgmfn, rc); + if (rc || err) + pr_warn("d0: Failed to map pfn (0x%lx) to mfn (0x%lx) rc:%d:%d\n", + lpfn, fgmfn, rc, err); return rc; } diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h index b40a431..2ecfe4f 100644 --- a/include/xen/interface/memory.h +++ b/include/xen/interface/memory.h @@ -190,6 +190,7 @@ DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap); #define XENMEM_add_to_physmap_range 23 struct xen_add_to_physmap_range { + /* IN */ /* Which domain to change the mapping for. */ domid_t domid; uint16_t space; /* => enum phys_map_space */ @@ -203,6 +204,11 @@ struct xen_add_to_physmap_range { /* GPFN in domid where the source mapping page should appear. */ GUEST_HANDLE(xen_pfn_t) gpfns; + + /* OUT */ + + /* Per index error code. */ + GUEST_HANDLE(int) errs; }; DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap_range); -- 1.7.2.5
Ian Campbell
2013-Jan-16 14:28 UTC
Re: [PATCH] xen: return a per-mapping error from XENMEM_add_to_physmap_range.
Any Acks/Nacks? This touches both ARM and x86 (although x86 only notionally until the PVH stuff is merged). On Fri, 2013-01-04 at 14:03 +0000, Ian Campbell wrote:> Since ARM and PVH dom0 kernel use this to map foreign domain pages > they could in the future hit paged out or shared pages etc and > therefore need to propagate which frames are -ENOENT and which failed > for some other reason. > > We have not yet released a version of Xen with this particular > hypercall subop so we can change the interface without worrying about > compatibility (I think/hope). > > This would be used by the privcmd driver, in particular it relates to > Mats'' patch "improve performance of MMAPBATCH_V2." > > NB I have only implemented the ARM side since the PVH side isn''t in > tree yet. > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > Cc: Mats Petersson <mats.petersson@citrix.com> > Cc: Mukesh Rathor <mukesh.rathor@oracle.com> > Cc: Jan Beulich <JBeulich@suse.com> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> > Cc: tim@xen.org > Cc: stefano.stabellini@citrix.com > Cc: keir@xen.org > --- > xen/arch/arm/mm.c | 4 ++++ > xen/include/public/memory.h | 8 +++++++- > 2 files changed, 11 insertions(+), 1 deletions(-) > > diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c > index d97b3ea..945e7ac 100644 > --- a/xen/arch/arm/mm.c > +++ b/xen/arch/arm/mm.c > @@ -612,6 +612,10 @@ static int xenmem_add_to_physmap_range(struct domain *d, > xatpr->foreign_domid, > idx, gpfn); > > + rc = copy_to_guest_offset(xatpr->errs, xatpr->size-1, &rc, 1); > + if ( rc < 0 ) > + goto out; > + > xatpr->size--; > > /* Check for continuation if it''s not the last interation */ > diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h > index 3ee2902..62acabd 100644 > --- a/xen/include/public/memory.h > +++ b/xen/include/public/memory.h > @@ -236,6 +236,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t); > /* A batched version of add_to_physmap. */ > #define XENMEM_add_to_physmap_range 23 > struct xen_add_to_physmap_range { > + /* IN */ > /* Which domain to change the mapping for. */ > domid_t domid; > uint16_t space; /* => enum phys_map_space */ > @@ -247,8 +248,13 @@ struct xen_add_to_physmap_range { > /* Indexes into space being mapped. */ > XEN_GUEST_HANDLE(xen_ulong_t) idxs; > > - /* GPFN in domdwhere the source mapping page should appear. */ > + /* GPFN in domid where the source mapping page should appear. */ > XEN_GUEST_HANDLE(xen_pfn_t) gpfns; > + > + /* OUT */ > + > + /* Per index error code. */ > + XEN_GUEST_HANDLE(int) errs; > }; > typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t; > DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t);
Stefano Stabellini
2013-Jan-16 14:39 UTC
Re: [PATCH] xen: return a per-mapping error from XENMEM_add_to_physmap_range.
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> On Wed, 16 Jan 2013, Ian Campbell wrote:> Any Acks/Nacks? > > This touches both ARM and x86 (although x86 only notionally until the > PVH stuff is merged). > > On Fri, 2013-01-04 at 14:03 +0000, Ian Campbell wrote: > > Since ARM and PVH dom0 kernel use this to map foreign domain pages > > they could in the future hit paged out or shared pages etc and > > therefore need to propagate which frames are -ENOENT and which failed > > for some other reason. > > > > We have not yet released a version of Xen with this particular > > hypercall subop so we can change the interface without worrying about > > compatibility (I think/hope). > > > > This would be used by the privcmd driver, in particular it relates to > > Mats'' patch "improve performance of MMAPBATCH_V2." > > > > NB I have only implemented the ARM side since the PVH side isn''t in > > tree yet. > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > Cc: Mats Petersson <mats.petersson@citrix.com> > > Cc: Mukesh Rathor <mukesh.rathor@oracle.com> > > Cc: Jan Beulich <JBeulich@suse.com> > > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> > > Cc: tim@xen.org > > Cc: stefano.stabellini@citrix.com > > Cc: keir@xen.org > > --- > > xen/arch/arm/mm.c | 4 ++++ > > xen/include/public/memory.h | 8 +++++++- > > 2 files changed, 11 insertions(+), 1 deletions(-) > > > > diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c > > index d97b3ea..945e7ac 100644 > > --- a/xen/arch/arm/mm.c > > +++ b/xen/arch/arm/mm.c > > @@ -612,6 +612,10 @@ static int xenmem_add_to_physmap_range(struct domain *d, > > xatpr->foreign_domid, > > idx, gpfn); > > > > + rc = copy_to_guest_offset(xatpr->errs, xatpr->size-1, &rc, 1); > > + if ( rc < 0 ) > > + goto out; > > + > > xatpr->size--; > > > > /* Check for continuation if it''s not the last interation */ > > diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h > > index 3ee2902..62acabd 100644 > > --- a/xen/include/public/memory.h > > +++ b/xen/include/public/memory.h > > @@ -236,6 +236,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t); > > /* A batched version of add_to_physmap. */ > > #define XENMEM_add_to_physmap_range 23 > > struct xen_add_to_physmap_range { > > + /* IN */ > > /* Which domain to change the mapping for. */ > > domid_t domid; > > uint16_t space; /* => enum phys_map_space */ > > @@ -247,8 +248,13 @@ struct xen_add_to_physmap_range { > > /* Indexes into space being mapped. */ > > XEN_GUEST_HANDLE(xen_ulong_t) idxs; > > > > - /* GPFN in domdwhere the source mapping page should appear. */ > > + /* GPFN in domid where the source mapping page should appear. */ > > XEN_GUEST_HANDLE(xen_pfn_t) gpfns; > > + > > + /* OUT */ > > + > > + /* Per index error code. */ > > + XEN_GUEST_HANDLE(int) errs; > > }; > > typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t; > > DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t); > > >
Keir Fraser
2013-Jan-16 15:03 UTC
Re: [PATCH] xen: return a per-mapping error from XENMEM_add_to_physmap_range.
Acked-by: Keir Fraser <keir@xen.org> On 16/01/2013 14:39, "Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com> wrote:> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > On Wed, 16 Jan 2013, Ian Campbell wrote: >> Any Acks/Nacks? >> >> This touches both ARM and x86 (although x86 only notionally until the >> PVH stuff is merged). >> >> On Fri, 2013-01-04 at 14:03 +0000, Ian Campbell wrote: >>> Since ARM and PVH dom0 kernel use this to map foreign domain pages >>> they could in the future hit paged out or shared pages etc and >>> therefore need to propagate which frames are -ENOENT and which failed >>> for some other reason. >>> >>> We have not yet released a version of Xen with this particular >>> hypercall subop so we can change the interface without worrying about >>> compatibility (I think/hope). >>> >>> This would be used by the privcmd driver, in particular it relates to >>> Mats'' patch "improve performance of MMAPBATCH_V2." >>> >>> NB I have only implemented the ARM side since the PVH side isn''t in >>> tree yet. >>> >>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> >>> Cc: Mats Petersson <mats.petersson@citrix.com> >>> Cc: Mukesh Rathor <mukesh.rathor@oracle.com> >>> Cc: Jan Beulich <JBeulich@suse.com> >>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> >>> Cc: tim@xen.org >>> Cc: stefano.stabellini@citrix.com >>> Cc: keir@xen.org >>> --- >>> xen/arch/arm/mm.c | 4 ++++ >>> xen/include/public/memory.h | 8 +++++++- >>> 2 files changed, 11 insertions(+), 1 deletions(-) >>> >>> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c >>> index d97b3ea..945e7ac 100644 >>> --- a/xen/arch/arm/mm.c >>> +++ b/xen/arch/arm/mm.c >>> @@ -612,6 +612,10 @@ static int xenmem_add_to_physmap_range(struct domain >>> *d, >>> xatpr->foreign_domid, >>> idx, gpfn); >>> >>> + rc = copy_to_guest_offset(xatpr->errs, xatpr->size-1, &rc, 1); >>> + if ( rc < 0 ) >>> + goto out; >>> + >>> xatpr->size--; >>> >>> /* Check for continuation if it''s not the last interation */ >>> diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h >>> index 3ee2902..62acabd 100644 >>> --- a/xen/include/public/memory.h >>> +++ b/xen/include/public/memory.h >>> @@ -236,6 +236,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t); >>> /* A batched version of add_to_physmap. */ >>> #define XENMEM_add_to_physmap_range 23 >>> struct xen_add_to_physmap_range { >>> + /* IN */ >>> /* Which domain to change the mapping for. */ >>> domid_t domid; >>> uint16_t space; /* => enum phys_map_space */ >>> @@ -247,8 +248,13 @@ struct xen_add_to_physmap_range { >>> /* Indexes into space being mapped. */ >>> XEN_GUEST_HANDLE(xen_ulong_t) idxs; >>> >>> - /* GPFN in domdwhere the source mapping page should appear. */ >>> + /* GPFN in domid where the source mapping page should appear. */ >>> XEN_GUEST_HANDLE(xen_pfn_t) gpfns; >>> + >>> + /* OUT */ >>> + >>> + /* Per index error code. */ >>> + XEN_GUEST_HANDLE(int) errs; >>> }; >>> typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t; >>> DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t); >> >> >>
Mats Petersson
2013-Jan-16 15:07 UTC
Re: [PATCH] xen: return a per-mapping error from XENMEM_add_to_physmap_range.
On 16/01/13 14:28, Ian Campbell wrote:> Any Acks/Nacks? > > This touches both ARM and x86 (although x86 only notionally until the > PVH stuff is merged).Acked-by: Mats Petersson <mats.petersson@citrix.com>> > On Fri, 2013-01-04 at 14:03 +0000, Ian Campbell wrote: >> Since ARM and PVH dom0 kernel use this to map foreign domain pages >> they could in the future hit paged out or shared pages etc and >> therefore need to propagate which frames are -ENOENT and which failed >> for some other reason. >> >> We have not yet released a version of Xen with this particular >> hypercall subop so we can change the interface without worrying about >> compatibility (I think/hope). >> >> This would be used by the privcmd driver, in particular it relates to >> Mats'' patch "improve performance of MMAPBATCH_V2." >> >> NB I have only implemented the ARM side since the PVH side isn''t in >> tree yet. >> >> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> >> Cc: Mats Petersson <mats.petersson@citrix.com> >> Cc: Mukesh Rathor <mukesh.rathor@oracle.com> >> Cc: Jan Beulich <JBeulich@suse.com> >> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> >> Cc: tim@xen.org >> Cc: stefano.stabellini@citrix.com >> Cc: keir@xen.org >> --- >> xen/arch/arm/mm.c | 4 ++++ >> xen/include/public/memory.h | 8 +++++++- >> 2 files changed, 11 insertions(+), 1 deletions(-) >> >> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c >> index d97b3ea..945e7ac 100644 >> --- a/xen/arch/arm/mm.c >> +++ b/xen/arch/arm/mm.c >> @@ -612,6 +612,10 @@ static int xenmem_add_to_physmap_range(struct domain *d, >> xatpr->foreign_domid, >> idx, gpfn); >> >> + rc = copy_to_guest_offset(xatpr->errs, xatpr->size-1, &rc, 1); >> + if ( rc < 0 ) >> + goto out; >> + >> xatpr->size--; >> >> /* Check for continuation if it''s not the last interation */ >> diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h >> index 3ee2902..62acabd 100644 >> --- a/xen/include/public/memory.h >> +++ b/xen/include/public/memory.h >> @@ -236,6 +236,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t); >> /* A batched version of add_to_physmap. */ >> #define XENMEM_add_to_physmap_range 23 >> struct xen_add_to_physmap_range { >> + /* IN */ >> /* Which domain to change the mapping for. */ >> domid_t domid; >> uint16_t space; /* => enum phys_map_space */ >> @@ -247,8 +248,13 @@ struct xen_add_to_physmap_range { >> /* Indexes into space being mapped. */ >> XEN_GUEST_HANDLE(xen_ulong_t) idxs; >> >> - /* GPFN in domdwhere the source mapping page should appear. */ >> + /* GPFN in domid where the source mapping page should appear. */ >> XEN_GUEST_HANDLE(xen_pfn_t) gpfns; >> + >> + /* OUT */ >> + >> + /* Per index error code. */ >> + XEN_GUEST_HANDLE(int) errs; >> }; >> typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t; >> DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t); >
Konrad Rzeszutek Wilk
2013-Jan-16 17:22 UTC
Re: [PATCH] xen: return a per-mapping error from XENMEM_add_to_physmap_range.
On Wed, Jan 16, 2013 at 02:28:51PM +0000, Ian Campbell wrote:> Any Acks/Nacks?I took the Linux patch and applied it to my stable/pvh... something already.> > This touches both ARM and x86 (although x86 only notionally until the > PVH stuff is merged). > > On Fri, 2013-01-04 at 14:03 +0000, Ian Campbell wrote: > > Since ARM and PVH dom0 kernel use this to map foreign domain pages > > they could in the future hit paged out or shared pages etc and > > therefore need to propagate which frames are -ENOENT and which failed > > for some other reason. > > > > We have not yet released a version of Xen with this particular > > hypercall subop so we can change the interface without worrying about > > compatibility (I think/hope). > > > > This would be used by the privcmd driver, in particular it relates to > > Mats'' patch "improve performance of MMAPBATCH_V2." > > > > NB I have only implemented the ARM side since the PVH side isn''t in > > tree yet. > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > Cc: Mats Petersson <mats.petersson@citrix.com> > > Cc: Mukesh Rathor <mukesh.rathor@oracle.com> > > Cc: Jan Beulich <JBeulich@suse.com> > > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> > > Cc: tim@xen.org > > Cc: stefano.stabellini@citrix.com > > Cc: keir@xen.org > > --- > > xen/arch/arm/mm.c | 4 ++++ > > xen/include/public/memory.h | 8 +++++++- > > 2 files changed, 11 insertions(+), 1 deletions(-) > > > > diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c > > index d97b3ea..945e7ac 100644 > > --- a/xen/arch/arm/mm.c > > +++ b/xen/arch/arm/mm.c > > @@ -612,6 +612,10 @@ static int xenmem_add_to_physmap_range(struct domain *d, > > xatpr->foreign_domid, > > idx, gpfn); > > > > + rc = copy_to_guest_offset(xatpr->errs, xatpr->size-1, &rc, 1); > > + if ( rc < 0 ) > > + goto out; > > + > > xatpr->size--; > > > > /* Check for continuation if it''s not the last interation */ > > diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h > > index 3ee2902..62acabd 100644 > > --- a/xen/include/public/memory.h > > +++ b/xen/include/public/memory.h > > @@ -236,6 +236,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t); > > /* A batched version of add_to_physmap. */ > > #define XENMEM_add_to_physmap_range 23 > > struct xen_add_to_physmap_range { > > + /* IN */ > > /* Which domain to change the mapping for. */ > > domid_t domid; > > uint16_t space; /* => enum phys_map_space */ > > @@ -247,8 +248,13 @@ struct xen_add_to_physmap_range { > > /* Indexes into space being mapped. */ > > XEN_GUEST_HANDLE(xen_ulong_t) idxs; > > > > - /* GPFN in domdwhere the source mapping page should appear. */ > > + /* GPFN in domid where the source mapping page should appear. */ > > XEN_GUEST_HANDLE(xen_pfn_t) gpfns; > > + > > + /* OUT */ > > + > > + /* Per index error code. */ > > + XEN_GUEST_HANDLE(int) errs; > > }; > > typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t; > > DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t); > >
Ian Campbell
2013-Jan-17 16:49 UTC
Re: [PATCH] xen: return a per-mapping error from XENMEM_add_to_physmap_range.
On Wed, 2013-01-16 at 17:22 +0000, Konrad Rzeszutek Wilk wrote:> On Wed, Jan 16, 2013 at 02:28:51PM +0000, Ian Campbell wrote: > > Any Acks/Nacks? > > I took the Linux patch and applied it to my stable/pvh... something > already.Thanks. I''ve applied the Xen side with the various acks.