linux/arch/x86/include/asm/xen
Konrad Rzeszutek Wilk cf8d91633d xen/p2m/m2p/gnttab: Support GNTMAP_host_map in the M2P override.
We only supported the M2P (and P2M) override only for the
GNTMAP_contains_pte type mappings. Meaning that we grants
operations would "contain the machine address of the PTE to update"
If the flag is unset, then the grant operation is
"contains a host virtual address". The latter case means that
the Hypervisor takes care of updating our page table
(specifically the PTE entry) with the guest's MFN. As such we should
not try to do anything with the PTE. Previous to this patch
we would try to clear the PTE which resulted in Xen hypervisor
being upset with us:

(XEN) mm.c:1066:d0 Attempt to implicitly unmap a granted PTE c0100000ccc59067
(XEN) domain_crash called from mm.c:1067
(XEN) Domain 0 (vcpu#0) crashed on cpu#3:
(XEN) ----[ Xen-4.0-110228  x86_64  debug=y  Not tainted ]----

and crashing us.

This patch allows us to inhibit the PTE clearing in the PV guest
if the GNTMAP_contains_pte is not set.

On the m2p_remove_override path we provide the same parameter.

Sadly in the grant-table driver we do not have a mechanism to
tell m2p_remove_override whether to clear the PTE or not. Since
the grant-table driver is used by user-space, we can safely assume
that it operates only on PTE's. Hence the implementation for
it to work on !GNTMAP_contains_pte returns -EOPNOTSUPP. In the future
we can implement the support for this. It will require some extra
accounting structure to keep track of the page[i], and the flag.

[v1: Added documentation details, made it return -EOPNOTSUPP instead
 of trying to do a half-way implementation]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-04-18 11:10:27 -04:00
..
events.h xen: use our own eventchannel->irq path 2009-02-09 12:17:30 +01:00
grant_table.h x86: drop double underscores from header guards 2008-10-23 00:01:39 -07:00
hypercall.h xen: switch to new schedop hypercall by default. 2011-02-25 16:43:10 +00:00
hypervisor.h xen: HVM X2APIC support 2011-01-07 10:03:50 -05:00
interface_32.h xen: implement XENMEM_machphys_mapping 2010-11-12 15:00:06 -08:00
interface_64.h xen: implement XENMEM_machphys_mapping 2010-11-12 15:00:06 -08:00
interface.h x86: Fix common misspellings 2011-03-18 10:39:30 +01:00
page.h xen/p2m/m2p/gnttab: Support GNTMAP_host_map in the M2P override. 2011-04-18 11:10:27 -04:00
pci.h xen/pci: Add xen_[find|register|unregister]_device_domain_owner functions. 2011-04-14 11:16:54 -04:00
swiotlb-xen.h pci-swiotlb-xen: Add glue code to setup dma_ops utilizing xen_swiotlb_* 2010-07-27 11:51:02 -04:00