Re: [PATCH virt] virt: fix uninit-value in vhost_vsock_dev_open

2024-04-22 Thread Stefan Hajnoczi
fields, so you could argue seqpacket_allow should just be explicitly initialized to false. However, eliminating this class of errors by zeroing seems reasonable in this code path. vhost_vsock_dev_open() is not performance-critical. Acked-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [syzbot] [virtualization?] upstream boot error: WARNING: refcount bug in __free_pages_ok

2024-03-21 Thread Stefan Hajnoczi
On Thu, Mar 21, 2024 at 08:52:03AM -0700, syzbot wrote: > Hello, > > syzbot tried to test the proposed patch but the build/boot failed: > > bcore: registered new interface driver viperboard > [7.297712][T1] usbcore: registered new interface driver dln2 > [7.299149][T1] usbcore:

Re: [syzbot] [virtualization?] upstream boot error: WARNING: refcount bug in __free_pages_ok

2024-03-21 Thread Stefan Hajnoczi
On Wed, Mar 20, 2024 at 01:08:02PM -0700, syzbot wrote: > Hello, > > syzbot has tested the proposed patch and the reproducer did not trigger any > issue: > > Reported-and-tested-by: syzbot+70f57d8a3ae84934c...@syzkaller.appspotmail.com > > Tested on: > > commit: 4bedfb31

Re: [syzbot] [virtualization?] upstream boot error: WARNING: refcount bug in __free_pages_ok

2024-03-20 Thread Stefan Hajnoczi
On Tue, Mar 19, 2024 at 03:51:18PM -0500, Mike Christie wrote: > On 3/19/24 12:19 PM, Stefan Hajnoczi wrote: > > On Tue, Mar 19, 2024 at 03:40:53AM -0400, Michael S. Tsirkin wrote: > >> On Tue, Mar 19, 2024 at 12:32:26AM -0700, syzbot wrote: > >>> Hello, > >

Re: [syzbot] [virtualization?] upstream boot error: WARNING: refcount bug in __free_pages_ok

2024-03-19 Thread Stefan Hajnoczi
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 52998cdd8d3438df9a77c858a827b8932da1bb28 This is the last time virtio_scsi.c was touched. If the test passes then the issue is probably in another subsystem and we can bisect more recent commits. If it fails, then older

Re: [syzbot] [virtualization?] upstream boot error: WARNING: refcount bug in __free_pages_ok

2024-03-19 Thread Stefan Hajnoczi
On Tue, Mar 19, 2024 at 03:40:53AM -0400, Michael S. Tsirkin wrote: > On Tue, Mar 19, 2024 at 12:32:26AM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:b3603fcb79b1 Merge tag 'dlm-6.9' of git://git.kernel.org/p.. > > git tree: upstream

Re: [PATCH] virtiofs: don't mark virtio_fs_sysfs_exit as __exit

2024-02-28 Thread Stefan Hajnoczi
On Wed, 28 Feb 2024 at 16:47, Arnd Bergmann wrote: > > From: Arnd Bergmann > > Calling an __exit function from an __init function is not allowed > and will result in undefined behavior when the code is built-in: > > WARNING: modpost: vmlinux: section mismatch in reference: virtio_fs_init+0x50 >

Re: [PATCH v3] vduse: Fix off by one in vduse_dev_mmap()

2024-02-28 Thread Stefan Hajnoczi
pa_user/vduse_dev.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi > diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c > b/drivers/vdpa/vdpa_user/vduse_dev.c > index b7a1fb88c506..eb914084c650 100644 > --- a/drivers/vdpa/vdpa_user/vduse_dev.c >

Re: [PATCH v2] vduse: Fix off by one in vduse_dev_mmap()

2024-02-28 Thread Stefan Hajnoczi
On Wed, 28 Feb 2024 at 12:44, Dan Carpenter wrote: > > The dev->vqs[] array has "dev->vq_num" elements. It's allocated in > vduse_dev_init_vqs(). Thus, this > comparison needs to be >= to avoid > reading one element beyond the end of the array. > > Add an array_index_nospec() as well to prevent

Re: [syzbot] [virtualization?] KMSAN: uninit-value in virtqueue_add (4)

2024-01-24 Thread Stefan Hajnoczi
On Wed, Jan 24, 2024 at 11:47:32AM +0100, Alexander Potapenko wrote: > On Thu, Jan 4, 2024 at 9:45 PM Stefan Hajnoczi wrote: > > > > On Tue, Jan 02, 2024 at 08:03:46AM -0500, Michael S. Tsirkin wrote: > > > On Mon, Jan 01, 2024 at 05:38:24AM -0800, syz

Re: [syzbot] [virtualization?] KMSAN: uninit-value in virtqueue_add (4)

2024-01-04 Thread Stefan Hajnoczi
On Tue, Jan 02, 2024 at 08:03:46AM -0500, Michael S. Tsirkin wrote: > On Mon, Jan 01, 2024 at 05:38:24AM -0800, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:fbafc3e621c3 Merge tag 'for_linus' of git://git.kernel.org.. > > git tree: upstream

Re: [PATCH] virtio_blk: Add support for lifetime feature

2021-04-14 Thread Stefan Hajnoczi
On Mon, Apr 12, 2021 at 10:42:17AM +0100, Christoph Hellwig wrote: > A note to the virtio committee: eMMC is the worst of all the currently > active storage standards by a large margin. It defines very strange > ad-hoc interfaces that expose very specific internals and often provides > very poor

