Re: [PATCH 2/2] KVM: not link irqfd with a fake IRQ bypass producer

2020-10-19 Thread Jason Wang
On 2020/10/19 下午5:06, Zhenzhong Duan wrote: In case failure to setup Post interrupt for an IRQ, it make no sense to assign irqfd->producer to the producer. This change makes code more robust. It's better to describe what issue we will get without this patch. Thanks Signed-off-by: Zhenzh

Re: [PATCH 1/2] KVM: not register a IRQ bypass producer if unsupported or disabled

2020-10-19 Thread Jason Wang
On 2020/10/19 下午5:06, Zhenzhong Duan wrote: If Post interrupt is disabled due to hardware limit or forcely disabled by "intremap=nopost" parameter, return -EINVAL so that the legacy mode IRQ isn't registered as IRQ bypass producer. Is there any side effect if it was still registered? With

Re: [PATCH net v2] Revert "virtio-net: ethtool configurable RXCSUM"

2020-10-19 Thread Jason Wang
On 2020/10/20 上午1:32, Michael S. Tsirkin wrote: This reverts commit 3618ad2a7c0e78e4258386394d5d5f92a3dbccf8. When the device does not have a control vq (e.g. when using a version of QEMU based on upstream v0.10 or older, or when specifying ctrl_vq=off,ctrl_rx=off,ctrl_vlan=off,ctrl_rx_extra=of

Re: [RFC 0/4] Introduce VDUSE - vDPA Device in Userspace

2020-10-19 Thread Jason Wang
On 2020/10/19 下午10:56, Xie Yongji wrote: This series introduces a framework, which can be used to implement vDPA Devices in a userspace program. To implement it, the work consist of two parts: control path emulating and data path offloading. In the control path, the VDUSE driver will make use o

Re: [External] Re: [RFC 0/4] Introduce VDUSE - vDPA Device in Userspace

2020-10-19 Thread Jason Wang
On 2020/10/20 上午10:18, 谢永吉 wrote: How does this driver compare with vhost-user-blk (which doesn't need kernel support)? We want to implement a block device rather than a virtio-blk dataplane. And with this driver's help, the vhost-user-blk process could provide storage service to

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-19 Thread Jason Gunthorpe
On Mon, Oct 19, 2020 at 12:42:15PM -0700, Nick Desaulniers wrote: > On Sat, Oct 17, 2020 at 10:43 PM Greg KH wrote: > > > > On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote: > > > From: Tom Rix > > > > > > This is a upcoming change to clean up a new warning treewide. > > > I am won

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-19 Thread Nick Desaulniers via Virtualization
On Sat, Oct 17, 2020 at 10:43 PM Greg KH wrote: > > On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote: > > From: Tom Rix > > > > This is a upcoming change to clean up a new warning treewide. > > I am wondering if the change could be one mega patch (see below) or > > normal patch per

Re: [RFC 0/4] Introduce VDUSE - vDPA Device in Userspace

2020-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2020 at 10:56:19PM +0800, Xie Yongji wrote: > This series introduces a framework, which can be used to implement > vDPA Devices in a userspace program. To implement it, the work > consist of two parts: control path emulating and data path offloading. > > In the control path, the VD

Re: [PATCH] drivers/virt: vmgenid: add vm generation id driver

2020-10-19 Thread Mathieu Desnoyers
- On Oct 17, 2020, at 2:10 PM, Andy Lutomirski l...@kernel.org wrote: > On Fri, Oct 16, 2020 at 6:40 PM Jann Horn wrote: >> >> [adding some more people who are interested in RNG stuff: Andy, Jason, >> Theodore, Willy Tarreau, Eric Biggers. also linux-api@, because this >> concerns some pretty

Re: [PATCH] drm: remove unneeded break

2020-10-19 Thread Sam Ravnborg
Hi Tom On Mon, Oct 19, 2020 at 09:31:15AM -0700, t...@redhat.com wrote: > From: Tom Rix > > A break is not needed if it is preceded by a return or break > > Signed-off-by: Tom Rix Looks good and builds with no warnings. One of the diffs made me - "oh this looks wrong". But after I looked agai

Re: [External] Re: [RFC 3/4] vduse: grab the module's references until there is no vduse device

2020-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2020 at 11:56:35PM +0800, 谢永吉 wrote: > > > > On Mon, Oct 19, 2020 at 11:47 PM Michael S. Tsirkin wrote: > > On Mon, Oct 19, 2020 at 11:44:36PM +0800, 谢永吉 wrote: > > > > > > On Mon, Oct 19, 2020 at 11:05 PM Michael S. Tsirkin > wrote: > > > >     On

Re: [External] Re: [RFC 3/4] vduse: grab the module's references until there is no vduse device

2020-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2020 at 11:44:36PM +0800, 谢永吉 wrote: > > > On Mon, Oct 19, 2020 at 11:05 PM Michael S. Tsirkin wrote: > > On Mon, Oct 19, 2020 at 10:56:22PM +0800, Xie Yongji wrote: > > The module should not be unloaded if any vduse device exists. > > So increase the module's refere

Re: [PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers

2020-10-19 Thread Daniel Vetter
On Mon, Oct 19, 2020 at 11:45:05AM +0200, Christian König wrote: > Hi Thomas, > > [SNIP] > > > >   +int ttm_bo_vmap(struct ttm_buffer_object *bo, struct dma_buf_map > > > > *map) > > > > +{ > > > > +    struct ttm_resource *mem = &bo->mem; > > > > +    int ret; > > > > + > > > > +    ret = ttm_m

Re: [RFC 2/4] vduse: Introduce VDUSE - vDPA Device in Userspace

2020-10-19 Thread Randy Dunlap
On 10/19/20 8:08 AM, Michael S. Tsirkin wrote: > On Mon, Oct 19, 2020 at 10:56:21PM +0800, Xie Yongji wrote: >> diff --git a/include/uapi/linux/vduse.h b/include/uapi/linux/vduse.h >> +#define VDUSE_BASE 'V' >> + > > Could we see some documentation about the user interface of this module > plea

Re: [RFC 1/4] mm: export zap_page_range() for driver use

2020-10-19 Thread Matthew Wilcox
On Mon, Oct 19, 2020 at 10:56:20PM +0800, Xie Yongji wrote: > Export zap_page_range() for use in VDUSE. I think you're missing a lot of MMU notifier work by calling this directly. It probably works in every scenario you've tested, but won't work for others. I see you're using VM_MIXEDMAP -- woul

Re: [RFC 2/4] vduse: Introduce VDUSE - vDPA Device in Userspace

2020-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2020 at 10:56:21PM +0800, Xie Yongji wrote: > diff --git a/include/uapi/linux/vduse.h b/include/uapi/linux/vduse.h > new file mode 100644 > index ..855d2116b3a6 > --- /dev/null > +++ b/include/uapi/linux/vduse.h > @@ -0,0 +1,85 @@ > +/* SPDX-License-Identifier: GPL-2.0 *

Re: [RFC 3/4] vduse: grab the module's references until there is no vduse device

2020-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2020 at 10:56:22PM +0800, Xie Yongji wrote: > The module should not be unloaded if any vduse device exists. > So increase the module's reference count when creating vduse > device. And the reference count is kept until the device is > destroyed. > > Signed-off-by: Xie Yongji > ---

Re: [PATCH] drivers/virt: vmgenid: add vm generation id driver

2020-10-19 Thread Michael S. Tsirkin
On Sun, Oct 18, 2020 at 09:14:00AM -0700, Andy Lutomirski wrote: > On Sun, Oct 18, 2020 at 8:59 AM Michael S. Tsirkin wrote: > > > > On Sun, Oct 18, 2020 at 08:54:36AM -0700, Andy Lutomirski wrote: > > > On Sun, Oct 18, 2020 at 8:52 AM Michael S. Tsirkin > > > wrote: > > > > > > > > On Sat, Oct

Re: [PATCH v1 20/29] virtio-mem: nb_sb_per_mb and subblock_size are specific to Sub Block Mode (SBM)

2020-10-19 Thread David Hildenbrand
On 18.10.20 14:41, Wei Yang wrote: > On Fri, Oct 16, 2020 at 03:17:06PM +0200, David Hildenbrand wrote: >> On 16.10.20 10:53, Wei Yang wrote: >>> On Mon, Oct 12, 2020 at 02:53:14PM +0200, David Hildenbrand wrote: Let's rename to "sbs_per_mb" and "sb_size" and move accordingly. Cc: "M

Re: [PATCH v1 21/29] virtio-mem: memory notifier callbacks are specific to Sub Block Mode (SBM)

2020-10-19 Thread David Hildenbrand
On 19.10.20 03:57, Wei Yang wrote: > On Mon, Oct 12, 2020 at 02:53:15PM +0200, David Hildenbrand wrote: >> Let's rename accordingly. >> >> Cc: "Michael S. Tsirkin" >> Cc: Jason Wang >> Cc: Pankaj Gupta >> Signed-off-by: David Hildenbrand >> --- >> drivers/virtio/virtio_mem.c | 29 ++

Re: [PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers

2020-10-19 Thread Christian König
Hi Thomas, [SNIP]   +int ttm_bo_vmap(struct ttm_buffer_object *bo, struct dma_buf_map *map) +{ +    struct ttm_resource *mem = &bo->mem; +    int ret; + +    ret = ttm_mem_io_reserve(bo->bdev, mem); +    if (ret) +    return ret; + +    if (mem->bus.is_iomem) { +    void __iomem *vaddr_

Re: [PATCH v1 25/29] virtio-mem: Big Block Mode (BBM) memory hotplug

2020-10-19 Thread David Hildenbrand
On 19.10.20 04:26, Wei Yang wrote: > On Mon, Oct 12, 2020 at 02:53:19PM +0200, David Hildenbrand wrote: >> Currently, we do not support device block sizes that exceed the Linux >> memory block size. For example, having a device block size of 1 GiB (e.g., >> gigantic pages in the hypervisor) won't w

Re: [PATCH v1 28/29] virtio-mem: Big Block Mode (BBM) - basic memory hotunplug

2020-10-19 Thread David Hildenbrand
On 19.10.20 05:48, Wei Yang wrote: > On Mon, Oct 12, 2020 at 02:53:22PM +0200, David Hildenbrand wrote: >> Let's try to unplug completely offline big blocks first. Then, (if >> enabled via unplug_offline) try to offline and remove whole big blocks. >> >> No locking necessary - we can deal with conc

Re: [PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers

2020-10-19 Thread Thomas Zimmermann
Hi Christian On 15.10.20 16:08, Christian König wrote: > Am 15.10.20 um 14:38 schrieb Thomas Zimmermann: >> The new functions ttm_bo_{vmap,vunmap}() map and unmap a TTM BO in kernel >> address space. The mapping's address is returned as struct dma_buf_map. >> Each function is a simplified version

Re: [PATCH v1 09/29] virtio-mem: don't always trigger the workqueue when offlining memory

2020-10-19 Thread David Hildenbrand
On 18.10.20 05:57, Wei Yang wrote: > On Fri, Oct 16, 2020 at 11:18:39AM +0200, David Hildenbrand wrote: >> On 16.10.20 06:03, Wei Yang wrote: >>> On Mon, Oct 12, 2020 at 02:53:03PM +0200, David Hildenbrand wrote: Let's trigger from offlining code when we're not allowed to touch online > > Her

Re: [PATCH v1 29/29] virtio-mem: Big Block Mode (BBM) - safe memory hotunplug

2020-10-19 Thread David Hildenbrand
On 19.10.20 09:54, Wei Yang wrote: > On Mon, Oct 12, 2020 at 02:53:23PM +0200, David Hildenbrand wrote: >> Let's add a safe mechanism to unplug memory, avoiding long/endless loops >> when trying to offline memory - similar to in SBM. >> >> Fake-offline all memory (via alloc_contig_range()) before t