From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: [PATCH v2 2/3] KVM: use kvm_release_page_clean to release the page
Date: Thu, 26 Jul 2012 11:58:17 +0800 [thread overview]
Message-ID: <5010C059.50007@linux.vnet.ibm.com> (raw)
In-Reply-To: <5010C008.4030304@linux.vnet.ibm.com>
In kvm_async_pf_wakeup_all, it uses bad_page to generate broadcast wakeup,
and uses put_page to release bad_page, the work depends on the fact that
bad_page is the normal page. But we will use the error code instead of
bad_page, so use kvm_release_page_clean to release the page which will
release the error code properly
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
---
virt/kvm/async_pf.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c
index 74268b4..ebae24b 100644
--- a/virt/kvm/async_pf.c
+++ b/virt/kvm/async_pf.c
@@ -112,7 +112,7 @@ void kvm_clear_async_pf_completion_queue(struct kvm_vcpu *vcpu)
typeof(*work), link);
list_del(&work->link);
if (work->page)
- put_page(work->page);
+ kvm_release_page_clean(work->page);
kmem_cache_free(async_pf_cache, work);
}
spin_unlock(&vcpu->async_pf.lock);
@@ -139,7 +139,7 @@ void kvm_check_async_pf_completion(struct kvm_vcpu *vcpu)
list_del(&work->queue);
vcpu->async_pf.queued--;
if (work->page)
- put_page(work->page);
+ kvm_release_page_clean(work->page);
kmem_cache_free(async_pf_cache, work);
}
}
--
1.7.7.6
next prev parent reply other threads:[~2012-07-26 3:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-26 3:56 [PATCH v2 0/3] KVM: remove dummy pages Xiao Guangrong
2012-07-26 3:57 ` [PATCH v2 1/3] KVM: MMU: use kvm_release_pfn_clean to release pfn Xiao Guangrong
2012-07-26 3:58 ` Xiao Guangrong [this message]
2012-07-26 3:58 ` [PATCH v2 3/3] KVM: remove dummy pages Xiao Guangrong
2012-07-26 8:56 ` Avi Kivity
2012-07-26 9:20 ` Takuya Yoshikawa
2012-07-26 9:35 ` Xiao Guangrong
2012-07-26 9:52 ` Takuya Yoshikawa
2012-07-26 9:25 ` Xiao Guangrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5010C059.50007@linux.vnet.ibm.com \
--to=xiaoguangrong@linux.vnet.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).