Re: [Xen-devel] [PATCH RFC 4/4] xen-block: introduce a new request type to unmap grants

2013-07-09 Thread Wei Liu
On Mon, Jul 08, 2013 at 03:41:52PM -0400, Konrad Rzeszutek Wilk wrote: > On Mon, Jul 08, 2013 at 03:03:27PM +0200, Roger Pau Monne wrote: > > Right now blkfront has no way to unmap grant refs, if using persistent > > grants once a grant is used blkfront cannot assure if blkback will > > have this g

Re: [Xen-devel] [PATCH RFC 4/4] xen-block: introduce a new request type to unmap grants

2013-07-09 Thread Wei Liu
On Tue, Jul 09, 2013 at 02:32:07PM -0400, Konrad Rzeszutek Wilk wrote: > On Tue, Jul 09, 2013 at 06:37:58PM +0200, Roger Pau Monné wrote: > > On 08/07/13 21:41, Konrad Rzeszutek Wilk wrote: > > > On Mon, Jul 08, 2013 at 03:03:27PM +0200, Roger Pau Monne wrote: > > >> Right now blkfront has no way t

Re: [Xen-devel] [PATCH 08/14] xen: netback: Remove redundant check on unsigned variable

2012-12-28 Thread Wei Liu
On Fri, 2012-12-28 at 05:15 +, Tushar Behera wrote: > On 11/16/2012 02:46 PM, Ian Campbell wrote: > > On Fri, 2012-11-16 at 06:50 +, Tushar Behera wrote: > >> No need to check whether unsigned variable is less than 0. > >> > >> CC: Ian Campbell > >> CC: xen-de...@lists.xensource.com > >> C

Re: [PATCH next] xen: Use more current logging styles

2013-06-28 Thread Wei Liu
On Thu, Jun 27, 2013 at 09:57:49PM -0700, Joe Perches wrote: > Instead of mixing printk and pr_ forms, > just use pr_ > > Miscellaneous changes around these conversions: > > Add a missing newline to avoid message interleaving, > coalesce formats, reflow modified lines to 80 columns. > Do you al

Re: [PATCH next] xen: Convert printks to pr_

2013-06-28 Thread Wei Liu
word spaces > Add missing newlines > Align arguments and reflow to 80 columns > Remove DRV_NAME from formats as pr_fmt adds the same content > > This does change some of the prefixes of these messages > but it also does make them more consistent. > > Signed-off-by: Joe Perches

Re: [Xen-devel] [PATCH] xen: switch to threaded irq in netback

2016-09-21 Thread Wei Liu
pen coding it use the threaded irq mechanism in > xen-netback. > > Signed-off-by: Juergen Gross The code looks OK: Acked-by: Wei Liu Wei.

Re: [PATCH resend 2] xen-netback: switch to threaded irq for control ring

2016-09-22 Thread Wei Liu
On Thu, Sep 22, 2016 at 11:06:25AM +0200, Juergen Gross wrote: > Instead of open coding it use the threaded irq mechanism in > xen-netback. > > Signed-off-by: Juergen Gross Acked-by: Wei Liu

