c9e3853c04
24448-x86-pt-irq-leak.patch - Upstream patches from Jan 24261-x86-cpuidle-Westmere-EX.patch 24417-amd-erratum-573.patch 24429-mceinj-tool.patch 24447-x86-TXT-INIT-SIPI-delay.patch ioemu-9868-MSI-X.patch - bnc#732884 - remove private runlevel 4 from init scripts xen.no-default-runlevel-4.patch - bnc#727515 - Fragmented packets hang network boot of HVM guest ipxe-gcc45-warnings.patch ipxe-ipv4-fragment.patch ipxe-enable-nics.patch - fate#310510 - fix xenpaging update xenpaging.autostart.patch, make changes with mem-swap-target permanent update xenpaging.doc.patch, mention issues with live migration - fate#310510 - fix xenpaging add xenpaging.evict_mmap_readonly.patch update xenpaging.error-handling.patch, reduce debug output - bnc#736824 - Microcode patches for AMD's 15h processors panic the system 24189-x86-p2m-pod-locking.patch 24412-x86-AMD-errata-model-shift.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=164
88 lines
3.8 KiB
Diff
88 lines
3.8 KiB
Diff
# HG changeset patch
|
|
# Parent a4d7c27ec1f190ecbb9a909609f6ef0eca250c00
|
|
xenpaging: extend xc_mem_paging_enable() to handle interface version
|
|
|
|
Since upcoming patches will change the way how paging internally works, add a
|
|
new interface to xc_mem_paging_enable() to make sure the pager is not
|
|
out-of-date. This is similar to XEN_DOMCTL_INTERFACE_VERSION in do_domctl()
|
|
where the tools have to match the running hypervisor.
|
|
|
|
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
|
|
Index: xen-4.1.2-testing/tools/libxc/xc_mem_paging.c
|
|
===================================================================
|
|
--- xen-4.1.2-testing.orig/tools/libxc/xc_mem_paging.c
|
|
+++ xen-4.1.2-testing/tools/libxc/xc_mem_paging.c
|
|
@@ -25,12 +25,13 @@
|
|
|
|
|
|
int xc_mem_paging_enable(xc_interface *xch, domid_t domain_id,
|
|
+ unsigned long interface_age,
|
|
void *shared_page, void *ring_page)
|
|
{
|
|
return xc_mem_event_control(xch, domain_id,
|
|
XEN_DOMCTL_MEM_EVENT_OP_PAGING_ENABLE,
|
|
XEN_DOMCTL_MEM_EVENT_OP_PAGING,
|
|
- shared_page, ring_page, INVALID_MFN);
|
|
+ shared_page, ring_page, interface_age);
|
|
}
|
|
|
|
int xc_mem_paging_disable(xc_interface *xch, domid_t domain_id)
|
|
Index: xen-4.1.2-testing/tools/libxc/xenctrl.h
|
|
===================================================================
|
|
--- xen-4.1.2-testing.orig/tools/libxc/xenctrl.h
|
|
+++ xen-4.1.2-testing/tools/libxc/xenctrl.h
|
|
@@ -1736,6 +1736,7 @@ int xc_mem_event_control(xc_interface *x
|
|
void *ring_page, unsigned long gfn);
|
|
|
|
int xc_mem_paging_enable(xc_interface *xch, domid_t domain_id,
|
|
+ unsigned long interface_age,
|
|
void *shared_page, void *ring_page);
|
|
int xc_mem_paging_disable(xc_interface *xch, domid_t domain_id);
|
|
int xc_mem_paging_nominate(xc_interface *xch, domid_t domain_id,
|
|
Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.c
|
|
===================================================================
|
|
--- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.c
|
|
+++ xen-4.1.2-testing/tools/xenpaging/xenpaging.c
|
|
@@ -366,6 +366,7 @@ static xenpaging_t *xenpaging_init(int a
|
|
|
|
/* Initialise Xen */
|
|
rc = xc_mem_paging_enable(xch, paging->mem_event.domain_id,
|
|
+ MEM_EVENT_PAGING_AGE,
|
|
paging->mem_event.shared_page,
|
|
paging->mem_event.ring_page);
|
|
if ( rc != 0 )
|
|
Index: xen-4.1.2-testing/xen/arch/x86/mm/mem_event.c
|
|
===================================================================
|
|
--- xen-4.1.2-testing.orig/xen/arch/x86/mm/mem_event.c
|
|
+++ xen-4.1.2-testing/xen/arch/x86/mm/mem_event.c
|
|
@@ -274,6 +274,15 @@ int mem_event_domctl(struct domain *d, x
|
|
if ( p2m->pod.entry_count )
|
|
break;
|
|
|
|
+ rc = -ENOEXEC;
|
|
+ /* Disallow paging in a PoD guest */
|
|
+ if ( mec->gfn != MEM_EVENT_PAGING_AGE )
|
|
+ {
|
|
+ gdprintk(XENLOG_INFO, "Expected paging age %lx, got %lx\n",
|
|
+ MEM_EVENT_PAGING_AGE, mec->gfn);
|
|
+ break;
|
|
+ }
|
|
+
|
|
rc = mem_event_enable(d, mec, med);
|
|
}
|
|
break;
|
|
Index: xen-4.1.2-testing/xen/include/public/mem_event.h
|
|
===================================================================
|
|
--- xen-4.1.2-testing.orig/xen/include/public/mem_event.h
|
|
+++ xen-4.1.2-testing/xen/include/public/mem_event.h
|
|
@@ -49,6 +49,8 @@
|
|
#define MEM_EVENT_REASON_INT3 5 /* int3 was hit: gla/gfn are RIP */
|
|
#define MEM_EVENT_REASON_SINGLESTEP 6 /* single step was invoked: gla/gfn are RIP */
|
|
|
|
+#define MEM_EVENT_PAGING_AGE 1UL /* Number distinguish the mem_paging <-> pager interface */
|
|
+
|
|
typedef struct mem_event_shared_page {
|
|
uint32_t port;
|
|
} mem_event_shared_page_t;
|