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
69 lines
1.8 KiB
Diff
69 lines
1.8 KiB
Diff
changeset: 24171:fe80909663c1
|
|
user: Keir Fraser <keir@xen.org>
|
|
date: Tue Nov 22 13:00:21 2011 +0000
|
|
files: xen/common/wait.c
|
|
description:
|
|
x86,waitqueue: Allocate whole page for shadow stack.
|
|
|
|
Signed-off-by: Keir Fraser <keir@xen.org>
|
|
|
|
|
|
---
|
|
xen/common/wait.c | 19 +++++++++++++++----
|
|
1 file changed, 15 insertions(+), 4 deletions(-)
|
|
|
|
Index: xen-4.1.2-testing/xen/common/wait.c
|
|
===================================================================
|
|
--- xen-4.1.2-testing.orig/xen/common/wait.c
|
|
+++ xen-4.1.2-testing/xen/common/wait.c
|
|
@@ -33,7 +33,7 @@ struct waitqueue_vcpu {
|
|
* hypervisor context before sleeping (descheduling), setjmp/longjmp-style.
|
|
*/
|
|
void *esp;
|
|
- char stack[3000];
|
|
+ char *stack;
|
|
#endif
|
|
};
|
|
|
|
@@ -41,11 +41,19 @@ int init_waitqueue_vcpu(struct vcpu *v)
|
|
{
|
|
struct waitqueue_vcpu *wqv;
|
|
|
|
- wqv = xmalloc(struct waitqueue_vcpu);
|
|
+ wqv = xzalloc(struct waitqueue_vcpu);
|
|
if ( wqv == NULL )
|
|
return -ENOMEM;
|
|
|
|
- memset(wqv, 0, sizeof(*wqv));
|
|
+#ifdef CONFIG_X86
|
|
+ wqv->stack = alloc_xenheap_page();
|
|
+ if ( wqv->stack == NULL )
|
|
+ {
|
|
+ xfree(wqv);
|
|
+ return -ENOMEM;
|
|
+ }
|
|
+#endif
|
|
+
|
|
INIT_LIST_HEAD(&wqv->list);
|
|
wqv->vcpu = v;
|
|
|
|
@@ -63,6 +71,9 @@ void destroy_waitqueue_vcpu(struct vcpu
|
|
return;
|
|
|
|
BUG_ON(!list_empty(&wqv->list));
|
|
+#ifdef CONFIG_X86
|
|
+ free_xenheap_page(wqv->stack);
|
|
+#endif
|
|
xfree(wqv);
|
|
|
|
v->waitqueue_vcpu = NULL;
|
|
@@ -115,7 +126,7 @@ static void __prepare_to_wait(struct wai
|
|
: "=S" (wqv->esp)
|
|
: "c" (cpu_info), "D" (wqv->stack)
|
|
: "memory" );
|
|
- BUG_ON((cpu_info - (char *)wqv->esp) > sizeof(wqv->stack));
|
|
+ BUG_ON((cpu_info - (char *)wqv->esp) > PAGE_SIZE);
|
|
}
|
|
|
|
static void __finish_wait(struct waitqueue_vcpu *wqv)
|