Skip to contentSkip to conversation

xen/domain: enable VCPUOP_register_runstate_phys_area hypercall

PATCH In review [email protected] 2 participants 2 messages Dec 12, 2025 – Dec 15, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/domain: enable VCPUOP_register_runstate_phys_area hypercall

ice@blossom ..............................................................................................................................................................................…/xen 🌸 enable-runstate-phys-area ? ❯ cat 0001-xen-domain-enable-VCPUOP_register_runstate_phys_area.patch
From 416992b30258d34b7cc7bc4f7875719f47618147 Mon Sep 17 00:00:00 2001
From: melanie <[email protected]>
Date: Fri, 12 Dec 2025 20:55:50 +0000
Subject: [PATCH] xen/domain: enable VCPUOP_register_runstate_phys_area
hypercall

The XENFEAT_runstate_phys_area feature is unconditionally advertised to guests via XENVER_get_features ( see xen/common/kernel.c ),  but the corresponding VCPUOP_register_runstate_phys_area hypercall was disabled with a placeholder check that always returned -ENOSYS!

Remove the dead code to enable the hypercall,  making the implementation consistent with the advertised feature.

---
xen/common/domain.c | 4 ----

1 file changed, 4 deletions(-)
xen/common/domain.c +0 -0
index 93c71bc766..3ae8d41cf2 100644
@@ -2284,10 +2284,6 @@ long common_vcpu_op(int cmd, struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg)

     {
         struct vcpu_register_runstate_memory_area area;

-        rc = -ENOSYS;
-        if ( 0 /* TODO: Dom's XENFEAT_runstate_phys_area setting */ ) -            break;
-
         rc = -EFAULT;
         if ( copy_from_guest(&area.addr.p, arg, 1) ) break;
--

#1 lore raw
Quoted 2 lines · On 12.12.2025 22:01, [email protected] wrote:

ice@blossom ..............................................................................................................................................................................…/xen 🌸 enable-runstate-phys-area ? ❯ cat 0001-xen-domain-enable-VCPUOP_register_runstate_phys_area.patch

I don't quite understand what this is.

Quoted 10 lines

From 416992b30258d34b7cc7bc4f7875719f47618147 Mon Sep 17 00:00:00 2001
From: melanie <[email protected]>
Date: Fri, 12 Dec 2025 20:55:50 +0000
Subject: [PATCH] xen/domain: enable VCPUOP_register_runstate_phys_area hypercall

The XENFEAT_runstate_phys_area feature is unconditionally advertised to guests via XENVER_get_features ( see xen/common/kernel.c ),  but the corresponding VCPUOP_register_runstate_phys_area hypercall was disabled with a placeholder check that always returned -ENOSYS!

Well, no. The check you remove ...

xen/common/domain.c long common_vcpu_op(int cmd, struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg) · line 2289

Quoted 9 lines
xen/common/domain.c +0 -3
@@ -2284,10 +2284,6 @@ long common_vcpu_op(int cmd, struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg)
      {
          struct vcpu_register_runstate_memory_area area;
 
-        rc = -ENOSYS;
-        if ( 0 /* TODO: Dom's XENFEAT_runstate_phys_area setting */ )
-            break;

... is dead code, yes, but it certainly didn't cause the function to return -ENOSYS. See commit 48a3fd14327f ("domain: expose newly introduced hypercalls as XENFEAT"), which in a change like this the description surely should have referenced.

Jan