浏览代码

xen/grant-table: fix suspend for non-PV guests

Commit aa8532c32216ae07c3813b9aeb774517878a7573 (xen: refactor suspend
pre/post hooks) broke resuming PVHVM (auto-translated physmap) guests.

The gnttab_suspend() would clear the mapping for the grant table
frames, but the ->unmap_frames() call is only applicable to PV guests.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
David Vrabel 11 年之前
父节点
当前提交
13cd36a37a
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/xen/grant-table.c

+ 2 - 1
drivers/xen/grant-table.c

@@ -1168,7 +1168,8 @@ int gnttab_resume(void)
 
 
 int gnttab_suspend(void)
 int gnttab_suspend(void)
 {
 {
-	gnttab_interface->unmap_frames();
+	if (!xen_feature(XENFEAT_auto_translated_physmap))
+		gnttab_interface->unmap_frames();
 	return 0;
 	return 0;
 }
 }