aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-05-02 16:37:24 +0200
committerJan Beulich <jbeulich@suse.com>2013-05-02 16:37:24 +0200
commit4939f9a6dee4280f38730fd3066e5dce353112f6 (patch)
treef7fc6fa0c8f7b1261706f24a15c6ee9e58534440 /xen/include/xen
parent918a5f17b447072b40780f4d03a3adc99ff0073b (diff)
downloadxen-4939f9a6dee4280f38730fd3066e5dce353112f6.tar.gz
xen-4939f9a6dee4280f38730fd3066e5dce353112f6.tar.bz2
xen-4939f9a6dee4280f38730fd3066e5dce353112f6.zip
x86: make vcpu_reset() preemptible
... as dropping the old page tables may take significant amounts of time. This is part of CVE-2013-1918 / XSA-45. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/include/xen')
-rw-r--r--xen/include/xen/domain.h4
-rw-r--r--xen/include/xen/sched.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h
index d4ac50ff0f..504a70fc95 100644
--- a/xen/include/xen/domain.h
+++ b/xen/include/xen/domain.h
@@ -13,7 +13,7 @@ typedef union {
struct vcpu *alloc_vcpu(
struct domain *d, unsigned int vcpu_id, unsigned int cpu_id);
struct vcpu *alloc_dom0_vcpu0(void);
-void vcpu_reset(struct vcpu *v);
+int vcpu_reset(struct vcpu *);
struct xen_domctl_getdomaininfo;
void getdomaininfo(struct domain *d, struct xen_domctl_getdomaininfo *info);
@@ -67,7 +67,7 @@ void arch_dump_vcpu_info(struct vcpu *v);
void arch_dump_domain_info(struct domain *d);
-void arch_vcpu_reset(struct vcpu *v);
+int arch_vcpu_reset(struct vcpu *);
extern spinlock_t vcpu_alloc_lock;
bool_t domctl_lock_acquire(void);
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index beadc429f9..41f749e19e 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -682,6 +682,9 @@ static inline struct domain *next_domain_in_cpupool(
/* VCPU is blocked due to missing mem_sharing ring. */
#define _VPF_mem_sharing 6
#define VPF_mem_sharing (1UL<<_VPF_mem_sharing)
+ /* VCPU is being reset. */
+#define _VPF_in_reset 7
+#define VPF_in_reset (1UL<<_VPF_in_reset)
static inline int vcpu_runnable(struct vcpu *v)
{