Re: [PATCH v5 11/12] x86/paravirt: switch functions with custom code to ALTERNATIVE

2021-03-08 Thread Jürgen Groß via Virtualization
On 08.03.21 19:30, Borislav Petkov wrote: On Mon, Mar 08, 2021 at 01:28:43PM +0100, Juergen Gross wrote: diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 36cd71fa097f..04b3067f31b5 100644 --- a/arch/x86/include/asm/paravirt.h +++

Re: [PATCH v5 02/12] x86/paravirt: switch time pvops functions to use static_call()

2021-03-08 Thread Jürgen Groß via Virtualization
On 08.03.21 18:00, Boris Ostrovsky wrote: On 3/8/21 7:28 AM, Juergen Gross wrote: --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c @@ -379,11 +379,6 @@ void xen_timer_resume(void) } } -static const struct pv_time_ops xen_time_ops __initconst = { - .sched_clock =

Re: [PATCH v7 net-next] virtio-net: support XDP when not more queues

2021-03-08 Thread Jason Wang
On 2021/3/9 10:31 上午, Xuan Zhuo wrote: On Tue, 9 Mar 2021 10:17:16 +0800, Jason Wang wrote: On 2021/3/8 4:52 下午, Xuan Zhuo wrote: The number of queues implemented by many virtio backends is limited, especially some machines have a large number of CPUs. In this case, it is often impossible to

Re: [PATCH V2 2/4] vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA

2021-03-08 Thread Jason Wang
On 2021/3/9 10:28 上午, Zhu, Lingshan wrote: On 3/9/2021 10:23 AM, Jason Wang wrote: On 2021/3/8 4:35 下午, Zhu Lingshan wrote: This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-net for vDPA Signed-off-by: Zhu Lingshan ---   drivers/vdpa/ifcvf/ifcvf_base.h | 5 +  

Re: [PATCH V2 4/4] vDPA/ifcvf: remove the version number string

2021-03-08 Thread Jason Wang
On 2021/3/8 4:35 下午, Zhu Lingshan wrote: This commit removes the version number string, using kernel version is enough. Signed-off-by: Zhu Lingshan --- Acked-by: Jason Wang drivers/vdpa/ifcvf/ifcvf_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH V2 3/4] vDPA/ifcvf: rename original IFCVF dev ids to N3000 ids

2021-03-08 Thread Jason Wang
On 2021/3/8 4:35 下午, Zhu Lingshan wrote: IFCVF driver probes multiple types of devices now, to distinguish the original device driven by IFCVF from others, it is renamed as "N3000". Signed-off-by: Zhu Lingshan Acked-by: Jason Wang You probably need to rename the driver. Thanks ---

Re: [PATCH V2 2/4] vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA

2021-03-08 Thread Jason Wang
On 2021/3/8 4:35 下午, Zhu Lingshan wrote: This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-net for vDPA Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_base.h | 5 + drivers/vdpa/ifcvf/ifcvf_main.c | 5 + 2 files changed, 10 insertions(+) diff --git

Re: [PATCH V2 1/4] vDPA/ifcvf: get_vendor_id returns a device specific vendor id

2021-03-08 Thread Jason Wang
On 2021/3/8 4:35 下午, Zhu Lingshan wrote: In this commit, ifcvf_get_vendor_id() will return a device specific vendor id of the probed pci device than a hard code. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_main.c | 5 - 1 file changed, 4

Re: [PATCH v7 net-next] virtio-net: support XDP when not more queues

2021-03-08 Thread Jason Wang
On 2021/3/8 4:52 下午, Xuan Zhuo wrote: The number of queues implemented by many virtio backends is limited, especially some machines have a large number of CPUs. In this case, it is often impossible to allocate a separate queue for XDP_TX/XDP_REDIRECT, then xdp cannot be loaded to work, even xdp

RE: [RFC PATCH 08/18] virt/mshv: map and unmap guest memory

2021-03-08 Thread Michael Kelley via Virtualization
From: Nuno Das Neves Sent: Monday, March 8, 2021 11:14 AM > > On 2/8/2021 11:45 AM, Michael Kelley wrote: > > From: Nuno Das Neves Sent: Friday, > > November > 20, 2020 4:30 PM > >> [snip] > >> @@ -245,16 +249,318 @@ hv_call_delete_partition(u64 partition_id) > >>return

Re: [PATCH v5 11/12] x86/paravirt: switch functions with custom code to ALTERNATIVE

2021-03-08 Thread Borislav Petkov
On Mon, Mar 08, 2021 at 01:28:43PM +0100, Juergen Gross wrote: > diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h > index 36cd71fa097f..04b3067f31b5 100644 > --- a/arch/x86/include/asm/paravirt.h > +++ b/arch/x86/include/asm/paravirt.h > @@ -137,7 +137,8 @@ static

Re: [PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

2021-03-08 Thread Willem de Bruijn
On Mon, Mar 8, 2021 at 11:43 AM David Ahern wrote: > > On 3/8/21 9:26 AM, Balazs Nemeth wrote: > > On Mon, 2021-03-08 at 09:17 -0700, David Ahern wrote: > >> On 3/8/21 9:07 AM, Willem de Bruijn wrote: > diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c > index

Re: [PATCH v5 02/12] x86/paravirt: switch time pvops functions to use static_call()

2021-03-08 Thread Boris Ostrovsky
On 3/8/21 7:28 AM, Juergen Gross wrote: > --- a/arch/x86/xen/time.c > +++ b/arch/x86/xen/time.c > @@ -379,11 +379,6 @@ void xen_timer_resume(void) > } > } > > -static const struct pv_time_ops xen_time_ops __initconst = { > - .sched_clock = xen_sched_clock, > - .steal_clock =

Re: [PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

2021-03-08 Thread David Ahern
On 3/8/21 9:26 AM, Balazs Nemeth wrote: > On Mon, 2021-03-08 at 09:17 -0700, David Ahern wrote: >> On 3/8/21 9:07 AM, Willem de Bruijn wrote: diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c index b1690149b6fa..cc1b6457fc93 100644 --- a/net/mpls/mpls_gso.c +++

Re: [PATCH v5 00/12] x86: major paravirt cleanup

2021-03-08 Thread Peter Zijlstra
On Mon, Mar 08, 2021 at 01:28:32PM +0100, Juergen Gross wrote: > This is a major cleanup of the paravirt infrastructure aiming at > eliminating all custom code patching via paravirt patching. > > This is achieved by using ALTERNATIVE instead, leading to the ability > to give objtool access to the

Re: [PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

2021-03-08 Thread David Ahern
On 3/8/21 9:07 AM, Willem de Bruijn wrote: >> diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c >> index b1690149b6fa..cc1b6457fc93 100644 >> --- a/net/mpls/mpls_gso.c >> +++ b/net/mpls/mpls_gso.c >> @@ -27,7 +27,7 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff >> *skb, >> >>

Re: [PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

2021-03-08 Thread Willem de Bruijn
On Mon, Mar 8, 2021 at 5:32 AM Balazs Nemeth wrote: > > A packet with skb_inner_network_header(skb) == skb_network_header(skb) > and ETH_P_MPLS_UC will prevent mpls_gso_segment from pulling any headers > from the packet. Subsequently, the call to skb_mac_gso_segment will > again call

Re: [PATCH V2 4/4] vDPA/ifcvf: remove the version number string

2021-03-08 Thread Leon Romanovsky
On Mon, Mar 08, 2021 at 04:35:25PM +0800, Zhu Lingshan wrote: > This commit removes the version number string, using kernel > version is enough. > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/ifcvf/ifcvf_main.c | 2 -- > 1 file changed, 2 deletions(-) > Thanks, Reviewed-by: Leon

Re: [PATCH v2 1/2] net: check if protocol extracted by virtio_net_hdr_set_proto is correct

2021-03-08 Thread Willem de Bruijn
On Mon, Mar 8, 2021 at 5:32 AM Balazs Nemeth wrote: > > For gso packets, virtio_net_hdr_set_proto sets the protocol (if it isn't > set) based on the type in the virtio net hdr, but the skb could contain > anything since it could come from packet_snd through a raw socket. If > there is a mismatch

[PATCH v5 09/12] x86/paravirt: switch iret pvops to ALTERNATIVE

2021-03-08 Thread Juergen Gross via Virtualization
The iret paravirt op is rather special as it is using a jmp instead of a call instruction. Switch it to ALTERNATIVE. Signed-off-by: Juergen Gross --- V3: - use ALTERNATIVE_TERNARY --- arch/x86/include/asm/paravirt.h | 6 +++--- arch/x86/include/asm/paravirt_types.h | 5 +

[PATCH v5 10/12] x86/paravirt: add new macros PVOP_ALT* supporting pvops in ALTERNATIVEs

2021-03-08 Thread Juergen Gross via Virtualization
Instead of using paravirt patching for custom code sequences add support for using ALTERNATIVE handling combined with paravirt call patching. Signed-off-by: Juergen Gross --- V3: - drop PVOP_ALT_VCALL() macro --- arch/x86/include/asm/paravirt_types.h | 49 ++- 1 file

[PATCH v5 11/12] x86/paravirt: switch functions with custom code to ALTERNATIVE

2021-03-08 Thread Juergen Gross via Virtualization
Instead of using paravirt patching for custom code sequences use ALTERNATIVE for the functions with custom code replacements. Instead of patching an ud2 instruction for unpopulated vector entries into the caller site, use a simple function just calling BUG() as a replacement. Simplify the

[PATCH v5 00/12] x86: major paravirt cleanup

2021-03-08 Thread Juergen Gross via Virtualization
This is a major cleanup of the paravirt infrastructure aiming at eliminating all custom code patching via paravirt patching. This is achieved by using ALTERNATIVE instead, leading to the ability to give objtool access to the patched in instructions. In order to remove most of the 32-bit special

[PATCH v5 12/12] x86/paravirt: have only one paravirt patch function

2021-03-08 Thread Juergen Gross via Virtualization
There is no need any longer to have different paravirt patch functions for native and Xen. Eliminate native_patch() and rename paravirt_patch_default() to paravirt_patch(). Signed-off-by: Juergen Gross --- V3: - remove paravirt_patch_insns() (kernel test robot) ---

[PATCH v5 06/12] x86: add new features for paravirt patching

2021-03-08 Thread Juergen Gross via Virtualization
For being able to switch paravirt patching from special cased custom code sequences to ALTERNATIVE handling some X86_FEATURE_* are needed as new features. This enables to have the standard indirect pv call as the default code and to patch that with the non-Xen custom code sequence via ALTERNATIVE

[PATCH v5 07/12] x86/paravirt: remove no longer needed 32-bit pvops cruft

2021-03-08 Thread Juergen Gross via Virtualization
PVOP_VCALL4() is only used for Xen PV, while PVOP_CALL4() isn't used at all. Keep PVOP_CALL4() for 64 bits due to symmetry reasons. This allows to remove the 32-bit definitions of those macros leading to a substantial simplification of the paravirt macros, as those were the only ones needing

[PATCH v5 02/12] x86/paravirt: switch time pvops functions to use static_call()

2021-03-08 Thread Juergen Gross via Virtualization
The time pvops functions are the only ones left which might be used in 32-bit mode and which return a 64-bit value. Switch them to use the static_call() mechanism instead of pvops, as this allows quite some simplification of the pvops implementation. Signed-off-by: Juergen Gross --- V4: - drop

[PATCH v5 08/12] x86/paravirt: simplify paravirt macros

2021-03-08 Thread Juergen Gross via Virtualization
The central pvops call macros PVOP_CALL() and PVOP_VCALL() are looking very similar now. The main differences are using PVOP_VCALL_ARGS or PVOP_CALL_ARGS, which are identical, and the return value handling. So drop PVOP_VCALL_ARGS and instead of PVOP_VCALL() just use

Re: [RFC PATCH 06/27] virtio: Add virtio_queue_get_used_notify_split

2021-03-08 Thread Stefan Hajnoczi
On Tue, Mar 02, 2021 at 07:34:20PM +0100, Eugenio Perez Martin wrote: > On Tue, Mar 2, 2021 at 12:22 PM Stefan Hajnoczi wrote: > > > > On Tue, Jan 12, 2021 at 07:21:27PM +0100, Eugenio Perez Martin wrote: > > > On Mon, Dec 7, 2020 at 5:58 PM Stefan Hajnoczi wrote: > > > > > > > > On Fri, Nov 20,