xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ed Swierk <eswierk@skyportsystems.com>
Cc: Jan Beulich <jbeulich@suse.com>, xen-devel@lists.xen.org
Subject: Re: [PATCH] xen/mcfg: Call PHYSDEVOP_pci_mmcfg_reserved before PCI enumeration
Date: Tue, 22 Sep 2015 09:39:52 -0400	[thread overview]
Message-ID: <20150922133952.GE24845@l.oracle.com> (raw)
In-Reply-To: <CAO_EM_m8yYGuue1DwV+3bM2a67LsKZ=EUet1S-U0j7sGGVe6Ug@mail.gmail.com>

On Tue, Sep 22, 2015 at 06:26:11AM -0700, Ed Swierk wrote:
> On Tue, Sep 22, 2015 at 5:35 AM, Ed Swierk <eswierk@skyportsystems.com> wrote:
> > So if the contract is that Dom0 tells Xen about mmcfgs before the
> > devices they cover, then Linux ought to call pci_mmcfg_reserved from
> > (or immediately after) both pci_mmcfg_early_init() and
> > pci_mmcfg_late_init().
> 
> Brainstorming possible approaches:
> 
> I don't see an obvious way to hook into those functions (or their
> callers) without injecting Xen-specific code. Is there a precedent to
> follow?

No.
> 
> Alternatively, we could just call the equivalent of xen_mcfg_late()
> from the existing xen_{add,remove}_device() notifiers. This would
> generate a lot of useless pci_mmcfg_reserved hypercalls (number of
> devices times number of mmcfg areas), but pci_mmcfg_arch_enable() in
> Xen should happily ignore the redundant ones. The advantage of this
> approach other than simplicity is that it makes the mmcfg -> device
> setup ordering very explicit.

While that will update the Xen's view of MMCFG it won't update the
existing configuration that Xen has slurped up during bootup.

As in, you will still get warnings.
> 
> Any other ideas?

I like it - as it will update it right away. However we would need some
extra smarts in Xen to reconfigure its view of the PCI device now that the
extended configuration space has become available.

> 
> --Ed
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  parent reply	other threads:[~2015-09-22 13:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15 23:29 [PATCH] xen/mcfg: Call PHYSDEVOP_pci_mmcfg_reserved before PCI enumeration Ed Swierk
2015-09-21 15:58 ` Ed Swierk
2015-09-21 18:05   ` Konrad Rzeszutek Wilk
2015-09-22  5:23     ` Jan Beulich
2015-09-22 13:36       ` Konrad Rzeszutek Wilk
2015-09-22 13:57         ` Jan Beulich
2015-09-22 14:09           ` Konrad Rzeszutek Wilk
2015-09-22 14:12             ` Jan Beulich
2015-09-22 14:33               ` Konrad Rzeszutek Wilk
2015-09-22 15:07                 ` Jan Beulich
2015-09-22  5:21   ` Jan Beulich
2015-09-22 12:35     ` Ed Swierk
2015-09-22 12:40       ` Jan Beulich
2015-09-22 13:26       ` Ed Swierk
2015-09-22 13:36         ` Jan Beulich
2015-09-22 13:39         ` Konrad Rzeszutek Wilk [this message]
2015-09-22 13:52           ` Jan Beulich
2015-09-22 14:03             ` Konrad Rzeszutek Wilk
2015-09-22 14:11               ` Jan Beulich
2015-09-22 14:37                 ` Konrad Rzeszutek Wilk
2015-09-22 15:09                   ` Jan Beulich
2015-09-22 20:17                     ` Ed Swierk
2015-09-23  0:53                       ` Konrad Rzeszutek Wilk

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=20150922133952.GE24845@l.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=eswierk@skyportsystems.com \
    --cc=jbeulich@suse.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).