Re: [EXT] Re: [PATCH RFC] iommu/virtio: Use page size bitmap supported by endpoint

2020-03-23 Thread Jean-Philippe Brucker
On Mon, Mar 23, 2020 at 06:04:37PM +, Bharat Bhushan wrote: > > > -static int viommu_domain_finalise(struct viommu_dev *viommu, > > > +static int viommu_domain_finalise(struct viommu_endpoint *vdev, > > > struct iommu_domain *domain) > > > { > > > int ret; > > >

[PATCH V7 8/8] virtio: Intel IFC VF driver for VDPA

2020-03-23 Thread Jason Wang
From: Zhu Lingshan This commit introduced two layers to drive IFC VF: (1) ifcvf_base layer, which handles IFC VF NIC hardware operations and configurations. (2) ifcvf_main layer, which complies to VDPA bus framework, implemented device operations for VDPA bus, handles device probe,

[PATCH V7 7/8] vdpasim: vDPA device simulator

2020-03-23 Thread Jason Wang
This patch implements a software vDPA networking device. The datapath is implemented through vringh and workqueue. The device has an on-chip IOMMU which translates IOVA to PA. For kernel virtio drivers, vDPA simulator driver provides dma_ops. For vhost driers, set_map() methods of vdpa_config_ops i

[PATCH V7 6/8] vhost: introduce vDPA-based backend

2020-03-23 Thread Jason Wang
From: Tiwei Bie This patch introduces a vDPA-based vhost backend. This backend is built on top of the same interface defined in virtio-vDPA and provides a generic vhost interface for userspace to accelerate the virtio devices in guest. This backend is implemented as a vDPA device driver on top o

[PATCH V7 4/8] vDPA: introduce vDPA bus

2020-03-23 Thread Jason Wang
vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: -

[PATCH V7 5/8] virtio: introduce a vDPA based transport

2020-03-23 Thread Jason Wang
This patch introduces a vDPA transport for virtio. This is used to use kernel virtio driver to drive the vDPA device that is capable of populating virtqueue directly. A new virtio-vdpa driver will be registered to the vDPA bus, when a new virtio-vdpa device is probed, it will register the device w

[PATCH V7 3/8] vringh: IOTLB support

2020-03-23 Thread Jason Wang
This patch implements the third memory accessor for vringh besides current kernel and userspace accessors. This idea is to allow vringh to do the address translation through an IOTLB which is implemented via vhost_map interval tree. Users should setup and IOVA to PA mapping in this IOTLB. This all

[PATCH V7 1/8] vhost: allow per device message handler

2020-03-23 Thread Jason Wang
This patch allow device to register its own message handler during vhost_dev_init(). vDPA device will use it to implement its own DMA mapping logic. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 3 ++- drivers/vhost/scsi.c | 2 +- drivers/vhost/vhost.c | 12 ++-- drivers/vhost

[PATCH V7 2/8] vhost: factor out IOTLB

2020-03-23 Thread Jason Wang
This patch factors out IOTLB into a dedicated module in order to be reused by other modules like vringh. User may choose to enable the automatic retiring by specifying VHOST_IOTLB_FLAG_RETIRE flag to fit for the case of vhost device IOTLB implementation. Signed-off-by: Jason Wang --- MAINTAINERS

[PATCH V7 0/8] vDPA support

2020-03-23 Thread Jason Wang
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are

[PATCH v2 5/5] x86/vmware: Use bool type for vmw_sched_clock

2020-03-23 Thread Alexey Makhalov via Virtualization
To be aligned with other bool variables. Signed-off-by: Alexey Makhalov Reviewed-by: Thomas Gleixner --- arch/x86/kernel/cpu/vmware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c index e885f73bebd4..9b6fafa69

[PATCH v2 0/5] x86/vmware: Steal time accounting support

2020-03-23 Thread Alexey Makhalov via Virtualization
Hi, This is a second version of the series. Changes are mentioned bellow. Big thanks for the reviewers. v2 changes: - renamed steal_time to vmw_steal_time (3rd patch) to avoid conflict with KVM one to fix compilation issue found by Borislav Petkov and kbuild test robot - added: "Revi

[PATCH v2 4/5] x86/vmware: Enable steal time accounting

2020-03-23 Thread Alexey Makhalov via Virtualization
Set paravirt_steal_rq_enabled if steal clock present. paravirt_steal_rq_enabled is used in sched/core.c to adjust task progress by offsetting stolen time. Use 'no-steal-acc' off switch (share same name with KVM) to disable steal time accounting. Signed-off-by: Alexey Makhalov Reviewed-by: Thomas

[PATCH v2 2/5] x86/vmware: Remove vmware_sched_clock_setup()

2020-03-23 Thread Alexey Makhalov via Virtualization
Move cyc2ns setup logic to separate function. This separation will allow to use cyc2ns mult/shift pair not only for the sched_clock but also for other clocks such as steal_clock. Signed-off-by: Alexey Makhalov Reviewed-by: Thomas Hellstrom Reviewed-by: Thomas Gleixner --- arch/x86/kernel/cpu/v

[PATCH v2 3/5] x86/vmware: Steal time clock for VMware guest

2020-03-23 Thread Alexey Makhalov via Virtualization
Steal time is the amount of CPU time needed by a guest virtual machine that is not provided by the host. Steal time occurs when the host allocates this CPU time elsewhere: for example, to another guest. Steal time can be enabled by adding VM configuration option stealclock.enable = "TRUE". It is s

[PATCH v2 1/5] x86/vmware: Make vmware_select_hypercall() __init

2020-03-23 Thread Alexey Makhalov via Virtualization
vmware_select_hypercall() is used only by the __init functions, and should be annotated with __init as well. Signed-off-by: Alexey Makhalov Reviewed-by: Thomas Hellstrom Reviewed-by: Thomas Gleixner --- arch/x86/kernel/cpu/vmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH 29/51] drm/cirrus: Drop explicit drm_mode_config_cleanup call

2020-03-23 Thread Daniel Vetter
We can even delete the drm_driver.release hook now! This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init().

[PATCH 30/51] drm/cirrus: Fully embrace devm_

2020-03-23 Thread Daniel Vetter
With the drm_device lifetime fun cleaned up there's nothing in the way anymore to use devm_ for everything hw releated. Do it, and in the process, throw out the entire onion unwinding. Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: Daniel Vetter Cc:

[PATCH 28/51] drm/bochs: Drop explicit drm_mode_config_cleanup

2020-03-23 Thread Daniel Vetter
Instead rely on the automatic clean, for which we just need to check that drm_mode_config_init succeeded. To avoid an inversion in the cleanup we also have to move the dev_private allocation over to drmm_kzalloc. This is made possible by a preceeding patch which added a drmm_ cleanup action to drm

[PATCH 09/51] drm/cirrus: Use drmm_add_final_kfree

2020-03-23 Thread Daniel Vetter
With this we can drop the final kfree from the release function. I also noticed that cirrus forgot to call drm_dev_fini(). v2: Don't call kfree(cirrus) after we've handed overship of that to drm_device and the drmm_ stuff. Acked-by: Gerd Hoffmann Acked-by: Sam Ravnborg Signed-off-by: Daniel Ve

[PATCH 07/51] drm/qxl: Use drmm_add_final_kfree

2020-03-23 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Cc: spice-de...@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- drivers/gpu/drm

[PATCH] KVM: SVM: Use __packed shorthard

2020-03-23 Thread Borislav Petkov
I guess we can do that ontop. --- From: Borislav Petkov Date: Mon, 23 Mar 2020 14:20:08 +0100 ... to make it more readable. No functional changes. Signed-off-by: Borislav Petkov --- arch/x86/include/asm/svm.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

Re: [PATCH RFC] iommu/virtio: Use page size bitmap supported by endpoint

2020-03-23 Thread Jean-Philippe Brucker
Hi Bharat, Please add the IOMMU list on your next posting On Mon, Mar 23, 2020 at 02:11:08PM +0530, Bharat Bhushan wrote: > Different endpoint can support different page size, probe > endpoint if it supports specific page size otherwise use > global page sizes. > > Signed-off-by: Bharat Bhushan