RE: [PATCH] uio_hv_generic: Fix sysfs creation path for ring buffer

2025-03-11 Thread Dexuan Cui
> From: Naman Jain > Sent: Monday, March 10, 2025 9:45 PM > > [...] > > Hi Greg, > > I understand this is deviating from the discussions that we have had > > till now, but I wanted to kindly request your opinion on the following > > approach, which came up in one of our internal discussions. > > >

RE: [PATCH] Drivers: hv: kvp/vss: Avoid accessing a ringbuffer not initialized yet

2024-11-01 Thread Dexuan Cui
> From: Michael Kelley > Sent: Friday, November 1, 2024 2:11 PM > > Michael, will you post a formal patch or want me to do it? > > Either works for me. > > I can do it. You probably have more pressing issues to keep > you busy :-) Thanks a lot! :-) > Fair enough. I'll do it that way. > > M

RE: [PATCH] Drivers: hv: kvp/vss: Avoid accessing a ringbuffer not initialized yet

2024-11-01 Thread Dexuan Cui
> From: Michael Kelley > Sent: Thursday, October 31, 2024 6:39 PM > > > From: Michael Kelley > > > Sent: Wednesday, October 30, 2024 5:12 PM > > > [...] > > > What do you think about this (compile tested only), which splits the > > > "init" function into two parts for devices that have char devs?

RE: [PATCH] Drivers: hv: kvp/vss: Avoid accessing a ringbuffer not initialized yet

2024-10-31 Thread Dexuan Cui
> From: Michael Kelley > Sent: Wednesday, October 30, 2024 5:12 PM > [...] > What do you think about this (compile tested only), which splits the > "init" function into two parts for devices that have char devs? I'm > trying to avoid adding yet another synchronization point by just > doing the ini

RE: [PATCH] Drivers: hv: kvp/vss: Avoid accessing a ringbuffer not initialized yet

2024-10-30 Thread Dexuan Cui
> From: Michael Kelley > Sent: Tuesday, October 29, 2024 4:45 PM > [...] > An alternate approach occurs to me. util_probe() does these three > things in order: > > 1) Allocates the receive buffer > 2) Calls the util_init() function, which for KVP and VSS creates the char dev > 3) Sets up the VMBu

RE: [PATCH 1/2] Drivers: hv: vmbus: Wait for offers during boot

2024-10-25 Thread Dexuan Cui
> From: Michael Kelley > Sent: Tuesday, October 22, 2024 11:04 AM > [...] > I wasn't aware of the VF handling. Where does the guest notify the > host that it is planning to hibernate? I went looking for such code, but > couldn't immediately find it. Is it in the netvsc driver? Is this the > seque

RE: [PATCH] tools: hv: Fix a complier warning in the fcopy uio daemon

2024-09-20 Thread Dexuan Cui
> From: Saurabh Singh Sengar > Sent: Friday, September 13, 2024 12:31 AM > To: Dexuan Cui > Cc: KY Srinivasan ; Haiyang Zhang > ; Wei Liu ; Long Li > ; Greg Kroah-Hartman > ; open list:Hyper-V/Azure CORE AND DRIVERS > ; open list ; > sta...@vger.kernel.org > Subject

[PATCH] tools: hv: Fix a complier warning in the fcopy uio daemon

2024-09-09 Thread Dexuan Cui
sc[]'. Fixes: 82b0945ce2c2 ("tools: hv: Add new fcopy application based on uio driver") Cc: sta...@vger.kernel.org # 6.10+ Signed-off-by: Dexuan Cui --- tools/hv/hv_fcopy_uio_daemon.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/hv/hv_fcopy_u

[PATCH] Drivers: hv: kvp/vss: Avoid accessing a ringbuffer not initialized yet

2024-09-09 Thread Dexuan Cui
to be fixed when the fix is backported to the stable kernel branches. Fixes: e0fa3e5e7df6 ("Drivers: hv: utils: fix a race on userspace daemons registration") Cc: sta...@vger.kernel.org Signed-off-by: Dexuan Cui --- drivers/hv/channel.c | 11 +++ drivers/hv/hv_kvp.c |

RE: [PATCH v3] tools/hv: Add memory allocation check in hv_fcopy_start