Re: [PATCH] virtiofs: remove useless function

2021-04-14 Thread Stefan Hajnoczi
/virtio_fs.c | 5 - > 1 file changed, 5 deletions(-) The function was never used... Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] virtio_blk: Add support for lifetime feature

2021-04-12 Thread Stefan Hajnoczi
On Tue, Mar 30, 2021 at 11:16:02PM +, Enrico Granata wrote: > The VirtIO TC has adopted a new feature in virtio-blk enabling > discovery of lifetime information. > > This commit adds support for the VIRTIO_BLK_T_LIFETIME command > to the virtio_blk driver, and adds two new attributes to the >

Re: memory leak in virtio_transport_send_pkt_info

2021-03-31 Thread Stefan Hajnoczi
On Mon, Feb 08, 2021 at 08:39:30AM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:9f29bd8b Merge tag 'fs_for_v5.11-rc5' of git://git.kernel... > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=11e435af50 >

Re: [PATCH] virtio_blk: make virtio blks as non-rotational devices

2021-03-29 Thread Stefan Hajnoczi
On Fri, Mar 26, 2021 at 11:39:13AM +0800, Sochin Jiang wrote: > This confuses some users seeing one rotational block device > in the guest(/sys/block/vdx/queue/rotational), let's make > virtio blks as virtual block devices, just like xen blks, > and as we known, QUEUE_FLAG_VIRT is defined as

Re: [PATCH 2/3] virtiofs: split requests that exceed virtqueue size

2021-03-22 Thread Stefan Hajnoczi
_i.h| 5 + > fs/fuse/inode.c | 7 +++ > fs/fuse/virtio_fs.c | 14 ++ > 3 files changed, 26 insertions(+) Nice that FUSE already has max_pages :-). Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v2] virtiofs: fix memory leak in virtio_fs_probe()

2021-03-17 Thread Stefan Hajnoczi
_sys_finit_module+0xb5/0x120 > [<ad2f48c6>] do_syscall_64+0x33/0x40 > [<809526b5>] entry_SYSCALL_64_after_hwframe+0x44/0xae > > Cc: sta...@vger.kernel.org > Signed-off-by: Luis Henriques > --- > Changes since v1: > - Use kfree() to free fs->vqs instead of calling virtio_fs_put() > > fs/fuse/virtio_fs.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] scsi: target: vhost-scsi: remove redundant initialization of variable ret

