Re: [PATCH v3 1/5] x86/paravirt: move some functions and defines to alternative

2023-10-30 Thread Juergen Gross via Virtualization
On 25.10.23 12:34, Borislav Petkov wrote: On Thu, Oct 19, 2023 at 11:15:16AM +0200, Juergen Gross wrote: +/* Low-level backend functions usable from alternative code replacements. */ +DEFINE_ASM_FUNC(x86_nop, "", .entry.text); +EXPORT_SYMBOL_GPL(x86_nop); This is all x86 code so you don't real

Re: [RFC] vdpa/mlx5: preserve CVQ vringh index

2023-10-30 Thread Steven Sistare
On 10/27/2023 2:31 AM, Jason Wang wrote: > On Fri, Oct 27, 2023 at 4:07 AM Steve Sistare > wrote: >> >> mlx5_vdpa does not preserve userland's view of vring base for the control >> queue in the following sequence: >> >> ioctl VHOST_SET_VRING_BASE >> ioctl VHOST_VDPA_SET_STATUS VIRTIO_CONFIG_S_DRI

[PATCH v4 1/5] x86/paravirt: move some functions and defines to alternative

2023-10-30 Thread Juergen Gross via Virtualization
As a preparation for replacing paravirt patching completely by alternative patching, move some backend functions and #defines to alternative code and header. Signed-off-by: Juergen Gross --- V4: - rename x86_nop() to nop_func() and x86_BUG() to BUG_func() (Boris Petkov) --- arch/x86/include/as

[PATCH v4 0/5] x86/paravirt: Get rid of paravirt patching

2023-10-30 Thread Juergen Gross via Virtualization
This is a small series getting rid of paravirt patching by switching completely to alternative patching for the same functionality. The basic idea is to add the capability to switch from indirect to direct calls via a special alternative patching option. This removes _some_ of the paravirt macro

[PATCH v4 3/5] x86/paravirt: introduce ALT_NOT_XEN

2023-10-30 Thread Juergen Gross via Virtualization
Introduce the macro ALT_NOT_XEN as a short form of ALT_NOT(X86_FEATURE_XENPV). Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Juergen Gross --- V3: - split off from next patch --- arch/x86/include/asm/paravirt.h | 42 --- arch/x86/include/asm/paravirt_types.h

[PATCH v4 5/5] x86/paravirt: remove no longer needed paravirt patching code

2023-10-30 Thread Juergen Gross via Virtualization
Now that paravirt is using the alternatives patching infrastructure, remove the paravirt patching code. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/paravirt.h | 18 arch/x86/include/asm/paravirt_types.h | 40 arch/x86/in

[PATCH v4 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-10-30 Thread Juergen Gross via Virtualization
Instead of stacking alternative and paravirt patching, use the new ALT_FLAG_CALL flag to switch those mixed calls to pure alternative handling. This eliminates the need to be careful regarding the sequence of alternative and paravirt patching. For call depth tracking callthunks_setup() needs to b

Re: [PATCH V2 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-10-30 Thread Yishai Hadas via Virtualization
On 29/10/2023 22:17, Michael S. Tsirkin wrote: On Sun, Oct 29, 2023 at 05:59:48PM +0200, Yishai Hadas wrote: Initialize the supported admin commands upon activating the admin queue. The supported commands are saved as part of the admin queue context, it will be used by the next patches from thi

RE: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-30 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Monday, October 30, 2023 1:53 AM > > On Sun, Oct 29, 2023 at 05:59:45PM +0200, Yishai Hadas wrote: > > From: Feng Liu > > > > Introduce support for the admin virtqueue. By negotiating > > VIRTIO_F_ADMIN_VQ feature, driver detects capability and creates one >

Re: [PATCH V2 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-10-30 Thread Michael S. Tsirkin
On Mon, Oct 30, 2023 at 05:27:50PM +0200, Yishai Hadas wrote: > On 29/10/2023 22:17, Michael S. Tsirkin wrote: > > On Sun, Oct 29, 2023 at 05:59:48PM +0200, Yishai Hadas wrote: > > > Initialize the supported admin commands upon activating the admin queue. > > > > > > The supported commands are sav

Re: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-30 Thread Michael S. Tsirkin
On Mon, Oct 30, 2023 at 03:51:40PM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Monday, October 30, 2023 1:53 AM > > > > On Sun, Oct 29, 2023 at 05:59:45PM +0200, Yishai Hadas wrote: > > > From: Feng Liu > > > > > > Introduce support for the admin virtqueue. By negotia

Re: [PATCH V2 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-10-30 Thread Yishai Hadas via Virtualization
On 30/10/2023 17:57, Michael S. Tsirkin wrote: On Mon, Oct 30, 2023 at 05:27:50PM +0200, Yishai Hadas wrote: On 29/10/2023 22:17, Michael S. Tsirkin wrote: On Sun, Oct 29, 2023 at 05:59:48PM +0200, Yishai Hadas wrote: Initialize the supported admin commands upon activating the admin queue. Th

Re: [RFC] vdpa/mlx5: preserve CVQ vringh index

2023-10-30 Thread Steven Sistare
On 10/30/2023 11:12 AM, Eugenio Perez Martin wrote: > On Thu, Oct 26, 2023 at 10:09 PM Steve Sistare > wrote: >> >> mlx5_vdpa does not preserve userland's view of vring base for the control >> queue in the following sequence: >> >> ioctl VHOST_SET_VRING_BASE >> ioctl VHOST_VDPA_SET_STATUS VIRTIO_C

RE: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-30 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Monday, October 30, 2023 9:29 PM > On Mon, Oct 30, 2023 at 03:51:40PM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: Monday, October 30, 2023 1:53 AM > > > > > > On Sun, Oct 29, 2023 at 05:59:45PM +0200, Yishai Hadas wrote: > >

Re: [PATCH V2 vfio 5/9] virtio-pci: Initialize the supported admin commands

2023-10-30 Thread Michael S. Tsirkin
On Mon, Oct 30, 2023 at 06:06:45PM +0200, Yishai Hadas wrote: > On 30/10/2023 17:57, Michael S. Tsirkin wrote: > > On Mon, Oct 30, 2023 at 05:27:50PM +0200, Yishai Hadas wrote: > > > On 29/10/2023 22:17, Michael S. Tsirkin wrote: > > > > On Sun, Oct 29, 2023 at 05:59:48PM +0200, Yishai Hadas wrote:

Re: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-30 Thread Michael S. Tsirkin
On Mon, Oct 30, 2023 at 06:10:06PM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Monday, October 30, 2023 9:29 PM > > On Mon, Oct 30, 2023 at 03:51:40PM +, Parav Pandit wrote: > > > > > > > > > > From: Michael S. Tsirkin > > > > Sent: Monday, October 30, 2023 1:53 AM

Re: [RFC] vdpa/mlx5: preserve CVQ vringh index

2023-10-30 Thread Jason Wang
On Mon, Oct 30, 2023 at 10:06 PM Steven Sistare wrote: > > On 10/27/2023 2:31 AM, Jason Wang wrote: > > On Fri, Oct 27, 2023 at 4:07 AM Steve Sistare > > wrote: > >> > >> mlx5_vdpa does not preserve userland's view of vring base for the control > >> queue in the following sequence: > >> > >> ioc

RE: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-30 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, October 31, 2023 5:02 AM > > On Mon, Oct 30, 2023 at 06:10:06PM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: Monday, October 30, 2023 9:29 PM On Mon, Oct 30, 2023 at > > > 03:51:40PM +, Parav Pandit wrote: > > >