[PATCH net-next 1/1] netvsc: Add #include's for csum_* function declarations

2017-05-30 Thread Michael Kelley
Add direct #include statements for declarations of csum_tcpudp_magic() and csum_ipv6_magic(). While the needed #include's are picked up indirectly for the x86 architecture, they aren't on other architectures, resulting in compile errors. Signed-off-by: Michael Kelley --- drivers/

[PATCH char-misc 1/1] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-03-11 Thread Michael Kelley
/x64 don't use an IRQ. Signed-off-by: Michael Kelley --- arch/x86/include/asm/mshyperv.h | 4 drivers/hv/hv.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index e73c4d0..b73b839 100644 --- a/arc

RE: [PATCH v2 1/4] x86/hyper-v: move synic/stimer control structures definitions to hyperv-tlfs.h

2018-11-26 Thread Michael Kelley
ude/asm/hyperv-tlfs.h | 69 ++ > drivers/hv/hv.c| 2 +- > drivers/hv/hyperv_vmbus.h | 68 - > 3 files changed, 70 insertions(+), 69 deletions(-) > Reviewed-by: Michael Kelley

RE: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-26 Thread Michael Kelley
From: Greg KH Monday, November 26, 2018 11:21 AM > > diff --git a/arch/x86/include/asm/mshyperv.h > > b/arch/x86/include/asm/mshyperv.h > > index 0d6271cce198..8d97bd3a13a6 100644 > > --- a/arch/x86/include/asm/mshyperv.h > > +++ b/arch/x86/include/asm/mshyperv.h > > @@ -109,6 +109,10 @@ void h

RE: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-26 Thread Michael Kelley
From: Greg KH Monday, November 26, 2018 11:57 AM > > > You created "null" hooks that do nothing, for no one in this patch > > > series, why? > > > > > > > hv_enable_vmbus_irq() and hv_disable_vmbus_irq() have non-null > > implementations in the ARM64 code in patch 2 of this series. The > > impl

RE: [PATCH v2 1/4] x86/hyper-v: move synic/stimer control structures definitions to hyperv-tlfs.h

2018-11-27 Thread Michael Kelley
From: Vitaly Kuznetsov Tuesday, November 27, 2018 5:11 AM > > I personally tend to prefer masks over bitfields, so I'd rather do the > > consolidation in the opposite direction: use the definitions in > > hyperv-tlfs.h and replace those unions/bitfields elsewhere. (I vaguely > > remember posting

RE: [PATCH 1/6] x86/hyper-v: Do some housekeeping in hyperv-tlfs.h

2018-12-09 Thread Michael Kelley
FY). > > Do some housekeeping work. While on it, replace all (1 << X) with BIT(X) > macro. > > Signed-off-by: Vitaly Kuznetsov > Reviewed-by: Michael Kelley

RE: [PATCH 2/6] x86/hyper-v: Drop HV_X64_CONFIGURE_PROFILER definition

2018-12-09 Thread Michael Kelley
e dropped. > > Signed-off-by: Vitaly Kuznetsov Reviewed-by: Michael Kelley

RE: [PATCH v2] x86/hyper-v: Mark TLFS structures packed

2018-12-02 Thread Michael Kelley
From: Vitaly Kuznetsov Sent: Friday, November 30, 2018 4:54 AM > > @@ -466,7 +466,7 @@ union hv_message_flags { > struct { > __u8 msg_pending:1; > __u8 reserved:7; > - }; > + } __packed; > }; > > /* Define port identifier type. */ I think __packed i

RE: [PATCH 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-12-02 Thread Michael Kelley
From: Will Deacon Sent: Tuesday, November 27, 2018 2:19 AM > > > The general approach is for patches 1 and 2 of the series to provide > > > all the new code under arch/arm64 to enable Hyper-V. But the code > > > won't get called (or even built) with just these two patches because > > > CONFIG_

RE: [PATCH v3] x86/hyper-v: Mark TLFS structures packed

2018-12-03 Thread Michael Kelley
d to struct 'u' defined within union 'hv_port_id' >[Michael Kelley] > > - This is a follow-up to my "[PATCH v2 0/4] x86/kvm/hyper-v: Implement > Direct Mode for synthetic timers" series, as suggested by Thomas I'm > routing it to KVM tree to avoid merge conflicts. > --- Reviewed-by: Michael Kelley

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

2018-06-19 Thread Michael Kelley
hing more generic, so the code uses the Hyper-V terminology. This will be fixed when Hyper-V updates the usage in the TLFS. Michael Kelley (5): arm64: mm: Add slow_virt_to_phys() arm64: hyperv: Add core Hyper-V include files arm64: hyperv: Add support for Hyper-V as a hypervisor Drivers:

[PATCH 1/5] arm64: mm: Add slow_virt_to_phys()

2018-06-19 Thread Michael Kelley
Add slow_virt_to_phys() function for ARM64 that parallels the same function on x86/x64. This is needed by the architecture independent Hyper-V VMbus driver at drivers/hv/channel.c. The implementation directly translates the virtual address using the ARM64 'at' instruction. Signed-off-b

[PATCH 2/5] arm64: hyperv: Add core Hyper-V include files

2018-06-19 Thread Michael Kelley
formally published. The TLFS is available here: docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs mshyperv.h defines Linux-specific structures and routines for interacting with Hyper-V on ARM64. Signed-off-by: Michael Kelley Reviewed-by: James Morris --- MAINTAINERS

[PATCH 5/5] Drivers: hv: Enable CONFIG_HYPERV on ARM64

2018-06-19 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: James Morris --- drivers/hv/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hv/Kconfig b/drivers

[PATCH 3/5] arm64: hyperv: Add support for Hyper-V as a hypervisor

2018-06-19 Thread Michael Kelley
This code is architecture dependent code and is mostly driven by architecture independent code in the VMbus driver in drivers/hv/hv.c and drivers/hv/vmbus_drv.c. This code is built only when CONFIG_HYPERV is enabled. Signed-off-by: Michael Kelley Reviewed-by: James Morris --- MAINTA

[PATCH 4/5] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-06-19 Thread Michael Kelley
ff-by: Michael Kelley Reviewed-by: James Morris --- arch/x86/include/asm/mshyperv.h | 4 drivers/hv/hv.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index 3cd1431..27d0e83 100644 --- a/arch/x86/includ

[PATCH 1/1] scsi: storvsc: Avoid allocating memory for temp cpumasks

2018-05-17 Thread Michael Kelley
Current code allocates 240 Kbytes (in typical configs) for each synthetic SCSI controller to use as temp cpumask variables. Recode to avoid needing the temp cpumask variables and remove the memory allocation. Signed-off-by: Michael Kelley --- This patch is for the 4.18/scsi-queue branch and

RE: [PATCH 1/4] arm64: hyperv: Add core Hyper-V include files

2018-12-11 Thread Michael Kelley
ndows/reference/tlfs > > > > mshyperv.h defines Linux-specific structures and routines for > > interacting with Hyper-V. It is split into an ARM64 specific file > > and an architecture independent file in include/asm-generic. > > > > Signed-off-by: Michael Kelley &

RE: [PATCH 2/4] arm64: hyperv: Add support for Hyper-V as a hypervisor

2018-12-11 Thread Michael Kelley
yered patches in the next version. > > > This code is architecture dependent code and is mostly driven by > > architecture independent code in the VMbus driver in drivers/hv/hv.c > > and drivers/hv/vmbus_drv.c. > > > > This code is built only when CONFIG_HYPER

[PATCH 1/1] scsi: storvsc: Always use blk-mq

2018-12-19 Thread Michael Kelley
With high IOPS storage being increasingly prevalent for guests on Hyper-V and in Azure, make blk-mq the default so that the full performance of the storage can be realized without having to tweak other configuration settings. Signed-off-by: Michael Kelley --- drivers/scsi/storvsc_drv.c | 1 + 1

[PATCH 1/1] x86/hyper-v: Fix 'set but not used' warnings

2018-12-21 Thread Michael Kelley
In these two cases, a value returned by rdmsr() or rdmsrl() is ignored. Indicate that ignoring the value is intentional, so that with the W=1 compilation option no warning is generated. Signed-off-by: Michael Kelley --- arch/x86/hyperv/hv_apic.c | 2 +- arch/x86/hyperv/hv_spinlock.c | 2

RE: [PATCH 2/4] arm64: hyperv: Add support for Hyper-V as a hypervisor

2019-01-04 Thread Michael Kelley
From: Marc Zyngier Sent: Thursday, December 13, 2018 3:23 AM > >> As Will said, this isn't a viable option. Please follow SMCCC 1.1. > > > > I'll have to start a conversation with the Hyper-V team about this. > > I don't know why they chose to use HVC #1 or this register scheme > > for output va

RE: [PATCH v2] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-05 Thread Michael Kelley
From: Kimberly Brown Sent: Friday, January 4, 2019 8:35 PM > static inline void set_channel_pending_send_size(struct vmbus_channel *c, >u32 size) > { > + if (size) { > + ++c->out_full_total; > + > + if (!c->out_full_f

RE: [PATCH] Choose CPU based on allocated IRQs

2018-10-29 Thread Michael Kelley
to this IRQ. > > Change to choose CPU for an IRQ based on how many IRQs are already allocated > on this CPU. > > Signed-off-by: Long Li Reviewed-by: Michael Kelley

RE: [PATCH v2 char-misc 1/1] x86/hyperv: Fix PIT shutdown quirk

2018-10-30 Thread Michael Kelley
From: Thomas Gleixner Sent: Tuesday, October 30, 2018 1:36 AM > > You can avoid the ideffery completely. Something like the uncompiled patch > (lacks comments) below keeps everything in i8253 and should just work. > Thanks. I'll spin a new version with that approach. Having to clutter the i

[PATCH 1/1] irq/matrix: Fix memory overallocation

2018-10-31 Thread Michael Kelley
the correct size. Signed-off-by: Michael Kelley --- kernel/irq/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/matrix.c b/kernel/irq/matrix.c index 6e6d467..1f0985a 100644 --- a/kernel/irq/matrix.c +++ b/kernel/irq/matrix.c @@ -8,7 +8,7 @@ #include

[PATCH char-misc 1/1] x86/hyperv: Fix PIT shutdown quirk

2018-10-17 Thread Michael Kelley
th an alternate version that works on Hyper-V. The alternate shutdown function could go in the i8253.c module, but it seems better to keep the hack with the Hyper-V code rather than clutter up i8253.c with #ifdef CONFIG_HYPERV. Signed-off-by: Michael Kelley --- arch/x86/hyperv/hv_init.c

RE: [tip:irq/core] genirq/matrix: Improve target CPU selection for managed interrupts.

2018-11-07 Thread Michael Kelley
From: tip tree robot Sent: Tuesday, November 6, 2018 2:28 PM > > Committer: Thomas Gleixner > CommitDate: Tue, 6 Nov 2018 23:20:13 +0100 > > 2) Managed interrupts: > > Managed interrupts guarantee vector reservation when the MSI/MSI-X > functionality of a device is enabled, which is

RE: [tip:irq/core] genirq/matrix: Improve target CPU selection for managed interrupts.

2018-11-07 Thread Michael Kelley
From: Thomas Gleixner Sent: Wednesday, November 7, 2018 12:23 PM > > There is another interesting property of managed interrupts vs. CPU > hotplug. When the last CPU in the affinity mask goes offline, then the core > code shuts down the interrupt and the device driver and related layers > exclu

RE: [PATCH] genirq/affinity: Spread IRQs to all available NUMA nodes

2018-11-02 Thread Michael Kelley
From: Long Li Sent: Thursday, November 1, 2018 4:52 PM > > --- a/kernel/irq/affinity.c > +++ b/kernel/irq/affinity.c > @@ -117,12 +117,13 @@ static int irq_build_affinity_masks(const struct > irq_affinity *affd, >*/ > if (numvecs <= nodes) { > for_each_node_mask(n, n

[PATCH v3 4/4] Drivers: hv: Enable CONFIG_HYPERV on ARM64

2018-11-02 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 97954f5

[PATCH v3 0/4] Subject: Enable Linux guests on Hyper-V on ARM64

2018-11-02 Thread Michael Kelley
-next code 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

[PATCH v3 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ

2018-11-02 Thread Michael Kelley
ff-by: Michael Kelley --- arch/x86/include/asm/mshyperv.h | 4 drivers/hv/hv.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index 0d6271c..8d97bd3 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arc

[PATCH v3 2/4] arm64: hyperv: Add support for Hyper-V as a hypervisor

2018-11-02 Thread Michael Kelley
This code is architecture dependent code and is mostly driven by architecture independent code in the VMbus driver in drivers/hv/hv.c and drivers/hv/vmbus_drv.c. This code is built only when CONFIG_HYPERV is enabled. Signed-off-by: Michael Kelley --- MAINTAINERS | 1 + arch/

[PATCH v3 1/4] arm64: hyperv: Add core Hyper-V include files

2018-11-02 Thread Michael Kelley
-generic. Signed-off-by: Michael Kelley --- MAINTAINERS | 3 + arch/arm64/include/asm/hyperv-tlfs.h | 338 +++ arch/arm64/include/asm/mshyperv.h| 116 include/asm-generic/mshyperv.h | 240 + 4

RE: [PATCH V2 1/5] Drivers: hv: vmbus: Get rid of unnecessary state in hv_context

2018-10-24 Thread Michael Kelley
global state in struct hv_context. > Get rid of this state in struct hv_context. > > Signed-off-by: K. Y. Srinivasan > --- > drivers/hv/hv.c | 10 +++--- > drivers/hv/hyperv_vmbus.h | 2 -- > 2 files changed, 3 insertions(+), 9 deletions(-) > Reviewed-by: Michael Kelley

RE: [PATCH V2 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-24 Thread Michael Kelley
Srinivasan > --- > drivers/hv/hv_kvp.c | 26 ++ > 1 file changed, 22 insertions(+), 4 deletions(-) > Reviewed-by: Michael Kelley

RE: [PATCH v1 2/2] x86/hyperv: make HvNotifyLongSpinWait hypercall

2018-10-24 Thread Michael Kelley
From: Yi Sun Sent: Friday, October 19, 2018 6:14 AM > > The HvNotifyLongSpinWait hypercall (HVCALL_NOTIFY_LONG_SPIN_WAIT) > is used by a guest OS to notify the hypervisor that the calling > virtual processor is attempting to acquire a resource that is > potentially held by another virtual proces

RE: [PATCH V2 3/4] vmbus: add per-channel sysfs info

2018-10-18 Thread Michael Kelley
>From Olaf Hering Sent: Thursday, October 18, 2018 8:20 AM > > > This extends existing vmbus related sysfs structure to provide per-channel > > state information. This is useful when diagnosing issues with multiple > > queues in networking and storage. > > > +++ b/drivers/hv/vmbus_drv.c > > +stat

[PATCH v2 char-misc 1/1] x86/hyperv: Fix PIT shutdown quirk

2018-10-22 Thread Michael Kelley
rnate version that works on Hyper-V. The alternate shutdown function could go in the i8253.c module, but it seems better to keep the hack with the Hyper-V code rather than clutter up i8253.c with #ifdef CONFIG_HYPERV. Signed-off-by: Michael Kelley --- Changes in v2: * Fixed commit message and comme

[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: ** 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

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

2021-04-20 Thread Michael Kelley
CALL_REP_START_MASK; > + 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: [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: Mich

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 a/arch/x86/ke

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 T

[PATCH char-misc 1/1] x86/hyperv: Add interrupt handler annotations

2018-04-03 Thread Michael Kelley
Add standard interrupt handler annotations to hyperv_vector_handler(). Signed-off-by: Michael Kelley --- arch/x86/kernel/cpu/mshyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index 4488cf0..20f6849

RE: [PATCH v4] Drivers: hv: vmbus: Expose monitor data only when monitor pages are used

2019-03-02 Thread Michael Kelley
From: Kimberly Brown Sent: Friday, March 1, 2019 11:18 AM > > +/* > + * Channel-level attribute_group callback function. Returns the permission > for > + * each attribute, and returns 0 if an attribute is not visible. > + */ > +static umode_t vmbus_chan_attr_is_visible(struct kobject *kobj, >

[PATCH 0/2] Drivers: hv: Move Hyper-V clock/timer code to separate clocksource driver

2019-03-12 Thread Michael Kelley
rsion of the Hyper-V on ARM64 patches will follow once this clocksource restructuring is accepted. The code is currently diff'ed against Linux 5.0. I'll rebase to linux-next once 5.1-rc1 is available. Michael Kelley (2): Drivers: hv: Move Hyper-V clockevents code to new clocksource d

[PATCH 1/2] Drivers: hv: Move Hyper-V clockevents code to new clocksource driver

2019-03-12 Thread Michael Kelley
ependently enumerated in ACPI. No behavior is changed and no new functionality is added. Signed-off-by: Michael Kelley --- MAINTAINERS | 2 + arch/x86/include/asm/hyperv-tlfs.h| 6 + arch/x86/kernel/cpu/mshyperv.c| 2 + drivers/clocksource/Makefile

[PATCH 2/2] Drivers: hv: Move Hyper-V clocksource code to new clocksource driver

2019-03-12 Thread Michael Kelley
ation code to call initialization and cleanup routines since the Hyper-V synthetic timers are not independently enumerated in ACPI. Update Hyper-V clocksource users KVM and VDSO to get definitions from a new include file. No behavior is changed and no new functionality is added. Signed-off-by: Mich

RE: [PATCH 0/2] Drivers: hv: Move Hyper-V clock/timer code to separate clocksource driver

2019-03-12 Thread Michael Kelley
From: gre...@linuxfoundation.org Sent: Tuesday, March 12, 2019 2:47 PM > > > > Michael Kelley (2): > > Drivers: hv: Move Hyper-V clockevents code to new clocksource driver > > Drivers: hv: Move Hyper-V clocksource code to new clocksource driver > > You have

RE: [PATCH 1/2] Drivers: hv: Move Hyper-V clockevents code to new clocksource driver

2019-03-13 Thread Michael Kelley
From: Vitaly Kuznetsov Sent: Wednesday, March 13, 2019 1:28 AM > > > Clockevents code for Hyper-V synthetic timers is currently mixed > > in with other Hyper-V code. Move the code to a Hyper-V specific > > driver in the "clocksource" directory. Update the VMbus driver > > to call initialization

RE: [PATCH 1/2] Drivers: hv: Move Hyper-V clockevents code to new clocksource driver

2019-03-13 Thread Michael Kelley
From: Vitaly Kuznetsov Sent: Wednesday, March 13, 2019 7:23 AM > >> > diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile > >> > index be6e0fb..a887955 100644 > >> > --- a/drivers/clocksource/Makefile > >> > +++ b/drivers/clocksource/Makefile > >> > @@ -83,3 +83,4 @@ obj-$(C

RE: [PATCH] nfit: add Hyper-V NVDIMM DSM command set to white list

2019-01-26 Thread Michael Kelley
+- > include/uapi/linux/ndctl.h | 1 + > 3 files changed, 10 insertions(+), 2 deletions(-) > Reviewed-by: Michael Kelley

RE: [PATCH 3/3] PCI: hv: Add pci_destroy_slot() in pci_devices_present_work(), if necessary

2019-03-26 Thread Michael Kelley
From: Dexuan Cui Sent: Wednesday, March 20, 2019 5:36 PM > > > From: Michael Kelley > > > ... > > > diff --git a/drivers/pci/controller/pci-hyperv.c > > > @@ -1776,6 +1776,10 @@ static void pci_devices_present_work(struct > > work_struct *work) > &g

RE: [PATCH V5 0/3] x86/Hyper-V/IOMMU: Add Hyper-V IOMMU driver to support x2apic mode

2019-02-25 Thread Michael Kelley
we're hoping that it can get into linux-next this week (given the extra week due to 5.0-rc8). Thanks, Michael Kelley

RE: [PATCH V6 1/3] x86/Hyper-V: Set x2apic destination mode to physical when x2apic is available

2019-02-27 Thread Michael Kelley
e > 8-bit APIC id. > > Reviewed-by: Thomas Gleixner > Reviewed-by: Michael Kelley > Signed-off-by: Lan Tianyu > --- > Change since v5: >- Fix comile error due to x2apic_phys > > Change since v2: >- Fix compile error due to x2apic_ph

RE: [PATCH V6 2/3] IOMMU/Hyper-V: Add Hyper-V stub IOMMU driver

2019-02-27 Thread Michael Kelley
4 IO-APIC remapping entries because Hyper-V only expose one > single IO-APIC and one IO-APIC has 24 pins according IO-APIC spec( > https://pdos.csail.mit.edu/6.828/2016/readings/ia32/ioapic.pdf). > > Reviewed-by: Michael Kelley > Signed-off-by: Lan Tianyu Reconfirming my reviewed-by

RE: linux-next: Tree for Feb 27 (mshyperv)

2019-02-27 Thread Michael Kelley
From: Randy Dunlap Sent: Wednesday, February 27, 2019 9:25 AM > > on i386: > > ../arch/x86/kernel/cpu/mshyperv.c: In function 'ms_hyperv_init_platform': > ../arch/x86/kernel/cpu/mshyperv.c:339:3: error: 'x2apic_phys' undeclared > (first use in this > function) >x2apic_phys = 1; >^ FYI,

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

2021-02-12 Thread Michael Kelley
From: Melanie Plageman Sent: Thursday, February 11, 2021 3:18 PM > > Add ability to set the number of hardware queues with new module parameter, > storvsc_max_hw_queues. The default value remains the number of CPUs. This > functionality is useful in some environments (e.g. Microsoft Azure) wher

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 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 contiguous p

[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-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 phys

RE: [PATCH] Staging: hv: channel.c: fixed a tab spaces before space hv: connection.c fixed a "=" sign without space in code

2021-02-17 Thread Michael Kelley
From: Vasanth Sent: Wednesday, February 17, 2021 6:22 AM > > Signed-off-by: Vasanth Mathivanan > --- > drivers/hv/channel.c| 2 +- > drivers/hv/connection.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c > index 6fb0c

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

2021-02-17 Thread Michael Kelley
From: Melanie Plageman Sent: Wednesday, February 17, 2021 4:05 PM > > On Fri, Feb 12, 2021 at 04:35:16PM +, Michael Kelley wrote: > > From: Melanie Plageman Sent: Thursday, February > > 11, > 2021 3:18 PM > > > > > > Add ability to set the nu

[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

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

2021-02-18 Thread Michael Kelley
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 v8 3/6] arm64: hyperv: Add kexec and panic handlers

2021-02-18 Thread Michael Kelley
: 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 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
_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 code Michael Kelley (6): arm64: hyperv: Add Hyper-V hypercall and register access utili

[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 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

RE: [PATCH v5 15/16] x86/hyperv: implement an MSI domain for root partition

2021-02-02 Thread Michael Kelley
From: Wei Liu Sent: Tuesday, February 2, 2021 9:32 AM > > On Wed, Jan 27, 2021 at 05:47:04AM +, Michael Kelley wrote: > > From: Wei Liu Sent: Wednesday, January 20, 2021 4:01 AM > > > > > > When Linux runs as the root partition on Microsoft Hypervisor, its

RE: [PATCH v2 1/4] x86/hyperv: Load/save the Isolation Configuration leaf

2021-01-28 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Tuesday, January 26, 2021 3:57 AM > > If bit 22 of Group B Features is set, the guest has access to the > Isolation Configuration CPUID leaf. On x86, the first four bits > of EAX in this leaf provide the isolation type of the partition; > we entail three iso

RE: [PATCH v2 3/4] Drivers: hv: vmbus: Enforce 'VMBus version >= 5.2' on isolated guests

2021-01-28 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Tuesday, January 26, 2021 3:57 AM > > Restrict the protocol version(s) that will be negotiated with the host > to be 5.2 or greater if the guest is running isolated. This reduces the > footprint of the code that will be exercised by Confidential VMs and > he

RE: [PATCH v2 2/4] Drivers: hv: vmbus: Restrict vmbus_devices on isolated guests

2021-01-28 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Tuesday, January 26, 2021 3:57 AM > > Only the VSCs or ICs that have been hardened and that are critical for > the successful adoption of Confidential VMs should be allowed if the > guest is running isolated. This change reduces the footprint of the > code t

RE: [PATCH v2 4/4] hv_netvsc: Restrict configurations on isolated guests

2021-01-28 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Tuesday, January 26, 2021 3:57 AM > > Restrict the NVSP protocol version(s) that will be negotiated with the > host to be NVSP_PROTOCOL_VERSION_61 or greater if the guest is running > isolated. Moreover, do not advertise the SR-IOV capability and ignore > NV

RE: [PATCH v3 hyperv-next 1/4] x86/hyperv: Load/save the Isolation Configuration leaf

2021-02-01 Thread Michael Kelley
; u32 max_vp_index; > u32 max_lp_index; > + u32 isolation_config_a; > + u32 isolation_config_b; > }; > extern struct ms_hyperv_info ms_hyperv; > > @@ -169,6 +172,8 @@ void hyperv_report_panic(struct pt_regs *regs, long err, > bool > in_die); > void hyperv_report_panic_msg(phys_addr_t pa, size_t size); > bool hv_is_hyperv_initialized(void); > bool hv_is_hibernation_supported(void); > +enum hv_isolation_type hv_get_isolation_type(void); > +bool hv_is_isolation_supported(void); > void hyperv_cleanup(void); > #else /* CONFIG_HYPERV */ > static inline bool hv_is_hyperv_initialized(void) { return false; } > -- > 2.25.1 Reviewed-by: Michael Kelley

RE: [PATCH v3 hyperv-next 2/4] Drivers: hv: vmbus: Restrict vmbus_devices on isolated guests

2021-02-01 Thread Michael Kelley
child_relid); > + atomic_dec(&vmbus_connection.offer_in_progress); > + return; > + } > + > oldchannel = find_primary_channel_by_offer(offer); > > if (oldchannel != NULL) { > diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h > index f0d48a368f131..e3426f8c12db9 100644 > --- a/include/linux/hyperv.h > +++ b/include/linux/hyperv.h > @@ -789,6 +789,7 @@ struct vmbus_device { > u16 dev_type; > guid_t guid; > bool perf_device; > + bool allowed_in_isolated; > }; > > #define VMBUS_DEFAULT_MAX_PKT_SIZE 4096 > -- > 2.25.1 Reviewed-by: Michael Kelley

RE: [PATCH v3 hyperv-next 3/4] Drivers: hv: vmbus: Enforce 'VMBus version >= 5.2' on isolated guests

2021-02-01 Thread Michael Kelley
t; + goto cleanup; > + } > + > vmbus_proto_version = version; > pr_info("Vmbus version:%d.%d\n", > version >> 16, version & 0x); > -- > 2.25.1 Reviewed-by: Michael Kelley

RE: [PATCH v3 hyperv-next 4/4] hv_netvsc: Restrict configurations on isolated guests

2021-02-01 Thread Michael Kelley
len); > + if (hv_is_isolation_supported()) > + netdev_err(ndev, "Ignore VF_ASSOCIATION msg from the > host supporting isolation\n"); > + else > + netvsc_send_vf(ndev, nvmsg, msglen); > break; > } > } > -- > 2.25.1 Reviewed-by: Michael Kelley

RE: [PATCH][next] hv: hyperv.h: Replace one-element array with flexible-array in struct icmsg_negotiate

2021-02-01 Thread Michael Kelley
; > u16 icmsg_vercnt; > u32 reserved; > - struct ic_version icversion_data[1]; /* any size array */ > + struct ic_version icversion_data[]; /* any size array */ > } __packed; > > struct shutdown_msg_data { > -- > 2.27.0 Reviewed-by: Michael Kelley

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

2021-02-04 Thread Michael Kelley
From: Wei Liu Sent: Monday, February 1, 2021 10:55 AM > > On Wed, Jan 27, 2021 at 12:23:43PM -0800, Michael Kelley wrote: > [...] > > +/* > > + * Reference to pv_ops must be inline so objtool > > + * detection of noinstr violations can work correctly. > > + */

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

2021-02-04 Thread Michael Kelley
From: Wei Liu Sent: Monday, February 1, 2021 11:53 AM > > On Wed, Jan 27, 2021 at 12:23:45PM -0800, Michael Kelley wrote: > [...] > > +static int hv_setup_stimer0_irq(void) > > +{ > > + int ret; > > + > > + ret = acpi_r

RE: [PATCH v5 07/16] x86/hyperv: extract partition ID from Microsoft Hypervisor if necessary

2021-02-04 Thread Michael Kelley
From: Wei Liu Sent: Tuesday, February 2, 2021 7:04 AM > > On Tue, Jan 26, 2021 at 12:48:37AM +, Michael Kelley wrote: > > From: Wei Liu Sent: Wednesday, January 20, 2021 4:01 AM > > > > > > We will need the partition ID for executing some hypercalls later. >

RE: [PATCH v5 13/16] asm-generic/hyperv: introduce hv_device_id and auxiliary structures

2021-02-04 Thread Michael Kelley
From: Wei Liu Sent: Wednesday, February 3, 2021 6:09 AM > > On Wed, Feb 03, 2021 at 02:49:53PM +0100, Arnd Bergmann wrote: > > On Wed, Feb 3, 2021 at 2:26 PM Wei Liu wrote: > > > On Tue, Feb 02, 2021 at 05:02:48PM +, Wei Liu wrote: > > > > On Tue, Jan 26,

RE: [PATCH v6 02/16] x86/hyperv: detect if Linux is the root partition

2021-02-04 Thread Michael Kelley
+ * interface (a process to be finalized). > + * > + * For now, use the privilege flag as the indicator for running as > + * root. > + */ > + if (cpuid_ebx(HYPERV_CPUID_FEATURES) & HV_CPU_MANAGEMENT) { > + hv_root_partition = true; > + pr_info("Hyper-V: running as root partition\n"); > + } > + > /* >* Extract host information. >*/ > -- > 2.20.1 Reviewed-by: Michael Kelley

RE: [PATCH v6 06/16] x86/hyperv: extract partition ID from Microsoft Hypervisor if necessary

2021-02-04 Thread Michael Kelley
> #define HVCALL_SET_VP_REGISTERS 0x0051 > #define HVCALL_POST_MESSAGE 0x005c > @@ -407,6 +408,11 @@ struct hv_tlb_flush_ex { > u64 gva_list[]; > } __packed; > > +/* HvGetPartitionId hypercall (output only) */ > +struct hv_get_partition_id { > + u64 partition_id; > +} __packed; > + > /* HvRetargetDeviceInterrupt hypercall */ > union hv_msi_entry { > u64 as_uint64; > -- > 2.20.1 Reviewed-by: Michael Kelley

RE: [PATCH v6 05/16] x86/hyperv: allocate output arg pages if required

2021-02-04 Thread Michael Kelley
GFP_KERNEL); > diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h > index ac2b0d110f03..62d9390f1ddf 100644 > --- a/arch/x86/include/asm/mshyperv.h > +++ b/arch/x86/include/asm/mshyperv.h > @@ -76,6 +76,7 @@ static inline void hv_disable_stimer0_percpu_irq(int irq) {} > #if IS_ENABLED(CONFIG_HYPERV) > extern void *hv_hypercall_pg; > extern void __percpu **hyperv_pcpu_input_arg; > +extern void __percpu **hyperv_pcpu_output_arg; > > static inline u64 hv_do_hypercall(u64 control, void *input, void *output) > { > -- > 2.20.1 Reviewed-by: Michael Kelley

RE: [PATCH v6 09/16] x86/hyperv: provide a bunch of helper functions

2021-02-04 Thread Michael Kelley
rely on acpi code > --- > arch/x86/hyperv/Makefile | 2 +- > arch/x86/hyperv/hv_proc.c | 219 ++ > arch/x86/include/asm/mshyperv.h | 4 + > include/asm-generic/hyperv-tlfs.h | 67 +++++ > 4 files changed, 291 insertions(+), 1 deletion(-) > create mode 100644 arch/x86/hyperv/hv_proc.c > Reviewed-by: Michael Kelley

RE: [PATCH v6 13/16] asm-generic/hyperv: introduce hv_device_id and auxiliary structures

2021-02-04 Thread Michael Kelley
e_type:2; > + } pci; > + > + /* HV_DEVICE_TYPE_IOAPIC */ > + struct { > + u8 ioapic_id; > + u8 rsvdz0; > + u16 rsvdz1; > + u16 rsvdz2; > + > + u16 rsvdz3:14; > + u16 device_type:2; > + } ioapic; > + > + /* HV_DEVICE_TYPE_ACPI */ > + struct { > + u32 input_mapping_base; > + u32 input_mapping_count:30; > + u32 device_type:2; > + } acpi; > +} __packed; > + > #endif > -- > 2.20.1 Reviewed-by: Michael Kelley

RE: [PATCH v6 15/16] x86/hyperv: implement an MSI domain for root partition

2021-02-04 Thread Michael Kelley
From: Wei Liu Sent: Wednesday, February 3, 2021 7:05 AM > > When Linux runs as the root partition on Microsoft Hypervisor, its > interrupts are remapped. Linux will need to explicitly map and unmap > interrupts for hardware. > > Implement an MSI domain to issue the correct hypercalls. And initi

RE: [PATCH v6 16/16] iommu/hyperv: setup an IO-APIC IRQ remapping domain for root partition

2021-02-04 Thread Michael Kelley
ertions(+), 3 deletions(-) > Reviewed-by: Michael Kelley

RE: [PATCH v6 15/16] x86/hyperv: implement an MSI domain for root partition

2021-02-04 Thread Michael Kelley
From: Wei Liu Sent: Thursday, February 4, 2021 9:57 AM > > On Thu, Feb 04, 2021 at 05:43:16PM +, Michael Kelley wrote: > [...] > > > remove_cpuhp_state: > > > diff --git a/arch/x86/hyperv/irqdomain.c b/arch/x86/hyperv/irqdomain.c > > > new file

RE: [PATCH v5 16/16] iommu/hyperv: setup an IO-APIC IRQ remapping domain for root partition

2021-02-04 Thread Michael Kelley
From: Wei Liu Sent: Wednesday, February 3, 2021 4:47 AM > > On Wed, Jan 27, 2021 at 05:47:08AM +, Michael Kelley wrote: > > From: Wei Liu Sent: Wednesday, January 20, 2021 4:01 AM > > > > > > Just like MSI/MSI-X, IO-APIC interrupts are remapped by Microsoft &g

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

2021-02-04 Thread Michael Kelley
From: Sunil Muthuswamy Sent: Wednesday, January 6, 2021 3:21 PM > > Linux has support for free page reporting now (36e66c554b5c) for > virtualized environment. On Hyper-V when virtually backed VMs are > configured, Hyper-V will advertise cold memory discard capability, > when supported. This pat

  1   2   3   4   5   6   >