xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: ian.jackson@eu.citrix.com, julien.grall@arm.com,
	wei.liu2@citrix.com, xen-devel@lists.xenproject.org
Subject: Re: [PATCH for-4.10] tools/libxl: mark hvm mmio area as reserved in e820 map
Date: Fri, 17 Nov 2017 14:27:02 +0100	[thread overview]
Message-ID: <31986637-418a-7d26-c58c-d9a854ec39da@suse.com> (raw)
In-Reply-To: <5A0EE389020000780018FA7D@suse.com>

On 17/11/17 13:26, Jan Beulich wrote:
>>>> On 17.11.17 at 12:47, <jgross@suse.com> wrote:
>> Make sure the HVM mmio area (especially console and Xenstore pages) is
>> marked as "reserved" in the guest's E820 map, as otherwise conflicts
>> might arise later, e.g. when hotplugging memory into the guest.
> 
> This is very certainly wrong. Have you looked at a couple of physical
> machines? Have you found an E820_RESERVED area on any of them for
> the MMIO hole? Two examples I can present right away:
> 
> <6>BIOS-e820: [mem 0x00000000c93f0000-0x00000000c9f8cfff] reserved
> <6>BIOS-e820: [mem 0x00000000c9f8d000-0x00000000c9fdefff] ACPI data
> <6>BIOS-e820: [mem 0x00000000c9fdf000-0x00000000cac82fff] ACPI NVS
> <6>BIOS-e820: [mem 0x00000000cac83000-0x00000000cb172fff] reserved
> <6>BIOS-e820: [mem 0x00000000cb173000-0x00000000cb173fff] usable
> <6>BIOS-e820: [mem 0x00000000cb174000-0x00000000cb181fff] reserved
> <6>BIOS-e820: [mem 0x00000000cb182000-0x00000000ccffffff] usable
> <6>BIOS-e820: [mem 0x00000000cd000000-0x00000000cdffffff] reserved
> <6>BIOS-e820: [mem 0x00000000d0000000-0x00000000dfffffff] reserved
> <6>BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
> <6>BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
> 
> and
> 
> (XEN)  00000000cf4bd000 - 00000000cf4bf000 (reserved)
> (XEN)  00000000cf4bf000 - 00000000cf636000 (usable)
> (XEN)  00000000cf636000 - 00000000cf7bf000 (ACPI NVS)
> (XEN)  00000000cf7bf000 - 00000000cf7df000 (usable)
> (XEN)  00000000cf7df000 - 00000000cf7ff000 (ACPI data)
> (XEN)  00000000cf7ff000 - 00000000cf800000 (usable)
> (XEN)  00000000cf800000 - 00000000d0000000 (reserved)
> (XEN)  00000000f8000000 - 00000000fd000000 (reserved)
> (XEN)  00000000ffe00000 - 0000000100000000 (reserved)
> 
> Things covered by E820_RESERVED include the MCFG area, yes, but
> not most other parts. The OS has to either be careful or consult
> ACPI for further resource usage details. In particular, the ACPI spec
> says
> 
> "The platform boot firmware does not return a range description for
>  the memory mapping of PCI devices, ISA Option ROMs, and ISA Plug
>  and Play cards because the OS has mechanisms available to detect
>  them."
> 
> See the section "E820 Assumptions and Limitations" for further details.

So is it _wrong_ to return the mmio area as reserved? We at least want
the shared console and Xenstore page to be marked as reserved, and those
are part of the mmio area.

We could, of course, just report the HVM special pages as reserved, but
this would IMO be more hacky than reporting just the mmio area.

Oh yes, and the LAPIC, of course. Again part of mmio area.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-11-17 13:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 11:47 [PATCH for-4.10] tools/libxl: mark hvm mmio area as reserved in e820 map Juergen Gross
2017-11-17 11:49 ` Wei Liu
2017-11-17 12:26 ` Jan Beulich
     [not found] ` <5A0EE389020000780018FA7D@suse.com>
2017-11-17 13:27   ` Juergen Gross [this message]
2017-11-17 16:50 ` Juergen Gross

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=31986637-418a-7d26-c58c-d9a854ec39da@suse.com \
    --to=jgross@suse.com \
    --cc=JBeulich@suse.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=julien.grall@arm.com \
    --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 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).