diff options
-rw-r--r-- | drivers/xen/grant-table.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 99399cb0fd1..e69c7780c20 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -1173,10 +1173,7 @@ static int gnttab_setup(void) if (max_nr_gframes < nr_grant_frames) return -ENOSYS; - if (xen_pv_domain()) - return gnttab_map(0, nr_grant_frames - 1); - - if (gnttab_shared.addr == NULL) { + if (xen_feature(XENFEAT_auto_translated_physmap) && gnttab_shared.addr == NULL) { gnttab_shared.addr = xen_remap(xen_hvm_resume_frames, PAGE_SIZE * max_nr_gframes); if (gnttab_shared.addr == NULL) { @@ -1185,10 +1182,7 @@ static int gnttab_setup(void) return -ENOMEM; } } - - gnttab_map(0, nr_grant_frames - 1); - - return 0; + return gnttab_map(0, nr_grant_frames - 1); } int gnttab_resume(void) |