aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/grant_table.c
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-11-26 14:17:56 +0000
committerKeir Fraser <keir@xen.org>2010-11-26 14:17:56 +0000
commitff80d6a6f9bbd772291ff12e65d42ba7008250bc (patch)
tree93a1ef6b2238acd1628d27fec004db391dc2b3a1 /xen/common/grant_table.c
parent44e41ca0bcd96588252be3143964df602cc3e5d0 (diff)
downloadxen-ff80d6a6f9bbd772291ff12e65d42ba7008250bc.tar.gz
xen-ff80d6a6f9bbd772291ff12e65d42ba7008250bc.tar.bz2
xen-ff80d6a6f9bbd772291ff12e65d42ba7008250bc.zip
xenpaging: populate paged-out pages unconditionally in grant code
Populate a page unconditionally to avoid missing a page-in request. If the page is already in the process of being paged-in, the this vcpu will be stopped and later resumed once the page content is usable again. This matches other p2m_mem_paging_populate usage in the source tree. Signed-off-by: Olaf Hering <olaf@aepfle.de>
Diffstat (limited to 'xen/common/grant_table.c')
-rw-r--r--xen/common/grant_table.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index 721f2a5ecd..092e6c3bfd 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -156,10 +156,11 @@ static int __get_paged_frame(unsigned long gfn, unsigned long *frame, int readon
if ( p2m_is_valid(p2mt) ) {
*frame = mfn_x(mfn);
- if ( p2m_is_paged(p2mt) )
- p2m_mem_paging_populate(p2m, gfn);
if ( p2m_is_paging(p2mt) )
+ {
+ p2m_mem_paging_populate(p2m, gfn);
rc = GNTST_eagain;
+ }
} else {
*frame = INVALID_MFN;
rc = GNTST_bad_page;