diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-16 15:01:03 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-16 15:01:03 -0400 |
| commit | 497a5df7bf6ffd136ae21c49d1a01292930d7ca2 (patch) | |
| tree | 774215d43cdc9fbd8660086d1801400163dcbd52 /include | |
| parent | 714d8e7e27197dd39b2550e762a6a6fcf397a471 (diff) | |
| parent | 0b97b03d88b40bfbd7ff0e069186a137d9786d43 (diff) | |
Merge tag 'stable/for-linus-4.1-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen features and fixes from David Vrabel:
- use a single source list of hypercalls, generating other tables etc.
at build time.
- add a "Xen PV" APIC driver to support >255 VCPUs in PV guests.
- significant performance improve to guest save/restore/migration.
- scsiback/front save/restore support.
- infrastructure for multi-page xenbus rings.
- misc fixes.
* tag 'stable/for-linus-4.1-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen/pci: Try harder to get PXM information for Xen
xenbus_client: Extend interface to support multi-page ring
xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
xen: support suspend/resume in pvscsi frontend
xen: scsiback: add LUN of restored domain
xen-scsiback: define a pr_fmt macro with xen-pvscsi
xen/mce: fix up xen_late_init_mcelog() error handling
xen/privcmd: improve performance of MMAPBATCH_V2
xen: unify foreign GFN map/unmap for auto-xlated physmap guests
x86/xen/apic: WARN with details.
x86/xen: Provide a "Xen PV" APIC driver to support >255 VCPUs
xen/pciback: Don't print scary messages when unsupported by hypervisor.
xen: use generated hypercall symbols in arch/x86/xen/xen-head.S
xen: use generated hypervisor symbols in arch/x86/xen/trace.c
xen: synchronize include/xen/interface/xen.h with xen
xen: build infrastructure for generating hypercall depending symbols
xen: balloon: Use static attribute groups for sysfs entries
xen: pcpu: Use static attribute groups for sysfs entry
Diffstat (limited to 'include')
| -rw-r--r-- | include/xen/interface/xen.h | 6 | ||||
| -rw-r--r-- | include/xen/xen-ops.h | 47 | ||||
| -rw-r--r-- | include/xen/xenbus.h | 20 |
3 files changed, 65 insertions, 8 deletions
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h index f68719f405af..a48378958062 100644 --- a/include/xen/interface/xen.h +++ b/include/xen/interface/xen.h | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | #define __HYPERVISOR_vcpu_op 24 | 67 | #define __HYPERVISOR_vcpu_op 24 |
| 68 | #define __HYPERVISOR_set_segment_base 25 /* x86/64 only */ | 68 | #define __HYPERVISOR_set_segment_base 25 /* x86/64 only */ |
| 69 | #define __HYPERVISOR_mmuext_op 26 | 69 | #define __HYPERVISOR_mmuext_op 26 |
| 70 | #define __HYPERVISOR_acm_op 27 | 70 | #define __HYPERVISOR_xsm_op 27 |
| 71 | #define __HYPERVISOR_nmi_op 28 | 71 | #define __HYPERVISOR_nmi_op 28 |
| 72 | #define __HYPERVISOR_sched_op 29 | 72 | #define __HYPERVISOR_sched_op 29 |
| 73 | #define __HYPERVISOR_callback_op 30 | 73 | #define __HYPERVISOR_callback_op 30 |
| @@ -75,7 +75,11 @@ | |||
| 75 | #define __HYPERVISOR_event_channel_op 32 | 75 | #define __HYPERVISOR_event_channel_op 32 |
| 76 | #define __HYPERVISOR_physdev_op 33 | 76 | #define __HYPERVISOR_physdev_op 33 |
| 77 | #define __HYPERVISOR_hvm_op 34 | 77 | #define __HYPERVISOR_hvm_op 34 |
| 78 | #define __HYPERVISOR_sysctl 35 | ||
| 79 | #define __HYPERVISOR_domctl 36 | ||
| 80 | #define __HYPERVISOR_kexec_op 37 | ||
| 78 | #define __HYPERVISOR_tmem_op 38 | 81 | #define __HYPERVISOR_tmem_op 38 |
| 82 | #define __HYPERVISOR_xc_reserved_op 39 /* reserved for XenClient */ | ||
| 79 | 83 | ||
| 80 | /* Architecture-specific hypercall definitions. */ | 84 | /* Architecture-specific hypercall definitions. */ |
| 81 | #define __HYPERVISOR_arch_0 48 | 85 | #define __HYPERVISOR_arch_0 48 |
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h index 83338210ee04..c643e6a94c9a 100644 --- a/include/xen/xen-ops.h +++ b/include/xen/xen-ops.h | |||
| @@ -27,13 +27,58 @@ int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order, | |||
| 27 | void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order); | 27 | void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order); |
| 28 | 28 | ||
| 29 | struct vm_area_struct; | 29 | struct vm_area_struct; |
| 30 | |||
| 31 | /* | ||
| 32 | * xen_remap_domain_mfn_array() - map an array of foreign frames | ||
| 33 | * @vma: VMA to map the pages into | ||
| 34 | * @addr: Address at which to map the pages | ||
| 35 | * @gfn: Array of GFNs to map | ||
| 36 | * @nr: Number entries in the GFN array | ||
| 37 | * @err_ptr: Returns per-GFN error status. | ||
| 38 | * @prot: page protection mask | ||
| 39 | * @domid: Domain owning the pages | ||
| 40 | * @pages: Array of pages if this domain has an auto-translated physmap | ||
| 41 | * | ||
| 42 | * @gfn and @err_ptr may point to the same buffer, the GFNs will be | ||
| 43 | * overwritten by the error codes after they are mapped. | ||
| 44 | * | ||
| 45 | * Returns the number of successfully mapped frames, or a -ve error | ||
| 46 | * code. | ||
| 47 | */ | ||
| 48 | int xen_remap_domain_mfn_array(struct vm_area_struct *vma, | ||
| 49 | unsigned long addr, | ||
| 50 | xen_pfn_t *gfn, int nr, | ||
| 51 | int *err_ptr, pgprot_t prot, | ||
| 52 | unsigned domid, | ||
| 53 | struct page **pages); | ||
| 54 | |||
| 55 | /* xen_remap_domain_mfn_range() - map a range of foreign frames | ||
| 56 | * @vma: VMA to map the pages into | ||
| 57 | * @addr: Address at which to map the pages | ||
| 58 | * @gfn: First GFN to map. | ||
| 59 | * @nr: Number frames to map | ||
| 60 | * @prot: page protection mask | ||
| 61 | * @domid: Domain owning the pages | ||
| 62 | * @pages: Array of pages if this domain has an auto-translated physmap | ||
| 63 | * | ||
| 64 | * Returns the number of successfully mapped frames, or a -ve error | ||
| 65 | * code. | ||
| 66 | */ | ||
| 30 | int xen_remap_domain_mfn_range(struct vm_area_struct *vma, | 67 | int xen_remap_domain_mfn_range(struct vm_area_struct *vma, |
| 31 | unsigned long addr, | 68 | unsigned long addr, |
| 32 | xen_pfn_t mfn, int nr, | 69 | xen_pfn_t gfn, int nr, |
| 33 | pgprot_t prot, unsigned domid, | 70 | pgprot_t prot, unsigned domid, |
| 34 | struct page **pages); | 71 | struct page **pages); |
| 35 | int xen_unmap_domain_mfn_range(struct vm_area_struct *vma, | 72 | int xen_unmap_domain_mfn_range(struct vm_area_struct *vma, |
| 36 | int numpgs, struct page **pages); | 73 | int numpgs, struct page **pages); |
| 74 | int xen_xlate_remap_gfn_array(struct vm_area_struct *vma, | ||
| 75 | unsigned long addr, | ||
| 76 | xen_pfn_t *gfn, int nr, | ||
| 77 | int *err_ptr, pgprot_t prot, | ||
| 78 | unsigned domid, | ||
| 79 | struct page **pages); | ||
| 80 | int xen_xlate_unmap_gfn_range(struct vm_area_struct *vma, | ||
| 81 | int nr, struct page **pages); | ||
| 37 | 82 | ||
| 38 | bool xen_running_on_version_or_later(unsigned int major, unsigned int minor); | 83 | bool xen_running_on_version_or_later(unsigned int major, unsigned int minor); |
| 39 | 84 | ||
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index b0f1c9e5d687..289c0b5f08fe 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h | |||
| @@ -46,6 +46,10 @@ | |||
| 46 | #include <xen/interface/io/xenbus.h> | 46 | #include <xen/interface/io/xenbus.h> |
| 47 | #include <xen/interface/io/xs_wire.h> | 47 | #include <xen/interface/io/xs_wire.h> |
| 48 | 48 | ||
| 49 | #define XENBUS_MAX_RING_PAGE_ORDER 4 | ||
| 50 | #define XENBUS_MAX_RING_PAGES (1U << XENBUS_MAX_RING_PAGE_ORDER) | ||
| 51 | #define INVALID_GRANT_HANDLE (~0U) | ||
| 52 | |||
| 49 | /* Register callback to watch this node. */ | 53 | /* Register callback to watch this node. */ |
| 50 | struct xenbus_watch | 54 | struct xenbus_watch |
| 51 | { | 55 | { |
| @@ -199,15 +203,19 @@ int xenbus_watch_pathfmt(struct xenbus_device *dev, struct xenbus_watch *watch, | |||
| 199 | const char *pathfmt, ...); | 203 | const char *pathfmt, ...); |
| 200 | 204 | ||
| 201 | int xenbus_switch_state(struct xenbus_device *dev, enum xenbus_state new_state); | 205 | int xenbus_switch_state(struct xenbus_device *dev, enum xenbus_state new_state); |
| 202 | int xenbus_grant_ring(struct xenbus_device *dev, unsigned long ring_mfn); | 206 | int xenbus_grant_ring(struct xenbus_device *dev, void *vaddr, |
| 203 | int xenbus_map_ring_valloc(struct xenbus_device *dev, | 207 | unsigned int nr_pages, grant_ref_t *grefs); |
| 204 | int gnt_ref, void **vaddr); | 208 | int xenbus_map_ring_valloc(struct xenbus_device *dev, grant_ref_t *gnt_refs, |
| 205 | int xenbus_map_ring(struct xenbus_device *dev, int gnt_ref, | 209 | unsigned int nr_grefs, void **vaddr); |
| 206 | grant_handle_t *handle, void *vaddr); | 210 | int xenbus_map_ring(struct xenbus_device *dev, |
| 211 | grant_ref_t *gnt_refs, unsigned int nr_grefs, | ||
| 212 | grant_handle_t *handles, unsigned long *vaddrs, | ||
| 213 | bool *leaked); | ||
| 207 | 214 | ||
| 208 | int xenbus_unmap_ring_vfree(struct xenbus_device *dev, void *vaddr); | 215 | int xenbus_unmap_ring_vfree(struct xenbus_device *dev, void *vaddr); |
| 209 | int xenbus_unmap_ring(struct xenbus_device *dev, | 216 | int xenbus_unmap_ring(struct xenbus_device *dev, |
| 210 | grant_handle_t handle, void *vaddr); | 217 | grant_handle_t *handles, unsigned int nr_handles, |
| 218 | unsigned long *vaddrs); | ||
| 211 | 219 | ||
| 212 | int xenbus_alloc_evtchn(struct xenbus_device *dev, int *port); | 220 | int xenbus_alloc_evtchn(struct xenbus_device *dev, int *port); |
| 213 | int xenbus_free_evtchn(struct xenbus_device *dev, int port); | 221 | int xenbus_free_evtchn(struct xenbus_device *dev, int port); |
