[PATCH 2/2] Revert "virtio_pci: harden MSI-X interrupts"

2022-03-22 Thread Jason Wang
This reverts commit 9e35276a5344f74d4a3600fc4100b3dd251d5c56. Issue were reported for the drivers that are using affinity managed IRQ where manually toggling IRQ status is not expected. And we forget to enable the interrupts in the restore path as well. In the future, we will rework on the interru

[PATCH 1/2] Revert "virtio-pci: harden INTX interrupts"

2022-03-22 Thread Jason Wang
This reverts commit 080cd7c3ac8701081d143a15ba17dd9475313188. Since the MSI-X interrupts hardening will be reverted in the next patch. We will rework the interrupt hardening in the future. Fixes: 080cd7c3ac87 ("virtio-pci: harden INTX interrupts") Signed-off-by: Jason Wang --- drivers/virtio/vir

Re: [PATCH] virtio: use virtio_device_ready() in virtio_device_restore()

2022-03-22 Thread Jason Wang
On Tue, Mar 22, 2022 at 10:07 PM Michael S. Tsirkin wrote: > > On Tue, Mar 22, 2022 at 12:43:13PM +0100, Stefano Garzarella wrote: > > After waking up a suspended VM, the kernel prints the following trace > > for virtio drivers which do not directly call virtio_device_ready() in > > the .restore:

[PATCH v3 6/6] virtio-crypto: Introduce RSA algorithm

2022-03-22 Thread zhenwei pi
There are two parts in this patch: 1, support akcipher service by cryptodev-builtin driver 2, virtio-crypto driver supports akcipher service Then virtio-crypto gets request from guest side, and forwards the request to builtin driver to handle it. Test with a guest linux: 1, The self-test framewor

[PATCH v3 5/6] tests/crypto: Add test suite for crypto akcipher

2022-03-22 Thread zhenwei pi
From: Lei He Add unit test and benchmark test for crypto akcipher. Signed-off-by: lei he Signed-off-by: zhenwei pi --- tests/bench/benchmark-crypto-akcipher.c | 163 ++ tests/bench/meson.build | 6 + tests/bench/test_akcipher_keys.inc | 277 + tests/unit/mes

[PATCH v3 4/6] crypto: Implement RSA algorithm by hogweed

2022-03-22 Thread zhenwei pi
From: Lei He Introduce ASN.1 decoder, and implement RSA algorithm by hogweed from nettle. Thus QEMU supports a 'real' RSA backend to handle request from guest side. It's important to test RSA offload case without OS & hardware requirement. Signed-off-by: lei he Signed-off-by: zhenwei pi --- c

[PATCH v3 3/6] crypto: Introduce akcipher crypto class

2022-03-22 Thread zhenwei pi
Support basic asymmetric operations: encrypt, decrypt, sign and verify. Co-developed-by: lei he Signed-off-by: lei he Signed-off-by: zhenwei pi --- crypto/akcipher.c | 78 + crypto/meson.build| 1 + include/crypto/akcipher.h | 139

[PATCH v3 2/6] crypto-akcipher: Introduce akcipher types to qapi

2022-03-22 Thread zhenwei pi
From: Lei He Introduce akcipher types, also include RSA & ECDSA related types. Signed-off-by: Lei He Signed-off-by: zhenwei pi --- qapi/crypto.json | 86 1 file changed, 86 insertions(+) diff --git a/qapi/crypto.json b/qapi/crypto.json index 1

[PATCH v3 1/6] virtio-crypto: header update

2022-03-22 Thread zhenwei pi
Update header from linux, support akcipher service. Reviewed-by: Gonglei Signed-off-by: lei he Signed-off-by: zhenwei pi --- .../standard-headers/linux/virtio_crypto.h| 82 ++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/include/standard-headers/linux/virt

[PATCH v3 0/6] Support akcipher for virtio-crypto

2022-03-22 Thread zhenwei pi
v2 -> v3: - Introduce akcipher types to qapi - Add test/benchmark suite for akcipher class - Seperate 'virtio_crypto: Support virtio crypto asym operation' into: - crypto: Introduce akcipher crypto class - virtio-crypto: Introduce RSA algorithm v1 -> v2: - Update virtio_crypto.h from v2 versio

Re: [PATCH v8 2/5] mm: page_isolation: check specified range for unmovable pages

