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

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

2024-06-21 Thread Dexuan Cui
+ 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/mshyperv.

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

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
de 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/kernel/cpu/mshype

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

2024-05-20 Thread Dexuan Cui
-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 repost

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

2024-05-16 Thread Dexuan Cui
from 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
to update 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

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

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

2024-03-29 Thread Dexuan Cui
adroom; > > - *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; > > > } > > > - > > > -

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 >

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

2024-01-30 Thread Dexuan Cui
leep. 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 R

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 for x86

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

2023-10-20 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-19 Thread Dexuan Cui
CPU or 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_memory_

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

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

2023-09-19 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