Re: [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values

2017-10-16 Thread Wei Liu
he guest can no longer be pinged. > > xen_net{front|back} should not allow the user to set this value which causes > network problems. > > Reported-by: Chen Shi > Signed-off-by: Mohammed Gamal Acked-by: Wei Liu CC netfront maintainers

Re: [PATCH v4 18/20] net/xen-netback: Make it running on 64KB page granularity

2015-09-07 Thread Wei Liu
k backend on a non-modified Xen. > > It's only necessary to adapt the ring size and break skb data in small > chunk of 4KB. The rest of the code is relying on the grant table code. > > Signed-off-by: Julien Grall > Reviewed-by: Wei Liu -- To unsubscribe from this list:

Re: [Xen-devel] [PATCH v4 18/20] net/xen-netback: Make it running on 64KB page granularity

2015-09-08 Thread Wei Liu
On Tue, Sep 08, 2015 at 12:07:31PM +0100, Julien Grall wrote: > Hi Wei, > > On 07/09/15 17:57, Wei Liu wrote: > > You might need to rebase you patch. A patch to netback went it recently. > > Do you mean 210c34dcd8d912dcc740f1f17625a7293af5cb56 "xen-netback: add >

Re: [PATCH] xen-netback: corretly check failed allocation

2015-10-15 Thread Wei Liu
On Thu, Oct 15, 2015 at 12:26:16PM -0400, Insu Yun wrote: > Since vzalloc can be failed in memory pressure, > return value should be checked and return ENOMEM. This function doesn't return ENOMEM, instead it writes to xenstore to indicate error. The commit log needs to be updated. > > Signed-off

Re: [PATCH] xen-netback: correctly check failed allocation

2015-10-16 Thread Wei Liu
On Thu, Oct 15, 2015 at 02:02:47PM -0400, Insu Yun wrote: > I changed patch with valid format. > > On Thu, Oct 15, 2015 at 2:02 PM, Insu Yun wrote: > > > Since vzalloc can be failed in memory pressure, > > writes -ENOMEM to xenstore to indicate error. > > > > Signed-off-by: Insu Yun > > --- > >

Re: [PATCH] xen-netback: correctly check failed allocation

2015-10-16 Thread Wei Liu
On Fri, Oct 16, 2015 at 10:05:21AM +0100, Wei Liu wrote: > On Thu, Oct 15, 2015 at 02:02:47PM -0400, Insu Yun wrote: > > I changed patch with valid format. > > > > On Thu, Oct 15, 2015 at 2:02 PM, Insu Yun wrote: > > > > > Since vzalloc can be failed in memo

Re: [Xen-devel] [PATCH v3 2/9] xen-block: add document for mutli hardware queues/rings

2015-10-02 Thread Wei Liu
On Fri, Oct 02, 2015 at 06:04:35PM +0200, Roger Pau Monné wrote: > El 05/09/15 a les 14.39, Bob Liu ha escrit: > > Document multi queues/rings of xen-block. > > > > Signed-off-by: Bob Liu > > As said by Konrad, you should send this against the Xen public headers > also (or even before). I have a

Re: [Xen-devel] [PATCH] xen/netfront: don't cache skb_shinfo()

2018-08-09 Thread Wei Liu
On Thu, Aug 09, 2018 at 04:42:16PM +0200, Juergen Gross wrote: > skb_shinfo() can change when calling __pskb_pull_tail(): Don't cache > its return value. > > Cc: sta...@vger.kernel.org > Signed-off-by: Juergen Gross Reviewed-by: Wei Liu

Re: [PATCH 4/4] drivers/net: Use octal not symbolic permissions

2018-03-26 Thread Wei Liu
> > Signed-off-by: Joe Perches > --- > drivers/net/xen-netback/xenbus.c | 4 +- > drivers/net/xen-netfront.c | 6 +-- Reviewed-by: Wei Liu

Re: [Xen-devel] [PATCH] xen/pvh: Indicate XENFEAT_linux_rsdp_unrestricted to Xen

2018-04-10 Thread Wei Liu
s able to find RSDP, > for back-compatibility reasons we need to indicate to Xen that we can > handle this, an we do so by setting XENFEAT_linux_rsdp_unrestricted > flag in ELF notes. > > (Also take this opportunity and sync features.h header file with Xen) > > Signed-off-by: Boris Ostrovsky Reviewed-by: Wei Liu

Re: [PATCH] net: xenbus: convert to DEFINE_SHOW_ATTRIBUTE

2018-12-10 Thread Wei Liu
On Mon, Dec 10, 2018 at 10:53:29AM -0500, Yangtao Li wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Yangtao Li Acked-by: Wei Liu Thanks for the patch.

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

2021-04-20 Thread Wei Liu
On Tue, Apr 20, 2021 at 04:50:56AM +, Michael Kelley wrote: > From: Andrea Parri (Microsoft) Sent: Monday, April > 19, 2021 6:44 PM > > > > If a malicious or compromised Hyper-V sends a spurious message of type > > CHANNELMSG_UNLOAD_RESPONSE, the function vmbus_unload_response() will > > cal

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

2021-04-20 Thread Wei Liu
On Tue, Apr 20, 2021 at 11:31:54AM +0200, Vitaly Kuznetsov wrote: > 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 response is delayed until all dirt

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

2021-04-20 Thread Wei Liu
On Tue, Apr 20, 2021 at 08:44:19AM -0700, Michael Kelley wrote: > Due to a full ring buffer, the driver may be unable to send updates to > the Hyper-V host. But outputing the error message can make the problem > worse because console output is also typically written to the frame > buffer. As a re

Re: Regressions with VMBus/VSCs hardening changes

2021-02-15 Thread Wei Liu
On Fri, Feb 12, 2021 at 05:50:50PM +0100, Andrea Parri wrote: > Hi all, [...] > 2) IIUC a8c3209998afb5 could be dropped (after rebase) without further modi- >fications to hyperv-next. I've reverted the said patch from hyperv-next. Wei.

[GIT PULL] Hyper-V commits for 5.12

2021-02-16 Thread Wei Liu
rom Andrea Parri and Andres Beltran. - Patches to make Linux boot as the root partition on Microsoft Hypervisor from Wei Liu. - One patch to add a new sysfs interface to support hibernation on Hyper-V from Dexuan Cui. - Two miscellaneous clean-up patches from Colin a

Re: [PATCH 0/4] Add support for XMM fast hypercalls

2021-04-08 Thread Wei Liu
On Wed, Apr 07, 2021 at 11:29:26PM +0200, Siddharth Chandrasekaran wrote: > Hyper-V supports the use of XMM registers to perform fast hypercalls. > This allows guests to take advantage of the improved performance of the > fast hypercall interface even though a hypercall may require more than > (the

Re: [PATCH 0/4] Add support for XMM fast hypercalls

2021-04-08 Thread Wei Liu
On Thu, Apr 08, 2021 at 05:30:26PM +0200, Paolo Bonzini wrote: > On 08/04/21 17:28, Wei Liu wrote: > > > Although the Hyper-v TLFS mentions that a guest cannot use this feature > > > unless the hypervisor advertises support for it, some hypercalls which > > > we plan

Re: [PATCH 4/4] KVM: hyper-v: Advertise support for fast XMM hypercalls

2021-04-08 Thread Wei Liu
On Thu, Apr 08, 2021 at 04:20:54PM +0200, Siddharth Chandrasekaran wrote: > On Thu, Apr 08, 2021 at 02:05:53PM +0200, Vitaly Kuznetsov wrote: > > Siddharth Chandrasekaran writes: > > > > > Now that all extant hypercalls that can use XMM registers (based on > > > spec) for input/outputs are patched

Re: [PATCH 0/4] Add support for XMM fast hypercalls

2021-04-08 Thread Wei Liu
On Thu, Apr 08, 2021 at 05:54:43PM +0200, Siddharth Chandrasekaran wrote: > On Thu, Apr 08, 2021 at 05:48:19PM +0200, Paolo Bonzini wrote: > > On 08/04/21 17:40, Siddharth Chandrasekaran wrote: > > > > > > Although the Hyper-v TLFS mentions that a guest cannot use this > > > > > > feature > > > >

Re: [PATCH v2] xen-netback: making the bandwidth limiter runtime settable

2015-03-20 Thread Wei Liu
ble. > > When the watch fires, the timer is reset. The timer's mutex is used for > fencing the change. > > Cc: Anthony Liguori > Signed-off-by: Imre Palik Acked-by: Wei Liu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body o

Re: [PATCH RESEND 1/2] xenbus_client: Extend interface to support multi-page ring

2015-03-31 Thread Wei Liu
On Tue, Mar 31, 2015 at 02:36:43PM +0200, Juergen Gross wrote: > On 03/31/2015 02:15 PM, Bob Liu wrote: > >From: Wei Liu > > > >Originally Xen PV drivers only use single-page ring to pass along > >information. This might limit the throughput between frontend and &

Re: [PATCH] xen-netback:Make the function xenvif_schedulable have a return type of bool

2015-06-17 Thread Wei Liu
as Krause Acked-by: Wei Liu > --- > drivers/net/xen-netback/common.h| 2 +- > drivers/net/xen-netback/interface.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/xen-netback/common.h > b/drivers/net/xen-netback/common.h > index

Re: [Xen-devel] "tcp: refine TSO autosizing" causes performance regression on Xen

2015-06-02 Thread Wei Liu
Hi Eric Sorry for coming late to the discussion. On Thu, Apr 16, 2015 at 05:42:16AM -0700, Eric Dumazet wrote: > On Thu, 2015-04-16 at 11:01 +0100, George Dunlap wrote: > > > He suggested that after he'd been prodded by 4 more e-mails in which two > > of us guessed what he was trying to get at.

Re: [PATCH] xen-netback: fix a BUG() during initialization

2015-06-19 Thread Wei Liu
gt; > The fix modifies connect() to remove the possibly existing packet-rate > watches before trying to install those watches. This behaviour is in line > with how connect() deals with the hotplug-status watch. > > Signed-off-by: Imre Palik > Cc: Matt Wilson Acked-by: Wei Liu

Re: [Xen-devel] [PATCH 4/6] xen-netfront: add range check for Tx response id

2018-05-01 Thread Wei Liu
On Mon, Apr 30, 2018 at 11:01:48PM +0200, Marek Marczykowski-Górecki wrote: > Tx response ID is fetched from shared page, so make sure it is sane > before using it as an array index. > > CC: sta...@vger.kernel.org > Signed-off-by: Marek Marczykowski-Górecki > --- > drivers/net/xen-netfront.c | 1

Re: [Xen-devel] [RFC][PATCH] KVM: APPLES can improve the performance of applications and virtualized systems by up to 49%

2018-05-15 Thread Wei Liu
On Sat, May 12, 2018 at 04:27:04PM +0800, Weiwei Jia wrote: > Dear all, > > Recently, we made a few improvements on effectively utilizing Pause > Loop Exiting (PLE) support for higher throughput on virtualized > systems. Basically, it solves two problems: 1) how to adjust > PLE_Window; 2) how to s

Re: [PATCH] xen-netback: fix occasional leak of grant ref mappings under memory pressure

2019-02-28 Thread Wei Liu
On Thu, Feb 28, 2019 at 09:46:57AM +, Paul Durrant wrote: > > -Original Message- > > From: Igor Druzhinin [mailto:igor.druzhi...@citrix.com] > > Sent: 28 February 2019 02:03 > > To: xen-de...@lists.xenproject.org; net...@vger.kernel.org; > > linux-kern

Re: [PATCH] xen-netback: fix occasional leak of grant ref mappings under memory pressure

2019-02-28 Thread Wei Liu
On Thu, Feb 28, 2019 at 12:07:07PM +, Paul Durrant wrote: > Yes, I meant kfree_skb(nskb). > In that case I think your patch looks fine. Wei.

Re: [PATCH v2] xen-netback: fix occasional leak of grant ref mappings under memory pressure

2019-02-28 Thread Wei Liu
of page cache writes coexist with active atomic skb allocations from > network traffic. Additionally, rework the logic to deal with frag_list > deallocation in a single place. > > Signed-off-by: Paul Durrant > Signed-off-by: Igor Druzhinin Acked-by: Wei Liu > --- > drivers/n

Re: [PATCH v2 4/8] xen/netback: fix spurious event detection for common event case

2021-02-11 Thread Wei Liu
e a event being spurious if no rx OR no tx requests are > pending. > > Fix that plus using local variables for rx/tx pending indicators in > order to split function calls and if condition. > > Fixes: 23025393dbeb3b ("xen/netback: use lateeoi irq binding") > Signed-off-by: Juergen Gross Reviewed-by: Wei Liu

Re: [PATCH v5 09/16] x86/hyperv: provide a bunch of helper functions

2021-02-02 Thread Wei Liu
On Tue, Jan 26, 2021 at 01:20:36AM +, Michael Kelley wrote: > From: Wei Liu Sent: Wednesday, January 20, 2021 4:01 AM [...] > > +#include > > + > > +#define HV_DEPOSIT_MAX_ORDER (8) > > +#define HV_DEPOSIT_MAX (1 << HV_DEPOSIT_MAX_ORDER) > > Is there a

Re: [PATCH] xen/netback: avoid race in xenvif_rx_ring_slots_available()

2021-02-02 Thread Wei Liu
> associated queue held. > > Reported-by: Igor Druzhinin > Fixes: 23025393dbeb3b8b3 ("xen/netback: use lateeoi irq binding") > Cc: sta...@vger.kernel.org > Signed-off-by: Juergen Gross Acked-by: Wei Liu

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

2021-02-02 Thread Wei Liu
On Tue, Jan 26, 2021 at 01:26:52AM +, Michael Kelley wrote: > From: Wei Liu Sent: Wednesday, January 20, 2021 4:01 AM > > > > We will need to identify the device we want Microsoft Hypervisor to > > manipulate. Introduce the data structures for that purpose. > >

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

2021-02-02 Thread Wei Liu
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 > > interrupts are remapped. Linux will need to explicitly map and unm

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

2021-02-02 Thread Wei Liu
On Tue, Feb 02, 2021 at 06:15:23PM +, Michael Kelley wrote: > 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 &

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

2021-02-03 Thread Wei Liu
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 > > Hypervisor when Linux runs as the root partition. Implement an IRQ > &g

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

2021-02-03 Thread Wei Liu
On Tue, Feb 02, 2021 at 05:02:48PM +, Wei Liu wrote: > On Tue, Jan 26, 2021 at 01:26:52AM +, Michael Kelley wrote: > > From: Wei Liu Sent: Wednesday, January 20, 2021 4:01 AM > > > > > > We will need to identify the device we want Microsoft Hypervisor to >

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

2021-02-03 Thread Wei Liu
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 +0000, Wei Liu wrote: > > > On Tue, Jan 26, 2021 at 01:26:52AM +, Michael Kelley wrote: > > > > From: Wei Li

[PATCH v6 00/16] Introducing Linux root partition support for Microsoft Hypervisor

2021-02-03 Thread Wei Liu
1. Address more comments from Vitaly. 2. Fix and test 32bit build. Changes since v1: 1. Simplify MSI IRQ domain implementation. 2. Address Vitaly's comments. Wei Liu (16): asm-generic/hyperv: change HV_CPU_POWER_MANAGEMENT to HV_CPU_MANAGEMENT x86/hyperv: detect if Linux is the root par

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

2021-02-03 Thread Wei Liu
We will need the partition ID for executing some hypercalls later. Signed-off-by: Lillian Grassin-Drake Co-Developed-by: Sunil Muthuswamy Signed-off-by: Wei Liu --- v6: 1. Use u64 status. v3: 1. Make hv_get_partition_id static. 2. Change code structure a bit. --- arch/x86/hyperv/hv_init.c

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

2021-02-03 Thread Wei Liu
Just like MSI/MSI-X, IO-APIC interrupts are remapped by Microsoft Hypervisor when Linux runs as the root partition. Implement an IRQ domain to handle mapping and unmapping of IO-APIC interrupts. Signed-off-by: Wei Liu --- v6: 1. Simplify code due to changes in a previous patch. --- arch/x86

