|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame
On 13/06/16 13:45, Paul Durrant wrote: -----Original Message----- From: Julien Grall [mailto:julien.grall@xxxxxxx] Sent: 13 June 2016 13:42 To: Paul Durrant; boris.ostrovsky@xxxxxxxxxx; David Vrabel; jgross@xxxxxxxx; sstabellini@xxxxxxxxxx; konrad.wilk@xxxxxxxxxx Cc: Andrew Cooper; xen-devel@xxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; JBeulich@xxxxxxxx; steve.capper@xxxxxxx Subject: Re: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame On 13/06/16 13:41, Julien Grall wrote:Hello Paul, On 13/06/16 13:12, Paul Durrant wrote:-----Original Message----- From: Xen-devel [mailto:xen-devel-bounces@xxxxxxxxxxxxx] On BehalfOfJulien Grall Sent: 13 June 2016 11:51 To: boris.ostrovsky@xxxxxxxxxx; David Vrabel; jgross@xxxxxxxx; sstabellini@xxxxxxxxxx; konrad.wilk@xxxxxxxxxx Cc: steve.capper@xxxxxxx; Andrew Cooper; linux-kernel@xxxxxxxxxxxxxxx;xen-devel@xxxxxxxxxxxxx; Julien Grall; JBeulich@xxxxxxxx Subject: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame The version 1 of the grant-table protocol only supports frame encodedon32-bit. When the platform is supporting 48-bit physical address, the frame will be encoded on 36-bit which will lead a truncation and give access to the wrong frame. On ARM Xen will always allow the guest to use all the physical address, although today the RAM is always located under 40-bits (see xen/include/public/arch-arm.h). Add a truncation check in gnttab_update_entry_v1 to prevent the guestto Sorry I misunderstood your previous mail. So the only downside is the size of the table. Looking at the structure in the header (public/grant_table.h), this is effectively much bigger. A commit in Linux [1] suggests that grant v2 only supports 256 grants per page rather than 512 for v1.
How would that impact a guest?
Regards,
[1] commit 11c7ff17c9b6dbf3a4e4f36be30ad531a6cf0ec9
Author: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Mon Jan 6 10:44:39 2014 -0500
xen/grant-table: Force to use v1 of grants.
We have the framework to use v2, but there are no backends that
actually use it. The end result is that on PV we use v2 grants
and on PVHVM v1. The v1 has a capacity of 512 grants per page while
the v2 has 256 grants per page. This means we lose about 50%
capacity - and if we want more than 16 VIFs (each VIF takes
512 grants), then we are hitting the max per guest of 32.
So from my understanding the table is much more bigger.
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |