diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-05-02 16:37:24 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-05-02 16:37:24 +0200 |
commit | 4939f9a6dee4280f38730fd3066e5dce353112f6 (patch) | |
tree | f7fc6fa0c8f7b1261706f24a15c6ee9e58534440 /xen/arch/x86/domain.c | |
parent | 918a5f17b447072b40780f4d03a3adc99ff0073b (diff) | |
download | xen-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/arch/x86/domain.c')
-rw-r--r-- | xen/arch/x86/domain.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index bc1a31f7e6..5bf52ff566 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -939,17 +939,16 @@ int arch_set_info_guest( #undef c } -void arch_vcpu_reset(struct vcpu *v) +int arch_vcpu_reset(struct vcpu *v) { if ( !is_hvm_vcpu(v) ) { destroy_gdt(v); - vcpu_destroy_pagetables(v, 0); - } - else - { - vcpu_end_shutdown_deferral(v); + return vcpu_destroy_pagetables(v); } + + vcpu_end_shutdown_deferral(v); + return 0; } /* @@ -1960,7 +1959,7 @@ int domain_relinquish_resources(struct domain *d) /* Drop the in-use references to page-table bases. */ for_each_vcpu ( d, v ) { - ret = vcpu_destroy_pagetables(v, 1); + ret = vcpu_destroy_pagetables(v); if ( ret ) return ret; |