RE: [PATCH 2/2] drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status

2021-04-20 Thread Michael Kelley
+- > 10 files changed, 54 insertions(+), 41 deletions(-) Wei -- I have gone through these changes reasonably carefully, but your review of the Linux-in-the-root-partition changes would be a good double-check. It's too easy to get the sense of the tests backwards. :-( Reviewed-by: Michael K

RE: [PATCH 1/2] x86/hyperv: Move hv_do_rep_hypercall to asm-generic

2021-04-20 Thread Michael Kelley
> + control |= (u64)rep_comp << HV_HYPERCALL_REP_START_OFFSET; > + > + touch_nmi_watchdog(); > + } while (rep_comp < rep_count); > + > + return status; > +} > > /* Generate the guest OS identifier as described in the Hyper-V TLFS */ > static inline __u64 generate_guest_id(__u64 d_info1, __u64 kernel_version, > -- > 2.17.1 Reviewed-by: Michael Kelley

RE: ** POTENTIAL FRAUD ALERT - RED HAT ** [PATCH v2 1/1] Drivers: hv: vmbus: Increase wait time for VMbus unload

2021-04-20 Thread Michael Kelley
From: Vitaly Kuznetsov Sent: Tuesday, April 20, 2021 2:32 AM > > Michael Kelley writes: > > > When running in Azure, disks may be connected to a Linux VM with > > read/write caching enabled. If a VM panics and issues a VMbus > > UNLOAD request to Hyper-V, the re

[PATCH 1/1] video: hyperv_fb: Add ratelimit on error message

2021-04-20 Thread Michael Kelley
. Break the cycle by rate limiting the error message. Also output the error code for additional diagnosability. Signed-off-by: Michael Kelley --- drivers/video/fbdev/hyperv_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video

RE: [PATCH v2] Drivers: hv: vmbus: Initialize unload_event statically

2021-04-19 Thread Michael Kelley
gt; > Reported-by: Michael Kelley > Signed-off-by: Andrea Parri (Microsoft) > --- > Changes since v1[1]: > - add inline comment in vmbus_unload_response() > > [1] > https://lore.kernel.org/linux-hyperv/20210416143932.16512-1-parri.and...@gmail.com/ > > driver

[PATCH v2 1/1] Drivers: hv: vmbus: Increase wait time for VMbus unload

2021-04-19 Thread Michael Kelley
the VM is completely hung. Fixes: 911e1987efc8 ("Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload") Signed-off-by: Michael Kelley --- Changed in v2: Fixed silly error in the argument to mdelay() --- drivers/hv/channel_mgmt.c | 30 +- 1 file changed, 25

[PATCH 1/1] Drivers: hv: vmbus: Increase wait time for VMbus unload

2021-04-19 Thread Michael Kelley
the VM is completely hung. Fixes: 911e1987efc8 ("Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload") Signed-off-by: Michael Kelley --- drivers/hv/channel_mgmt.c | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/drivers/hv/channe

RE: [PATCH 1/2] x86/hyperv: Move hv_do_rep_hypercall to asm-generic

2021-04-18 Thread Michael Kelley
From: Wei Liu Sent: Sunday, April 18, 2021 6:09 AM > On Fri, Apr 16, 2021 at 05:43:02PM -0700, Joseph Salisbury wrote: > > From: Joseph Salisbury > > > > This patch makes no functional changes. It simply moves > > hv_do_rep_hypercall() > > out of arch/x86/include/asm/mshyperv.h and into

RE: [PATCH] Drivers: hv: vmbus: Initialize unload_event statically

2021-04-16 Thread Michael Kelley
Please leave a comment somewhere in the code itself that describes this scenario so that somebody in the future doesn't decide it's OK to "simplify" the initialization of unload_event. :-) Michael > > Reported-by: Michael Kelley > Signed-off-by: Andrea Parri (Microsoft) > --

RE: [PATCH v3 3/3] Drivers: hv: vmbus: Check for pending channel interrupts before taking a CPU offline

2021-04-16 Thread Michael Kelley
drivers/hv/hv.c | 56 ++--- > 1 file changed, 53 insertions(+), 3 deletions(-) > Reviewed-by: Michael Kelley > diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c > index 3e6ff83adff42..e0c522d143a37 100644 > --- a/drivers/hv/hv.c > +++ b/drivers/hv/hv.c >

RE: [PATCH v3 1/3] Drivers: hv: vmbus: Introduce and negotiate VMBus protocol version 5.3

2021-04-16 Thread Michael Kelley
s/hv/connection.c | 3 ++- > include/linux/hyperv.h | 2 ++ > 2 files changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Michael Kelley > > diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c > index 350e8c5cafa8c..dc19d5ae4373c 100644 > --- a/drivers/hv/conne

RE: [PATCH hyperv-next] scsi: storvsc: Use blk_mq_unique_tag() to generate requestIDs

2021-04-15 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Thursday, April 15, 2021 3:59 AM > > Use blk_mq_unique_tag() to generate requestIDs for StorVSC, avoiding > all issues with allocating enough entries in the VMbus requestor. > > Suggested-by: Michael Kelley > Signed-off-by: Andre

RE: [PATCH v2 3/3] Drivers: hv: vmbus: Check for pending channel interrupts before taking a CPU offline

