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

2024-06-20 Thread Wei Liu
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 of the code snippet is to always return 0 for both fields. > > The check is wrong though. Fix that. > > > > This is discovered by this call in VFIO: > > > >

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

2024-06-20 Thread Dexuan Cui
In a TDX VM without paravisor, currently the default timer is the Hyper-V timer, which depends on the slow VM Reference Counter MSR: the Hyper-V TSC page is not enabled in such a VM because the VM uses Invariant TSC as a better clocksource and it's challenging to mark the Hyper-V TSC page shared in

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

2024-06-20 Thread Michael Kelley
From: Wei Liu Sent: Thursday, June 20, 2024 6:48 PM > > The intent of the code snippet is to always return 0 for both fields. > The check is wrong though. Fix that. > > This is discovered by this call in VFIO: > > pci_read_config_byte(vdev->pdev, PCI_INTERRUPT_PIN, &pin); > > The old code

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

2024-06-20 Thread Wei Liu
The intent of the code snippet is to always return 0 for both fields. The check is wrong though. Fix that. This is discovered by this call in VFIO: pci_read_config_byte(vdev->pdev, PCI_INTERRUPT_PIN, &pin); The old code does not set *val to 0 because the second half of the check is incorrect

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 __init ms_hyperv_init_platform(void) > > ms_hyperv.hint

[PATCH] Drivers: hv: Remove deprecated hv_fcopy declarations

2024-06-20 Thread Rachel Menge
There are lingering hv_fcopy declarations which do not have definitions. The fcopy driver was removed in commit ec314f61e4fc ("Drivers: hv: Remove fcopy driver"). Therefore, remove the hv_fcopy declarations which are no longer needed or defined. Fixes: ec314f61e4fc ("Drivers: hv: Remove fcopy dri

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

2024-06-20 Thread Michael Kelley
From: Dexuan Cui Sent: Tuesday, June 18, 2024 5:25 PM > > In a TDX VM without paravisor, currently the default timer is the Hyper-V > timer, which depends on the slow VM Reference Counter MSR: the Hyper-V TSC > page is not enabled in such a VM because the VM uses Invariant TSC as a > better clock

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

2024-06-20 Thread Roman Kisel
On 6/18/2024 5:25 PM, Dexuan Cui wrote: In a TDX VM without paravisor, currently the default timer is the Hyper-V timer, which depends on the slow VM Reference Counter MSR: the Hyper-V TSC page is not enabled in such a VM because the VM uses Invariant TSC as a better clocksource and it's chall

[PATCH v4 14/40] PCI: hv: Optimize hv_get_dom_num() by using find_and_set_bit()

2024-06-20 Thread Yury Norov
The function traverses bitmap with for_each_clear_bit() just to allocate a bit atomically. Simplify it by using dedicated find_and_set_bit(). Signed-off-by: Yury Norov Reviewed-by: Michael Kelley Acked-by: Wei Liu Acked-by: Bjorn Helgaas --- drivers/pci/controller/pci-hyperv.c | 8 +++- 1