summaryrefslogtreecommitdiffstats
path: root/include/xen
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-16 16:06:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-16 16:06:27 -0500
commit051089a2eed9a9977080774f3793ff2688cd3878 (patch)
tree29e23a60ea7e98633a3eef8dd436b57d7d41986d /include/xen
parent974aa5630b318938273d7efe7a2cf031c7b927db (diff)
parent646d944c2ef5a3b298c4e150494c71b9272d8b47 (diff)
Merge tag 'for-linus-4.15-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen updates from Juergen Gross: "Xen features and fixes for v4.15-rc1 Apart from several small fixes it contains the following features: - a series by Joao Martins to add vdso support of the pv clock interface - a series by Juergen Gross to add support for Xen pv guests to be able to run on 5 level paging hosts - a series by Stefano Stabellini adding the Xen pvcalls frontend driver using a paravirtualized socket interface" * tag 'for-linus-4.15-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (34 commits) xen/pvcalls: fix potential endless loop in pvcalls-front.c xen/pvcalls: Add MODULE_LICENSE() MAINTAINERS: xen, kvm: track pvclock-abi.h changes x86/xen/time: setup vcpu 0 time info page x86/xen/time: set pvclock flags on xen_time_init() x86/pvclock: add setter for pvclock_pvti_cpu0_va ptp_kvm: probe for kvm guest availability xen/privcmd: remove unused variable pageidx xen: select grant interface version xen: update arch/x86/include/asm/xen/cpuid.h xen: add grant interface version dependent constants to gnttab_ops xen: limit grant v2 interface to the v1 functionality xen: re-introduce support for grant v2 interface xen: support priv-mapping in an HVM tools domain xen/pvcalls: remove redundant check for irq >= 0 xen/pvcalls: fix unsigned less than zero error check xen/time: Return -ENODEV from xen_get_wallclock() xen/pvcalls-front: mark expected switch fall-through xen: xenbus_probe_frontend: mark expected switch fall-throughs xen/time: do not decrease steal time after live migration on xen ...
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/grant_table.h5
-rw-r--r--include/xen/interface/vcpu.h42
-rw-r--r--include/xen/xen-ops.h25
3 files changed, 71 insertions, 1 deletions
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h
index 34b1379f9777..2e37741f6b8d 100644
--- a/include/xen/grant_table.h
+++ b/include/xen/grant_table.h
@@ -174,10 +174,13 @@ gnttab_set_unmap_op(struct gnttab_unmap_grant_ref *unmap, phys_addr_t addr,
174 unmap->dev_bus_addr = 0; 174 unmap->dev_bus_addr = 0;
175} 175}
176 176
177int arch_gnttab_init(unsigned long nr_shared); 177int arch_gnttab_init(unsigned long nr_shared, unsigned long nr_status);
178int arch_gnttab_map_shared(xen_pfn_t *frames, unsigned long nr_gframes, 178int arch_gnttab_map_shared(xen_pfn_t *frames, unsigned long nr_gframes,
179 unsigned long max_nr_gframes, 179 unsigned long max_nr_gframes,
180 void **__shared); 180 void **__shared);
181int arch_gnttab_map_status(uint64_t *frames, unsigned long nr_gframes,
182 unsigned long max_nr_gframes,
183 grant_status_t **__shared);
181void arch_gnttab_unmap(void *shared, unsigned long nr_gframes); 184void arch_gnttab_unmap(void *shared, unsigned long nr_gframes);
182 185
183struct grant_frames { 186struct grant_frames {
diff --git a/include/xen/interface/vcpu.h b/include/xen/interface/vcpu.h
index 98188c87f5c1..504c71601511 100644
--- a/include/xen/interface/vcpu.h
+++ b/include/xen/interface/vcpu.h
@@ -178,4 +178,46 @@ DEFINE_GUEST_HANDLE_STRUCT(vcpu_register_vcpu_info);
178 178
179/* Send an NMI to the specified VCPU. @extra_arg == NULL. */ 179/* Send an NMI to the specified VCPU. @extra_arg == NULL. */
180#define VCPUOP_send_nmi 11 180#define VCPUOP_send_nmi 11
181
182/*
183 * Get the physical ID information for a pinned vcpu's underlying physical
184 * processor. The physical ID informmation is architecture-specific.
185 * On x86: id[31:0]=apic_id, id[63:32]=acpi_id.
186 * This command returns -EINVAL if it is not a valid operation for this VCPU.
187 */
188#define VCPUOP_get_physid 12 /* arg == vcpu_get_physid_t */
189struct vcpu_get_physid {
190 uint64_t phys_id;
191};
192DEFINE_GUEST_HANDLE_STRUCT(vcpu_get_physid);
193#define xen_vcpu_physid_to_x86_apicid(physid) ((uint32_t)(physid))
194#define xen_vcpu_physid_to_x86_acpiid(physid) ((uint32_t)((physid) >> 32))
195
196/*
197 * Register a memory location to get a secondary copy of the vcpu time
198 * parameters. The master copy still exists as part of the vcpu shared
199 * memory area, and this secondary copy is updated whenever the master copy
200 * is updated (and using the same versioning scheme for synchronisation).
201 *
202 * The intent is that this copy may be mapped (RO) into userspace so
203 * that usermode can compute system time using the time info and the
204 * tsc. Usermode will see an array of vcpu_time_info structures, one
205 * for each vcpu, and choose the right one by an existing mechanism
206 * which allows it to get the current vcpu number (such as via a
207 * segment limit). It can then apply the normal algorithm to compute
208 * system time from the tsc.
209 *
210 * @extra_arg == pointer to vcpu_register_time_info_memory_area structure.
211 */
212#define VCPUOP_register_vcpu_time_memory_area 13
213DEFINE_GUEST_HANDLE_STRUCT(vcpu_time_info);
214struct vcpu_register_time_memory_area {
215 union {
216 GUEST_HANDLE(vcpu_time_info) h;
217 struct pvclock_vcpu_time_info *v;
218 uint64_t p;
219 } addr;
220};
221DEFINE_GUEST_HANDLE_STRUCT(vcpu_register_time_memory_area);
222
181#endif /* __XEN_PUBLIC_VCPU_H__ */ 223#endif /* __XEN_PUBLIC_VCPU_H__ */
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
index a95e65ec83c3..fd23e42c6024 100644
--- a/include/xen/xen-ops.h
+++ b/include/xen/xen-ops.h
@@ -33,6 +33,7 @@ void xen_resume_notifier_unregister(struct notifier_block *nb);
33bool xen_vcpu_stolen(int vcpu); 33bool xen_vcpu_stolen(int vcpu);
34void xen_setup_runstate_info(int cpu); 34void xen_setup_runstate_info(int cpu);
35void xen_time_setup_guest(void); 35void xen_time_setup_guest(void);
36void xen_manage_runstate_time(int action);
36void xen_get_runstate_snapshot(struct vcpu_runstate_info *res); 37void xen_get_runstate_snapshot(struct vcpu_runstate_info *res);
37u64 xen_steal_clock(int cpu); 38u64 xen_steal_clock(int cpu);
38 39
@@ -104,6 +105,8 @@ int xen_remap_domain_gfn_range(struct vm_area_struct *vma,
104 struct page **pages); 105 struct page **pages);
105int xen_unmap_domain_gfn_range(struct vm_area_struct *vma, 106int xen_unmap_domain_gfn_range(struct vm_area_struct *vma,
106 int numpgs, struct page **pages); 107 int numpgs, struct page **pages);
108
109#ifdef CONFIG_XEN_AUTO_XLATE
107int xen_xlate_remap_gfn_array(struct vm_area_struct *vma, 110int xen_xlate_remap_gfn_array(struct vm_area_struct *vma,
108 unsigned long addr, 111 unsigned long addr,
109 xen_pfn_t *gfn, int nr, 112 xen_pfn_t *gfn, int nr,
@@ -112,6 +115,28 @@ int xen_xlate_remap_gfn_array(struct vm_area_struct *vma,
112 struct page **pages); 115 struct page **pages);
113int xen_xlate_unmap_gfn_range(struct vm_area_struct *vma, 116int xen_xlate_unmap_gfn_range(struct vm_area_struct *vma,
114 int nr, struct page **pages); 117 int nr, struct page **pages);
118#else
119/*
120 * These two functions are called from arch/x86/xen/mmu.c and so stubs
121 * are needed for a configuration not specifying CONFIG_XEN_AUTO_XLATE.
122 */
123static inline int xen_xlate_remap_gfn_array(struct vm_area_struct *vma,
124 unsigned long addr,
125 xen_pfn_t *gfn, int nr,
126 int *err_ptr, pgprot_t prot,
127 unsigned int domid,
128 struct page **pages)
129{
130 return -EOPNOTSUPP;
131}
132
133static inline int xen_xlate_unmap_gfn_range(struct vm_area_struct *vma,
134 int nr, struct page **pages)
135{
136 return -EOPNOTSUPP;
137}
138#endif
139
115int xen_xlate_map_ballooned_pages(xen_pfn_t **pfns, void **vaddr, 140int xen_xlate_map_ballooned_pages(xen_pfn_t **pfns, void **vaddr,
116 unsigned long nr_grant_frames); 141 unsigned long nr_grant_frames);
117 142