lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1601181710270.9400@kaball.uk.xensource.com>
Date:	Mon, 18 Jan 2016 17:34:38 +0000
From:	Stefano Stabellini <stefano.stabellini@...citrix.com>
To:	Mark Rutland <mark.rutland@....com>
CC:	Shannon Zhao <zhaoshenglong@...wei.com>,
	<ard.biesheuvel@...aro.org>, <leif.lindholm@...aro.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<stefano.stabellini@...rix.com>, <david.vrabel@...rix.com>,
	<catalin.marinas@....com>, <will.deacon@....com>,
	<julien.grall@...rix.com>, <xen-devel@...ts.xen.org>,
	<devicetree@...r.kernel.org>, <linux-efi@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <shannon.zhao@...aro.org>,
	<peter.huangpeng@...wei.com>, Jan Beulich <JBeulich@...ell.com>,
	Ian Campbell <Ian.Campbell@...rix.com>
Subject: Re: [PATCH v2 12/16] ARM: Xen: Document UEFI support on Xen ARM
 virtual platforms

On Mon, 18 Jan 2016, Mark Rutland wrote:
> On Fri, Jan 15, 2016 at 02:55:25PM +0800, Shannon Zhao wrote:
> > From: Shannon Zhao <shannon.zhao@...aro.org>
> > 
> > Add a "uefi" node under /hypervisor node in FDT, then Linux kernel could
> > scan this to get the UEFI information.
> > 
> > Signed-off-by: Shannon Zhao <shannon.zhao@...aro.org>
> > ---
> >  Documentation/devicetree/bindings/arm/xen.txt | 42 +++++++++++++++++++++++++++
> >  1 file changed, 42 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/arm/xen.txt b/Documentation/devicetree/bindings/arm/xen.txt
> > index 0f7b9c2..fbc17ae 100644
> > --- a/Documentation/devicetree/bindings/arm/xen.txt
> > +++ b/Documentation/devicetree/bindings/arm/xen.txt
> > @@ -15,6 +15,36 @@ the following properties:
> >  - interrupts: the interrupt used by Xen to inject event notifications.
> >    A GIC node is also required.
> >  
> > +To support UEFI on Xen ARM virtual platforms, Xen pupulates the FDT "uefi" node
> > +under /hypervisor with following parameters:
> 
> s/pupulates/populates/
> 
> > +
> > +________________________________________________________________________________
> > +Name                      | Size   | Description
> > +================================================================================
> > +xen,uefi-system-table     | 64-bit | Guest physical address of the UEFI System
> > +			  |	   | Table.
> > +--------------------------------------------------------------------------------
> > +xen,uefi-mmap-start       | 64-bit | Guest physical address of the UEFI memory
> > +			  |	   | map.
> > +--------------------------------------------------------------------------------
> > +xen,uefi-mmap-size        | 32-bit | Size in bytes of the UEFI memory map
> > +                          |        | pointed to in previous entry.
> > +--------------------------------------------------------------------------------
> > +xen,uefi-mmap-desc-size   | 32-bit | Size in bytes of each entry in the UEFI
> > +                          |        | memory map.
> > +--------------------------------------------------------------------------------
> > +xen,uefi-mmap-desc-ver    | 32-bit | Version of the mmap descriptor format.
> > +--------------------------------------------------------------------------------
> > +
> > +Below is the format of the mmap descriptor.
> > +typedef struct {
> > +	u32 type;
> > +	u32 pad;
> > +	u64 phys_addr;
> > +	u64 virt_addr;
> > +	u64 num_pages;
> > +	u64 attribute;
> > +} efi_memory_desc_t;
> 
> I don't think we should describe this here, as it duplicates the UEFI
> spec, and is techincally incorrect the above is only guaranteed to be
> the prefix of each memory descriptor -- that's why the
> uefi-mmap-desc-size property exists.
> 
> We don't do this in Documentation/arm/uefi.txt, and I don't see why we
> should do so here.
> 
> Does Xen handle arbitrary size memory map descriptors? I'm not sure what
> new information might be passed in future additions to the descriptor
> format, and I'm not sure what should happen in the Dom0 case.

Xen passes to Dom0 the memory map in the same format as the native
memory map.


> >  Example (assuming #address-cells = <2> and #size-cells = <2>):
> >  
> > @@ -22,4 +52,16 @@ hypervisor {
> >  	compatible = "xen,xen-4.3", "xen,xen";
> >  	reg = <0 0xb0000000 0 0x20000>;
> >  	interrupts = <1 15 0xf08>;
> > +	uefi {
> > +		xen,uefi-system-table = <0xXXXXXXXX>;
> > +		xen,uefi-mmap-start = <0xXXXXXXXX>;
> > +		xen,uefi-mmap-size = <0xXXXXXXXX>;
> > +		xen,uefi-mmap-desc-size = <0xXXXXXXXX>;
> > +		xen,uefi-mmap-desc-ver = <0xXXXXXXXX>;
> > +        };
> >  };
> > +
> > +These "xen,uefi-*" parameters are similar to those in Documentation/arm/uefi.txt
> > +which are used by normal UEFI. But to Xen ARM virtual platforms, it needs to
> > +introduce a Xen specific UEFI and it doesn't want to mix with normal UEFI.
> > +Therefore, it defines these parameters under /hypervisor node.
> 
> Could we please describe what that actual difference is?
> 
> I know that the OS must handle a system table differently under Xen, but
> this doesn't describe what it should do.

For a reference, the hypercall interface is described in not so many words here:

include/xen/interface/platform.h
http://xenbits.xen.org/gitweb/?p=xen.git;a=blob_plain;f=xen/include/public/platform.h;hb=HEAD

However it is clear that platform.h also contains some x86 specific
calls, for example xenpf_set_processor_pminfo. It might be a good idea
to list the calls that are available on ARM64.


> I assume that the OS can handle the memory map in an identical fashion
> to when it is native. Is that true?
 
Yes, I think that's true.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