Re: Re: [PATCH 0/3] recover hardware corrupted page by virtio balloon

2022-05-26 Thread zhenwei pi
On 5/27/22 02:37, Peter Xu wrote: On Wed, May 25, 2022 at 01:16:34PM -0700, Jue Wang wrote: The hypervisor _must_ emulate poisons identified in guest physical address space (could be transported from the source VM), this is to prevent silent data corruption in the guest. With a paravirtual appro

[PATCH V6 9/9] virtio: use WARN_ON() to warning illegal status value

2022-05-26 Thread Jason Wang
We used to use BUG_ON() in virtio_device_ready() to detect illegal status value, this seems sub-optimal since the value is under the control of the device. Switch to use WARN_ON() instead. Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Marc Zyngier Cc: Halil Pasic Cc: Corne

[PATCH V6 8/9] virtio: harden vring IRQ

2022-05-26 Thread Jason Wang
This is a rework on the previous IRQ hardening that is done for virtio-pci where several drawbacks were found and were reverted: 1) try to use IRQF_NO_AUTOEN which is not friendly to affinity managed IRQ that is used by some device such as virtio-blk 2) done only for PCI transport The vq->brok

[PATCH V6 7/9] virtio: allow to unbreak virtqueue

2022-05-26 Thread Jason Wang
This patch allows the new introduced __virtio_break_device() to unbreak the virtqueue. Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Marc Zyngier Cc: Halil Pasic Cc: Cornelia Huck Cc: Vineeth Vijayan Cc: Peter Oberparleiter Cc: linux-s...@vger.kernel.org Signed-off-by:

[PATCH V6 6/9] virtio-ccw: implement synchronize_cbs()

2022-05-26 Thread Jason Wang
This patch tries to implement the synchronize_cbs() for ccw. For the vring_interrupt() that is called via virtio_airq_handler(), the synchronization is simply done via the airq_info's lock. For the vring_interrupt() that is called via virtio_ccw_int_handler(), a per device rwlock is introduced and

[PATCH V6 5/9] virtio-mmio: implement synchronize_cbs()

2022-05-26 Thread Jason Wang
Simply synchronize the platform irq that is used by us. Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Marc Zyngier Cc: Halil Pasic Cc: Cornelia Huck Cc: Vineeth Vijayan Cc: Peter Oberparleiter Cc: linux-s...@vger.kernel.org Reviewed-by: Cornelia Huck Signed-off-by: Jas

[PATCH V6 4/9] virtio-pci: implement synchronize_cbs()

2022-05-26 Thread Jason Wang
We can simply reuse vp_synchronize_vectors() for .synchronize_cbs(). Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Marc Zyngier Cc: Halil Pasic Cc: Cornelia Huck Cc: Vineeth Vijayan Cc: Peter Oberparleiter Cc: linux-s...@vger.kernel.org Reviewed-by: Cornelia Huck Signe

[PATCH V6 3/9] virtio: introduce config op to synchronize vring callbacks

2022-05-26 Thread Jason Wang
This patch introduces new virtio config op to vring callbacks. Transport specific method is required to make sure the write before this function is visible to the vring_interrupt() that is called after the return of this function. For the transport that doesn't provide synchronize_vqs(), use syncho

[PATCH V6 2/9] virtio: use virtio_reset_device() when possible

2022-05-26 Thread Jason Wang
This allows us to do common extension without duplicating code. Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Marc Zyngier Cc: Halil Pasic Cc: Cornelia Huck Cc: Vineeth Vijayan Cc: Peter Oberparleiter Cc: linux-s...@vger.kernel.org Reviewed-by: Cornelia Huck Signed-off

[PATCH V6 1/9] virtio: use virtio_device_ready() in virtio_device_restore()

2022-05-26 Thread Jason Wang
From: Stefano Garzarella It will allow us to do extension on virtio_device_ready() without duplicating code. Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Marc Zyngier Cc: Halil Pasic Cc: Cornelia Huck Cc: Vineeth Vijayan Cc: Peter Oberparleiter Cc: linux-s...@vger.ke

[PATCH V6 0/9] rework on the IRQ hardening of virtio

2022-05-26 Thread Jason Wang
Hi All: This is a rework on the IRQ hardening for virtio which is done previously by the following commits are reverted: 9e35276a5344 ("virtio_pci: harden MSI-X interrupts") 080cd7c3ac87 ("virtio-pci: harden INTX interrupts") The reason is that it depends on the IRQF_NO_AUTOEN which may conflict

Re: [PATCH 0/3] recover hardware corrupted page by virtio balloon

2022-05-26 Thread zhenwei pi
Hi, Andrew & Naoya I would appreciate it if you could give me any hint about the changes of memory/memory-failure! On 5/20/22 15:06, zhenwei pi wrote: Hi, I'm trying to recover hardware corrupted page by virtio balloon, the workflow of this feature like this: Guest 5.MF -> 6.RV

