[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 3/7] xen/monitor: wrap monitor_op under CONFIG_VM_EVENT


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Tue, 18 Nov 2025 18:32:36 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=R81sVUysovOxXE6UE4eYjgnofd2JsEJPd3NYNv6MvEw=; b=LINqwAnYLeBczllGmN1kfod8W+TjMZfa8zbR8ScrFYLCufYwlyGND0fSfFbU2S+FLdrNQHP/Zg8C5j5+VT3aUF49yUlSH67Ps0hsTgZ/9BxXS0c1pKhx98/kPu0Hm3gsuaanI0AtZ9bnJTj8jPPWeGBi+XViuEafEEIFSF4I2zcV5mT1NhSFWugqQVSglZedau579Xvh5xjwV/yy39sdxY47CVgUvXgzu9XBNWAijiZp/70kSyy5zVBi1Rr7jm5oq+wJtolZUyjcYqChPL3rpcS1mPK1spkCyC56ld66d1TU+z4+KqDfA5WxSc82OBT8b8JZhrePQ5CFNeTzB40Rcg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=a3WKCXfjl16Cd8vk1vR9Jy3fyn4k7Knzi08dTvrzss0e65rpoBiV+DV7JF50IpuyhYjNbQIYf+fuKnpsbhM22lhoH+7vcOzh3JPXsTFbvy0QojzRpuXCnq76p6yOAmAVzw0O/3DhXwUyBNHHHif/qTRuoQ5b5YeXFjN/uHOcDJhk25gDVVEU1Vy9EDPcInjbbIgdPeD9LKH34d2VHtNIMAAqVsRZG/xzb9floGzZCjhQT9rNhHJS+zNvFRDr9Vmn1Oo1Pp4PmJDL001Kp1HywJ3WuirPCbjNF69C3WQd8mklUoT9xK1GqQba6paGZB4XSGoMOFvxxwSSQ84fjy30EQ==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, "Petre Pircalabu" <ppircalabu@xxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 19 Nov 2025 00:09:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <Penny.Zheng@xxxxxxx>
---
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 <jbeulich@xxxxxxxx>

Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.