aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/xen
AgeCommit message (Collapse)AuthorFilesLines
2010-10-22xen: don't map missing memoryJeremy Fitzhardinge1-1/+8
When setting up a pte for a missing pfn (no matching mfn), just create an empty pte rather than a junk mapping. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2010-10-22xen: add return value to set_phys_to_machine()Jeremy Fitzhardinge1-1/+1
set_phys_to_machine() can return false on failure, which means a memory allocation failure for the p2m structure. It can only fail if setting the mfn for a pfn in previously unused address space. It is guaranteed to succeed if you're setting a mapping to INVALID_P2M_ENTRY or updating the mfn for an existing pfn. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2010-10-20xen: add variable hypercall callerJeremy Fitzhardinge1-0/+17
Allow non-constant hypercall to be called, for privcmd. [ Impact: make arbitrary hypercalls; needed for privcmd ] Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2010-10-20xen: add xen_set_domain_pte()Jeremy Fitzhardinge1-0/+1
Add xen_set_domain_pte() to allow setting a pte mapping a page from another domain. The common case is to map from DOMID_IO, the pseudo domain which owns all IO pages, but will also be used in the privcmd interface to map other domain pages. [ Impact: new Xen-internal API for cross-domain mappings ] Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2010-10-18xen/x86/PCI: Add support for the Xen PCI subsystemAlex Nixon1-0/+53
The frontend stub lives in arch/x86/pci/xen.c, alongside other sub-arch PCI init code (e.g. olpc.c). It provides a mechanism for Xen PCI frontend to setup/destroy legacy interrupts, MSI/MSI-X, and PCI configuration operations. [ Impact: add core of Xen PCI support ] [ v2: Removed the IOMMU code and only focusing on PCI.] [ v3: removed usage of pci_scan_all_fns as that does not exist] [ v4: introduced pci_xen value to fix compile warnings] [ v5: squished fixes+features in one patch, changed Reviewed-by to Ccs] [ v7: added Acked-by] Signed-off-by: Alex Nixon <[email protected]> Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Ian Campbell <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Stefano Stabellini <[email protected]> Acked-by: Jesse Barnes <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Qing He <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected]
2010-08-12Merge branch 'stable/xen-swiotlb-0.8.6' of ↵Linus Torvalds2-6/+16
git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen * 'stable/xen-swiotlb-0.8.6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: x86: Detect whether we should use Xen SWIOTLB. pci-swiotlb-xen: Add glue code to setup dma_ops utilizing xen_swiotlb_* functions. swiotlb-xen: SWIOTLB library for Xen PV guest with PCI passthrough. xen/mmu: inhibit vmap aliases rather than trying to clear them out vmap: add flag to allow lazy unmap to be disabled at runtime xen: Add xen_create_contiguous_region xen: Rename the balloon lock xen: Allow unprivileged Xen domains to create iomap pages xen: use _PAGE_IOMAP in ioremap to do machine mappings Fix up trivial conflicts (adding both xen swiotlb and xen pci platform driver setup close to each other) in drivers/xen/{Kconfig,Makefile} and include/xen/xen-ops.h
2010-07-27pci-swiotlb-xen: Add glue code to setup dma_ops utilizing xen_swiotlb_*Konrad Rzeszutek Wilk1-0/+14
functions. We add the glue code that sets up a dma_ops structure with the xen_swiotlb_* functions. The code turns on xen_swiotlb flag when it detects it is running under Xen and it is either in privileged mode or the iommu=soft flag was passed in. It also disables the bare-metal SWIOTLB if the Xen-SWIOTLB has been enabled. Note: The Xen-SWIOTLB is only built when CONFIG_XEN is enabled. Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Acked-by: Jeremy Fitzhardinge <[email protected]> Cc: FUJITA Tomonori <[email protected]> Cc: Albert Herranz <[email protected]> Cc: Ian Campbell <[email protected]>
2010-07-22xen: Add support for HVM hypercalls.Jeremy Fitzhardinge1-0/+6
Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Sheng Yang <[email protected]> Signed-off-by: Stefano Stabellini <[email protected]>
2010-06-07xen: use _PAGE_IOMAP in ioremap to do machine mappingsJeremy Fitzhardinge1-6/+2
In a Xen domain, ioremap operates on machine addresses, not pseudo-physical addresses. We use _PAGE_IOMAP to determine whether a mapping is intended for machine addresses. [ Impact: allow Xen domain to map real hardware ] Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2009-11-04xen: move Xen-testing predicates to common headerJeremy Fitzhardinge1-27/+0
Move xen_domain and related tests out of asm-x86 to xen/xen.h so they can be included whenever they are necessary. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
2009-04-08Xen: Add virt_to_pfn helper functionAlex Nixon1-1/+2
Signed-off-by: Alex Nixon <[email protected]>
2009-03-14Merge branches 'x86/apic', 'x86/asm', 'x86/cleanups', 'x86/debug', ↵Ingo Molnar1-0/+2
'x86/kconfig', 'x86/mm', 'x86/ptrace', 'x86/setup' and 'x86/urgent'; commit 'v2.6.29-rc8' into x86/core
2009-03-12x86: fix HYPERVISOR_update_descriptor()Jan Beulich1-0/+2
Impact: fix potential oops during app-initiated LDT manipulation The underlying hypercall has differing argument requirements on 32- and 64-bit. Signed-off-by: Jan Beulich <[email protected]> Acked-by: Jeremy Fitzhardinge <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-03-02xen: deal with virtually mapped percpu dataJeremy Fitzhardinge1-0/+1
The virtually mapped percpu space causes us two problems: - for hypercalls which take an mfn, we need to do a full pagetable walk to convert the percpu va into an mfn, and - when a hypercall requires a page to be mapped RO via all its aliases, we need to make sure its RO in both the percpu mapping and in the linear mapping This primarily affects the gdt and the vcpu info structure. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Cc: Xen-devel <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-02-16x86, xen: short-circuit tests for dom0Jeremy Fitzhardinge1-10/+18
When testing for a dom0/initial/privileged domain, make sure the predicate evaluates to a compile-time 0 if CONFIG_XEN_DOM0 isn't enabled. This will make most of the dom0 code evaporate without much more effort. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-02-09xen: use our own eventchannel->irq pathJeremy Fitzhardinge1-6/+0
Rather than overloading vectors for event channels, take full responsibility for mapping an event channel to irq directly. With this patch Xen has its own irq allocator. When the kernel gets an event channel upcall, it maps the event channel number to an irq and injects it into the normal interrupt path. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-02-04x86: don't apply __supported_pte_mask to non-present ptesJeremy Fitzhardinge1-1/+1
On an x86 system which doesn't support global mappings, __supported_pte_mask has _PAGE_GLOBAL clear, to make sure it never appears in the PTE. pfn_pte() and so on will enforce it with: static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) { return __pte((((phys_addr_t)page_nr << PAGE_SHIFT) | pgprot_val(pgprot)) & __supported_pte_mask); } However, we overload _PAGE_GLOBAL with _PAGE_PROTNONE on non-present ptes to distinguish them from swap entries. However, applying __supported_pte_mask indiscriminately will clear the bit and corrupt the pte. I guess the best fix is to only apply __supported_pte_mask to present ptes. This seems like the right solution to me, as it means we can completely ignore the issue of overlaps between the present pte bits and the non-present pte-as-swap entry use of the bits. __supported_pte_mask contains the set of flags we support on the current hardware. We also use bits in the pte for things like logically present ptes with no permissions, and swap entries for swapped out pages. We should only apply __supported_pte_mask to present ptes, because otherwise we may destroy other information being stored in the ptes. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2008-12-16xen: clean up asm/xen/hypervisor.hJeremy Fitzhardinge3-31/+19
Impact: cleanup hypervisor.h had accumulated a lot of crud, including lots of spurious #includes. Clean it all up, and go around fixing up everything else accordingly. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-10-23x86: drop double underscores from header guardsH. Peter Anvin8-24/+24
Drop double underscores from header guards in arch/x86/include. They are used inconsistently, and are not necessary. Signed-off-by: H. Peter Anvin <[email protected]>
2008-10-22x86: Fix ASM_X86__ header guardsH. Peter Anvin8-24/+24
Change header guards named "ASM_X86__*" to "_ASM_X86_*" since: a. the double underscore is ugly and pointless. b. no leading underscore violates namespace constraints. Signed-off-by: H. Peter Anvin <[email protected]>
2008-10-22x86, um: ... and asm-x86 moveAl Viro8-0/+1236
Signed-off-by: Al Viro <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>