]> xenbits.xensource.com Git - xen.git/commitdiff
xsm/flask: Fix XSM support for HVMOP_track_dirty_vram
authorAurelien Chartier <aurelien.chartier@citrix.com>
Thu, 4 Jul 2013 08:46:25 +0000 (10:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 4 Jul 2013 08:46:25 +0000 (10:46 +0200)
The XSM check for HVMOP_track_dirty_vram is done with a call to xsm_hvm_param,
therefore the switch handling that case should be located in flask_hvm_param
and not in flask_hvmcontext.

This was fixed upstream by the two following patches :
875756ca34fabc7243c4a682ffd7008710a907e2 (add case in flask_hvm_param)
652f94327383c5517b709f0a3e4b970216b3d375 (remove case from flask_hvmcontext)

Signed-off-by: Aurelien Chartier <aurelien.chartier@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
xen/xsm/flask/hooks.c

index 02a0d2083627275b3752fed5491a923802328142..8f49e673bebd6baf89280c57643f48123bb53a09 100644 (file)
@@ -844,9 +844,6 @@ static int flask_hvmcontext(struct domain *d, uint32_t cmd)
     case XEN_DOMCTL_gethvmcontext_partial:
         perm = HVM__GETHVMC;
         break;
-    case HVMOP_track_dirty_vram:
-        perm = HVM__TRACKDIRTYVRAM;
-        break;
     default:
         return -EPERM;
     }
@@ -885,6 +882,9 @@ static int flask_hvm_param(struct domain *d, unsigned long op)
     case HVMOP_get_param:
         perm = HVM__GETPARAM;
         break;
+    case HVMOP_track_dirty_vram:
+        perm = HVM__TRACKDIRTYVRAM;
+        break;
     default:
         return -EPERM;
     }