* [PATCH] KVM: Fix kvm_coalesced_mmio_ring duplicate allocation
@ 2010-01-21 8:20 Sheng Yang
2010-01-21 17:31 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Sheng Yang @ 2010-01-21 8:20 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Avi Kivity, kvm, Sheng Yang
The commit 0953ca73 "KVM: Simplify coalesced mmio initialization"
allocate kvm_coalesced_mmio_ring in the kvm_coalesced_mmio_init(), but
didn't discard the original allocation...
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
virt/kvm/kvm_main.c | 17 -----------------
1 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 7c5c873..2b0974a 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -371,9 +371,6 @@ static struct kvm *kvm_create_vm(void)
{
int r = 0, i;
struct kvm *kvm = kvm_arch_create_vm();
-#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
- struct page *page;
-#endif
if (IS_ERR(kvm))
goto out;
@@ -402,23 +399,9 @@ static struct kvm *kvm_create_vm(void)
}
}
-#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
- page = alloc_page(GFP_KERNEL | __GFP_ZERO);
- if (!page) {
- cleanup_srcu_struct(&kvm->srcu);
- goto out_err;
- }
-
- kvm->coalesced_mmio_ring =
- (struct kvm_coalesced_mmio_ring *)page_address(page);
-#endif
-
r = kvm_init_mmu_notifier(kvm);
if (r) {
cleanup_srcu_struct(&kvm->srcu);
-#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
- put_page(page);
-#endif
goto out_err;
}
--
1.5.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: Fix kvm_coalesced_mmio_ring duplicate allocation
2010-01-21 8:20 [PATCH] KVM: Fix kvm_coalesced_mmio_ring duplicate allocation Sheng Yang
@ 2010-01-21 17:31 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2010-01-21 17:31 UTC (permalink / raw)
To: Sheng Yang; +Cc: Avi Kivity, kvm
On Thu, Jan 21, 2010 at 04:20:04PM +0800, Sheng Yang wrote:
> The commit 0953ca73 "KVM: Simplify coalesced mmio initialization"
> allocate kvm_coalesced_mmio_ring in the kvm_coalesced_mmio_init(), but
> didn't discard the original allocation...
>
> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-21 18:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21 8:20 [PATCH] KVM: Fix kvm_coalesced_mmio_ring duplicate allocation Sheng Yang
2010-01-21 17:31 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox