From: Linus Torvalds Date: Mon, 26 Apr 2021 17:44:16 +0000 (-0700) Subject: Merge tag 'hyperv-next-signed-20210426' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Tag: xarray-5.18~2079 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4d480dbf21f3385e9957b1ee8dadee35548f4516;p=users%2Fwilly%2Fxarray.git Merge tag 'hyperv-next-signed-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V updates from Wei Liu: - VMBus enhancement - Free page reporting support for Hyper-V balloon driver - Some patches for running Linux as Arm64 Hyper-V guest - A few misc clean-up patches * tag 'hyperv-next-signed-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: (30 commits) drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status x86/hyperv: Move hv_do_rep_hypercall to asm-generic video: hyperv_fb: Add ratelimit on error message Drivers: hv: vmbus: Increase wait time for VMbus unload Drivers: hv: vmbus: Initialize unload_event statically Drivers: hv: vmbus: Check for pending channel interrupts before taking a CPU offline Drivers: hv: vmbus: Drivers: hv: vmbus: Introduce CHANNELMSG_MODIFYCHANNEL_RESPONSE Drivers: hv: vmbus: Introduce and negotiate VMBus protocol version 5.3 Drivers: hv: vmbus: Use after free in __vmbus_open() Drivers: hv: vmbus: remove unused function Drivers: hv: vmbus: Remove unused linux/version.h header x86/hyperv: remove unused linux/version.h header x86/Hyper-V: Support for free page reporting x86/hyperv: Fix unused variable 'hi' warning in hv_apic_read x86/hyperv: Fix unused variable 'msr_val' warning in hv_qlock_wait hv: hyperv.h: a few mundane typo fixes drivers: hv: Fix EXPORT_SYMBOL and tab spaces issue Drivers: hv: vmbus: Drop error message when 'No request id available' asm-generic/hyperv: Add missing function prototypes per -W1 warnings clocksource/drivers/hyper-v: Move handling of STIMER0 interrupts ... --- 4d480dbf21f3385e9957b1ee8dadee35548f4516 diff --cc drivers/clocksource/hyperv_timer.c index a02b0a224807,ce94f78eb851..977fd05ac35f --- a/drivers/clocksource/hyperv_timer.c +++ b/drivers/clocksource/hyperv_timer.c @@@ -418,6 -472,30 +472,30 @@@ static struct clocksource hyperv_cs_ms .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; + /* + * Reference to pv_ops must be inline so objtool + * detection of noinstr violations can work correctly. + */ + #ifdef CONFIG_GENERIC_SCHED_CLOCK + static __always_inline void hv_setup_sched_clock(void *sched_clock) + { + /* + * We're on an architecture with generic sched clock (not x86/x64). + * The Hyper-V sched clock read function returns nanoseconds, not + * the normal 100ns units of the Hyper-V synthetic clock. + */ + sched_clock_register(sched_clock, 64, NSEC_PER_SEC); + } + #elif defined CONFIG_PARAVIRT + static __always_inline void hv_setup_sched_clock(void *sched_clock) + { + /* We're on x86/x64 *and* using PV ops */ - pv_ops.time.sched_clock = sched_clock; ++ paravirt_set_sched_clock(sched_clock); + } + #else /* !CONFIG_GENERIC_SCHED_CLOCK && !CONFIG_PARAVIRT */ + static __always_inline void hv_setup_sched_clock(void *sched_clock) {} + #endif /* CONFIG_GENERIC_SCHED_CLOCK */ + static bool __init hv_init_tsc_clocksource(void) { u64 tsc_msr;