aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-01-14 15:18:02 +0000
committerKeir Fraser <keir@xen.org>2011-01-14 15:18:02 +0000
commit48f902c059c84c1630b752cae00333814a96482a (patch)
tree5253b7fb7bdb85843bbcd921a0de82f6b4a5ad26
parent5d7db6a945d821d48d36e76ea5aef4db1e03b6f1 (diff)
downloadxen-48f902c059c84c1630b752cae00333814a96482a.tar.gz
xen-48f902c059c84c1630b752cae00333814a96482a.tar.bz2
xen-48f902c059c84c1630b752cae00333814a96482a.zip
x86 hvm: Do not check-and-fail on in_atomic() in hvm_copy().
Stub this out for 4.0, as PV-on-HVM drivers hit this case when performing grant-table hypercalls. Grant-table code currently accesses guest memory under bug per-domain lock. The test in hvm_copy() is not necessary until the xenpaging implementation is more complete, which will not now be until after 4.1.0. Signed-off-by: Keir Fraser <keir@xen.org>
-rw-r--r--xen/arch/x86/hvm/hvm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 62c018fa44..1a89bfb575 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -1994,11 +1994,20 @@ static enum hvm_copy_result __hvm_copy(
int count, todo = size;
/*
+ * XXX Disable for 4.1.0: PV-on-HVM drivers will do grant-table ops
+ * such as query_size. Grant-table code currently does copy_to/from_guest
+ * accesses under the big per-domain lock, which this test would disallow.
+ * The test is not needed until we implement sleeping-on-waitqueue when
+ * we access a paged-out frame, and that's post 4.1.0 now.
+ */
+#if 0
+ /*
* If the required guest memory is paged out, this function may sleep.
* Hence we bail immediately if called from atomic context.
*/
if ( in_atomic() )
return HVMCOPY_unhandleable;
+#endif
while ( todo > 0 )
{