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: <1347636860.24226.236.camel@zakaz.uk.xensource.com>
Date:	Fri, 14 Sep 2012 16:34:20 +0100
From:	Ian Campbell <Ian.Campbell@...rix.com>
To:	Stefano Stabellini <Stefano.Stabellini@...citrix.com>
CC:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	"arnd@...db.de" <arnd@...db.de>,
	"linux@....linux.org.uk" <linux@....linux.org.uk>,
	"catalin.marinas@....com" <catalin.marinas@....com>,
	"linaro-dev@...ts.linaro.org" <linaro-dev@...ts.linaro.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"Tim (Xen.org)" <tim@....org>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 14/24] xen/arm: initialize grant_table on ARM

On Fri, 2012-09-14 at 16:29 +0100, Stefano Stabellini wrote:
> On Fri, 14 Sep 2012, Ian Campbell wrote:
> > On Fri, 2012-09-14 at 15:56 +0100, Stefano Stabellini wrote:
> > > On Fri, 14 Sep 2012, Konrad Rzeszutek Wilk wrote:
> > > > On Fri, Sep 14, 2012 at 12:13:16PM +0100, Stefano Stabellini wrote:
> > > > > Initialize the grant table mapping at the address specified at index 0
> > > > > in the DT under the /xen node.
> > > > > After the grant table is initialized, call xenbus_probe (if not dom0).
> > > > 
> > > > So we don't really care about the grant's size then? The DT xen.txt
> > > > talks about it..
> > > 
> > > I am assuming that the size of the memory region specified in the device
> > > tree is sufficiently large to map the entire grant table, given that both
> > > the device tree hypervisor entry and the grant table size comes from Xen.
> > 
> > Actually, the grant table can grow dynamically under the control of the
> > guest, I think you just pass GNTTABOP_setup_table with some more frames.
> > See drivers/xen/grant_table.c:gnttab_expand().
> 
> gnttab_expand can return error if the new size exceeds
> gnttab_max_grant_frames(), that is implemented using
> GNTTABOP_query_size.

I hadn't spotted / wasn't aware that this gives you the max too.

> > > The grant table size is currently queried to Xen directly via an
> > > hypercall (GNTTABOP_query_size). Basically the size in the device tree
> > > is redundant information.
> > 
> > This size is the size of the physical address space where the guest
> > could chose map grant table frames. It could be either larger or smaller
> > than the actual grant table. (smaller because the guest could use
> > physical addresses not within this region, if it wanted to for some
> > reason).
> 
> Right.
> 
> What I am saying is that I assume that the memory region specified in
> the device tree is greater or equal than gnttab_max_grant_frames().

Makes sense.

(note that gnttab_max_grant_frames can be set on the hypervisor command
line though)

> Maybe I should add this to the device tree doc.

No harm in being explicit. 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