From: Matt Fleming <matt@console-pimps.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: david.vrabel@citrix.com, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com, jeremy@goop.org,
fenghua.yu@intel.com, matt.fleming@intel.com,
tony.luck@intel.com, x86@kernel.org, tglx@linutronix.de,
xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com,
Daniel Kiper <daniel.kiper@oracle.com>,
konrad.wilk@oracle.com, Tang Liang <liang.tang@oracle.com>,
eshelton@pobox.com, mingo@redhat.com, linux-efi@vger.kernel.org,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
hpa@zytor.com
Subject: Re: [PATCH v3 5/5] xen: Put EFI machinery in place
Date: Wed, 26 Mar 2014 13:46:17 +0000 [thread overview]
Message-ID: <20140326134617.GE24856@console-pimps.org> (raw)
In-Reply-To: <5332E4A802000078000025B6@nat28.tlf.novell.com>
On Wed, 26 Mar, at 01:31:04PM, Jan Beulich wrote:
> >>> On 26.03.14 at 14:12, <matt@console-pimps.org> wrote:
> >
> > Is there a reason that you can't just populate an efi_system_table_t
> > object, which could be used by efi_init(), so that we can save you the
> > trouble of duplicating all of this code?
>
> Would the generic function cope with all other fields being NULL (or
> equivalent)?
I've no idea, but it shouldn't be difficult to make that work. And by
making it work in the generic code
> >> +/*
> >> + * Convenience functions to obtain memory types and attributes
> >> + */
> >> +static u32 efi_mem_type_xen(unsigned long phys_addr)
> >> +{
> >> + struct xen_platform_op op;
> >> + union xenpf_efi_info *info = &op.u.firmware_info.u.efi_info;
> >> +
> >> + op.cmd = XENPF_firmware_info;
> >> + op.u.firmware_info.type = XEN_FW_EFI_INFO;
> >> + op.u.firmware_info.index = XEN_FW_EFI_MEM_INFO;
> >> + info->mem.addr = phys_addr;
> >> + info->mem.size = 0;
> >> + return HYPERVISOR_dom0_op(&op) ? 0 : info->mem.type;
> >> +}
> >
> > Same idea here. Unless you expect the EFI memory map to change at runtime
> > (and it's not clear to me whether that wouldn't cause other things to
> > explode) you'd be better off building a struct efi_memory_map and using
> > the existing generic functions.
>
> As said in another reply to this series - the memory map isn't being
> (and shouldn't be) exposed to Dom0.
Right, so you might not necessarily expose the EFI memory map that was
constructed by the firmware, but it's worth looking at exposing *some*
boot memory map, e.g. the map of memory before the kernel took control
in DomU.
Whether the firmware or the kernel builds it doesn't really matter. My
point is that since we've already got a means of looking in the boot
memory map for EFI type and EFI attributes, let's use it.
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-03-26 13:46 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 20:57 [PATCH v3 0/5] xen: Add EFI support Daniel Kiper
2014-03-25 20:57 ` [PATCH v3 1/5] efi: Add efi_init_ops variable Daniel Kiper
2014-03-26 12:56 ` Matt Fleming
2014-03-26 14:02 ` Daniel Kiper
2014-03-26 14:29 ` Matt Fleming
2014-03-25 20:57 ` [PATCH v3 2/5] efi: Export arch_tables variable Daniel Kiper
2014-03-26 13:21 ` Jan Beulich
2014-03-26 14:08 ` Daniel Kiper
2014-03-26 14:17 ` Jan Beulich
2014-03-26 14:18 ` Matt Fleming
2014-03-25 20:57 ` [PATCH v3 3/5] x86: Call efi_memblock_x86_reserve_range() on native EFI platform only Daniel Kiper
2014-03-26 13:00 ` Matt Fleming
2014-03-26 13:22 ` Jan Beulich
2014-03-26 13:31 ` Matt Fleming
2014-03-26 13:39 ` Jan Beulich
2014-03-26 13:48 ` Daniel Kiper
2014-03-26 13:57 ` Matt Fleming
2014-03-26 22:01 ` Daniel Kiper
2014-03-26 22:35 ` [Xen-devel] [PATCH v3 3/5] x86: Call efi_memblock_x86_reserve_range() on native EFI platform onl Andrew Cooper
2014-03-25 20:57 ` [PATCH v3 4/5] xen: Define EFI related stuff Daniel Kiper
2014-03-26 13:25 ` Jan Beulich
2014-03-26 14:58 ` Stefano Stabellini
2014-03-26 15:25 ` Jan Beulich
2014-03-26 15:34 ` Stefano Stabellini
2014-03-25 20:57 ` [PATCH v3 5/5] xen: Put EFI machinery in place Daniel Kiper
2014-03-26 13:12 ` Matt Fleming
2014-03-26 13:31 ` Jan Beulich
2014-03-26 13:46 ` Matt Fleming [this message]
2014-03-26 13:53 ` Matt Fleming
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=20140326134617.GE24856@console-pimps.org \
--to=matt@console-pimps.org \
--cc=JBeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=daniel.kiper@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=eshelton@pobox.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=ian.campbell@citrix.com \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=liang.tang@oracle.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mingo@redhat.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox