All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Juergen Gross <jgross@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	Paul Durrant <paul.durrant@citrix.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] [v2] xen: avoid link error on ARM
Date: Tue, 5 Mar 2019 17:49:38 +0100	[thread overview]
Message-ID: <CAK8P3a03_v849mauL5SvX=5n1DGnaii9XeGJJF7Z1rO+n2H+xg@mail.gmail.com> (raw)
In-Reply-To: <9a285a75-b9ea-37a9-b5bd-ba2a068dd944@suse.com>

On Tue, Mar 5, 2019 at 3:57 PM Juergen Gross <jgross@suse.com> wrote:
> On 05/03/2019 14:43, Boris Ostrovsky wrote:
> > On 3/5/19 8:30 AM, Arnd Bergmann wrote:

> >> @@ -809,15 +789,7 @@ static long privcmd_ioctl_mmap_resource(struct file *file, void __user *udata)
> >>              goto out;
> >>
> >>      if (xen_feature(XENFEAT_auto_translated_physmap)) {
> >> -            struct remap_pfn r = {
> >> -                    .mm = vma->vm_mm,
> >> -                    .pages = vma->vm_private_data,
> >> -                    .prot = vma->vm_page_prot,
> >> -            };
> >> -
> >> -            rc = apply_to_page_range(r.mm, kdata.addr,
> >> -                                     kdata.num << PAGE_SHIFT,
> >> -                                     remap_pfn_fn, &r);
> >> +            rc = xen_remap_vma_range(vma, kdata.addr, kdata.num << PAGE_SHIFT);
> >
> > I wonder whether drivers/xen/xlate_mmu.c might be a good place for these
> > routines.
>
> Hmm, probably. This would require a stub in the header to avoid
> problems in case of CONFIG_XEN_AUTO_XLATE not defined, though
> (the #ifdef is already there).
>
> I think this is the cleanest solution.

Putting it into xlate_mmu.c was my first attempt, but I was not sure how to
solve the dependency on CONFIG_XEN_AUTO_XLATE. So
xen_feature(XENFEAT_auto_translated_physmap)) would be guaranteed
to return false if CONFIG_XEN_AUTO_XLATE is disabled?

       Arnd

  parent reply	other threads:[~2019-03-05 16:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05 13:30 [PATCH] [v2] xen: avoid link error on ARM Arnd Bergmann
2019-03-05 13:35 ` Juergen Gross
2019-03-05 13:35 ` Juergen Gross
2019-03-05 13:43 ` Boris Ostrovsky
2019-03-05 13:43 ` Boris Ostrovsky
2019-03-05 14:57   ` Juergen Gross
2019-03-05 16:49     ` Arnd Bergmann
2019-03-05 16:49     ` Arnd Bergmann [this message]
2019-03-05 16:56       ` Juergen Gross
2019-03-05 16:56       ` Juergen Gross
2019-03-05 14:57   ` Juergen Gross
2019-03-05 13:30 Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK8P3a03_v849mauL5SvX=5n1DGnaii9XeGJJF7Z1rO+n2H+xg@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=paul.durrant@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.