Re: [PATCH v4 0/4] Implement vdpasim stop operation

2022-05-26 Thread Jason Wang
On Thu, May 26, 2022 at 8:54 PM Parav Pandit wrote: > > > > > From: Eugenio Pérez > > Sent: Thursday, May 26, 2022 8:44 AM > > > Implement stop operation for vdpa_sim devices, so vhost-vdpa will offer > > > > that backend feature and userspace can effectively stop the device. > > > > > > > > This

Re: Re: [PATCH 3/3] virtio_balloon: Introduce memory recover

2022-05-26 Thread zhenwei pi
On 5/27/22 03:18, Michael S. Tsirkin wrote: On Fri, May 20, 2022 at 03:06:48PM +0800, zhenwei pi wrote: Introduce a new queue 'recover VQ', this allows guest to recover hardware corrupted page: Guest 5.MF -> 6.RVQ FE10.Unpoison page / \

Re: [PATCH] vhost-vdpa: Fix some error handling path in vhost_vdpa_process_iotlb_msg()

2022-05-26 Thread Michael S. Tsirkin
On Sun, May 22, 2022 at 03:59:01PM +0200, Christophe JAILLET wrote: > In the error paths introduced by the commit in the Fixes tag, a mutex may > be left locked. > Add the correct goto instead of a direct return. > > Fixes: a1468175bb17 ("vhost-vdpa: support ASID based IOTLB API") > Signed-off-by:

Re: [PATCH 3/3] virtio_balloon: Introduce memory recover

2022-05-26 Thread Michael S. Tsirkin
On Fri, May 20, 2022 at 03:06:48PM +0800, zhenwei pi wrote: > Introduce a new queue 'recover VQ', this allows guest to recover > hardware corrupted page: > > Guest 5.MF -> 6.RVQ FE10.Unpoison page > / \/ > ---+-

Re: [PATCH v3 2/4] vhost-vdpa: introduce STOP backend feature bit

2022-05-26 Thread Dan Carpenter
On Thu, May 26, 2022 at 07:00:06PM +0200, Eugenio Perez Martin wrote: > > It feels like returning any literal that isn't 1 or 0 should trigger a > > warning... I've written that and will check it out tonight. > > > > I'm not sure this should be so strict, or "literal" does not include pointers? >

Re: [PATCH 0/3] recover hardware corrupted page by virtio balloon

2022-05-26 Thread Peter Xu
On Wed, May 25, 2022 at 01:16:34PM -0700, Jue Wang wrote: > The hypervisor _must_ emulate poisons identified in guest physical > address space (could be transported from the source VM), this is to > prevent silent data corruption in the guest. With a paravirtual > approach like this patch series, t

Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d

2022-05-26 Thread Dan Carpenter
On Thu, May 26, 2022 at 03:28:25PM +0100, Matthew Wilcox wrote: > On Thu, May 26, 2022 at 11:48:32AM +0300, Dan Carpenter wrote: > > On Thu, May 26, 2022 at 02:16:34AM +0100, Matthew Wilcox wrote: > > > Bizarre this started showing up now. The recent patch was: > > > > > > - info->alloced +

Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d

2022-05-26 Thread Matthew Wilcox
On Thu, May 26, 2022 at 11:48:32AM +0300, Dan Carpenter wrote: > On Thu, May 26, 2022 at 02:16:34AM +0100, Matthew Wilcox wrote: > > Bizarre this started showing up now. The recent patch was: > > > > - info->alloced += compound_nr(page); > > - inode->i_blocks += BLOCKS_PER_PAGE << com

Re: [PATCH v4 4/4] vdpa_sim: Implement stop vdpa op

2022-05-26 Thread Stefano Garzarella
On Thu, May 26, 2022 at 02:43:38PM +0200, Eugenio Pérez wrote: Implement stop operation for vdpa_sim devices, so vhost-vdpa will offer that backend feature and userspace can effectively stop the device. This is a must before get virtqueue indexes (base) for live migration, since the device could

Re: [PATCH v4 1/4] vdpa: Add stop operation

2022-05-26 Thread Stefano Garzarella
On Thu, May 26, 2022 at 02:43:35PM +0200, Eugenio Pérez wrote: This operation is optional: It it's not implemented, backend feature bit will not be exposed. Signed-off-by: Eugenio Pérez --- include/linux/vdpa.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/vdpa.h b/incl

RE: [PATCH 9/9] crypto: Introduce RSA algorithm

2022-05-26 Thread Gonglei (Arei) via Virtualization
> -Original Message- > From: Lei He [mailto:helei.si...@bytedance.com] > Sent: Wednesday, May 25, 2022 5:01 PM > To: m...@redhat.com; Gonglei (Arei) ; > berra...@redhat.com > Cc: qemu-de...@nongnu.org; virtualization@lists.linux-foundation.org; > linux-cry...@vger.kernel.org; jasow...@re

