diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2012-08-03 03:42:52 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-06 09:04:58 -0400 |
commit | 32cad84f44d186654492f1a50a1424c8906ccbd9 (patch) | |
tree | 8a5e7d77edac00a763d3e48aa4d7bf296e671e2b /arch/x86/kvm/x86.c | |
parent | cb9aaa30b133574b646d9d4766ef08a843211393 (diff) |
KVM: do not release the error page
After commit a2766325cf9f9, the error page is replaced by the
error code, it need not be released anymore
[ The patch has been compiling tested for powerpc ]
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ebf2109318e0..7953a9e7cb17 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1639,10 +1639,9 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data) | |||
1639 | vcpu->arch.time_page = | 1639 | vcpu->arch.time_page = |
1640 | gfn_to_page(vcpu->kvm, data >> PAGE_SHIFT); | 1640 | gfn_to_page(vcpu->kvm, data >> PAGE_SHIFT); |
1641 | 1641 | ||
1642 | if (is_error_page(vcpu->arch.time_page)) { | 1642 | if (is_error_page(vcpu->arch.time_page)) |
1643 | kvm_release_page_clean(vcpu->arch.time_page); | ||
1644 | vcpu->arch.time_page = NULL; | 1643 | vcpu->arch.time_page = NULL; |
1645 | } | 1644 | |
1646 | break; | 1645 | break; |
1647 | } | 1646 | } |
1648 | case MSR_KVM_ASYNC_PF_EN: | 1647 | case MSR_KVM_ASYNC_PF_EN: |
@@ -3945,10 +3944,8 @@ static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt, | |||
3945 | goto emul_write; | 3944 | goto emul_write; |
3946 | 3945 | ||
3947 | page = gfn_to_page(vcpu->kvm, gpa >> PAGE_SHIFT); | 3946 | page = gfn_to_page(vcpu->kvm, gpa >> PAGE_SHIFT); |
3948 | if (is_error_page(page)) { | 3947 | if (is_error_page(page)) |
3949 | kvm_release_page_clean(page); | ||
3950 | goto emul_write; | 3948 | goto emul_write; |
3951 | } | ||
3952 | 3949 | ||
3953 | kaddr = kmap_atomic(page); | 3950 | kaddr = kmap_atomic(page); |
3954 | kaddr += offset_in_page(gpa); | 3951 | kaddr += offset_in_page(gpa); |