2021-04-14 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Wednesday, April 14, 2021 8:01 AM > > Check that enough time has passed such that the modify channel message > has been processed before taking a CPU offline. > > Signed-off-by: Andrea Parri (Microsoft) > --- > drivers/hv/hv.c | 49

RE: [PATCH v2 2/3] Drivers: hv: vmbus: Drivers: hv: vmbus: Introduce CHANNELMSG_MODIFYCHANNEL_RESPONSE

2021-04-14 Thread Michael Kelley
v/channel.c | 99 --- > drivers/hv/channel_mgmt.c | 42 + > drivers/hv/hv_trace.h | 15 ++ > drivers/hv/vmbus_drv.c| 4 +- > include/linux/hyperv.h| 11 - > 5 files changed, 152 insertions(+), 19 deletions(-) > Reviewed-by: Michael Kelley

RE: [PATCH v2 1/3] Drivers: hv: vmbus: Introduce and negotiate VMBus protocol version 5.3

2021-04-14 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Wednesday, April 14, 2021 8:01 AM > > Hyper-V has added VMBus protocol version 5.3. Allow Linux guests to > negotiate the new version on version of Hyper-V that support it. > > Signed-off-by: Andrea Parri (Microsoft) > --- > drivers/hv/connection.c | 3

RE: [PATCH] Drivers: hv: vmbus: remove unused function

2021-04-14 Thread Michael Kelley
. */ > static inline u32 > hv_get_ring_buffersize(const struct hv_ring_buffer_info *ring_info) > -- > 1.8.3.1 This function became unused as of commit 4226ff69a3df ("vmbus: simplify hv_ringbuffer_read") on 7/17/2017. Reviewed-by: Michael Kelley

RE: [PATCH hyperv-next] Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer

2021-04-09 Thread Michael Kelley
_MAX_XFER_PAGE_RANGES? It used to be a fixed 375, but now is NVSP_RSC_MAX, which is 562. If that's the only change, then Reviewed-by: Michael Kelley > > Signed-off-by: Andres Beltran > Co-developed-by: Andrea Parri (Microsoft) > Signed-off-by: Andrea Parri (Microsof

RE: [RFC PATCH hyperv-next] scsi: storvsc: Use blk_mq_unique_tag() to generate requestIDs

2021-04-09 Thread Michael Kelley
too much complexity. See a few comments inline below. > > Suggested-by: Michael Kelley > Signed-off-by: Andrea Parri (Microsoft) > --- > drivers/hv/channel.c | 14 +++--- > drivers/hv/ring_buffer.c | 12 ++--- > drivers/net/hyperv/netvsc.c |

RE: [PATCH 2/7] hyperv: SVM enlightened TLB flush support flag

2021-04-07 Thread Michael Kelley
From: Vineeth Pillai Sent: Wednesday, April 7, 2021 7:41 AM > > Bit 22 of HYPERV_CPUID_FEATURES.EDX is specific to SVM and specifies > support for enlightened TLB flush. With this enligtenment enabled, s/enligtenment/enlightenment/ > ASID invalidations flushes only gva->hpa entries. To flush

RE: [PATCH 1/7] hyperv: Detect Nested virtualization support for SVM

2021-04-07 Thread Michael Kelley
From: Vineeth Pillai Sent: Wednesday, April 7, 2021 7:41 AM > > Detect nested features exposed by Hyper-V if SVM is enabled. > > Signed-off-by: Vineeth Pillai > --- > arch/x86/kernel/cpu/mshyperv.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git

RE: [PATCH v9 0/7] Enable Linux guests on Hyper-V on ARM64

2021-04-05 Thread Michael Kelley
From: Michael Kelley > Sent: Wednesday, March 24, 2021 8:55 AM > To: w...@kernel.org; catalin.mari...@arm.com; Mark Rutland > ; > lorenzo.pieral...@arm.com; sudeep.ho...@arm.com > Cc: linux-arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; linux- > hyp...@vger

RE: [PATCH v9 1/7] smccc: Add HVC call variant with result registers other than 0 thru 3

2021-03-25 Thread Michael Kelley
From: Mark Rutland Sent: Thursday, March 25, 2021 2:56 AM > > On Thu, Mar 25, 2021 at 04:55:51AM +, Michael Kelley wrote: > > From: Mark Rutland Sent: Wednesday, March 24, 2021 > > 9:55 AM > > > For the benefit of others here, SMCCCv1.2 allows: > > >

RE: [PATCH v9 1/7] smccc: Add HVC call variant with result registers other than 0 thru 3

2021-03-24 Thread Michael Kelley
From: Mark Rutland Sent: Wednesday, March 24, 2021 9:55 AM > > Hi Michael, > > On Mon, Mar 08, 2021 at 11:57:13AM -0800, Michael Kelley wrote: > > Hypercalls to Hyper-V on ARM64 may return results in registers other > > than X0 thru X3, as permitted by the SMCCC sp

RE: [PATCH v9 0/7] Enable Linux guests on Hyper-V on ARM64

2021-03-24 Thread Michael Kelley
From: Michael Kelley Sent: Monday, March 8, 2021 11:57 AM > > This series enables Linux guests running on Hyper-V on ARM64 > hardware. New ARM64-specific code in arch/arm64/hyperv initializes > Hyper-V, including its interrupts and hypercall mechanism. > Existing architect

RE: [PATCH v2] video: hyperv_fb: Fix a double free in hvfb_probe

2021-03-24 Thread Michael Kelley
;apertures) calls in hvfb_getmem(). This will allow framebuffer_release() to free the memory, which follows the pattern of other fbdev drivers. Modulo this revision to the commit message, which Wei Liu can probably incorporate, Reviewed-by: Michael Kelley > > Signed-off-by: Lv Yunlong > ---

RE: [PATCH v5] x86/Hyper-V: Support for free page reporting

2021-03-23 Thread Michael Kelley
V2: > - Addressed feedback comments > - Added page reporting config option tied to hyper-v balloon config > > In V3: > - Addressed feedback from Vitaly > > In V4: > - Queried and cached the Hyper-V extended capability for the lifetime > of the VM > - Addressed feedba

RE: [PATCH] video/fbdev: Fix a double free in hvfb_probe

2021-03-23 Thread Michael Kelley
From: Lv Yunlong Sent: Tuesday, March 23, 2021 12:34 AM > > In function hvfb_probe in hyperv_fb.c, it calls hvfb_getmem(hdev, info) > and return err when info->apertures is freed. > > In the error1 label of hvfb_probe, info->apertures will be freed twice > by framebuffer_release(info). > > My

RE: [PATCH -next] x86: Fix unused variable 'msr_val' warning

2021-03-22 Thread Michael Kelley
From: Ingo Molnar Sent: Monday, March 22, 2021 2:08 PM > > * Xu Yihang wrote: > > > Fixes the following W=1 kernel build warning(s): > > arch/x86/hyperv/hv_spinlock.c:28:16: warning: variable 'msr_val' set but > > not used [- > Wunused-but-set-variable] > > unsigned long msr_val; > > > >

RE: [PATCH v4] x86/Hyper-V: Support for free page reporting

2021-03-19 Thread Michael Kelley
From: Sunil Muthuswamy Sent: Friday, March 19, 2021 2:21 PM > > > What's the strategy for this flag in the unlikely event that the hypercall > > fails? > > It doesn't seem right to have hv_query_ext_cap() fail, but leave the > > static flag set to true. Just move that line down to after the

RE: [PATCH v4] x86/Hyper-V: Support for free page reporting

2021-03-19 Thread Michael Kelley
V2: > - Addressed feedback comments > - Added page reporting config option tied to hyper-v balloon config > > In V3: > - Addressed feedback from Vitaly > > In V4: > - Queried and cached the Hyper-V extended capability for the lifetime > of the VM > - Addresse

RE: [PATCH -next] x86: Fix unused variable 'hi'

2021-03-19 Thread Michael Kelley
From: Ingo Molnar Sent: Thursday, March 18, 2021 4:24 AM > > * Xu Yihang wrote: > > > Fixes the following W=1 kernel build warning(s): > > arch/x86/hyperv/hv_apic.c:58:15: warning: variable ‘hi’ set but not used > > [-Wunused-but- > set-variable] > > > > Reported-by: Hulk Robot > >

RE: [PATCH -next] x86: Fix unused variable 'msr_val' warning

2021-03-19 Thread Michael Kelley
From: Xu Yihang Sent: Thursday, March 18, 2021 1:04 AM > > Fixes the following W=1 kernel build warning(s): > arch/x86/hyperv/hv_spinlock.c:28:16: warning: variable ‘msr_val’ set but not > used [- > Wunused-but-set-variable] > unsigned long msr_val; > > Reported-by: Hulk Robot >

RE: [PATCH v2 1/1] scsi: storvsc: Enable scatterlist entry lengths > 4Kbytes

2021-03-16 Thread Michael Kelley
From: Vitaly Kuznetsov Sent: Wednesday, March 3, 2021 1:09 AM > To: Michael Kelley > Cc: KY Srinivasan ; martin.peter...@oracle.com; Long Li > ; wei@kernel.org; j...@linux.ibm.com; linux- > hyp...@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-s...@vger.kernel.or

RE: linux-next: manual merge of the hyperv tree with the tip tree

2021-03-15 Thread Michael Kelley
From: Stephen Rothwell Sent: Sunday, March 14, 2021 8:35 PM > > Hi all, > > Today's linux-next merge of the hyperv tree got a conflict in: > > arch/x86/include/asm/mshyperv.h > > between commit: > > a0e2bf7cb700 ("x86/paravirt: Switch time pvops functions to use > static_call()") > >

RE: [RFC PATCH 11/18] virt/mshv: set up synic pages for intercept messages

2021-03-11 Thread Michael Kelley
From: Nuno Das Neves Sent: Thursday, March 11, 2021 11:38 AM > > On 2/8/2021 11:47 AM, Michael Kelley wrote: > > From: Nuno Das Neves Sent: Friday, > > November > 20, 2020 4:31 PM > >> > >> Same idea as synic setup in drivers/hv/hv.c:hv_synic_enabl

[PATCH 1/1] asm-generic/hyperv: Add missing function prototypes per -W1 warnings

2021-03-10 Thread Michael Kelley
Add two function prototypes for -W1 warnings generated by the kernel test robot. Reported-by: kernel test robot Signed-off-by: Michael Kelley --- include/asm-generic/mshyperv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h

RE: [PATCH v1] scsi: storvsc: Cap cmd_per_lun at can_queue

2021-03-09 Thread Michael Kelley
From: John Garry Sent: Tuesday, March 9, 2021 8:36 AM > > On 09/03/2021 15:57, Michael Kelley wrote: > > From: John Garry Sent: Tuesday, March 9, 2021 2:10 > > AM > >> > >> On 08/03/2021 17:56, Melanie Plageman wrote: > >>> On Mon, Mar 08

RE: [PATCH v1] scsi: storvsc: Cap cmd_per_lun at can_queue

2021-03-09 Thread Michael Kelley
From: John Garry Sent: Tuesday, March 9, 2021 2:10 AM > > On 08/03/2021 17:56, Melanie Plageman wrote: > > On Mon, Mar 08, 2021 at 02:37:40PM +0000, Michael Kelley wrote: > >> From: Melanie Plageman (Microsoft) Sent: > >> Friday, > March 5, 2021 3:22 PM > &g

RE: [PATCH v1] scsi: storvsc: Cap cmd_per_lun at can_queue

2021-03-09 Thread Michael Kelley
From: Melanie Plageman Sent: Monday, March 8, 2021 9:56 AM > > On Mon, Mar 08, 2021 at 02:37:40PM +, Michael Kelley wrote: > > From: Melanie Plageman (Microsoft) Sent: > > Friday, March > 5, 2021 3:22 PM > > > > > > The scsi_device->queue_dep

[PATCH v9 7/7] Drivers: hv: Enable Hyper-V code to be built on ARM64

2021-03-08 Thread Michael Kelley
Update drivers/hv/Kconfig so CONFIG_HYPERV can be selected on ARM64, causing the Hyper-V specific code to be built. Signed-off-by: Michael Kelley Reviewed-by: Sunil Muthuswamy --- drivers/hv/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hv/Kconfig b

[PATCH v9 6/7] arm64: efi: Export screen_info

2021-03-08 Thread Michael Kelley
The Hyper-V frame buffer driver may be built as a module, and it needs access to screen_info. So export screen_info. Signed-off-by: Michael Kelley Acked-by: Ard Biesheuvel --- arch/arm64/kernel/efi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64

[PATCH v9 4/7] arm64: hyperv: Add kexec and panic handlers

2021-03-08 Thread Michael Kelley
-by: Michael Kelley Reviewed-by: Sunil Muthuswamy --- arch/arm64/hyperv/Makefile | 2 +- arch/arm64/hyperv/hv_core.c | 52 ++ arch/arm64/hyperv/mshyperv.c | 54 3 files changed, 107 insertions(+), 1 deletion

[PATCH v9 2/7] arm64: hyperv: Add Hyper-V hypercall and register access utilities

2021-03-08 Thread Michael Kelley
of mshyperv.h in include/asm-generic. Use these definitions to provide utility functions to make Hyper-V hypercalls and to get and set Hyper-V provided registers associated with a virtual processor. Signed-off-by: Michael Kelley --- MAINTAINERS | 3 + arch/arm64/Kbuild

[PATCH v9 5/7] arm64: hyperv: Initialize hypervisor on boot

2021-03-08 Thread Michael Kelley
Add ARM64-specific code to initialize the Hyper-V hypervisor when booting as a guest VM. Provide functions and data structures indicating hypervisor status that are needed by VMbus driver. This code is built only when CONFIG_HYPERV is enabled. Signed-off-by: Michael Kelley --- arch/arm64

[PATCH v9 3/7] arm64: hyperv: Add Hyper-V clocksource/clockevent support

2021-03-08 Thread Michael Kelley
Add architecture specific definitions and functions needed by the architecture independent Hyper-V clocksource driver. Update the Hyper-V clocksource driver to be initialized on ARM64. Signed-off-by: Michael Kelley Reviewed-by: Sunil Muthuswamy --- arch/arm64/include/asm/mshyperv.h | 12

[PATCH v9 1/7] smccc: Add HVC call variant with result registers other than 0 thru 3

2021-03-08 Thread Michael Kelley
-by: Michael Kelley --- There are several ways to support returning results from registers other than X0 thru X3, and Hyper-V usage should be compatible with whatever the maintainers prefer. What's implemented in this patch may be the most flexible, but it has the downside of not being a true function

[PATCH v9 0/7] Enable Linux guests on Hyper-V on ARM64

2021-03-08 Thread Michael Kelley
Changes in v2: * Removed patch to implement slow_virt_to_phys() on ARM64. Use of slow_virt_to_phys() in arch independent Hyper-V drivers has been eliminated by commit 6ba34171bcbd ("Drivers: hv: vmbus: Remove use of slow_virt_to_phys()") * Minor tweaks to rebase to latest linux-next

RE: [RFC PATCH 08/18] virt/mshv: map and unmap guest memory

2021-03-08 Thread Michael Kelley
From: Nuno Das Neves Sent: Monday, March 8, 2021 11:14 AM > > On 2/8/2021 11:45 AM, Michael Kelley wrote: > > From: Nuno Das Neves Sent: Friday, > > November > 20, 2020 4:30 PM > >> [snip] > >> @@ -245,16 +249,318 @@ hv_call_delete_par

RE: [PATCH v1] scsi: storvsc: Cap cmd_per_lun at can_queue

2021-03-08 Thread Michael Kelley
From: Melanie Plageman (Microsoft) Sent: Friday, March 5, 2021 3:22 PM > > The scsi_device->queue_depth is set to Scsi_Host->cmd_per_lun during > allocation. > > Cap cmd_per_lun at can_queue to avoid dispatch errors. > > Signed-off-by: Melanie Plageman (Microsoft) > --- >