Re: [PATCH v3 2/4] vhost-vdpa: introduce STOP backend feature bit

2022-05-26 Thread Dan Carpenter
On Thu, May 26, 2022 at 02:44:02PM +0200, Eugenio Perez Martin wrote: > > >> +static bool vhost_vdpa_can_stop(const struct vhost_vdpa *v) { > > >> + struct vdpa_device *vdpa = v->vdpa; > > >> + const struct vdpa_config_ops *ops = vdpa->config; > > >> + > > >> + return ops->stop; >

RE: [PATCH v4 0/4] Implement vdpasim stop operation

2022-05-26 Thread Parav Pandit via Virtualization
> From: Eugenio Pérez > Sent: Thursday, May 26, 2022 8:44 AM > Implement stop operation for vdpa_sim devices, so vhost-vdpa will offer > > that backend feature and userspace can effectively stop the device. > > > > This is a must before get virtqueue indexes (base) for live migration, > >

Re: [RFC PATCH v2 0/5] TUN/VirtioNet USO features support.

2022-05-26 Thread Andrew Melnichenko
I'll check it, thank you! On Thu, May 26, 2022 at 9:56 AM Jason Wang wrote: > > On Tue, May 24, 2022 at 7:07 PM Andrew Melnichenko wrote: > > > > Hi all, > > > > The issue is that host segments packets between guests on the same host. > > Tests show that it happens because SKB_GSO_DODGY skb offl

Re: Re: [PATCH v7 0/9] Introduce akcipher service for virtio-crypto

2022-05-26 Thread zhenwei pi
Hi, Daniel Thanks a lot for your review! On 5/26/22 18:48, Daniel P. Berrangé wrote: I've sent a pull request containing all the crypto/ changes, as that covers stuff I maintain. ie patches 2-8 Patches 1 and 9, I'll leave for MST to review & queue since the virtual hardware is not my area of k

RE: [PATCH v7 0/9] Introduce akcipher service for virtio-crypto

2022-05-26 Thread Gonglei (Arei) via Virtualization
> -Original Message- > From: Daniel P. Berrangé [mailto:berra...@redhat.com] > Sent: Thursday, May 26, 2022 6:48 PM > To: Lei He > Cc: m...@redhat.com; Gonglei (Arei) ; > qemu-de...@nongnu.org; virtualization@lists.linux-foundation.org; > linux-cry...@vger.kernel.org; jasow...@redhat.com

Re: [PATCH v7 0/9] Introduce akcipher service for virtio-crypto

2022-05-26 Thread Daniel P . Berrangé
I've sent a pull request containing all the crypto/ changes, as that covers stuff I maintain. ie patches 2-8 Patches 1 and 9, I'll leave for MST to review & queue since the virtual hardware is not my area of knowledge. On Wed, May 25, 2022 at 05:01:09PM +0800, Lei He wrote: > v6 -> v7: > - Fix se

Re: [PATCH v3 2/4] vhost-vdpa: introduce STOP backend feature bit

2022-05-26 Thread Stefano Garzarella
On Thu, May 26, 2022 at 10:57:03AM +0200, Eugenio Perez Martin wrote: On Wed, May 25, 2022 at 1:23 PM Dawar, Gautam wrote: [AMD Official Use Only - General] -Original Message- From: Eugenio Pérez Sent: Wednesday, May 25, 2022 4:29 PM To: Michael S. Tsirkin ; net...@vger.kernel.org;

Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d

2022-05-26 Thread Dan Carpenter
On Thu, May 26, 2022 at 02:16:34AM +0100, Matthew Wilcox wrote: > Bizarre this started showing up now. The recent patch was: > > - info->alloced += compound_nr(page); > - inode->i_blocks += BLOCKS_PER_PAGE << compound_order(page); > + info->alloced += folio_nr_pages(folio); > +

Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d

2022-05-26 Thread Arnd Bergmann
On Wed, May 25, 2022 at 11:35 PM kernel test robot wrote: > .__mulsi3.o.cmd: No such file or directory > Makefile:686: arch/h8300/Makefile: No such file or directory > Makefile:765: arch/h8300/Makefile: No such file or directory > arch/Kconfig:10: can't open file "arch/h8300/Kconfig" Please stop

Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d

2022-05-26 Thread Dan Carpenter
On Wed, May 25, 2022 at 02:50:56PM -0700, Andrew Morton wrote: > On Thu, 26 May 2022 05:35:20 +0800 kernel test robot wrote: > > > tree/branch: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > branch HEAD: 8cb8311e95e3bb58bd84d6350365f14a718faa6d Add linux-next