[PATCH v6 07/16] x86/hyperv: handling hypercall page setup for root

2021-02-03 Thread Wei Liu
f-by: Sunil Muthuswamy Signed-off-by: Nuno Das Neves Co-Developed-by: Lillian Grassin-Drake Co-Developed-by: Sunil Muthuswamy Co-Developed-by: Nuno Das Neves Signed-off-by: Wei Liu Reviewed-by: Michael Kelley --- v3: 1. Use HV_HYP_PAGE_SIZE. 2. Add checks to hv_suspend & co. --- arch/x8

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

2021-02-03 Thread Wei Liu
: Sunil Muthuswamy Co-Developed-by: Sunil Muthuswamy Signed-off-by: Wei Liu --- v6: 1. Use u64 status. 2. Use vpset instead of bitmap. 3. Factor out hv_map_interrupt 4. Address other misc comments. v4: Fix compilation issue when CONFIG_PCI_MSI is not set. v3: build irqdomain.o for 32bit as well. v2

[PATCH v6 14/16] asm-generic/hyperv: import data structures for mapping device interrupts

2021-02-03 Thread Wei Liu
Signed-off-by: Sunil Muthuswamy Co-Developed-by: Sunil Muthuswamy Signed-off-by: Wei Liu Reviewed-by: Michael Kelley --- arch/x86/include/asm/hyperv-tlfs.h | 13 +++ include/asm-generic/hyperv-tlfs.h | 36 ++ 2 files changed, 49 insertions(+) diff --git a

[PATCH v6 11/16] asm-generic/hyperv: update hv_msi_entry

2021-02-03 Thread Wei Liu
We will soon need to access fields inside the MSI address and MSI data fields. Introduce hv_msi_address_register and hv_msi_data_register. Fix up one user of hv_msi_entry in mshyperv.h. No functional change expected. Signed-off-by: Wei Liu Reviewed-by: Michael Kelley --- arch/x86/include/asm

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

2021-02-03 Thread Wei Liu
: Nuno Das Neves Signed-off-by: Wei Liu --- v6: 1. Address Michael's comments. v4: Fix compilation issue when CONFIG_ACPI_NUMA is not set. v3: 1. Add __packed to structures. 2. Drop unnecessary exports. v2: 1. Adapt to hypervisor side changes 2. Address Vitaly's comments use u64 sta

[PATCH v6 12/16] asm-generic/hyperv: update hv_interrupt_entry

2021-02-03 Thread Wei Liu
We will soon use the same structure to handle IO-APIC interrupts as well. Introduce an enum to identify the source and a data structure for IO-APIC RTE. While at it, update pci-hyperv.c to use the enum. No functional change. Signed-off-by: Wei Liu Acked-by: Rob Herring Reviewed-by: Michael

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

2021-02-03 Thread Wei Liu
We will need to identify the device we want Microsoft Hypervisor to manipulate. Introduce the data structures for that purpose. They will be used in a later patch. Signed-off-by: Sunil Muthuswamy Co-Developed-by: Sunil Muthuswamy Signed-off-by: Wei Liu --- v6: 1. Add reserved0 as field name

[PATCH v6 10/16] x86/hyperv: implement and use hv_smp_prepare_cpus

2021-02-03 Thread Wei Liu
Microsoft Hypervisor requires the root partition to make a few hypercalls to setup application processors before they can be used. Signed-off-by: Lillian Grassin-Drake Signed-off-by: Sunil Muthuswamy Co-Developed-by: Lillian Grassin-Drake Co-Developed-by: Sunil Muthuswamy Signed-off-by: Wei

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

2021-02-03 Thread Wei Liu
When Linux runs as the root partition, it will need to make hypercalls which return data from the hypervisor. Allocate pages for storing results when Linux runs as the root partition. Signed-off-by: Lillian Grassin-Drake Co-Developed-by: Lillian Grassin-Drake Signed-off-by: Wei Liu --- v3

[PATCH v6 08/16] ACPI / NUMA: add a stub function for node_to_pxm()

2021-02-03 Thread Wei Liu
There is already a stub function for pxm_to_node but conversion to the other direction is missing. It will be used by Microsoft Hypervisor code later. Signed-off-by: Wei Liu --- v6: new --- include/acpi/acpi_numa.h | 4 1 file changed, 4 insertions(+) diff --git a/include/acpi

[PATCH v6 03/16] Drivers: hv: vmbus: skip VMBus initialization if Linux is root

2021-02-03 Thread Wei Liu
There is no VMBus and the other infrastructures initialized in hv_acpi_init when Linux is running as the root partition. Signed-off-by: Wei Liu Reviewed-by: Pavel Tatashin Reviewed-by: Michael Kelley --- v3: Return 0 instead of -ENODEV. --- drivers/hv/vmbus_drv.c | 3 +++ 1 file changed, 3

[PATCH v6 04/16] clocksource/hyperv: use MSR-based access if running as root