RE: [PATCH v3 07/10] clocksource/drivers/hyper-v: Handle vDSO differences inline

2021-03-08 Thread Michael Kelley
From: Michael Kelley Sent: Tuesday, March 2, 2021 3:07 PM > > From: Daniel Lezcano Sent: Tuesday, March 2, 2021 > 2:14 PM > > > > On 02/03/2021 22:38, Michael Kelley wrote: > > > While the driver for the Hyper-V Reference TSC and STIMERs is architecture >

RE: [PATCH v8 4/6] arm64: hyperv: Initialize hypervisor on boot

2021-03-05 Thread Michael Kelley
From: Sunil Muthuswamy Sent: Wednesday, March 3, 2021 12:21 PM > > > +static u64 hypercall_output __initdata; > > + > > +static int __init hyperv_init(void) > > +{ > > + struct hv_get_vpindex_from_apicid_input *input; > > + u64 status; > > + int i; > nit: both, tabs & spaces are

RE: [PATCH v8 1/6] arm64: hyperv: Add Hyper-V hypercall and register access utilities

2021-03-05 Thread Michael Kelley
From: Sunil Muthuswamy Sent: Wednesday, March 3, 2021 10:28 AM > > > > + > > > + /* > > > + * Allocate a power of 2 size so alignment to that size is > > > + * guaranteed, since the hypercall input and output areas > > > + * must not cross a page boundary. > > > + */ > > > + input =

RE: [PATCH v8 1/6] arm64: hyperv: Add Hyper-V hypercall and register access utilities

2021-03-05 Thread Michael Kelley
From: Sunil Muthuswamy Sent: Tuesday, March 2, 2021 4:35 PM > > > +} > > +EXPORT_SYMBOL_GPL(hv_do_fast_hypercall8); > > + > > + > nit: Extra line, here and few other places I'll try to clean these up. > > > +u64 hv_get_vpreg(u32 msr) > > +{ > > + struct hv_get_vp_registers_input

RE: [PATCH v8 1/6] arm64: hyperv: Add Hyper-V hypercall and register access utilities

