Skip to contentSkip to conversation

x86: PV shim vs grant table

PATCH In review Jan Beulich 2 participants 5 messages Oct 29, 2020

lore
Share & tools
lore
#0 lore raw

cover x86: PV shim vs grant table

While Andrew reported a randconfig build failure, I started wondering why we'd ever build in a way different from what had failed to build. Fix the build and then switch the shim config file accordingly.

1: fix build of PV shim when !GRANT_TABLE
2: PV shim doesn't need GRANT_TABLE

Jan

#1 lore raw

PATCH 1/2 x86: fix build of PV shim when !GRANT_TABLE

To do its compat translation, shim code needs to include the compat header. For this to work, this header first of all needs to be generated.

xen/include/Makefile +1 -0
@@ -24,6 +24,7 @@ headers-$(CONFIG_X86)     += compat/arch
 headers-$(CONFIG_ARGO)    += compat/argo.h
 headers-$(CONFIG_PV)      += compat/callback.h
 headers-$(CONFIG_GRANT_TABLE) += compat/grant_table.h
+headers-$(CONFIG_PV_SHIM) += compat/grant_table.h
 headers-$(CONFIG_HVM)     += compat/hvm/dm_op.h
 headers-$(CONFIG_HVM)     += compat/hvm/hvm_op.h
 headers-$(CONFIG_HVM)     += compat/hvm/hvm_vcpu.h
#3 lore raw

PATCH 2/2 x86: PV shim doesn't need GRANT_TABLE

In reply to Jan Beulich

The only reference into the code controlled by this option is from the hypercall table, and that hypercall table entry gets overwritten.

xen/arch/x86/configs/pvshim_defconfig +1 -0
@@ -9,6 +9,7 @@ CONFIG_EXPERT=y
 CONFIG_SCHED_NULL=y
 # Disable features not used by the PV shim
 # CONFIG_XEN_SHSTK is not set
+# CONFIG_GRANT_TABLE is not set
 # CONFIG_HYPFS is not set
 # CONFIG_BIGMEM is not set
 # CONFIG_KEXEC is not set