2021-03-04 Thread Stefan Hajnoczi
On Wed, Mar 03, 2021 at 01:43:39PM +, Colin King wrote: > From: Colin Ian King > > The variable ret is being initialized with a value that is never read > and it is being updated later with a new value. The initialization is > redundant and can be removed. > > Addresses-Coverity: ("Unused

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-03 Thread Stefan Hajnoczi
On Tue, Mar 02, 2021 at 11:54:02AM +0100, Arnd Bergmann wrote: > On Tue, Mar 2, 2021 at 10:51 AM Stefan Hajnoczi wrote: > > On Tue, Mar 02, 2021 at 10:42:06AM +0800, Jie Deng wrote: > > > > > +/* > > > > > + * Definitions for virtio I2C Adpter > > >

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-02 Thread Stefan Hajnoczi
On Tue, Mar 02, 2021 at 10:42:06AM +0800, Jie Deng wrote: > > On 2021/3/1 23:19, Arnd Bergmann wrote: > > On Mon, Mar 1, 2021 at 7:41 AM Jie Deng wrote: > > > > > --- /dev/null > > > +++ b/include/uapi/linux/virtio_i2c.h > > > @@ -0,0 +1,56 @@ > > > +/* SPDX-License-Identifier: GPL-2.0-or-later

Re: [RFC PATCH] blk-core: remove blk_put_request()

2021-02-24 Thread Stefan Hajnoczi
On Mon, Feb 22, 2021 at 01:11:15PM -0800, Chaitanya Kulkarni wrote: > The function blk_put_request() is just a wrapper to > blk_mq_free_request(), remove the unnecessary wrapper. > > Any feedback is welcome on this RFC. > > Signed-off-by: Chaitanya Kulkarni > --- > block/blk-core.c

Re: [PATCH RFC v2 08/10] vdpa: add vdpa simulator for block device

2021-02-03 Thread Stefan Hajnoczi
On Tue, Feb 02, 2021 at 04:49:50PM +0100, Stefano Garzarella wrote: > On Tue, Feb 02, 2021 at 09:34:12AM +0000, Stefan Hajnoczi wrote: > > On Thu, Jan 28, 2021 at 03:41:25PM +0100, Stefano Garzarella wrote: > > > +static void vdpasim_blk_work(struct work_struct *work) >

Re: [PATCH RFC v2 10/10] vdpa_sim_blk: handle VIRTIO_BLK_T_GET_ID

2021-02-02 Thread Stefan Hajnoczi
ers/vdpa/vdpa_sim/vdpa_sim_blk.c | 15 +++ > 1 file changed, 15 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH RFC v2 08/10] vdpa: add vdpa simulator for block device

2021-02-02 Thread Stefan Hajnoczi
On Thu, Jan 28, 2021 at 03:41:25PM +0100, Stefano Garzarella wrote: > +static void vdpasim_blk_work(struct work_struct *work) > +{ > + struct vdpasim *vdpasim = container_of(work, struct vdpasim, work); > + u8 status = VIRTIO_BLK_S_OK; > + int i; > + > + spin_lock(>lock); > + > +

Re: [PATCH RFC v2 09/10] vdpa_sim_blk: implement ramdisk behaviour

2021-02-02 Thread Stefan Hajnoczi
ows [Stefan] > - use vdpasim*_to_cpu instead of le*_to_cpu > - used vringh_kiov_length() helper [Jason] > --- > drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 164 --- > 1 file changed, 146 insertions(+), 18 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v2] vhost/vsock: add IOTLB API support

2021-01-04 Thread Stefan Hajnoczi
,ats=on > > [1] https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg09077.html > > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Stefano Garzarella > --- > > The patch is the same of v1, but I re-tested it with: > - QEMU v5.2.0-551-ga05f8ecd88 > - Linux 5.9.15

Re: [PATCH 06/21] vdpa: introduce virtqueue groups

2021-01-04 Thread Stefan Hajnoczi
On Wed, Dec 16, 2020 at 02:48:03PM +0800, Jason Wang wrote: > This patch introduces virtqueue groups to vDPA device. The virtqueue > group is the minimal set of virtqueues that must share an address > space. And the adddress space identifier could only be attached to > a specific virtqueue group.

Re: [PATCH] vhost scsi: fix error return code in vhost_scsi_set_endpoint()

2020-12-07 Thread Stefan Hajnoczi
-by: Hulk Robot > Signed-off-by: Zhang Changzhong > --- > drivers/vhost/scsi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Acked-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] vfio iommu type1: Bypass the vma permission check in vfio_pin_pages_remote()

2020-12-07 Thread Stefan Hajnoczi
On Thu, Dec 03, 2020 at 05:01:32PM +0100, David Hildenbrand wrote: > The real question is: do we even *need* DMA from vfio devices to > virtio-fs regions? If not (do guests rely on it? what does the spec > state?), just don't care about vfio at all and don't map anything. Can DMA to/from the

Re: [PATCH] vfio iommu type1: Bypass the vma permission check in vfio_pin_pages_remote()

2020-12-03 Thread Stefan Hajnoczi
On Wed, Dec 02, 2020 at 10:45:11AM -0500, Peter Xu wrote: > On Wed, Dec 02, 2020 at 02:33:56PM +0000, Stefan Hajnoczi wrote: > > On Wed, Nov 25, 2020 at 10:57:11AM -0500, Peter Xu wrote: > > > On Wed, Nov 25, 2020 at 01:05:25AM +, Justin He wrote: > > > > > I'

Re: [PATCH net-next v1 1/3] vm_sockets: Include flag field in the vsock address data structure

2020-12-03 Thread Stefan Hajnoczi
On Tue, Dec 01, 2020 at 05:25:03PM +0200, Andra Paraschiv wrote: > vsock enables communication between virtual machines and the host they > are running on. With the multi transport support (guest->host and > host->guest), nested VMs can also use vsock channels for communication. > > In addition

Re: [PATCH] vfio iommu type1: Bypass the vma permission check in vfio_pin_pages_remote()

2020-12-02 Thread Stefan Hajnoczi
On Wed, Nov 25, 2020 at 10:57:11AM -0500, Peter Xu wrote: > On Wed, Nov 25, 2020 at 01:05:25AM +, Justin He wrote: > > > I'd appreciate if you could explain why vfio needs to dma map some > > > PROT_NONE > > > > Virtiofs will map a PROT_NONE cache window region firstly, then remap the > >

Re: [PATCH net] vsock: forward all packets to the host when no H2G is registered

2020-11-19 Thread Stefan Hajnoczi
; > Cc: Jorgen Hansen > Cc: Dexuan Cui > Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") > Reported-by: Andra Paraschiv > Tested-by: Andra Paraschiv > Signed-off-by: Stefano Garzarella > --- > net/vmw_vsock/af_vsock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH RFC 04/12] vdpa: add vdpa simulator for block device

2020-11-18 Thread Stefan Hajnoczi
On Tue, Nov 17, 2020 at 06:38:11PM +0100, Stefano Garzarella wrote: > On Tue, Nov 17, 2020 at 04:43:42PM +0000, Stefan Hajnoczi wrote: > > On Tue, Nov 17, 2020 at 03:16:20PM +0100, Stefano Garzarella wrote: > > > On Tue, Nov 17, 2020 at 11:11:21AM +0000, Stefan Hajnoczi wrote: &

Re: [PATCH RFC 04/12] vdpa: add vdpa simulator for block device

2020-11-17 Thread Stefan Hajnoczi
On Tue, Nov 17, 2020 at 03:16:20PM +0100, Stefano Garzarella wrote: > On Tue, Nov 17, 2020 at 11:11:21AM +0000, Stefan Hajnoczi wrote: > > On Fri, Nov 13, 2020 at 02:47:04PM +0100, Stefano Garzarella wrote: > > > +static void vdpasim_blk_work(struct work_struct *work) >

Re: [PATCH RFC 12/12] vdpa_sim_blk: implement ramdisk behaviour

2020-11-17 Thread Stefan Hajnoczi
On Fri, Nov 13, 2020 at 02:47:12PM +0100, Stefano Garzarella wrote: > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim_blk.c > b/drivers/vdpa/vdpa_sim/vdpa_sim_blk.c > index 8e41b3ab98d5..68e74383322f 100644 > --- a/drivers/vdpa/vdpa_sim/vdpa_sim_blk.c > +++ b/drivers/vdpa/vdpa_sim/vdpa_sim_blk.c > @@

Re: [PATCH RFC 10/12] vdpa_sim: split vdpasim_virtqueue's iov field in riov and wiov

2020-11-17 Thread Stefan Hajnoczi
On Fri, Nov 13, 2020 at 02:47:10PM +0100, Stefano Garzarella wrote: > vringh_getdesc_iotlb() manages 2 iovs for writable and readable > descriptors. This is very useful for the block device, where for > each request we have both types of descriptor. > > Let's split the vdpasim_virtqueue's iov

Re: [PATCH RFC 06/12] vdpa_sim: add struct vdpasim_device to store device properties

2020-11-17 Thread Stefan Hajnoczi
On Fri, Nov 13, 2020 at 02:47:06PM +0100, Stefano Garzarella wrote: > Move device properties used during the entire life cycle in a new > structure to simplify the copy of these fields during the vdpasim > initialization. > > Signed-off-by: Stefano Garzarella > --- >

Re: [PATCH RFC 04/12] vdpa: add vdpa simulator for block device

2020-11-17 Thread Stefan Hajnoczi
On Fri, Nov 13, 2020 at 02:47:04PM +0100, Stefano Garzarella wrote: > +static void vdpasim_blk_work(struct work_struct *work) > +{ > + struct vdpasim *vdpasim = container_of(work, struct vdpasim, work); > + u8 status = VIRTIO_BLK_S_OK; > + int i; > + > + spin_lock(>lock); > + > +

Re: [PATCH RFC 01/12] vhost-vdpa: add support for vDPA blk devices

2020-11-17 Thread Stefan Hajnoczi
On Fri, Nov 13, 2020 at 02:47:01PM +0100, Stefano Garzarella wrote: > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c > index 2754f3069738..fb0411594963 100644 > --- a/drivers/vhost/vdpa.c > +++ b/drivers/vhost/vdpa.c > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include

Re: [PATCH] vhost/vsock: add IOTLB API support

2020-10-30 Thread Stefan Hajnoczi
igned-off-by: Stefano Garzarella > --- > drivers/vhost/vsock.c | 68 +++++-- > 1 file changed, 65 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: virtiofs: WARN_ON(out_sgs + in_sgs != total_sgs)

2020-10-06 Thread Stefan Hajnoczi
On Sun, Oct 04, 2020 at 10:31:19AM -0400, Vivek Goyal wrote: > On Fri, Oct 02, 2020 at 10:44:37PM -0400, Qian Cai wrote: > > On Fri, 2020-10-02 at 12:28 -0400, Qian Cai wrote: > > > Running some fuzzing on virtiofs from a non-privileged user could trigger > > > a > > > warning in

Re: [RFC PATCH 00/24] Control VQ support in vDPA

2020-09-24 Thread Stefan Hajnoczi
On Thu, Sep 24, 2020 at 11:21:01AM +0800, Jason Wang wrote: > This series tries to add the support for control virtqueue in vDPA. Please include documentation for both driver authors and vhost-vdpa ioctl users. vhost-vdpa ioctls are only documented with a single sentence. Please add full

Re: [PATCH v3 11/18] fuse: implement FUSE_INIT map_alignment field

2020-08-26 Thread Stefan Hajnoczi
gt; > work even when emulating x86 on Power and similar combinations where the > > > host page sizes are different. > > > > > > Signed-off-by: Stefan Hajnoczi > > > Signed-off-by: Vivek Goyal > > > --- > > > fs/fuse/fuse_i.h

Re: [PATCH v2 0/5] virtio mmio specification enhancement

2020-07-31 Thread Stefan Hajnoczi
On Thu, Jul 30, 2020 at 08:15:12PM +, Pincus, Josh wrote: > We were looking into a similar enhancement for the Virt I/O MMIO transport > and came across this project. > This enhancement would be perfect for us. > > Has there been any progress since Feb, 2020? It looks like the effort might

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-31 Thread Stefan Hajnoczi
Hi, Sileby looks interesting! I had just written up the following idea which seems similar but includes a mechanism for revoking mappings. Alexander Graf recently brought up an idea that solves the following problem: When process A passes shared memory file descriptors to process B there is no

Re: [PATCH 02/10] block: virtio-blk: check logical block size

2020-07-28 Thread Stefan Hajnoczi
ile changed, 13 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: strace of io_uring events?

2020-07-23 Thread Stefan Hajnoczi
On Tue, Jul 21, 2020 at 05:58:48PM +0200, Stefano Garzarella wrote: > On Tue, Jul 21, 2020 at 08:27:34AM -0700, Andy Lutomirski wrote: > > On Fri, Jul 17, 2020 at 1:02 AM Stefano Garzarella > > wrote: > > > > > > On Thu, Jul 16, 2020 at 08:12:35AM -0700, Kees Cook wrote: > > > > On Thu, Jul 16,

Re: [PATCH v5 01/18] nitro_enclaves: Add ioctl interface definition

2020-07-16 Thread Stefan Hajnoczi
On Wed, Jul 15, 2020 at 10:45:23PM +0300, Andra Paraschiv wrote: > + * A NE CPU pool has be set before calling this function. The pool can be set s/has be/has to be/ Thanks, this looks good! Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] vhost/scsi: fix up req type endian-ness

2020-07-13 Thread Stefan Hajnoczi
rnel.org > Signed-off-by: Michael S. Tsirkin > --- > drivers/vhost/scsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] vsock/virtio: annotate 'the_virtio_vsock' RCU pointer

2020-07-13 Thread Stefan Hajnoczi
eref] > __rcu * > net/vmw_vsock/virtio_transport.c:631:9:struct virtio_vsock * > > Fixes: 0deab087b16a ("vsock/virtio: use RCU to avoid use-after-free on > the_virtio_vsock") > Reported-by: Michael S. Tsirkin > Signed-off-by: Stefano Garzarella > --- >

Re: [PATCH RFC 0/3] io_uring: add restrictions to support untrusted applications and guests

2020-07-13 Thread Stefan Hajnoczi
On Fri, Jul 10, 2020 at 06:20:17PM +0200, Stefano Garzarella wrote: > On Fri, Jul 10, 2020 at 11:33:09AM -0400, Konrad Rzeszutek Wilk wrote: > > .snip.. > > > Just to recap the proposal, the idea is to add some restrictions to the > > > operations (sqe, register, fixed file) to safely allow

Re: [PATCH v3 02/14] iommu: Report domain nesting info

2020-07-03 Thread Stefan Hajnoczi
On Tue, Jun 30, 2020 at 02:00:49AM +, Tian, Kevin wrote: > > From: Liu, Yi L > > Sent: Monday, June 29, 2020 8:23 PM > > > > Hi Stefan, > > > > > From: Stefan Hajnoczi > > > Sent: Monday, June 29, 2020 5:25 PM > > > >

Re: [PATCH v3 02/14] iommu: Report domain nesting info

2020-06-29 Thread Stefan Hajnoczi
On Wed, Jun 24, 2020 at 01:55:15AM -0700, Liu Yi L wrote: > +/* > + * struct iommu_nesting_info - Information for nesting-capable IOMMU. > + * user space should check it before using > + * nesting capability. > + * > + * @size:size of the

Re: [PATCH v3 13/14] vfio: Document dual stage control

2020-06-29 Thread Stefan Hajnoczi
fined by the Virtual Command Support in VT-d 3.0 spec, guest software > +running on VT-d should allocate PASID from host kernel. To allocate PASID > +from host, user space should +check the IOMMU_NESTING_FEAT_SYSWIDE_PASID s/+check/check/g Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v4 01/18] nitro_enclaves: Add ioctl interface definition

2020-06-25 Thread Stefan Hajnoczi
On Wed, Jun 24, 2020 at 05:02:54PM +0300, Paraschiv, Andra-Irina wrote: > On 23/06/2020 11:56, Stefan Hajnoczi wrote: > > On Mon, Jun 22, 2020 at 11:03:12PM +0300, Andra Paraschiv wrote: > > > +/* User memory region flags */ > > > + > > > +/* Mem

Re: [PATCH v4 17/18] nitro_enclaves: Add overview documentation

2020-06-25 Thread Stefan Hajnoczi
On Wed, Jun 24, 2020 at 05:39:39PM +0300, Paraschiv, Andra-Irina wrote: > > > On 23/06/2020 11:59, Stefan Hajnoczi wrote: > > On Mon, Jun 22, 2020 at 11:03:28PM +0300, Andra Paraschiv wrote: > > > +The kernel bzImage, the kernel command line, the ramdisk(s) are part of

Re: [PATCH v4 17/18] nitro_enclaves: Add overview documentation

2020-06-23 Thread Stefan Hajnoczi
On Mon, Jun 22, 2020 at 11:03:28PM +0300, Andra Paraschiv wrote: > +The kernel bzImage, the kernel command line, the ramdisk(s) are part of the > +Enclave Image Format (EIF); plus an EIF header including metadata such as > magic > +number, eif version, image size and CRC. > + > +Hash values are

Re: [PATCH v4 01/18] nitro_enclaves: Add ioctl interface definition

2020-06-23 Thread Stefan Hajnoczi
On Mon, Jun 22, 2020 at 11:03:12PM +0300, Andra Paraschiv wrote: > diff --git a/include/uapi/linux/nitro_enclaves.h > b/include/uapi/linux/nitro_enclaves.h > new file mode 100644 > index ..3270eb939a97 > --- /dev/null > +++ b/include/uapi/linux/nitro_enclaves.h > @@ -0,0 +1,137 @@ >

Re: [PATCH v2 14/15] vfio: Document dual stage control

2020-06-22 Thread Stefan Hajnoczi
On Wed, Jun 17, 2020 at 06:27:27AM +, Liu, Yi L wrote: > > From: Stefan Hajnoczi > > Sent: Monday, June 15, 2020 5:41 PM > > On Thu, Jun 11, 2020 at 05:15:33AM -0700, Liu Yi L wrote: > > > > > From: Eric Auger > > > > > > The VFIO API wa

Re: [PATCH v2 00/15] vfio: expose virtual Shared Virtual Addressing to VMs

2020-06-22 Thread Stefan Hajnoczi
On Tue, Jun 16, 2020 at 12:09:16PM -0400, Peter Xu wrote: > On Tue, Jun 16, 2020 at 04:49:28PM +0100, Stefan Hajnoczi wrote: > > Isolation between applications is preserved but there is no isolation > > between the device and the application itself. The application needs to >

Re: [PATCH v2 00/15] vfio: expose virtual Shared Virtual Addressing to VMs

2020-06-22 Thread Stefan Hajnoczi
On Tue, Jun 16, 2020 at 10:00:16AM -0700, Raj, Ashok wrote: > On Tue, Jun 16, 2020 at 04:49:28PM +0100, Stefan Hajnoczi wrote: > > On Tue, Jun 16, 2020 at 02:26:38AM +, Tian, Kevin wrote: > > > > From: Stefan Hajnoczi > > > > Sent: Monday, June 15, 2020 6:02 P

Re: [RFC v9 09/11] vhost/scsi: switch to buf APIs

2020-06-22 Thread Stefan Hajnoczi
on virtio_scsi_ctrl_tmf_resp\n"); > } The curly brackets are not necessary, but the patch still looks fine: Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [RFC v9 10/11] vhost/vsock: switch to the buf API

2020-06-22 Thread Stefan Hajnoczi
> 1 file changed, 18 insertions(+), 12 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH V2] drivers/block: Use kobj_to_dev() API

2020-06-22 Thread Stefan Hajnoczi
On Sat, Jun 20, 2020 at 09:53:43AM +0800, Wang Qing wrote: > Use kobj_to_dev() API instead of container_of(). > > Signed-off-by: Wang Qing > --- > drivers/block/virtio_blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.as

Re: [PATCH] drivers\block: Use kobj_to_dev() API

2020-06-19 Thread Stefan Hajnoczi
ivers/block/virtio_blk.c Please fix the '\' -> '/' in the commit message. Looks good otherwise: Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

[RFC 1/2] genirq: honor device NUMA node when allocating descs

2020-06-17 Thread Stefan Hajnoczi
Use the device's NUMA node instead of the first masked CPUs node when descs are allocated. The mask may include all CPUs and therefore not correspond to the home NUMA node of the device. Signed-off-by: Stefan Hajnoczi --- kernel/irq/irqdesc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[RFC 0/2] genirq: take device NUMA node into account for managed IRQs

2020-06-17 Thread Stefan Hajnoczi
reason why managed IRQs should *not* take NUMA into account that I've missed? 2. Is there a better place to implement this logic? For example, pci_alloc_irq_vectors_affinity() where the cpumasks are calculated. Any suggestions on how to proceed would be appreciated. Thanks! Stefan Hajnoczi (2):

[RFC 2/2] genirq/matrix: take NUMA into account for managed IRQs

2020-06-17 Thread Stefan Hajnoczi
Select CPUs from the IRQ's NUMA node in preference over other CPUs. This ensures that managed IRQs are assigned to the same NUMA node as the device. Signed-off-by: Stefan Hajnoczi --- include/linux/irq.h | 2 +- arch/x86/kernel/apic/vector.c | 3 ++- kernel/irq/matrix.c

Re: [PATCH v2 00/15] vfio: expose virtual Shared Virtual Addressing to VMs

2020-06-16 Thread Stefan Hajnoczi
On Tue, Jun 16, 2020 at 02:26:38AM +, Tian, Kevin wrote: > > From: Stefan Hajnoczi > > Sent: Monday, June 15, 2020 6:02 PM > > > > On Thu, Jun 11, 2020 at 05:15:19AM -0700, Liu Yi L wrote: > > > Shared Virtual Addressing (SVA), a.k.a, Shared Virtual Memo

Re: [PATCH v2 00/15] vfio: expose virtual Shared Virtual Addressing to VMs

2020-06-16 Thread Stefan Hajnoczi
On Mon, Jun 15, 2020 at 12:39:40PM +, Liu, Yi L wrote: > > From: Stefan Hajnoczi > > Sent: Monday, June 15, 2020 6:02 PM > > > > On Thu, Jun 11, 2020 at 05:15:19AM -0700, Liu Yi L wrote: > > > Shared Virtual Addressing (SVA), a.k.a, Shared Virtual Memory (SVM

Re: [PATCH v2 00/15] vfio: expose virtual Shared Virtual Addressing to VMs

2020-06-15 Thread Stefan Hajnoczi
On Thu, Jun 11, 2020 at 05:15:19AM -0700, Liu Yi L wrote: > Shared Virtual Addressing (SVA), a.k.a, Shared Virtual Memory (SVM) on > Intel platforms allows address space sharing between device DMA and > applications. SVA can reduce programming complexity and enhance security. > > This VFIO series

Re: [PATCH v2 14/15] vfio: Document dual stage control

2020-06-15 Thread Stefan Hajnoczi
On Thu, Jun 11, 2020 at 05:15:33AM -0700, Liu Yi L wrote: > From: Eric Auger > > The VFIO API was enhanced to support nested stage control: a bunch of > new iotcls and usage guideline. > > Let's document the process to follow to set up nested mode. > > Cc: Kevin Tian > CC: Jacob Pan > Cc:

Re: [PATCH RFC v5 12/13] vhost/vsock: switch to the buf API

2020-06-08 Thread Stefan Hajnoczi
On Sun, Jun 07, 2020 at 10:11:49AM -0400, Michael S. Tsirkin wrote: > A straight-forward conversion. > > Signed-off-by: Michael S. Tsirkin > --- > drivers/vhost/vsock.c | 30 ++ > 1 file changed, 18 insertions(+), 12 deletions(-) Reviewed-b

Re: [PATCH RFC v5 11/13] vhost/scsi: switch to buf APIs

2020-06-08 Thread Stefan Hajnoczi
ers/vhost/scsi.c | 73 ++-- > 1 file changed, 44 insertions(+), 29 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH RFC 11/13] vhost/scsi: switch to buf APIs

2020-06-05 Thread Stefan Hajnoczi
t drivers might be happier (especially drivers for niche OSes that were only tested against QEMU's virtio-scsi). On the other hand, it's a guest-visible change that could break similar niche drivers that assume length is always 0. I'd leave it as-is unless people hit issues that justify the risk of changing it. Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH RFC 12/13] vhost/vsock: switch to the buf API

2020-06-05 Thread Stefan Hajnoczi
On Tue, Jun 02, 2020 at 09:06:22AM -0400, Michael S. Tsirkin wrote: > A straight-forward conversion. > > Signed-off-by: Michael S. Tsirkin > --- > drivers/vhost/vsock.c | 30 ++ > 1 file changed, 18 insertions(+), 12 deletions(-) Reviewed-b

Re: [PATCH v3 01/18] nitro_enclaves: Add ioctl interface definition

2020-06-05 Thread Stefan Hajnoczi
On Mon, Jun 01, 2020 at 10:20:18AM +0300, Paraschiv, Andra-Irina wrote: > > > On 01/06/2020 06:02, Benjamin Herrenschmidt wrote: > > On Wed, 2020-05-27 at 09:49 +0100, Stefan Hajnoczi wrote: > > > What about feature bits or a API version number field? If you add > &g

[PATCH v2] capabilities: add description for CAP_SETFCAP

2020-06-02 Thread Stefan Hajnoczi
Document the purpose of CAP_SETFCAP. For some reason this capability had no description while the others did. Signed-off-by: Stefan Hajnoczi --- v2: * Rebased onto git master include/uapi/linux/capability.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/capability.h

Re: [PATCH v3 01/18] nitro_enclaves: Add ioctl interface definition

2020-05-27 Thread Stefan Hajnoczi
On Tue, May 26, 2020 at 01:13:17AM +0300, Andra Paraschiv wrote: > The Nitro Enclaves driver handles the enclave lifetime management. This > includes enclave creation, termination and setting up its resources such > as memory and CPU. > > An enclave runs alongside the VM that spawned it. It is

Re: [PATCH v1 00/15] Add support for Nitro Enclaves

2020-05-11 Thread Stefan Hajnoczi
On Sun, May 10, 2020 at 11:02:18AM +, Herrenschmidt, Benjamin wrote: > On Sat, 2020-05-09 at 21:21 +0200, Pavel Machek wrote: > > > > On Fri 2020-05-08 10:00:27, Paraschiv, Andra-Irina wrote: > > > > > > > > > On 07/05/2020 20:44, Pavel Machek wrote: > > > > > > > > Hi! > > > > > > > > >

Re: linux-next: Fixes tag needs some work in the vhost tree

2020-05-05 Thread Stefan Hajnoczi
On Sat, May 02, 2020 at 10:30:18AM +1000, Stephen Rothwell wrote: > Hi all, > > In commit > > ab8be610c87d ("virtio-blk: handle block_device_operations callbacks after > hot unplug") > > Fixes tag > > Fixes: 48e4043d4529523cbc7fa8dd745bd8e2c45ce1d3 > > has these problem(s): > > -

[PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-30 Thread Stefan Hajnoczi
all cases. Fixes: 48e4043d4529523cbc7fa8dd745bd8e2c45ce1d3 ("virtio: add virtio disk geometry feature") Reported-by: Lance Digby Signed-off-by: Stefan Hajnoczi --- v4: * Clarify vdev_mutex usage [Stefano and Michael] drivers/block/virtio_blk.c | 86 +++

Re: [PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-30 Thread Stefan Hajnoczi
On Thu, Apr 30, 2020 at 10:43:23AM +0200, Stefano Garzarella wrote: > On Wed, Apr 29, 2020 at 05:53:45PM +0100, Stefan Hajnoczi wrote: > > A userspace process holding a file descriptor to a virtio_blk device can > > still invoke block_device_operations after hot unplug. This lea

[PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-29 Thread Stefan Hajnoczi
all cases. Fixes: 48e4043d4529523cbc7fa8dd745bd8e2c45ce1d3 ("virtio: add virtio disk geometry feature") Reported-by: Lance Digby Signed-off-by: Stefan Hajnoczi --- drivers/block/virtio_blk.c | 87 ++ 1 file changed, 79 insertions(+), 8 delet

Re: [PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-28 Thread Stefan Hajnoczi
On Tue, Apr 28, 2020 at 11:25:07AM -0400, Michael S. Tsirkin wrote: > On Tue, Apr 28, 2020 at 03:30:09PM +0100, Stefan Hajnoczi wrote: > > A userspace process holding a file descriptor to a virtio_blk device can > > still invoke block_device_operations after hot unplug. For example

[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-04-28 Thread Stefan Hajnoczi
ported-by: Lance Digby Signed-off-by: Stefan Hajnoczi --- If someone has a simpler solution please let me know. I looked at various approaches including reusing device_lock(>vdev.dev) but they were more complex and extending the lifetime of virtio_device after remove() has been called seems que

Re: [PATCH] capabilities: add description for CAP_SETFCAP

2020-04-28 Thread Stefan Hajnoczi
On Tue, Apr 14, 2020 at 04:49:45PM +0100, Stefan Hajnoczi wrote: > Document the purpose of CAP_SETFCAP. For some reason this capability > had no description while the others did. > > Signed-off-by: Stefan Hajnoczi > --- > include/uapi/linux/capability.h | 2 ++ > 1 file

Re: [PATCH -next] virtiofs: remove unused variable 'fc'

2019-10-23 Thread Stefan Hajnoczi
t; > Signed-off-by: YueHaibing > --- > fs/fuse/virtio_fs.c | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] vsock/virtio: remove unused 'work' field from 'struct virtio_vsock_pkt'

2019-10-16 Thread Stefan Hajnoczi
the per-packet 'struct virtio_vsock_pkt' > > Suggested-by: Michael S. Tsirkin > Signed-off-by: Stefano Garzarella > --- > include/linux/virtio_vsock.h | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH net 0/2] vsock: don't allow half-closed socket in the host transports

2019-10-15 Thread Stefan Hajnoczi
On Sat, Oct 12, 2019 at 06:38:46PM -0400, Michael S. Tsirkin wrote: > On Fri, Oct 11, 2019 at 04:34:57PM +0200, Stefano Garzarella wrote: > > On Fri, Oct 11, 2019 at 10:19:13AM -0400, Michael S. Tsirkin wrote: > > > On Fri, Oct 11, 2019 at 03:07:56PM +0200, Stefano Garzarella wrote: > > > > We are

Re: [PATCH V3 0/7] mdev based hardware virtio offloading support

2019-10-14 Thread Stefan Hajnoczi
On Fri, Oct 11, 2019 at 04:15:50PM +0800, Jason Wang wrote: > There are hardware that can do virtio datapath offloading while having > its own control path. This path tries to implement a mdev based > unified API to support using kernel virtio driver to drive those > devices. This is done by

Re: [PATCH v4 1/5] vsock/virtio: limit the memory used per-socket

2019-10-14 Thread Stefan Hajnoczi
he vring with new 4 KB free buffers > > > > > to avoid starvation of other sockets. > > > > > > > > > > This patch mitigates this issue copying the payload of small > > > > > packets (< 128 bytes) into the buffer of last packet queued, in &

Re: [RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core

2019-10-11 Thread Stefan Hajnoczi
On Thu, Oct 10, 2019 at 11:32:54AM +0200, Stefano Garzarella wrote: > On Wed, Oct 09, 2019 at 01:30:26PM +0100, Stefan Hajnoczi wrote: > > On Fri, Sep 27, 2019 at 01:26:57PM +0200, Stefano Garzarella wrote: > > Another issue is that this patch drops the VIRTIO_VSOCK_MAX_BUF

Re: [PATCH v2 07/11] VSOCK: add AF_VSOCK test cases

2019-10-09 Thread Stefan Hajnoczi
On Wed, Oct 09, 2019 at 12:03:53PM +0200, Stefano Garzarella wrote: > Hi Stefan, > I'm thinking about dividing this test into single applications, one > for each test, do you think it makes sense? > Or is it just a useless complication? I don't mind either way but personally I would leave it as a

Re: [RFC PATCH 00/13] vsock: add multi-transports support

2019-10-09 Thread Stefan Hajnoczi
On Fri, Sep 27, 2019 at 01:26:50PM +0200, Stefano Garzarella wrote: > Hi all, > this series adds the multi-transports support to vsock, following > this proposal: > https://www.spinics.net/lists/netdev/msg575792.html Nice series! I have left a few comments but overall it looks promising. Stefan

Re: [RFC PATCH 13/13] vsock: fix bind() behaviour taking care of CID

2019-10-09 Thread Stefan Hajnoczi
with different CID, and > it prevents a connection to a wrong socket bound to the same > port, but with different CID. > > Signed-off-by: Stefano Garzarella > --- > net/vmw_vsock/af_vsock.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) Reviewed-

Re: [RFC PATCH 12/13] vsock: prevent transport modules unloading

2019-10-09 Thread Stefan Hajnoczi
ssign_transport(struct vsock_sock *vsk, > struct vsock_sock *psk) > return -ESOCKTNOSUPPORT; > } > > - if (!vsk->transport) > + /* We increase the module refcnt to prevent the tranport unloading s/tranport/transport/ Otherwise: Reviewed-by: Stefan H

Re: [RFC PATCH 11/13] vsock: add 'transport_hg' to handle g2h\h2g transports

2019-10-09 Thread Stefan Hajnoczi
On Fri, Sep 27, 2019 at 01:27:01PM +0200, Stefano Garzarella wrote: > VMCI transport provides both g2h and h2g behaviors in a single > transport. > We are able to set (or not) the g2h behavior, detecting if we > are in a VMware guest (or not), but the h2g feature is always set. > This prevents to

  1   2   3   4   5   6   7   8   >