Port-xen archive

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

Re: [patch] Re: proposal: stop using the xen_system_time timecounter in dom0



>>>>> On Sun, 23 Jun 2024 08:12:32 +0000, "Mathew, Cherry G." <c%bow.st@localhost> said:

>>>>> On Sun, 23 Jun 2024 08:05:13 +0000, "Mathew, Cherry G." <c%bow.st@localhost> said:
> [...]

>> +       return _hypercall2(int, sched_op, SCHEDOP_pin_override, SHUTDOWN_suspend);
>                                                                   ^^^^^^^^^^^^^^^^

> Sorry, that would not have the desired effect even if it had compiled,

Turns out that wouldn't even compile - and has a premature return, so is
incorrect. 

I compile tested the below - but have no way to test it currently.

diff -r 1376eff6ff1c sys/arch/xen/xen/xen_clock.c
--- a/sys/arch/xen/xen/xen_clock.c      Sun Jun 23 00:53:48 2024 +0000
+++ b/sys/arch/xen/xen/xen_clock.c      Sun Jun 23 09:14:27 2024 +0000
@@ -929,6 +929,17 @@
        xen_resumeclocks(ci);

 #ifdef DOM0OPS
+#if __XEN_INTERFACE_VERSION__ >= 0x00030201
+
+       struct sched_pin_override pin_cpuid = {
+               .pcpu = curcpu()->ci_cpuid,
+       };
+
+       _hypercall2(int, sched_op, SCHEDOP_pin_override, &pin_cpuid);
+#else
+       _hypercall2(int, sched_op, SCHEDOP_pin_override, curcpu()->ci_cpuid);
+#endif
+
        /*
         * If this is a privileged dom0, start pushing the wall
         * clock time back to the Xen hypervisor.


-- 
Math/(~cherry)


Home | Main Index | Thread Index | Old Index