On 2025-11-13 04:18, Jan Beulich wrote:
On 13.11.2025 04:16, Penny Zheng wrote:
Feature monitor_op is based on vm event subsystem, so monitor.o shall be
wrapped under CONFIG_VM_EVENT.
The following functions are only invoked by monitor-op, so they all shall be
wrapped with CONFIG_VM_EVENT (otherwise they will become unreachable and
violate Misra rule 2.1 when VM_EVENT=n):
- hvm_enable_msr_interception
   - hvm_function_table.enable_msr_interception
- hvm_has_set_descriptor_access_existing
   - hvm_function_table.set_descriptor_access_existi
- arch_monitor_get_capabilities
Function monitored_msr() still needs a stub to pass compilation when
VM_EVENT=n.

Signed-off-by: Penny Zheng <[email protected]>
---
v3 -> v4:
- a new commit split from previous "xen/vm_event: consolidate CONFIG_VM_EVENT"
- Another blank line ahead of the #ifdef
- Move hvm_enable_msr_interception() up into the earlier #ifdef
- only arch_monitor_get_capabilities() needs wrapping, as this static inline
function calls hvm_has_set_descriptor_access_exiting(), which is declared only
when VM_EVENT=y
---
  xen/arch/x86/hvm/Makefile          |  2 +-
  xen/arch/x86/hvm/svm/svm.c         |  8 +++++++-
  xen/arch/x86/hvm/vmx/vmx.c         | 10 ++++++++++
  xen/arch/x86/include/asm/hvm/hvm.h | 18 +++++++++++-------
  xen/arch/x86/include/asm/monitor.h |  9 +++++++++
  5 files changed, 38 insertions(+), 9 deletions(-)

Same remark as for patch 2 regarding the subject prefix. Then
Acked-by: Jan Beulich <[email protected]>

Reviewed-by: Jason Andryuk <[email protected]>

Reply via email to