2022-03-22 Thread David Hildenbrand
On 21.03.22 19:23, Zi Yan wrote: > On 21 Mar 2022, at 13:30, David Hildenbrand wrote: > >> On 17.03.22 16:37, Zi Yan wrote: >>> From: Zi Yan >>> >>> Enable set_migratetype_isolate() to check specified sub-range for >>> unmovable pages during isolation. Page isolation is done >>> at max(MAX_ORDER_

Re: [PATCH net] vsock/virtio: enable VQs early on probe

2022-03-22 Thread Stefano Garzarella
On Tue, Mar 22, 2022 at 10:09:06AM -0400, Michael S. Tsirkin wrote: On Tue, Mar 22, 2022 at 03:05:00PM +0100, Stefano Garzarella wrote: On Tue, Mar 22, 2022 at 09:36:14AM -0400, Michael S. Tsirkin wrote: > On Tue, Mar 22, 2022 at 11:38:23AM +0100, Stefano Garzarella wrote: > > virtio spec requir

Re: [PATCH net] vsock/virtio: enable VQs early on probe

2022-03-22 Thread Michael S. Tsirkin
On Tue, Mar 22, 2022 at 03:05:00PM +0100, Stefano Garzarella wrote: > On Tue, Mar 22, 2022 at 09:36:14AM -0400, Michael S. Tsirkin wrote: > > On Tue, Mar 22, 2022 at 11:38:23AM +0100, Stefano Garzarella wrote: > > > virtio spec requires drivers to set DRIVER_OK before using VQs. > > > This is set a

Re: [PATCH] virtio: use virtio_device_ready() in virtio_device_restore()

2022-03-22 Thread Michael S. Tsirkin
On Tue, Mar 22, 2022 at 12:43:13PM +0100, Stefano Garzarella wrote: > After waking up a suspended VM, the kernel prints the following trace > for virtio drivers which do not directly call virtio_device_ready() in > the .restore: > > PM: suspend exit > irq 22: nobody cared (try booting with

Re: [PATCH net] vsock/virtio: enable VQs early on probe

2022-03-22 Thread Stefano Garzarella
On Tue, Mar 22, 2022 at 09:36:14AM -0400, Michael S. Tsirkin wrote: On Tue, Mar 22, 2022 at 11:38:23AM +0100, Stefano Garzarella wrote: virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, but virtio-vsock driver uses VQs in the probe fun

Re: [PATCH net] vsock/virtio: enable VQs early on probe

2022-03-22 Thread Michael S. Tsirkin
On Tue, Mar 22, 2022 at 11:38:23AM +0100, Stefano Garzarella wrote: > virtio spec requires drivers to set DRIVER_OK before using VQs. > This is set automatically after probe returns, but virtio-vsock > driver uses VQs in the probe function to fill rx and event VQs > with new buffers. So this is a

Re: [PATCH] virtio: pci: Sanity check the bar index in find_shm_cap

2022-03-22 Thread Michael S. Tsirkin
On Tue, Mar 22, 2022 at 09:20:27AM +, Keir Fraser wrote: > On Tue, Mar 22, 2022 at 11:36:23AM +0800, Jason Wang wrote: > > On Mon, Mar 21, 2022 at 11:49 PM Keir Fraser wrote: > > > > > > The bar index is used as an index into the device's resource list > > > and should be checked as within ran

[PATCH] virtio: use virtio_device_ready() in virtio_device_restore()

2022-03-22 Thread Stefano Garzarella
After waking up a suspended VM, the kernel prints the following trace for virtio drivers which do not directly call virtio_device_ready() in the .restore: PM: suspend exit irq 22: nobody cared (try booting with the "irqpoll" option) Call Trace: dump_stack_lvl+0x38/0x49

[PATCH net] vsock/virtio: enable VQs early on probe

2022-03-22 Thread Stefano Garzarella
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, but virtio-vsock driver uses VQs in the probe function to fill rx and event VQs with new buffers. Let's fix this, calling virtio_device_ready() before using VQs in the probe function. Fi

[PATCH] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes

2022-03-22 Thread Liu Zixian via Virtualization
drm_cvt_mode may return NULL and we should check it. This bug is found by syzkaller: FAULT_INJECTION stacktrace: [ 168.567394] FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 [ 168.567403] CPU: 1 PID: 6425 Comm: syz Kdump: loaded Not tainted 4.19.

Re: [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup property

2022-03-22 Thread Krzysztof Kozlowski
On 22/03/2022 07:19, Minghao Xue wrote: > Hi Krzysztof, > > Thanks for your comment. First of all, which "generic wakeup-source > property" do you mean? There is only one generic - wakeup-source. > Could you give an example? I find "wakeup-source" > property in several binding files. Are you po