2021-02-03 Thread Wei Liu
When Linux runs as the root partition, the setup required for TSC page is different. Luckily Linux also has access to the MSR based clocksource. We can just disable the TSC page clocksource if Linux is the root partition. Signed-off-by: Wei Liu Acked-by: Daniel Lezcano Reviewed-by: Pavel

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

2021-02-03 Thread Wei Liu
For now we can use the privilege flag to check. Stash the value to be used later. Put in a bunch of defines for future use when we want to have more fine-grained detection. Signed-off-by: Wei Liu Reviewed-by: Pavel Tatashin --- v3: move hv_root_partition to mshyperv.c --- arch/x86/include/asm

[PATCH v6 01/16] asm-generic/hyperv: change HV_CPU_POWER_MANAGEMENT to HV_CPU_MANAGEMENT

2021-02-03 Thread Wei Liu
This makes the name match Hyper-V TLFS. Signed-off-by: Wei Liu Reviewed-by: Vitaly Kuznetsov Reviewed-by: Pavel Tatashin Reviewed-by: Michael Kelley --- include/asm-generic/hyperv-tlfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/hyperv-tlfs.h b

Re: [PATCH v3 hyperv-next 0/4] Drivers: hv: vmbus: Restrict devices and configurations on 'isolated' guests

2021-02-01 Thread Wei Liu
On Mon, Feb 01, 2021 at 03:48:10PM +0100, Andrea Parri (Microsoft) wrote: > Andrea Parri (Microsoft) (4): > x86/hyperv: Load/save the Isolation Configuration leaf > Drivers: hv: vmbus: Restrict vmbus_devices on isolated guests > Drivers: hv: vmbus: Enforce 'VMBus version >= 5.2' on isolated g

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

