From f013e4ff53da712d502ee27018f0a631f47b442c Mon Sep 17 00:00:00 2001 From: royger Date: Mon, 16 Jun 2014 08:48:42 +0000 Subject: xen: unify gnttab initialization for PVHVM and PVH Switch the initialization of gnttab to use an unused physical memory range for both PVHVM and PVH. In the past PVHVM was using the xenpci BAR, but there's no reason to do that, and in fact FreeBSD was probably doing it because it was the way it was done in Windows, were drivers cannot probably request for unused physical memory ranges, but it was never enforced in the hypervisor. Sponsored by: Citrix Systems R&D Approved by: gibbs xen/gnttab.c: - Allocate contiguous physical memory for grant table frames for both PVHVM and PVH. - Since gnttab is not a device, use the xenpv device in order to request for this allocation. dev/xen/xenpci/xenpcivar.h: dev/xen/xenpci/xenpci.c: - Remove the now unused xenpci_alloc_space and xenpci_alloc_space_int functions. xen/gnttab.h: - Change the prototype of gnttab_init and gnttab_resume, that now takes a device_t parameter. dev/xen/control/control.c: x86/xen/xenpv.c: - Changes to accomodate the new prototype of gnttab_init and gnttab_resume. --- sys/dev/xen/control/control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/xen/control/control.c') diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c index 78894ba..665a5ac 100644 --- a/sys/dev/xen/control/control.c +++ b/sys/dev/xen/control/control.c @@ -287,7 +287,7 @@ xctrl_suspend() } HYPERVISOR_shared_info->arch.max_pfn = max_pfn; - gnttab_resume(); + gnttab_resume(NULL); intr_resume(suspend_cancelled != 0); local_irq_enable(); xencons_resume(); @@ -385,7 +385,7 @@ xctrl_suspend() /* * Reset grant table info. */ - gnttab_resume(); + gnttab_resume(NULL); #ifdef SMP if (smp_started && !CPU_EMPTY(&cpu_suspend_map)) { -- cgit v1.1