From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>, Paul Durrant <paul.durrant@citrix.com>,
David Vrabel <david.vrabel@citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: HVMlite ABI specification DRAFT B + implementation outline
Date: Tue, 9 Feb 2016 17:32:34 +0100 [thread overview]
Message-ID: <56BA14A2.1030703@citrix.com> (raw)
In-Reply-To: <56B9FA7C02000078000D0142@prv-mh.provo.novell.com>
El 9/2/16 a les 14:41, Jan Beulich ha escrit:
>>>> On 09.02.16 at 14:00, <roger.pau@citrix.com> wrote:
>> Hm, I guess I'm overlooking something, but I think Xen checks the ACPI
>> tables, see xen/arch/x86/x86_64/mmconfig-shared.c:400:
>>
>> if (pci_mmcfg_check_hostbridge()) {
>> unsigned int i;
>>
>> pci_mmcfg_arch_init();
>> for (i = 0; i < pci_mmcfg_config_num; ++i)
>> if (pci_mmcfg_arch_enable(i))
>> valid = 0;
>> } else {
>> acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
>> pci_mmcfg_arch_init();
>> valid = pci_mmcfg_reject_broken();
>> }
>>
>> Which AFAICT suggests that Xen is indeed able to parse the 'MCFG' table,
>> which contains the list of MMCFG regions on the system. Is there any
>> other ACPI table where this information is reported that I'm missing?
>
> You didn't read my reply carefully enough: I didn't say Xen can't
> parse these tables. What I said is that Xen isn't by itself in the
> position to do sanity checks that have proven necessary. Hence ...
Sorry, Ack, AFAICT FreeBSD is much more naive in this aspect and blindly
trusts what the ACPI MCFG table contains (or at least it seems to me
that way).
I'm not going to argue since you say that this has proven necessary, but
are this kind of broken systems still around? PVH/HVMlite requires
recent hardware in order to run, so maybe things have improved since
this was implemented.
>> This would suggest then that the hypercall is no longer needed.
>
> ... it's needed - see Linux'es is_mmconf_reserved() which checks
> both E820 and data read from DSDT (and maybe SSDT). Also
> please don't forget about the hotplug case, where _CBA methods
> need evaluation in order to obtain address information.
Right, _CBA methods report the ECAM space, and are the only way to get
this information in the hotplug case I guess.
>>>> Then for BARs you need to know the specific PCI devices, which are
>>>> enumerated in the DSDT or similar ACPI tables, which are not static, and
>>>> thus cannot be parsed by Xen. We could do a brute force scan of the
>>>> whole PCI bus using the config registers, but that seems hacky. And as
>>>> Boris said we need to keep the usage of PHYSDEVOP_pci_device_add in
>>>> order to notify Xen of the PXM information.
>>>
>>> We can only be sure to have access to segment 0 at boot time.
>>> Other segments may be accessible via MMCFG only, and whether
>>> we can safely use the respective MMCFG we won't know - see
>>> above - early enough. That's also the reason why today we do a
>>> brute force scan only on segment 0.
>>
>> Andrew suggested that all current hardware only uses segment 0, so it
>> seems like covering segment 0 is all that's needed for now. Are OSes
>> already capable of dealing with segments different than 0 that only
>> support MMCFG accesses?
>
> Of course - Linux for example. I've actually seen Linux (and Xen) run
> on a system with multiple segments.
>
>> And in which case, if a segment != 0 appears, and it only supports MMCFG
>> accesses, the MCFG table should contain an entry for this area, which
>> should allow us to properly scan it.
Right, I wasn't specially trilled to remove these two PHYSDEV hypercalls
anyway, they are not very intrusive IMHO. We still need to figure out
how to do MMIO mapping of BARs however. We can continue the discussion
about MMIO mappings on your other reply to the ABI
<56B9F69002000078000D012B@prv-mh.provo.novell.com>.
Roger.
next prev parent reply other threads:[~2016-02-09 16:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-08 19:03 HVMlite ABI specification DRAFT B + implementation outline Roger Pau Monné
2016-02-08 21:26 ` Boris Ostrovsky
2016-02-09 10:56 ` Andrew Cooper
2016-02-09 11:58 ` Roger Pau Monné
2016-02-09 12:10 ` Jan Beulich
2016-02-09 13:00 ` Roger Pau Monné
2016-02-09 13:41 ` Jan Beulich
2016-02-09 16:32 ` Roger Pau Monné [this message]
2016-02-09 16:41 ` Jan Beulich
2016-02-09 14:36 ` Boris Ostrovsky
2016-02-09 14:42 ` Andrew Cooper
2016-02-09 14:48 ` Jan Beulich
2016-02-09 13:24 ` Jan Beulich
2016-02-09 15:06 ` Stefano Stabellini
2016-02-09 16:15 ` Jan Beulich
2016-02-09 16:17 ` David Vrabel
2016-02-09 16:28 ` Jan Beulich
2016-02-09 16:26 ` Stefano Stabellini
2016-02-09 16:33 ` Jan Beulich
2016-02-10 12:01 ` Roger Pau Monné
2016-02-10 12:53 ` Jan Beulich
2016-02-10 14:51 ` Roger Pau Monné
2016-02-10 15:14 ` Boris Ostrovsky
2016-02-09 15:14 ` Boris Ostrovsky
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=56BA14A2.1030703@citrix.com \
--to=roger.pau@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=paul.durrant@citrix.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--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.