aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2014-01-06 10:44:39 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2014-01-06 10:44:39 -0500
commit11c7ff17c9b6dbf3a4e4f36be30ad531a6cf0ec9 (patch)
treea90e090c190970ce5593e24da11f3fbedd43cb2c /drivers/xen
parent4e903a20da51ed2329c1b9c182dba74f47ac2ca8 (diff)
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. Oracle-bug: 16039922 CC: annie.li@oracle.com CC: msw@amazon.com Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/grant-table.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index 1d5fbce4acb7..1ce1c40331f3 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -1184,10 +1184,8 @@ static void gnttab_request_version(void)
1184 int rc; 1184 int rc;
1185 struct gnttab_set_version gsv; 1185 struct gnttab_set_version gsv;
1186 1186
1187 if (xen_feature(XENFEAT_auto_translated_physmap)) 1187 gsv.version = 1;
1188 gsv.version = 1; 1188
1189 else
1190 gsv.version = 2;
1191 rc = HYPERVISOR_grant_table_op(GNTTABOP_set_version, &gsv, 1); 1189 rc = HYPERVISOR_grant_table_op(GNTTABOP_set_version, &gsv, 1);
1192 if (rc == 0 && gsv.version == 2) { 1190 if (rc == 0 && gsv.version == 2) {
1193 grant_table_version = 2; 1191 grant_table_version = 2;