|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] x86/shim: Short circuit control/hardware checks in PV_SHIM_EXCLUSIVE builds
The net diffstat is:
add/remove: 0/13 grow/shrink: 25/129 up/down: 6297/-20469 (-14172)
With the following objects/functions removed entirely:
iommu_hwdom_none 1 - -1
hwdom_max_order 4 - -4
extra_hwdom_irqs 4 - -4
ctldom_max_order 4 - -4
acpi_c1e_quirk 43 - -43
hvm_pirq_eoi 62 - -62
max_order 94 - -94
conring_puts 104 - -104
propagate_node 119 - -119
mmio_ro_emulate_ops 224 - -224
mmcfg_intercept_ops 224 - -224
pci_cfg_ok 295 - -295
p2m_lock 546 - -546
And the following reduced to stubs:
arch_iommu_hwdom_init 852 2 -850
p2m_add_foreign 880 16 -864
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>
---
xen/include/xen/sched.h | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index a2accd90f6..cc942a3621 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -963,10 +963,22 @@ void watchdog_domain_destroy(struct domain *d);
* (that is, this would not be suitable for a driver domain)
* - There is never a reason to deny the hardware domain access to this
*/
-#define is_hardware_domain(_d) evaluate_nospec((_d) == hardware_domain)
+static always_inline bool is_hardware_domain(const struct domain *d)
+{
+ if ( IS_ENABLED(CONFIG_PV_SHIM_EXCLUSIVE) )
+ return false;
+
+ return evaluate_nospec(d == hardware_domain);
+}
/* This check is for functionality specific to a control domain */
-#define is_control_domain(_d) evaluate_nospec((_d)->is_privileged)
+static always_inline bool is_control_domain(const struct domain *d)
+{
+ if ( IS_ENABLED(CONFIG_PV_SHIM_EXCLUSIVE) )
+ return false;
+
+ return evaluate_nospec(d->is_privileged);
+}
#define VM_ASSIST(d, t) (test_bit(VMASST_TYPE_ ## t, &(d)->vm_assist))
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |