debuggers.hg

changeset 22807:47d67a64a2d2

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>
author Keir Fraser <keir@xen.org>
date Fri Jan 14 15:18:02 2011 +0000 (2011-01-14)
parents 59396addc940
children 7e42363f9005
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Fri Jan 14 14:26:11 2011 +0000
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Fri Jan 14 15:18:02 2011 +0000
     1.3 @@ -1994,11 +1994,20 @@ static enum hvm_copy_result __hvm_copy(
     1.4      int count, todo = size;
     1.5  
     1.6      /*
     1.7 +     * XXX Disable for 4.1.0: PV-on-HVM drivers will do grant-table ops
     1.8 +     * such as query_size. Grant-table code currently does copy_to/from_guest
     1.9 +     * accesses under the big per-domain lock, which this test would disallow.
    1.10 +     * The test is not needed until we implement sleeping-on-waitqueue when
    1.11 +     * we access a paged-out frame, and that's post 4.1.0 now.
    1.12 +     */
    1.13 +#if 0
    1.14 +    /*
    1.15       * If the required guest memory is paged out, this function may sleep.
    1.16       * Hence we bail immediately if called from atomic context.
    1.17       */
    1.18      if ( in_atomic() )
    1.19          return HVMCOPY_unhandleable;
    1.20 +#endif
    1.21  
    1.22      while ( todo > 0 )
    1.23      {