x86: kexec is PV-only
PATCH 1/1 x86: kexec is PV-only
Kexec is of no use without its hypercall, and that hypercall is wired up only for PV. Allowing that code to be built when !PV therefore results in a lot of unreachable code, violating Misra C:2012 rule 2.1.
xen/arch/x86/Kconfig +1 -1
@@ -22,7 +22,7 @@ config X86 select HAS_EX_TABLE select HAS_FAST_MULTIPLY select HAS_IOPORTS - select HAS_KEXEC + select HAS_KEXEC if PV select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCI
Quoted 9 lines · Jan Beulich
Kexec is of no use without its hypercall, and that hypercall is wired up only for PV. Allowing that code to be built when !PV therefore results in a lot of unreachable code, violating Misra C:2012 rule 2.1.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/Kconfig config X86 · line 28
Quoted 8 lines
xen/arch/x86/Kconfig +1
-1@@ -22,7 +22,7 @@ config X86 select HAS_EX_TABLE select HAS_FAST_MULTIPLY select HAS_IOPORTS - select HAS_KEXEC + select HAS_KEXEC if PV select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCI
This might be true, but it's wrong. kexec should be wired up for PVH too, and I don't see any reason why it can't be.
~Andrew
Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Jan Beulich
Kexec is of no use without its hypercall, and that hypercall is wired up only for PV. Allowing that code to be built when !PV therefore results in a lot of unreachable code, violating Misra C:2012 rule 2.1.
Signed-off-by Jan Beulich <[email protected]>
Quoted 14 lines
xen/arch/x86/Kconfig config X86 · line 28
Quoted 11 lines
xen/arch/x86/Kconfig +1
-1@@ -22,7 +22,7 @@ config X86 select HAS_EX_TABLE select HAS_FAST_MULTIPLY select HAS_IOPORTS - select HAS_KEXEC + select HAS_KEXEC if PV select HAS_NS16550 select HAS_PASSTHROUGH select HAS_PCIThis might be true, but it's wrong. kexec should be wired up for PVH too, and I don't see any reason why it can't be.
I'm happy to drop this patch if one enabling PVH surfaces. I did point out the issue a little while back, and since nothing really happened, I thought I'd make this patch to at least address the Misra aspect. I just don't see myself audit the affected code paths for validity in the PVH case.
Jan
Quoted 3 lines · Jan Beulich
Kexec is of no use without its hypercall, and that hypercall is wired up only for PV. Allowing that code to be built when !PV therefore results in a lot of unreachable code, violating Misra C:2012 rule 2.1.
Do you know what's missing for the hypercall to be functional on HVM environments? We would need that for parity between PVH and PV dom0s.
Thanks, Roger.
Quoted 7 lines · Roger Pau Monné
Quoted 3 lines · Jan Beulich
Kexec is of no use without its hypercall, and that hypercall is wired up only for PV. Allowing that code to be built when !PV therefore results in a lot of unreachable code, violating Misra C:2012 rule 2.1.
Do you know what's missing for the hypercall to be functional on HVM environments?
No, and since I don't know I also didn't mean to take on enabling that mode of operation. The Misra aspect, otoh, was simple enough to cover (without introducing much code which later would need undoing).
Jan