2021-02-01 Thread Wei Liu
On Mon, Feb 01, 2021 at 05:56:06PM +, Michael Kelley wrote: > From: Gustavo A. R. Silva Sent: Monday, February 1, > 2021 9:44 AM [...] > > struct shutdown_msg_data { > > -- > > 2.27.0 > > Reviewed-by: Michael Kelley Applied to hyperv-next. Thanks. Wei.

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

2021-02-01 Thread Wei Liu
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. > + */ > +static __always_inline void hv_setup_sched_clock(void *sched_clock) sched_clock_register is not trivia

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

2021-02-01 Thread Wei Liu
On Wed, Jan 27, 2021 at 12:23:45PM -0800, Michael Kelley wrote: [...] > +static int hv_setup_stimer0_irq(void) > +{ > + int ret; > + > + ret = acpi_register_gsi(NULL, HYPERV_STIMER0_VECTOR, > + ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_HIGH); When IO-APIC is enabled on x86, acpi

Re: [PATCH v3 00/17] Introducing Linux root partition support for Microsoft Hypervisor

2021-02-02 Thread Wei Liu
On Tue, Feb 02, 2021 at 10:40:43AM +, David Woodhouse wrote: > On Tue, 2020-12-15 at 16:42 +0000, Wei Liu wrote: > > On Tue, Dec 15, 2020 at 04:25:03PM +0100, Enrico Weigelt, metux IT consult > > wrote: > > > On 03.12.20 00:22, Wei Liu wrote: > > > > >

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

2021-02-02 Thread Wei Liu
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. > > > > Signed-off-by: Lillian Grassin-Drake > > Co-Developed

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

2021-02-04 Thread Wei Liu
On Thu, Feb 04, 2021 at 04:28:38PM +, Michael Kelley wrote: > 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 i

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

2021-02-04 Thread Wei Liu
On Thu, Feb 04, 2021 at 04:41:47PM +, Michael Kelley wrote: > From: Wei Liu Sent: Wednesday, February 3, 2021 4:47 AM [...] > > > > + > > > > + if (level) > > > > + intr_desc->trigger_mode = > > > >

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

2021-02-04 Thread Wei Liu
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 mode 100644 > > index ..117f17e8c88a > > --- /dev/null > > +++ b/arch/x86/hyperv/irqdomain.c > > @@ -0,0

Re: [PATCH v6 08/16] ACPI / NUMA: add a stub function for node_to_pxm()

2021-02-04 Thread Wei Liu
On Wed, Feb 03, 2021 at 03:04:27PM +, Wei Liu wrote: > There is already a stub function for pxm_to_node but conversion to the > other direction is missing. > > It will be used by Microsoft Hypervisor code later. > > Signed-off-by: Wei Liu Hi ACPI maintainers, if you&

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

2021-02-04 Thread Wei Liu
On Thu, Feb 04, 2021 at 06:40:55PM +, Michael Kelley wrote: > From: Wei Liu Sent: Thursday, February 4, 2021 9:57 AM [...] > > I've got the following diff to fix both issues. If you're happy with the > > changes, can you give your Reviewed-by? That saves a round

Re: [PATCH v6 08/16] ACPI / NUMA: add a stub function for node_to_pxm()

2021-02-04 Thread Wei Liu
On Thu, Feb 04, 2021 at 07:45:25PM +0100, Rafael J. Wysocki wrote: > On Thu, Feb 4, 2021 at 7:41 PM Wei Liu wrote: > > > > On Wed, Feb 03, 2021 at 03:04:27PM +, Wei Liu wrote: > > > There is already a stub function for pxm_to_node but conversion to the > >

Re: [PATCH v6 00/16] Introducing Linux root partition support for Microsoft Hypervisor

2021-02-04 Thread Wei Liu
On Wed, Feb 03, 2021 at 03:04:19PM +, Wei Liu wrote: > Wei Liu (16): > asm-generic/hyperv: change HV_CPU_POWER_MANAGEMENT to > HV_CPU_MANAGEMENT > x86/hyperv: detect if Linux is the root partition > Drivers: hv: vmbus: skip VMBus initialization if Linux is root >

Re: linux-next: manual merge of the hyperv tree with Linus' tree

2021-02-05 Thread Wei Liu
On Fri, Feb 05, 2021 at 07:02:02PM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the hyperv tree got a conflict in: > > arch/x86/hyperv/hv_init.c > > between commit: > > fff7b5e6ee63 ("x86/hyperv: Initialize clockevents after LAPIC is > initialized") > > from Li

Re: [PATCH 4/7] xen/events: link interdomain events to associated xenbus device

2021-02-09 Thread Wei Liu
aces to take the pointer to the xenbus device as a > parameter instead of the domain id of the other side. > > While at it remove the stale prototype of bind_evtchn_to_irq_lateeoi(). > > Signed-off-by: Juergen Gross Reviewed-by: Wei Liu

[GIT PULL] Hyper-V fixes for v5.7-rc7

2020-05-19 Thread Wei Liu
Hi Linus Please pull the following changes since commit f081bbb3fd03f949bcdc5aed95a827d7c65e0f30: hyper-v: Remove internal types from UAPI header (2020-04-22 21:10:05 +0100) are available in the Git repository at: ssh://g...@gitolite.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git ta

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

2020-05-20 Thread Wei Liu
On Tue, May 19, 2020 at 06:37:57PM +, Sunil Muthuswamy wrote: > 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 patch

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

2020-05-20 Thread Wei Liu
On Wed, May 20, 2020 at 10:59:22AM +0200, Vitaly Kuznetsov wrote: > Sunil Muthuswamy writes: [...] > > +EXPORT_SYMBOL_GPL(hv_query_ext_cap); > > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c > > index ebf34c7bc8bc..2de3f692c8bf 100644 > > --- a/arch/x86/kernel/cpu/ms

Re: [PATCH 1/1] x86/hyperv: Make hv_setup_sched_clock inline

2020-08-11 Thread Wei Liu
On Mon, Aug 10, 2020 at 10:08:41PM +0200, Thomas Gleixner wrote: > Michael Kelley writes: > > Make hv_setup_sched_clock inline so the reference to pv_ops works > > correctly with objtool updates to detect noinstr violations. > > See https://lore.kernel.org/patchwork/patch/1283635/ > > > > Signed-o

Re: [PATCH 1/1] Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops

2020-08-07 Thread Wei Liu
On Fri, Aug 07, 2020 at 11:06:47AM +0200, Vitaly Kuznetsov wrote: > Michael Kelley writes: > > > Hyper-V currently may be notified of a panic for any die event. But > > this results in false panic notifications for various user space traps > > that are die events. Fix this by ignoring die events

Re: [PATCH 1/1] x86/hyperv: Make hv_setup_sched_clock inline

2020-08-10 Thread Wei Liu
On Sun, Aug 09, 2020 at 06:29:51PM -0700, Michael Kelley wrote: > Make hv_setup_sched_clock inline so the reference to pv_ops works > correctly with objtool updates to detect noinstr violations. > See https://lore.kernel.org/patchwork/patch/1283635/ > I read the reference link. This change looks

Re: [PATCH v1] tools: hv: remove cast from hyperv_die_event

2020-08-19 Thread Wei Liu
On Wed, Aug 19, 2020 at 11:05:09AM +0200, Olaf Hering wrote: > No need to cast a void pointer. > > Signed-off-by: Olaf Hering Applied to hyperv-next. I also changed "tools" to "drivers". > --- > drivers/hv/vmbus_drv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/d

Re: [PATCH v3] Drivers: hv: vmbus: Add /sys/bus/vmbus/hibernation

2021-01-11 Thread Wei Liu
On Thu, Jan 07, 2021 at 06:08:51PM +, Michael Kelley wrote: > From: Dexuan Cui Sent: Wednesday, January 6, 2021 5:46 > PM > > > > When a Linux VM runs on Hyper-V, if the host toolstack doesn't support > > hibernation for the VM (this happens on old Hyper-V hosts like Windows > > Server 2016,

[GIT PULL] Hyper-V fixes for 5.11-rc4

2021-01-11 Thread Wei Liu
- One patch from Wei Liu to fix occasional crashes when flushing TLB Dexuan Cui (1): x86/hyperv: Fix kexec panic/hang issues Wei Liu (1): x86/hyperv: check cpu mask after interrupt has been disabled arch/x86/hyperv

Re: [PATCH] Revert "scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback()"

2020-12-11 Thread Wei Liu
On Fri, Dec 11, 2020 at 02:14:04PM +0100, Andrea Parri (Microsoft) wrote: > This reverts commit 3b8c72d076c42bf27284cda7b2b2b522810686f8. > > Dexuan reported a regression where StorVSC fails to probe a device (and > where, consequently, the VM may fail to boot). The root-cause analysis > led to a

Re: [PATCH] Revert "scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback()"

2020-12-11 Thread Wei Liu
On Fri, Dec 11, 2020 at 09:59:34AM -0500, Martin K. Petersen wrote: > > Wei, > > > Sorry for the last minute patch. We would very like this goes into > > 5.10 if possible; otherwise Linux 5.10 is going to be broken on > > Hyper-V. :-( > > Applied to 5.10/scsi-fixes. Thanks Martin.

Re: [PATCH] drivers/hv: remove obsolete TODO and fix misleading typo in comment

2020-12-07 Thread Wei Liu
On Sun, Dec 06, 2020 at 11:48:50AM +0100, Stefan Eschenbacher wrote: > Removes an obsolete TODO in the VMBus module and fixes a misleading typo > in the comment for the macro MAX_NUM_CHANNELS, where two digits have been > twisted. > > Signed-off-by: Stefan Eschenbacher > Co-developed-by: Max Stol

[GIT PULL] Hyper-V fixes for 5.11-rc5

2021-01-19 Thread Wei Liu
Hi Linus, The following changes since commit ad0a6bad44758afa3b440c254a24999a0c7e35d5: x86/hyperv: check cpu mask after interrupt has been disabled (2021-01-06 11:03:16 +) are available in the Git repository at: ssh://g...@gitolite.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git

Re: [PATCH v4 15/17] x86/hyperv: implement an MSI domain for root partition

2021-01-07 Thread Wei Liu
On Thu, Jan 07, 2021 at 06:21:24AM +0800, kernel test robot wrote: > Hi Wei, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62] > > url: > https://github.com/0day-ci/linux/commits/Wei-Li

Re: [PATCH v4 16/17] x86/ioapic: export a few functions and data structures via io_apic.h

2021-01-09 Thread Wei Liu
On Wed, Jan 06, 2021 at 08:33:49PM +, Wei Liu wrote: > We are about to implement an irqchip for IO-APIC when Linux runs as root > on Microsoft Hypervisor. At the same time we would like to reuse > existing code as much as possible. > > Move mp_chip_data to io_apic.h and ma

Re: [PATCH v4 17/17] x86/hyperv: handle IO-APIC when running as root

2021-01-09 Thread Wei Liu
On Wed, Jan 06, 2021 at 08:33:50PM +, Wei Liu wrote: > Just like MSI/MSI-X, IO-APIC interrupts are remapped by Microsoft > Hypervisor when Linux runs as the root partition. Implement an IRQ chip > to handle mapping and unmapping of IO-APIC interrupts. > > Use custom functions

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

2021-03-24 Thread Wei Liu
On Tue, Mar 23, 2021 at 10:43:02AM +0800, 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; > > As Hypervisor Top-Level Functional Specifi

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

2021-03-24 Thread Wei Liu
On Tue, Mar 23, 2021 at 11:32:50AM +, Wei Liu wrote: > On Tue, Mar 23, 2021 at 10:50:13AM +0800, 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-variab

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

2021-03-24 Thread Wei Liu
On Tue, Mar 23, 2021 at 06:47:16PM +, Sunil Muthuswamy wrote: > 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 patch

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

2021-03-25 Thread Wei Liu
freeing the memory and > leaving the pointer non-NULL, resulting in a double free if an error > occurs or later if hvfb_remove() is called. > > Fix this by removing all kfree(info->apertures) calls in hvfb_getmem(). > This will allow framebuffer_release() to free the memor

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

2021-03-23 Thread Wei Liu
Thanks for your patch. I would like to change the prefix to "video: hyperv_fb:" to be more specific. On Tue, Mar 23, 2021 at 12:33:50AM -0700, Lv Yunlong wrote: > In function hvfb_probe in hyperv_fb.c, it calls hvfb_getmem(hdev, info) > and return err when info->apertures is freed. > > In the er

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

2021-03-23 Thread Wei Liu
On Tue, Mar 23, 2021 at 10:50:13AM +0800, 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] > > Compiled with CONFIG_HYPERV enabled: > make allmodconfig ARCH=x86_64 CROSS_COM

  1   2   3   4   5   6   >