x86/shadow: Fix build with CONFIG_SHADOW_PAGING=n following c/s 45ac805
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 27 Feb 2017 11:47:10 +0000 (11:47 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 27 Feb 2017 11:49:39 +0000 (11:49 +0000)
c/s 45ac805 "x86/paging: Package up the log dirty function pointers" neglected
the case when CONFIG_SHADOW_PAGING is disabled.  Make a similar adjustment to
the none stubs.

Spotted by a Travis RANDCONFIG run.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/none.c

index 69e56c5c4e2cdc439ee636f11ffff3d0d19ca221..41ce5931f731ace2aedc263a1124f556f5465b76 100644 (file)
@@ -20,8 +20,13 @@ static void _clean_dirty_bitmap(struct domain *d)
 
 int shadow_domain_init(struct domain *d, unsigned int domcr_flags)
 {
-    paging_log_dirty_init(d, _enable_log_dirty,
-                          _disable_log_dirty, _clean_dirty_bitmap);
+    static const struct log_dirty_ops sh_none_ops = {
+        .enable  = _enable_log_dirty,
+        .disable = _disable_log_dirty,
+        .clean   = _clean_dirty_bitmap,
+    };
+
+    paging_log_dirty_init(d, &sh_none_ops);
     return is_pv_domain(d) ? 0 : -EOPNOTSUPP;
 }