From: George Dunlap Subject: [PATCH] Handle PoD case in hvm_hap_nested_page_fault() Date: Wed, 6 Jan 2010 12:19:37 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001517478aaada0ad4047c7df7f8 Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --001517478aaada0ad4047c7df7f8 Content-Type: text/plain; charset=ISO-8859-1 The new combined nested page fault handling doesn't consider the case where the gfn_to_mfn() translation caused the page to be transparently populated. Attached patch is one solution; a more robust solution would be to take the access type (read or write) and check it against the type returned by gfn_to_mfn() to handle spurious NPFs as well (if such things ever happen). Signed-off-by: George Dunlap --001517478aaada0ad4047c7df7f8 Content-Type: text/x-patch; charset=US-ASCII; name="20100106-handle-pod-populate.diff" Content-Disposition: attachment; filename="20100106-handle-pod-populate.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g442rprd0 ZGlmZiAtciBhMWQwYTU3NWI0YmEgeGVuL2FyY2gveDg2L2h2bS9odm0uYwotLS0gYS94ZW4vYXJj aC94ODYvaHZtL2h2bS5jCVdlZCBKYW4gMDYgMTA6MTM6NTUgMjAxMCArMDAwMAorKysgYi94ZW4v YXJjaC94ODYvaHZtL2h2bS5jCVdlZCBKYW4gMDYgMTI6MTc6NDcgMjAxMCArMDAwMApAQCAtOTM3 LDYgKzkzNywxNiBAQAogICAgIG1mbiA9IGdmbl90b19tZm5fdHlwZV9jdXJyZW50KGdmbiwgJnAy bXQsIHAybV9ndWVzdCk7CiAKICAgICAvKgorICAgICAqIElmIHRoaXMgaXMgYSB2YWxpZCBlbnRy eSBub3csIGl0IHdhcyBwcm9iYWJseSBwb3B1bGF0ZWQgYnkgdGhlIFBvRCBjb2RlLAorICAgICAq IG9yIHBlcmhhcHMgdGhlIG5lc3RlZCBmYXVsdCB3YXMgc3B1cmlvdXMuICBDb250aW51ZS4KKyAg ICAgKi8KKyAgICBpZiAoIHAybXQgPT0gcDJtX3JhbV9ydyApCisgICAgeworICAgICAgICBBU1NF UlQoIG1mbl92YWxpZChtZm4pICk7IC8qIGltcGxpZWQgYnkgcDJtdCA9PSBwMm1fcmFtX3J3ICov CisgICAgICAgIHJldHVybiAxOworICAgIH0KKworICAgIC8qCiAgICAgICogSWYgdGhpcyBHRk4g aXMgZW11bGF0ZWQgTU1JTyBvciBtYXJrZWQgYXMgcmVhZC1vbmx5LCBwYXNzIHRoZSBmYXVsdAog ICAgICAqIHRvIHRoZSBtbWlvIGhhbmRsZXIuCiAgICAgICovCg== --001517478aaada0ad4047c7df7f8 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --001517478aaada0ad4047c7df7f8--