Skip to content

Commit

Permalink
xen/grant-table: Force to use v1 of grants.
Browse files Browse the repository at this point in the history
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.

Oracle-bug: 16039922
CC: [email protected]
CC: [email protected]
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Reviewed-by: David Vrabel <[email protected]>
  • Loading branch information
konradwilk committed Jan 6, 2014
1 parent 4e903a2 commit 11c7ff1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/xen/grant-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -1184,10 +1184,8 @@ static void gnttab_request_version(void)
int rc;
struct gnttab_set_version gsv;

if (xen_feature(XENFEAT_auto_translated_physmap))
gsv.version = 1;
else
gsv.version = 2;
gsv.version = 1;

rc = HYPERVISOR_grant_table_op(GNTTABOP_set_version, &gsv, 1);
if (rc == 0 && gsv.version == 2) {
grant_table_version = 2;
Expand Down

0 comments on commit 11c7ff1

Please sign in to comment.