2021-03-05 Thread Michael Kelley
From: Boqun Feng Sent: Tuesday, February 23, 2021 6:37 PM > > On Thu, Feb 18, 2021 at 03:16:29PM -0800, Michael Kelley wrote: > [...] > > + > > +/* > > + * Get the value of a single VP register. One version > > + * returns just 64 bits and another returns t

RE: [RFC PATCH 06/18] virt/mshv: create, initialize, finalize, delete partition hypercalls

2021-03-04 Thread Michael Kelley
From: Nuno Das Neves Sent: Thursday, March 4, 2021 3:49 PM > > On 2/8/2021 11:42 AM, Michael Kelley wrote: > > From: Nuno Das Neves Sent: Friday, > > November > 20, 2020 4:30 PM > >> [snip] > >> + > >> +static int > >

RE: [PATCH v3 07/10] clocksource/drivers/hyper-v: Handle vDSO differences inline

2021-03-03 Thread Michael Kelley
From: Daniel Lezcano Sent: Tuesday, March 2, 2021 2:14 PM > > On 02/03/2021 22:38, Michael Kelley wrote: > > While the driver for the Hyper-V Reference TSC and STIMERs is architecture > > neutral, vDSO is implemented for x86/x64, but not for ARM64. Current code > > call

[PATCH v3 02/10] x86/hyper-v: Move hv_message_type to architecture neutral module

2021-03-02 Thread Michael Kelley
. As a compromise, move the entire definition into an arch neutral module, to avoid duplicating the arch neutral values for x86/x64 and for ARM64. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng --- arch/x86/include/asm/hyperv-tlfs.h | 29 - include/asm

[PATCH v3 03/10] Drivers: hv: Redo Hyper-V synthetic MSR get/set functions

2021-03-02 Thread Michael Kelley
synthetic MSRs that are architecture neutral. But keep the old x86-specific names as aliases that can be removed later when all references (particularly in KVM code) have been cleaned up in a separate patch series. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng

[PATCH v3 08/10] clocksource/drivers/hyper-v: Handle sched_clock differences inline

2021-03-02 Thread Michael Kelley
the difference inline based on whether GENERIC_SCHED_CLOCK is present. The new approach removes code under arch/* since the difference is tied more to the specifics of the Linux implementation than to the architecture. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng

[PATCH v3 09/10] clocksource/drivers/hyper-v: Set clocksource rating based on Hyper-V feature

2021-03-02 Thread Michael Kelley
there is slightly different, the net result in the normal cases is no functional change. Signed-off-by: Michael Kelley Acked-by: Daniel Lezcano --- drivers/clocksource/hyperv_timer.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/clocksource/hyperv_timer.c

[PATCH v3 10/10] clocksource/drivers/hyper-v: Move handling of STIMER0 interrupts

2021-03-02 Thread Michael Kelley
/x64, special case code is retained under arch/x86, but no STIMER0 interrupt handling code is needed under arch/arm64. No functional change. Signed-off-by: Michael Kelley --- arch/x86/hyperv/hv_init.c | 2 +- arch/x86/include/asm/mshyperv.h| 4 - arch/x86/kernel/cpu/mshyperv.c

[PATCH v3 04/10] Drivers: hv: vmbus: Move hyperv_report_panic_msg to arch neutral code

2021-03-02 Thread Michael Kelley
With the new Hyper-V MSR set function, hyperv_report_panic_msg() can be architecture neutral, so move it out from under arch/x86 and merge into hv_kmsg_dump(). This move also avoids needing a separate implementation under arch/arm64. No functional change. Signed-off-by: Michael Kelley Reviewed

[PATCH v3 01/10] Drivers: hv: vmbus: Move Hyper-V page allocator to arch neutral code

2021-03-02 Thread Michael Kelley
The Hyper-V page allocator functions are implemented in an architecture neutral way. Move them into the architecture neutral VMbus module so a separate implementation for ARM64 is not needed. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng --- arch/x86/hyperv

[PATCH v3 07/10] clocksource/drivers/hyper-v: Handle vDSO differences inline

2021-03-02 Thread Michael Kelley
inline based on whether VDSO_CLOCK_MODE_HVCLOCK is present. The new approach removes code under arch/* since the difference is tied more to the specifics of the Linux implementation than to the architecture. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng --- arch

[PATCH v3 05/10] Drivers: hv: vmbus: Handle auto EOI quirk inline

2021-03-02 Thread Michael Kelley
On x86/x64, Hyper-V provides a flag to indicate auto EOI functionality, but it doesn't on ARM64. Handle this quirk inline instead of calling into code under arch/x86 (and coming, under arch/arm64). No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng --- arch/x86

[PATCH v3 06/10] Drivers: hv: vmbus: Move handling of VMbus interrupts

2021-03-02 Thread Michael Kelley
, special case code is retained under arch/x86, but no VMbus interrupt handling code is needed under arch/arm64. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng --- arch/x86/include/asm/mshyperv.h | 1 - arch/x86/kernel/cpu/mshyperv.c | 13 +++-- drivers/hv/hv.c

[PATCH v3 00/10] Refactor arch specific Hyper-V code

2021-03-02 Thread Michael Kelley
to hv_remove_stimer0_handler() [Boqun Feng] * In patch 10/10, add clarifying comment that hv_setup_stimer0_irq() is not used on x86/x64 [Wei Liu] Michael Kelley (10): Drivers: hv: vmbus: Move Hyper-V page allocator to arch neutral code x86/hyper-v: Move hv_message_type to architecture neutral

RE: ** POTENTIAL FRAUD ALERT - RED HAT ** [PATCH v2 01/10] Drivers: hv: vmbus: Move Hyper-V page allocator to arch neutral code

2021-03-02 Thread Michael Kelley
From: Vitaly Kuznetsov Sent: Tuesday, March 2, 2021 4:57 AM > > Michael Kelley writes: > > > The Hyper-V page allocator functions are implemented in an architecture > > neutral way. Move them into the architecture neutral VMbus module so > > a separate implementat

RE: [PATCH v4] scsi: storvsc: Parameterize number hardware queues

2021-03-02 Thread Michael Kelley
"Resetting invalid storvsc_max_hw_queues value > to default.\n"); > + } > + if (storvsc_max_hw_queues) > + host->nr_hw_queues = storvsc_max_hw_queues; > + else > + host->nr_hw_queues = num_present_cpus; > + } > > /* >* Set the error handler work queue. > -- > 2.20.1 Reviewed-by: Michael Kelley

RE: [PATCH v2 10/10] clocksource/drivers/hyper-v: Move handling of STIMER0 interrupts

2021-03-01 Thread Michael Kelley
From: Daniel Lezcano Sent: Monday, March 1, 2021 10:45 AM > > On 01/03/2021 02:15, Michael Kelley wrote: > > STIMER0 interrupts are most naturally modeled as per-cpu IRQs. But > > because x86/x64 doesn't have per-cpu IRQs, the core STIMER0 interrupt > > handling machine

RE: [PATCH v2 08/10] clocksource/drivers/hyper-v: Handle sched_clock differences inline

2021-03-01 Thread Michael Kelley
From: Daniel Lezcano Sent: Monday, March 1, 2021 6:25 AM > > On 01/03/2021 02:15, Michael Kelley wrote: > > While the Hyper-V Reference TSC code is architecture neutral, the > > pv_ops.time.sched_clock() function is implemented for x86/x64, but not > > for ARM64. Curr

RE: [PATCH v2 07/10] clocksource/drivers/hyper-v: Handle vDSO differences inline

2021-03-01 Thread Michael Kelley
From: Daniel Lezcano Sent: Monday, March 1, 2021 4:22 AM > > On 01/03/2021 02:15, Michael Kelley wrote: > > While the driver for the Hyper-V Reference TSC and STIMERs is architecture > > neutral, vDSO is implemented for x86/x64, but not for ARM64. Current code > > call

RE: [PATCH 04/13] PCI: hyperv: Drop msi_controller structure

2021-02-28 Thread Michael Kelley
t;msi = >msi_chip; > - hbus->pci_bus->msi->dev = >hdev->device; > - > pci_lock_rescan_remove(); > pci_scan_child_bus(hbus->pci_bus); > hv_pci_assign_numa_node(hbus); > -- > 2.29.2 Reviewed-by: Michael Kelley I also tested in an Azure VM on Hyper-V, with a

[PATCH v2 06/10] Drivers: hv: vmbus: Move handling of VMbus interrupts

2021-02-28 Thread Michael Kelley
, special case code is retained under arch/x86, but no VMbus interrupt handling code is needed under arch/arm64. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng --- arch/x86/include/asm/mshyperv.h | 1 - arch/x86/kernel/cpu/mshyperv.c | 13 +++-- drivers/hv/hv.c

[PATCH v2 09/10] clocksource/drivers/hyper-v: Set clocksource rating based on Hyper-V feature

2021-02-28 Thread Michael Kelley
there is slightly different, the net result in the normal cases is no functional change. Signed-off-by: Michael Kelley --- drivers/clocksource/hyperv_timer.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource

[PATCH v2 10/10] clocksource/drivers/hyper-v: Move handling of STIMER0 interrupts

2021-02-28 Thread Michael Kelley
/x64, special case code is retained under arch/x86, but no STIMER0 interrupt handling code is needed under arch/arm64. No functional change. Signed-off-by: Michael Kelley --- arch/x86/hyperv/hv_init.c | 2 +- arch/x86/include/asm/mshyperv.h| 4 - arch/x86/kernel/cpu/mshyperv.c

[PATCH v2 08/10] clocksource/drivers/hyper-v: Handle sched_clock differences inline

2021-02-28 Thread Michael Kelley
the difference inline based on whether GENERIC_SCHED_CLOCK is present. The new approach removes code under arch/* since the difference is tied more to the specifics of the Linux implementation than to the architecture. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng

[PATCH v2 07/10] clocksource/drivers/hyper-v: Handle vDSO differences inline

2021-02-28 Thread Michael Kelley
inline based on whether VDSO_CLOCK_MODE_HVCLOCK is present. The new approach removes code under arch/* since the difference is tied more to the specifics of the Linux implementation than to the architecture. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng --- arch

[PATCH v2 05/10] Drivers: hv: vmbus: Handle auto EOI quirk inline

2021-02-28 Thread Michael Kelley
On x86/x64, Hyper-V provides a flag to indicate auto EOI functionality, but it doesn't on ARM64. Handle this quirk inline instead of calling into code under arch/x86 (and coming, under arch/arm64). No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng --- arch/x86

[PATCH v2 02/10] x86/hyper-v: Move hv_message_type to architecture neutral module

2021-02-28 Thread Michael Kelley
. As a compromise, move the entire definition into an arch neutral module, to avoid duplicating the arch neutral values for x86/x64 and for ARM64. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng --- arch/x86/include/asm/hyperv-tlfs.h | 29 - include/asm

[PATCH v2 04/10] Drivers: hv: vmbus: Move hyperv_report_panic_msg to arch neutral code

2021-02-28 Thread Michael Kelley
With the new Hyper-V MSR set function, hyperv_report_panic_msg() can be architecture neutral, so move it out from under arch/x86 and merge into hv_kmsg_dump(). This move also avoids needing a separate implementation under arch/arm64. No functional change. Signed-off-by: Michael Kelley Reviewed

[PATCH v2 03/10] Drivers: hv: Redo Hyper-V synthetic MSR get/set functions

2021-02-28 Thread Michael Kelley
synthetic MSRs that are architecture neutral. But keep the old x86-specific names as aliases that can be removed later when all references (particularly in KVM code) have been cleaned up in a separate patch series. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng

[PATCH v2 01/10] Drivers: hv: vmbus: Move Hyper-V page allocator to arch neutral code

2021-02-28 Thread Michael Kelley
The Hyper-V page allocator functions are implemented in an architecture neutral way. Move them into the architecture neutral VMbus module so a separate implementation for ARM64 is not needed. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng --- arch/x86/hyperv

[PATCH v2 00/10] Refactor arch specific Hyper-V code

2021-02-28 Thread Michael Kelley
missing call to hv_remove_stimer0_handler() [Boqun Feng] * In patch 10/10, add clarifying comment that hv_setup_stimer0_irq() is not used on x86/x64 [Wei Liu] Michael Kelley (10): Drivers: hv: vmbus: Move Hyper-V page allocator to arch neutral code x86/hyper-v: Move hv_message_type

RE: [PATCH 10/10] clocksource/drivers/hyper-v: Move handling of STIMER0 interrupts

2021-02-25 Thread Michael Kelley
From: Boqun Feng Sent: Monday, February 22, 2021 10:47 PM > > On Wed, Jan 27, 2021 at 12:23:45PM -0800, Michael Kelley wrote: > > STIMER0 interrupts are most naturally modeled as per-cpu IRQs. But > > because x86/x64 doesn't have per-cpu IRQs, the core STIMER0 interrupt >

RE: [PATCH 1/1] scsi: storvsc: Enable scatterlist entry lengths > 4Kbytes

2021-02-24 Thread Michael Kelley
From: Christoph Hellwig Sent: Wednesday, February 24, 2021 7:53 AM > > Shouldn't storvsc just use blk_queue_virt_boundary instead of all this > mess? The storvsc driver does set the virt boundary to PAGE_SIZE - 1. But the driver still has to translate the scatterlist into a list of guest

[PATCH v2 1/1] scsi: storvsc: Enable scatterlist entry lengths > 4Kbytes

2021-02-23 Thread Michael Kelley
E_SIZE != HV_HYP_PAGE_SIZE (such as ARM64). Signed-off-by: Michael Kelley --- Changes in v2: * Add HVPFN_DOWN() macro and use it instead of open coding [Vitaly Kuznetsov] * Change loop that fills pfn array and its initialization [Vitaly Kuznetsov] * Use offset_in_hvpage() instead of open coding driver

RE: [PATCH 1/1] scsi: storvsc: Enable scatterlist entry lengths > 4Kbytes

2021-02-23 Thread Michael Kelley
From: Vitaly Kuznetsov Sent: Tuesday, February 23, 2021 6:30 AM > > Michael Kelley writes: > > > storvsc currently sets .dma_boundary to limit scatterlist entries > > to 4 Kbytes, which is less efficient with huge pages that offer > > large chunks of contiguo

RE: [PATCH 09/10] clocksource/drivers/hyper-v: Set clocksource rating based on Hyper-V feature

2021-02-22 Thread Michael Kelley
From: Boqun Feng Sent: Monday, February 22, 2021 8:01 AM > > On Wed, Jan 27, 2021 at 12:23:44PM -0800, Michael Kelley wrote: > > On x86/x64, the TSC clocksource is available in a Hyper-V VM only if > > Hyper-V provides the TSC_INVARIANT flag. The rating on the Hyper-V >

RE: [PATCH v3] drivers: hv: Fix whitespace errors

2021-02-19 Thread Michael Kelley
( > vmbus_connection.ready_for_suspend_event), > .ready_for_resume_event = COMPLETION_INITIALIZER( > vmbus_connection.ready_for_resume_event), > -- > 2.25.1 Reviewed-by: Michael Kelley

RE: [PATCH printk-rework 09/14] printk: introduce a kmsg_dump iterator

2021-02-19 Thread Michael Kelley
PAGE_SIZE, >_written); > if (bytes_written) > hyperv_report_panic_msg(panic_pa, bytes_written); For the Hyper-V portion, Reviewed-by: Michael Kelley

RE: [PATCH] drivers: hv: channel: fixed a tab having spaces before hv: connection: fixed required space for "=" sign before.

2021-02-19 Thread Michael Kelley
From: Vasanth Sent: Thursday, February 18, 2021 3:15 AM > > Fixed checkpatch warning: Tab space before having normal space. > > Fixed checkpatch error: Required space for "=" sign before. > I think this commit message is appropriate. But I would still suggest simplifying the "Subject" line.

[PATCH v8 6/6] Drivers: hv: Enable Hyper-V code to be built on ARM64

2021-02-18 Thread Michael Kelley
Update drivers/hv/Kconfig so CONFIG_HYPERV can be selected on ARM64, causing the Hyper-V specific code to be built. Signed-off-by: Michael Kelley --- drivers/hv/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig index 79e5356

[PATCH v8 5/6] arm64: efi: Export screen_info

2021-02-18 Thread Michael Kelley
The Hyper-V frame buffer driver may be built as a module, and it needs access to screen_info. So export screen_info. Signed-off-by: Michael Kelley --- arch/arm64/kernel/efi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index fa02efb

[PATCH v8 2/6] arm64: hyperv: Add Hyper-V clocksource/clockevent support

2021-02-18 Thread Michael Kelley
Add architecture specific definitions and functions needed by the architecture independent Hyper-V clocksource driver. Update the Hyper-V clocksource driver to be initialized on ARM64. Signed-off-by: Michael Kelley --- arch/arm64/include/asm/mshyperv.h | 12 drivers/clocksource

[PATCH v8 0/6] Enable Linux guests on Hyper-V on ARM64

2021-02-18 Thread Michael Kelley
independent Hyper-V drivers has been eliminated by commit 6ba34171bcbd ("Drivers: hv: vmbus: Remove use of slow_virt_to_phys()") * Minor tweaks to rebase to latest linux-next code Michael Kelley (6): arm64: hyperv: Add Hyper-V hypercall and register access utilities arm64: h

[PATCH v8 3/6] arm64: hyperv: Add kexec and panic handlers

2021-02-18 Thread Michael Kelley
-by: Michael Kelley --- arch/arm64/hyperv/Makefile | 2 +- arch/arm64/hyperv/hv_core.c | 53 +++ arch/arm64/hyperv/mshyperv.c | 54 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 arch/arm64

[PATCH v8 4/6] arm64: hyperv: Initialize hypervisor on boot

2021-02-18 Thread Michael Kelley
Add ARM64-specific code to initialize the Hyper-V hypervisor when booting as a guest VM. Provide functions and data structures indicating hypervisor status that are needed by VMbus driver. This code is built only when CONFIG_HYPERV is enabled. Signed-off-by: Michael Kelley --- arch/arm64

[PATCH v8 1/6] arm64: hyperv: Add Hyper-V hypercall and register access utilities

2021-02-18 Thread Michael Kelley
of mshyperv.h in include/asm-generic. Use these definitions to provide utility functions to make Hyper-V hypercalls and to get and set Hyper-V provided registers associated with a virtual processor. Signed-off-by: Michael Kelley --- MAINTAINERS | 3 + arch/arm64/Kbuild

[PATCH 1/1] scsi: storvsc: Enable scatterlist entry lengths > 4Kbytes

2021-02-18 Thread Michael Kelley
E_SIZE != HV_HYP_PAGE_SIZE (such as ARM64). Signed-off-by: Michael Kelley --- drivers/scsi/storvsc_drv.c | 63 -- 1 file changed, 22 insertions(+), 41 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 2e4fa77..5d06061 100644 --- a/d

  1   2   3   4   5   6   7   >