2024-09-06 Thread Dexuan Cui
> From: Zhu Jun > Sent: Friday, September 6, 2024 2:14 AM Reviewed-by: Dexuan Cui

RE: [PATCH v2] tools/hv: Add memory allocation check in hv_fcopy_start

2024-09-06 Thread Dexuan Cui
> From: Saurabh Singh Sengar > Sent: Wednesday, September 4, 2024 10:21 PM > [...] > hv_fcopy_send_data is the parent function which calls hv_fcopy_start. > Possibly a good solution is to check the return value from > hv_fcopy_send_data The return value of hv_fcopy_send_data() is saved into icms

RE: [PATCH v2] tools/hv: Add memory allocation check in hv_fcopy_start

2024-08-30 Thread Dexuan Cui
> From: Zhu Jun > Sent: Wednesday, August 28, 2024 7:45 PM > @@ -296,6 +296,18 @@ static int hv_fcopy_start(struct hv_start_fcopy > *smsg_in) > file_name = (char *)malloc(file_size * sizeof(char)); > path_name = (char *)malloc(path_size * sizeof(char)); > > +if (!file_name) {

RE: [PATCH net] net: mana: Fix doorbell out of order violation and avoid unnecessary doorbell rings

2024-08-06 Thread Dexuan Cui
> From: lon...@linuxonhyperv.com > Sent: Monday, August 5, 2024 4:38 PM > [...] > After napi_complete_done() is called, another NAPI may be running on > another CPU and ring the doorbell before the current CPU does. When Can you please share more details about "another NAPI"? Is it about busy_pol

RE: [PATCH v2] Drivers: hv: vmbus: Optimize boot time by concurrent execution of hv_synic_init()

2024-07-29 Thread Dexuan Cui
U "hotplug" for VMs; it does support vCPU online/offline'ing. To be more accurate, I suggested the comment below instead. /* Register the callbacks for possible CPU online/offline'ing */ Otherwise, LGTM Reviewed-by: Dexuan Cui

RE: [PATCH] Drivers: hv: vmbus: Deferring per cpu tasks

2024-07-25 Thread Dexuan Cui
> From: Saurabh Singh Sengar > Sent: Thursday, July 25, 2024 10:27 PM > [...] > > > + ret = __cpuhp_setup_state_cpuslocked(CPUHP_AP_ONLINE_DYN, > > > "hyperv/vmbus:online", false, > > > + hv_synic_init, hv_synic_cleanup, > > > false); > > > + cpus_read_unlock()

RE: [PATCH] Drivers: hv: vmbus: Deferring per cpu tasks

2024-07-25 Thread Dexuan Cui
> From: Saurabh Singh Sengar > Sent: Thursday, July 25, 2024 8:35 AM > Subject: Re: [PATCH] Drivers: hv: vmbus: Deferring per cpu tasks Without the patch, I think the current CPU uses IPIs to let the other CPUs, one by one, run the function calls, and synchronously waits for the function calls t

RE: [PATCH] x86/tdx: Support vmalloc() for tdx_enc_status_changed()

2024-06-28 Thread Dexuan Cui
> From: Kirill A. Shutemov > Sent: Friday, June 28, 2024 3:05 AM > To: Dexuan Cui > > [...] > > static bool tdx_enc_status_changed(unsigned long vaddr, int numpages, > [...] > This patch collied with kexec changes. tdx_kexec_finish() calls > tdx_enc_status_ch

RE: [PATCH] PCI: hv: fix reading of PCI_INTERRUPT_LINE and PCI_INTERRUPT_PIN

2024-06-21 Thread Dexuan Cui
From: Jake Oshins Sent: Friday, June 21, 2024 9:51 AM > [...] >On Fri, Jun 21, 2024 at 06:19:05AM +, Wei Liu wrote: > On Fri, Jun 21, 2024 at 03:15:19AM +, Michael Kelley wrote: > > From: Wei Liu Sent: Thursday, June 20, 2024 > > 6:48 PM > > > > > > The intent

[PATCH v2] clocksource: hyper-v: Use lapic timer in a TDX VM without paravisor

2024-06-20 Thread Dexuan Cui
# 6.6+ Reviewed-by: Roman Kisel Signed-off-by: Dexuan Cui --- Changes in v2: Improved the comments in ms_hyperv_init_platform() [Michael Kelley] Added "print a warning in case Invariant TSC unavailable" in the changelog. Added Roman's Reviewed-by. arch/x86/kernel/cpu

RE: [PATCH] Drivers: hv: Remove deprecated hv_fcopy declarations

2024-06-20 Thread Dexuan Cui
> From: Rachel Menge > Sent: Thursday, June 20, 2024 3:51 PM > [...] LGTM Reviewed-by: Dexuan Cui

RE: [PATCH] clocksource: hyper-v: Use lapic timer in a TDX VM without paravisor

2024-06-20 Thread Dexuan Cui
> From: Michael Kelley > Sent: Thursday, June 20, 2024 2:19 PM > To: Dexuan Cui ; KY Srinivasan > [...] > > --- a/arch/x86/kernel/cpu/mshyperv.c > > +++ b/arch/x86/kernel/cpu/mshyperv.c > > @@ -449,9 +449,13 @@ static void __ini

RE: [PATCH] x86/tdx: Support vmalloc() for tdx_enc_status_changed()

2024-06-18 Thread Dexuan Cui
> From: Dexuan Cui > Sent: Monday, May 20, 2024 7:13 PM > [] > When a TDX guest runs on Hyper-V, the hv_netvsc driver's > netvsc_init_buf() > allocates buffers using vzalloc(), and needs to share the buffers with the > host OS by calling set_memory_decrypted()

[PATCH] clocksource: hyper-v: Use lapic timer in a TDX VM without paravisor

2024-06-18 Thread Dexuan Cui
hared in very early boot. Lower the rating of the Hyper-V timer so the local APIC timer becomes the the default timer in such a VM. This change should cause no perceivable performance difference. Cc: sta...@vger.kernel.org # 6.6+ Signed-off-by: Dexuan Cui --- arch/x86/kernel/cpu/mshyperv.c

RE: [RFC PATCH] clocksource: hyper-v: Enable the tsc_page for a TDX VM in TD mode

2024-05-24 Thread Dexuan Cui
> From: Dave Hansen > Sent: Thursday, May 23, 2024 7:26 AM > [...] > On 5/22/24 19:24, Dexuan Cui wrote: > ... > > +static bool noinstr intel_cc_platform_td_l2(enum cc_attr attr) > > +{ > > + switch (attr) { > > + case CC_ATTR_GUEST_MEM_EN

RE: [RFC PATCH] clocksource: hyper-v: Enable the tsc_page for a TDX VM in TD mode

2024-05-24 Thread Dexuan Cui
> From: Kirill A. Shutemov > Sent: Thursday, May 23, 2024 5:06 AM > To: Dexuan Cui > [...] > On Wed, May 22, 2024 at 07:24:41PM -0700, Dexuan Cui wrote: > > A TDX VM on Hyper-V may run in TD mode or Partitioned TD mode (L2). For > > the former, the VM has not enabled

[RFC PATCH] clocksource: hyper-v: Enable the tsc_page for a TDX VM in TD mode

2024-05-22 Thread Dexuan Cui
has similar code for SNP. This is just a RFC patch. I apprecite your insight. Thanks! Signed-off-by: Dexuan Cui --- arch/x86/coco/core.c | 15 +++ arch/x86/coco/tdx/tdx.c| 2 ++ arch/x86/hyperv/ivm.c | 3 ++- arch/x86/include/asm/tdx.h | 1 + arch/x86/ke

[PATCH] x86/tdx: Support vmalloc() for tdx_enc_status_changed()

2024-05-20 Thread Dexuan Cui
loped-by: Kirill A. Shutemov Signed-off-by: Kirill A. Shutemov Reviewed-by: Michael Kelley Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Rick Edgecombe Reviewed-by: Dave Hansen Acked-by: Kai Huang Cc: sta...@vger.kernel.org # 6.6+ Signed-off-by: Dexuan Cui --- This is basically a repo

RE: [PATCH] net: mana: Fix the extra HZ in mana_hwc_send_request

2024-05-16 Thread Dexuan Cui
om hardware") > Signed-off-by: Souradeep Chakrabarti > --- Looks good to me. Reviewed-by: Dexuan Cui

[PATCH] PCI: Add a mutex to protect the global list pci_domain_busn_res_list

2024-04-18 Thread Dexuan Cui
pdate the global list, causing list corruption. Add a mutex to protect the list. Signed-off-by: Dexuan Cui --- drivers/pci/probe.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index e19b79821dd6..1327fd820b

RE: [PATCH v2] Add a header in ifcfg and nm keyfiles describing the owner of the files

2024-04-18 Thread Dexuan Cui
> From: Easwar Hariharan > Sent: Thursday, April 18, 2024 9:16 AM > > On 4/18/2024 5:05 AM, Ani Sinha wrote: > > A comment describing the source of writing the contents of the ifcfg and > > network manager keyfiles (hyperv kvp daemon) is useful. It is valuable s/hyperv/Hyper-V/ > > +#define CFG

RE: [PATCH net] net: mana: Fix Rx DMA datasize and skb_over_panic

2024-04-01 Thread Dexuan Cui
> From: Haiyang Zhang > Sent: Monday, April 1, 2024 4:21 PM > > [...] > > I suggest the Fixes tag should be updated. Otherwise the fix > > looks good to me. > > Thanks for the suggestion. I actually thought about this before > submission. > I was worried about someone back ports the jumbo frame f

RE: [PATCH net] net: mana: Fix Rx DMA datasize and skb_over_panic

2024-03-29 Thread Dexuan Cui
mtu + MANA_RXBUF_PAD + *headroom; > > - *datasize = ALIGN(mtu + ETH_HLEN, MANA_RX_DATA_ALIGN); > + *datasize = mtu + ETH_HLEN; > } > I suggest the Fixes tag should be updated. Otherwise the fix looks good to me. Reviewed-by: Dexuan Cui

RE: [PATCH 1/1] Drivers: hv: vmbus: Calculate ring buffer size for more efficient use of memory

2024-02-26 Thread Dexuan Cui
> From: mhkelle...@gmail.com > Sent: Monday, February 12, 2024 10:20 PM > [...] > Fixes: c1135c7fd0e9 ("Drivers: hv: vmbus: Introduce types of GPADL") > Signed-off-by: Michael Kelley > --- Reviewed-by: Dexuan Cui The info below would need to be added: Fix

RE: [PATCH net,v2] hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed

2024-02-02 Thread Dexuan Cui
> From: Haiyang Zhang > Sent: Friday, February 2, 2024 9:10 AM > [...] > Reviewed-by: Haiyang Zhang Reviewed-by: Dexuan Cui

RE: [PATCH] hv_netvsc:Register VF in netvsc_probe if NET_DEVICE_REGISTER missed

2024-01-31 Thread Dexuan Cui
> From: Haiyang Zhang > Sent: Wednesday, January 31, 2024 8:46 AM > [...] > > From: Shradha Gupta > > Sent: Wednesday, January 31, 2024 2:54 AM > > > [...] > > > > + netvsc_prepare_bonding(vf_netdev); > > > > + netvsc_register_vf(vf_netdev, VF_REG_IN_PROBE); > > > > +

RE: [PATCH] hv_netvsc:Register VF in netvsc_probe if NET_DEVICE_REGISTER missed

2024-01-30 Thread Dexuan Cui
> From: Haiyang Zhang > Sent: Tuesday, January 30, 2024 2:05 PM > [...] > > > @@ -2205,8 +2209,11 @@ static int netvsc_vf_join(struct net_device > > > *vf_netdev, > > > ndev->name, ret); > > > goto upper_link_failed; > > > } > > > - > > > - schedule_delayed_work(&n

RE: [PATCH] hv_netvsc:Register VF in netvsc_probe if NET_DEVICE_REGISTER missed

2024-01-30 Thread Dexuan Cui
> From: Shradha Gupta > Sent: Monday, January 29, 2024 11:19 PM > [...] > If hv_netvsc driver is removed and reloaded, the NET_DEVICE_REGISTER s/removed/unloaded/ unloaded looks more accurate to me :-) > [...] > Tested-on: Ubuntu22 > Testcases: LISA testsuites > verify_reload_hyperv_mo

RE: [PATCH net] hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove

2024-01-30 Thread Dexuan Cui
e gets stuck on infinite msleep. The patch body looks good to me. Please post v2 with an updated changelog. Reviewed-by: Dexuan Cui

RE: [PATCH net,v5, 3/3] hv_netvsc: Mark VF as slave before exposing it to user-mode

2023-11-20 Thread Dexuan Cui
;) > Signed-off-by: Long Li > Signed-off-by: Haiyang Zhang > --- > v5: > Change function name netvsc_prepare_slave() to > netvsc_prepare_bonding(). > v4: > Add comments in get_netvsc_byslot() explaining the need to check > dev_addr > v2: > Use a new function to handle NETDEV_POST_INIT. Acked-by: Dexuan Cui

RE: [PATCH net,v4, 2/3] hv_netvsc: Fix race of register_netdevice_notifier and VF register

2023-11-12 Thread Dexuan Cui
; function is set before probing. > > Cc: sta...@vger.kernel.org > Fixes: e04e7a7bbd4b ("hv_netvsc: Fix a deadlock by getting rtnl lock earlier > in > netvsc_probe()") > Reported-by: Dexuan Cui > Signed-off-by: Haiyang Zhang > Reviewed-by: Wojciech Drewek Review

RE: [PATCH net,v4, 1/3] hv_netvsc: fix race of netvsc and VF register_netdevice

2023-11-12 Thread Dexuan Cui
vsc. > > Cc: sta...@vger.kernel.org > Fixes: e04e7a7bbd4b ("hv_netvsc: Fix a deadlock by getting rtnl lock earlier > in > netvsc_probe()") > Reported-by: Dexuan Cui > Signed-off-by: Haiyang Zhang > Reviewed-by: Wojciech Drewek Reviewed-by: Dexuan Cui

RE: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-20 Thread Dexuan Cui
> From: Dave Hansen > Sent: Friday, October 20, 2023 1:14 PM > To: Dexuan Cui ; KY Srinivasan > [...] > On 10/20/23 13:00, Dexuan Cui wrote: > >> OK, then what good is this patch in the first place? If you are right, > >> then this would give equivalent informa

RE: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-20 Thread Dexuan Cui
> From: Dave Hansen > Sent: Friday, October 20, 2023 11:40 AM > To: Dexuan Cui ; KY Srinivasan > [...] > On 10/19/23 23:01, Dexuan Cui wrote: > > This patch only modifies x86 related files. I think it's unlikely to see > > a third hardware Coco implementation fo

RE: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-19 Thread Dexuan Cui
> From: Dave Hansen > Sent: Thursday, October 19, 2023 8:54 AM > To: Dexuan Cui ; KY Srinivasan > [...] > > --- a/arch/x86/hyperv/ivm.c > > +++ b/arch/x86/hyperv/ivm.c > > @@ -450,6 +450,16 @@ static bool hv_is_private_mmio(u64 addr) > > retur

[PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-18 Thread Dexuan Cui
r an Intel CPU), the VM's memory is not encrypted, but mem_encrypt_init() also prints the same incorrect message. The introduction of x86_platform.print_mem_enc_feature_info can also fix the issue. Signed-off-by: Dexuan Cui --- Some open questions: 1. Should we refactor the existing print_me

RE: [PATCH v4 13/15] uapi: hyperv: Add mshv driver headers defining hypervisor ABIs

2023-10-04 Thread Dexuan Cui
> From: Greg KH > Sent: Tuesday, October 3, 2023 11:10 PM > [...] > On Tue, Oct 03, 2023 at 04:37:01PM -0700, Nuno Das Neves wrote: > > On 9/30/2023 11:19 PM, Greg KH wrote: > > > On Sat, Sep 30, 2023 at 10:01:58PM +, Wei Liu wrote: > > > > On Sat, Sep 30, 2023 at 08:09:19AM +0200, Greg KH wro

RE: [PATCH v1] hyperv: reduce size of ms_hyperv_info

2023-09-18 Thread Dexuan Cui
> From: Olaf Hering > Sent: Monday, September 18, 2023 9:02 AM > [...] > Use the hole prior shared_gpa_boundary to store the result of get_vtl. > This reduces the size by 8 bytes. > [...] > --- a/include/asm-generic/mshyperv.h > +++ b/include/asm-generic/mshyperv.h > @@ -53,8 +53,8 @@ struct ms_h