Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1550028
| Path | csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Stefano Stabellini <sstabellini@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2] Xen: ARM: Zero reserved fields of xatp before making hypervisor call |
| Date | Tue, 03 Jan 2017 19:10:01 +0100 |
| Message-ID | <sVBH3-1F1-17@gated-at.bofh.it> (permalink) |
| References | <sTaBj-RM-3@gated-at.bofh.it> <sV48p-2C9-3@gated-at.bofh.it> |
| X-X-Sender | sstabellini@sstabellini-ThinkPad-X260 |
| User-Agent | Alpine 2.10 (DEB 1266 2009-07-14) |
| MIME-Version | 1.0 |
| Content-Type | TEXT/PLAIN; charset=US-ASCII |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 42 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Jiandi An <anjiandi@codeaurora.org>, boris.ostrovsky@oracle.com, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, sstabellini@kernel.org, julien.grall@arm.com |
| X-Original-Date | Tue, 3 Jan 2017 10:03:59 -0800 (PST) |
| X-Original-Message-ID | <alpine.DEB.2.10.1701031003050.17742@sstabellini-ThinkPad-X260> |
| X-Original-References | <1482886052-30111-1-git-send-email-anjiandi@codeaurora.org> <a926f4b6-0bfd-bcd6-3313-e1bd01ce4fa2@suse.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1550028 |
Show key headers only | View raw
On Mon, 2 Jan 2017, Juergen Gross wrote:
> On 28/12/16 01:47, Jiandi An wrote:
> > Ensure all reserved fields of xatp are zero before making
> > hypervisor call to XEN in xen_map_device_mmio().
> > xenmem_add_to_physmap_one() in XEN fails the mapping request if
> > extra.res reserved field in xatp is not zero for XENMAPSPACE_dev_mmio
> > request.
> >
> > Signed-off-by: Jiandi An <anjiandi@codeaurora.org>
> > ---
> > Changed zeroing xatp to a static initialization
> > of .domid and .space for xatp.
> >
> > drivers/xen/arm-device.c | 8 +++++---
> > 1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/xen/arm-device.c b/drivers/xen/arm-device.c
> > index 778acf8..85dd20e 100644
> > --- a/drivers/xen/arm-device.c
> > +++ b/drivers/xen/arm-device.c
> > @@ -58,9 +58,13 @@ static int xen_map_device_mmio(const struct resource *resources,
> > xen_pfn_t *gpfns;
> > xen_ulong_t *idxs;
> > int *errs;
> > - struct xen_add_to_physmap_range xatp;
> >
> > for (i = 0; i < count; i++) {
> > + struct xen_add_to_physmap_range xatp = {
> > + .domid = DOMID_SELF,
> > + .space = XENMAPSPACE_dev_mmio
> > + };
> > +
>
> I still don't see the need to re-initialize the input parts of xatp
> on each loop iteration unless you can show the need for it (e.g. a
> buggy hypervisor version not conforming to the interface specification).
>
> OTOH I don't feel really strong about it and let Stefano being the
> maintainer for the ARM parts decide.
I don't feel strongly about this either - I think this patch is good
enough. I'll apply to xentip.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2] Xen: ARM: Zero reserved fields of xatp before making hypervisor call Jiandi An <anjiandi@codeaurora.org> - 2016-12-28 01:50 +0100
Re: [PATCH V2] Xen: ARM: Zero reserved fields of xatp before making hypervisor call Juergen Gross <jgross@suse.com> - 2017-01-02 07:20 +0100
Re: [PATCH V2] Xen: ARM: Zero reserved fields of xatp before making hypervisor call Stefano Stabellini <sstabellini@kernel.org> - 2017-01-03 19:10 +0100
Re: [PATCH V2] Xen: ARM: Zero reserved fields of xatp before making hypervisor call Julien Grall <julien.grall@arm.com> - 2017-01-16 16:10 +0100
csiph-web