Skip to contentSkip to conversation

x86/shadow: Fix build with CONFIG_SHADOW_PAGING=n following c/s 45ac805

PATCH In review Andrew Cooper 2 participants 2 messages Feb 27, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/shadow: Fix build with CONFIG_SHADOW_PAGING=n following c/s 45ac805

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.

---
CC: Jan Beulich <[email protected]>
CC: Tim Deegan <[email protected]>

---
 xen/arch/x86/mm/shadow/none.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
xen/arch/x86/mm/shadow/none.c +7 -2
index 69e56c5..41ce593 100644
@@ -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;
 }
 
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Andrew Cooper

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.

---

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel