aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/nestedhvm.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-01-23 14:12:54 +0100
committerJan Beulich <jbeulich@suse.com>2013-01-23 14:12:54 +0100
commitbcf557675d858e3b2e92788f5424ed4bfdac413d (patch)
treefacf1e523888c80e963541a203cc890160ef7adc /xen/arch/x86/hvm/nestedhvm.c
parentbad20150553601964143dff43d932accceba3e5e (diff)
downloadxen-bcf557675d858e3b2e92788f5424ed4bfdac413d.tar.gz
xen-bcf557675d858e3b2e92788f5424ed4bfdac413d.tar.bz2
xen-bcf557675d858e3b2e92788f5424ed4bfdac413d.zip
x86: properly use map_domain_page() in nested HVM code
This eliminates a couple of incorrect/inconsistent uses of map_domain_page() from VT-x code. Note that this does _not_ add error handling where none was present before, even though I think NULL returns from any of the mapping operations touched here need to properly be handled. I just don't know this code well enough to figure out what the right action in each case would be. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/hvm/nestedhvm.c')
-rw-r--r--xen/arch/x86/hvm/nestedhvm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/nestedhvm.c b/xen/arch/x86/hvm/nestedhvm.c
index 6047cb5ee0..b3cf07dda3 100644
--- a/xen/arch/x86/hvm/nestedhvm.c
+++ b/xen/arch/x86/hvm/nestedhvm.c
@@ -53,8 +53,7 @@ nestedhvm_vcpu_reset(struct vcpu *v)
nv->nv_ioport80 = 0;
nv->nv_ioportED = 0;
- if (nv->nv_vvmcx)
- hvm_unmap_guest_frame(nv->nv_vvmcx);
+ hvm_unmap_guest_frame(nv->nv_vvmcx, 1);
nv->nv_vvmcx = NULL;
nv->nv_vvmcxaddr = VMCX_EADDR;
nv->nv_flushp2m = 0;