x86: wire up VCPUOP_register_vcpu_time_memory_area for 32-bit guests

Forever sinced its introduction VCPUOP_register_vcpu_time_memory_area
was available only to native domains. Linux, for example, would attempt
to use it irrespective of guest bitness (including in its so called
PVHVM mode) as long as it finds XEN_PVCLOCK_TSC_STABLE_BIT set (which we
set only for clocksource=tsc, which in turn needs engaging via command
line option).

Fixes: a5d39947cb ("Allow guests to register secondary vcpu_time_info")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
Jan Beulich committed 2022-09-29 14:47:45 +02:00
1 parent 9214da34a3
commit b726541d94
1 file changed
+20
+20
View File
@@ -58,6 +58,26 @@ compat_vcpu_op(int cmd, unsigned int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg)
break;
}
case VCPUOP_register_vcpu_time_memory_area:
{
struct compat_vcpu_register_time_memory_area area = { .addr.p = 0 };
rc = -EFAULT;
if ( copy_from_guest(&area.addr.h, arg, 1) )
break;
if ( area.addr.h.c != area.addr.p ||
!compat_handle_okay(area.addr.h, 1) )
break;
rc = 0;
guest_from_compat_handle(v->arch.time_info_guest, area.addr.h);
force_update_vcpu_system_time(v);
break;
}
case VCPUOP_send_nmi:
case VCPUOP_get_physid:
rc = do_vcpu_op(cmd, vcpuid, arg);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.