Re: [Qemu-devel] [PATCH] gtk: Hardcode LC_CTYPE as C.utf-8

2017-01-31 Thread Mike FABIAN
Fedora has it since Fedora 24 (spring 2016), Debian for a while longer. I’ll ping again to get it included upstream. It needs 1.5MB at runtime only because of https://sourceware.org/bugzilla/show_bug.cgi?id=18978 as soon as that sorting bug is fixed, the C.UTF-8 locale will need less than 200k. > Berto -- Mike FABIAN 睡眠不足はいい仕事の敵だ。

Re: [Qemu-devel] [PATCH] gtk: Hardcode LC_CTYPE as C.utf-8

2017-01-31 Thread Mike FABIAN
has C.UTF-8, but not C.utf-8. Furthermore, since my > system defaults to en_US.UTF-8, I would expect the upper-case variant > for the character set name across all locales. Yes, I think it is more compatible to use the C.UTF-8 spelling because it uses the “official” spelling of “UTF-8”. -- Mike FABIAN 睡眠不足はいい仕事の敵だ。

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-02-08 Thread Longpeng (Mike)
backed impls as above. I'm confusing about which way you'd prefer, or do you have any better suggestion? Thanks! -- Regards, Longpeng(Mike) On 2017/1/10 21:30, Daniel P. Berrange wrote: > On Tue, Jan 10, 2017 at 12:17:48PM +, Gonglei (Arei) wrote: >>> >>>&g

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-02-08 Thread Longpeng (Mike)
Hi Daniel, On 2017/2/8 18:53, Daniel P. Berrange wrote: > On Wed, Feb 08, 2017 at 06:46:04PM +0800, Longpeng (Mike) wrote: >> Hi Daniel, >> >> I was writing AF_ALG-backed for QEMU crypto these days, I think there're more >> than two ways to implements it. >

Re: [Qemu-devel] Question about add AF_ALG backend for virtio-crypto

2017-02-09 Thread Longpeng (Mike)
Hi Daniel, On 2017/2/9 18:11, Daniel P. Berrange wrote: > On Thu, Feb 09, 2017 at 10:58:55AM +0800, Longpeng (Mike) wrote: >> Hi Daniel, >> >> So...you prefer approach 1 with a driver-table dispatch layer, right? >> And this implies that we must either rename some

[Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev

2017-02-09 Thread Mike Frysinger
Linux C libs are moving away from implicit header pollution with sys/types.h Signed-off-by: Mike Frysinger --- include/qemu/osdep.h | 4 1 file changed, 4 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 56c9e22405ec..6aaace6cf37f 100644 --- a/include/qemu

Re: [Qemu-devel] [PATCH v2 00/16] Postcopy: Hugepage support

2017-02-14 Thread Mike Kravetz
for postcopy live migration >>> UFFDIO_COPY ioctl will fail for >>> such region, in Arcangeli's git tree there is such prevent check >>> (if (!vma_is_shmem(dst_vma) && dst_vma->vm_flags & VM_SHARED). >>> Is it possible to handle such situat

Re: [Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev

2017-02-14 Thread Mike Frysinger
were, autoconf wouldn't have a AC_HEADER_MAJOR helper. https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html#index-AC_005fHEADER_005fMAJOR-616 -mike signature.asc Description: Digital signature

Re: [Qemu-devel] [LSF/MM TOPIC][LSF/MM, ATTEND] shared TLB, hugetlb reservations

2017-03-17 Thread Mike Kravetz
On 03/14/2017 11:37 AM, Andrea Arcangeli wrote: > Hello, > > On Wed, Mar 08, 2017 at 05:30:55PM -0800, Mike Kravetz wrote: >> On 01/10/2017 03:02 PM, Mike Kravetz wrote: >>> Another more concrete topic is hugetlb reservations. Michal Hocko >>> proposed the t

Re: [Qemu-devel] Dual userfaultfd behavior

2017-03-17 Thread Mike Kravetz
On 03/15/2017 06:47 AM, Alexey Perevalov wrote: > Hi Andrea, > > thank you for so perfect design description, > > the main question who will do RFC patches, > you or Mike or if you not against I could try. Sorry for not replying sooner, I have been away from e-mail. I have s

Re: [Qemu-devel] [PATCH v4 12/18] crypto: introduce some common functions for af_alg backend

2017-07-12 Thread long mike
2017-07-11 20:28 GMT+08:00 Daniel P. Berrange : > On Tue, Jul 04, 2017 at 04:57:04PM +0800, Longpeng(Mike) wrote: >> The AF_ALG socket family is the userspace interface for linux >> crypto API, this patch adds af_alg family support and some common >> functions for af_alg back

Re: [Qemu-devel] [PATCH v4 13/18] crypto: cipher: add afalg-backend cipher support

2017-07-13 Thread long mike
2017-07-11 20:29 GMT+08:00 Daniel P. Berrange : > On Tue, Jul 04, 2017 at 04:57:05PM +0800, Longpeng(Mike) wrote: >> Adds afalg-backend cipher support: introduces some private APIs >> firstly, and then intergrates them into qcrypto_cipher_afalg_driver. >> >> S

[Qemu-devel] [PATCH v5 01/18] crypto: cipher: introduce context free function

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Refactors the qcrypto_cipher_free(), splits it into two parts. One is gcrypt/nettle__cipher_free_ctx() to free the special context. This makes code more clear, what's more, it would be used by the later patch. Reviewed-by: Daniel P. Berrange Reviewed-by:

[Qemu-devel] [PATCH v5 07/18] crypto: hmac: move crypto/hmac.h into include/crypto/

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Moves crypto/hmac.h into include/crypto/, likes cipher.h and hash.h Reviewed-by: Daniel P. Berrange Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac.h

[Qemu-devel] [PATCH v5 03/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for nettle-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for nettle-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-nettle.c | 41 + 1 file c

[Qemu-devel] [PATCH v5 04/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for builtin-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for builtin-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-builtin.c | 101 ++-- 1 fi

[Qemu-devel] [PATCH v5 05/18] crypto: cipher: add cipher driver framework

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" 1) makes the public APIs in cipher-nettle/gcrypt/builtin static, and rename them with "nettle/gcrypt/builtin" prefix. 2) introduces cipher framework, including QCryptoCipherDriver and new public APIs. Reviewed-by: Daniel P. Berrange Reviewed

[Qemu-devel] [PATCH v5 13/18] crypto: cipher: add afalg-backend cipher support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Adds afalg-backend cipher support: introduces some private APIs firstly, and then intergrates them into qcrypto_cipher_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/Makefile.objs | 1 + crypto/afalgpriv.h| 9 ++ crypto/cipher-afa

[Qemu-devel] [PATCH v5 06/18] crypto: hash: add hash driver framework

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" 1) makes the public APIs in hash-nettle/gcrypt/glib static, and rename them with "nettle/gcrypt/glib" prefix. 2) introduces hash framework, including QCryptoHashDriver and new public APIs. Reviewed-by: Daniel P. Berrange Reviewed-by: Go

[Qemu-devel] [PATCH v5 14/18] crypto: hash: add afalg-backend hash support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Adds afalg-backend hash support: introduces some private APIs firstly, and then intergrates them into qcrypto_hash_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/Makefile.objs | 1 + crypto/afalgpriv.h | 1 + crypto/hash-afal

[Qemu-devel] [PATCH v5 10/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for glib-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for glib-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac-glib.c | 34 -- 1 file changed, 24 inserti

[Qemu-devel] [PATCH v5 15/18] crypto: hmac: add af_alg-backend hmac support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Adds afalg-backend hmac support: introduces some private APIs firstly, and then intergrates them into qcrypto_hmac_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/hash-afalg.c | 104 +--- crypto/hmac.c

[Qemu-devel] [PATCH v5 18/18] tests: crypto: add hmac speed benchmark support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" This patch add a hmac speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-hmac" directly. Signed-off-by: Longpeng(Mike) --- tests/Makefile.include| 2 ++ test

[Qemu-devel] [PATCH v5 00/18] crypto: add afalg-backend support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" The AF_ALG socket family is the userspace interface for linux crypto API, users can use it to access hardware accelerators. This patchset adds a afalg-backend for qemu crypto subsystem. Currently when performs encrypt/decrypt, we'll try afalg-backend firs

[Qemu-devel] [PATCH v5 00/18] crypto: add afalg-backend support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" The AF_ALG socket family is the userspace interface for linux crypto API, users can use it to access hardware accelerators. This patchset adds a afalg-backend for qemu crypto subsystem. Currently when performs encrypt/decrypt, we'll try afalg-backend firs

[Qemu-devel] [PATCH v5 02/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for gcrypt-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for gcrypt-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-gcrypt.c | 50 +- 1 fi

[Qemu-devel] [PATCH v5 08/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for gcrypt-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" 1) Fix a handle-leak problem in qcrypto_hmac_new(), didn't free ctx->handle if gcry_mac_setkey fails. 2) Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for gcrypt-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signe

[Qemu-devel] [PATCH v5 09/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for nettle-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for nettle-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac-nettle.c | 34 -- 1 file changed, 24 inserti

[Qemu-devel] [PATCH v5 12/18] crypto: introduce some common functions for af_alg backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" The AF_ALG socket family is the userspace interface for linux crypto API, this patch adds af_alg family support and some common functions for af_alg backend. It'll be used by afalg-backend crypto latter. Signed-off-by: Longpeng(Mike) --- configure

[Qemu-devel] [PATCH v5 11/18] crypto: hmac: add hmac driver framework

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" 1) makes the public APIs in hmac-nettle/gcrypt/glib static, and rename them with "nettle/gcrypt/glib" prefix. 2) introduces hmac framework, including QCryptoHmacDriver and new public APIs. Reviewed-by: Daniel P. Berrange Signed-off-by: Longpen

[Qemu-devel] [PATCH v5 16/18] tests: crypto: add cipher speed benchmark support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Now we have two qcrypto backends, libiary-backend and afalg-backend, but which one is faster? This patch add a cipher speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-cipher&

[Qemu-devel] [PATCH v5 17/18] tests: crypto: add hash speed benchmark support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" This patch add a hash speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-hash" directly. Signed-off-by: Longpeng(Mike) --- tests/Makefile.include| 2 ++ test

Re: [Qemu-devel] [PATCH v5 00/18] crypto: add afalg-backend support

2017-07-14 Thread Longpeng(Mike)
2017-07-14 21:04 GMT+08:00 Daniel P. Berrange : > On Fri, Jul 14, 2017 at 07:38:22AM -0400, longpeng.m...@gmail.com wrote: >> From: "Longpeng(Mike)" >> [...] >> >> NOTE: If we use specific hardware crypto cards, I think afalg-backend >> would e

[Qemu-devel] [PATCH v6 01/18] crypto: cipher: introduce context free function

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Refactors the qcrypto_cipher_free(), splits it into two parts. One is gcrypt/nettle__cipher_free_ctx() to free the special context. This makes code more clear, what's more, it would be used by the later patch. Reviewed-by: Daniel P. Berrange Reviewed-by:

[Qemu-devel] [PATCH v6 02/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for gcrypt-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for gcrypt-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-gcrypt.c | 50 +- 1 fi

[Qemu-devel] [PATCH v6 03/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for nettle-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for nettle-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-nettle.c | 41 + 1 file c

[Qemu-devel] [PATCH v6 06/18] crypto: hash: add hash driver framework

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" 1) makes the public APIs in hash-nettle/gcrypt/glib static, and rename them with "nettle/gcrypt/glib" prefix. 2) introduces hash framework, including QCryptoHashDriver and new public APIs. Reviewed-by: Daniel P. Berrange Reviewed-by: Go

[Qemu-devel] [PATCH v6 00/18] crypto: add afalg-backend support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" The AF_ALG socket family is the userspace interface for linux crypto API, users can use it to access hardware accelerators. This patchset adds a afalg-backend for qemu crypto subsystem. QEMU would try to use afalg-backend first if configures '--enable-cry

[Qemu-devel] [PATCH v6 04/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for builtin-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for builtin-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-builtin.c | 101 ++-- 1 fi

[Qemu-devel] [PATCH v6 07/18] crypto: hmac: move crypto/hmac.h into include/crypto/

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Moves crypto/hmac.h into include/crypto/, likes cipher.h and hash.h Reviewed-by: Daniel P. Berrange Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac.h

[Qemu-devel] [PATCH v6 09/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for nettle-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for nettle-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac-nettle.c | 34 -- 1 file changed, 24 inserti

[Qemu-devel] [PATCH v6 08/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for gcrypt-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" 1) Fix a handle-leak problem in qcrypto_hmac_new(), didn't free ctx->handle if gcry_mac_setkey fails. 2) Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for gcrypt-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signe

[Qemu-devel] [PATCH v6 05/18] crypto: cipher: add cipher driver framework

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" 1) makes the public APIs in cipher-nettle/gcrypt/builtin static, and rename them with "nettle/gcrypt/builtin" prefix. 2) introduces cipher framework, including QCryptoCipherDriver and new public APIs. Reviewed-by: Daniel P. Berrange Reviewed

[Qemu-devel] [PATCH v6 11/18] crypto: hmac: add hmac driver framework

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" 1) makes the public APIs in hmac-nettle/gcrypt/glib static, and rename them with "nettle/gcrypt/glib" prefix. 2) introduces hmac framework, including QCryptoHmacDriver and new public APIs. Reviewed-by: Daniel P. Berrange Signed-off-by: Longpen

[Qemu-devel] [PATCH v6 10/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for glib-backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for glib-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac-glib.c | 34 -- 1 file changed, 24 inserti

[Qemu-devel] [PATCH v6 13/18] crypto: cipher: add afalg-backend cipher support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Adds afalg-backend cipher support: introduces some private APIs firstly, and then intergrates them into qcrypto_cipher_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/Makefile.objs | 1 + crypto/afalgpriv.h| 9 ++ crypto/cipher-afa

[Qemu-devel] [PATCH v6 18/18] tests: crypto: add hmac speed benchmark support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" This patch add a hmac speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-hmac" directly. Signed-off-by: Longpeng(Mike) --- tests/Makefile.include| 2 ++ test

[Qemu-devel] [PATCH v6 12/18] crypto: introduce some common functions for af_alg backend

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" The AF_ALG socket family is the userspace interface for linux crypto API, this patch adds af_alg family support and some common functions for af_alg backend. It'll be used by afalg-backend crypto latter. Signed-off-by: Longpeng(Mike) --- configure

[Qemu-devel] [PATCH v6 14/18] crypto: hash: add afalg-backend hash support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Adds afalg-backend hash support: introduces some private APIs firstly, and then intergrates them into qcrypto_hash_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/Makefile.objs | 1 + crypto/afalgpriv.h | 1 + crypto/hash-afal

[Qemu-devel] [PATCH v6 15/18] crypto: hmac: add af_alg-backend hmac support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Adds afalg-backend hmac support: introduces some private APIs firstly, and then intergrates them into qcrypto_hmac_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/hash-afalg.c | 104 +--- crypto/hmac.c

[Qemu-devel] [PATCH v6 16/18] tests: crypto: add cipher speed benchmark support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" Now we have two qcrypto backends, libiary-backend and afalg-backend, but which one is faster? This patch add a cipher speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-cipher&

[Qemu-devel] [PATCH v6 17/18] tests: crypto: add hash speed benchmark support

2017-07-14 Thread longpeng . mike
From: "Longpeng(Mike)" This patch add a hash speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-hash" directly. Signed-off-by: Longpeng(Mike) --- tests/Makefile.include| 2 ++ test

[Qemu-devel] [PATCH] cryptodev: setiv only when really need

2017-01-13 Thread Longpeng(Mike)
ECB mode cipher doesn't need IV, if we setiv for it then qemu crypto API would report "Expected IV size 0 not **", so we should setiv only when the cipher algos really need. Signed-off-by: Longpeng(Mike) --- backends/cryptodev-builtin.c | 10 ++ 1 file changed, 6 i

[Qemu-devel] [PATCH] qtest: virtio: zeroed last VRingDesc after allocate

2017-01-14 Thread Longpeng(Mike)
his patch zeored the last VRingDesc in qvring_indirect_desc_setup(). Signed-off-by: Longpeng(Mike) --- tests/libqos/virtio.c | 8 1 file changed, 8 insertions(+) diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c index ec30cb9..b29c69e 100644 --- a/tests/libqos/virtio.c ++

Re: [Qemu-devel] [PATCH] qtest: virtio: zeroed last VRingDesc after allocate

2017-01-16 Thread Longpeng (Mike)
Hi Stefan, On 2017/1/16 22:13, Stefan Hajnoczi wrote: > On Sat, Jan 14, 2017 at 05:59:36PM +0800, Longpeng(Mike) wrote: .. >> diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c >> index ec30cb9..b29c69e 100644 >> --- a/tests/libqos/virtio.c >>

[Qemu-devel] [PATCH v2] qtest: virtio: zeroed last vring_desc after allocate

2017-01-16 Thread Longpeng(Mike)
Signed-off-by: Longpeng(Mike) --- Changes since v1: - use writel() for @len as it's 32 bits long. [Stefan] --- tests/libqos/virtio.c | 8 1 file changed, 8 insertions(+) diff --git a/tests/libqos/virtio.c b/tests/libqos/virtio.c index ec30cb9..02e6a43 100644 --- a/tests/libq

Re: [Qemu-devel] [PATCH v3 15/18] crypto: hmac: add af_alg hmac support

2017-07-04 Thread Longpeng (Mike)
Hi Daniel, First, sorry for the long delay... I have modified the code as your suggestion, and I'll send V4 soon. On 2017/4/26 20:23, Daniel P. Berrange wrote: > On Sat, Apr 22, 2017 at 03:20:24PM +0800, Longpeng(Mike) wrote: >> Adds afalg-backend hmac support: introduces som

[Qemu-devel] [PATCH v4 01/18] crypto: cipher: introduce context free function

2017-07-04 Thread Longpeng(Mike)
Refactors the qcrypto_cipher_free(), splits it into two parts. One is gcrypt/nettle__cipher_free_ctx() to free the special context. This makes code more clear, what's more, it would be used by the later patch. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng

[Qemu-devel] [PATCH v4 06/18] crypto: hash: add hash driver framework

2017-07-04 Thread Longpeng(Mike)
1) makes the public APIs in hash-nettle/gcrypt/glib static, and rename them with "nettle/gcrypt/glib" prefix. 2) introduces hash framework, including QCryptoHashDriver and new public APIs. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) -

[Qemu-devel] [PATCH v4 02/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for gcrypt-backend

2017-07-04 Thread Longpeng(Mike)
Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for gcrypt-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-gcrypt.c | 50 +- 1 file changed, 33 insertions(+), 17

[Qemu-devel] [PATCH v4 03/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for nettle-backend

2017-07-04 Thread Longpeng(Mike)
Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for nettle-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-nettle.c | 41 + 1 file changed, 29 insertions(+), 12 deletions

[Qemu-devel] [PATCH v4 08/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for gcrypt-backend

2017-07-04 Thread Longpeng(Mike)
1) Fix a handle-leak problem in qcrypto_hmac_new(), didn't free ctx->handle if gcry_mac_setkey fails. 2) Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for gcrypt-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- cry

[Qemu-devel] [PATCH v4 07/18] crypto: hmac: move crypto/hmac.h into include/crypto/

2017-07-04 Thread Longpeng(Mike)
Moves crypto/hmac.h into include/crypto/, likes cipher.h and hash.h Reviewed-by: Daniel P. Berrange Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac.h | 166 -- include/crypto/hmac.h

[Qemu-devel] [PATCH v4 09/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for nettle-backend

2017-07-04 Thread Longpeng(Mike)
Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for nettle-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac-nettle.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git

[Qemu-devel] [PATCH v4 00/18] crypto: add afalg-backend support

2017-07-04 Thread Longpeng(Mike)
quot;qcrypto_afalg_" prefix and "qcrypto_nettle(gcrypt,glib,builtin)_" prefix. [Daniel] - add testing results in cover-letter. [Gonglei] --- Longpeng(Mike) (18): crypto: cipher: introduce context free function crypto: cipher: introduce qcrypto_cipher_ctx_new for

[Qemu-devel] [PATCH v4 04/18] crypto: cipher: introduce qcrypto_cipher_ctx_new for builtin-backend

2017-07-04 Thread Longpeng(Mike)
Extracts qcrypto_cipher_ctx_new() from qcrypto_cipher_new() for builtin-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/cipher-builtin.c | 101 ++-- 1 file changed, 55 insertions(+), 46

[Qemu-devel] [PATCH v4 11/18] crypto: hmac: add hmac driver framework

2017-07-04 Thread Longpeng(Mike)
1) makes the public APIs in hmac-nettle/gcrypt/glib static, and rename them with "nettle/gcrypt/glib" prefix. 2) introduces hmac framework, including QCryptoHmacDriver and new public APIs. Reviewed-by: Daniel P. Berrange Signed-off-by: Longpeng(Mike) --- crypto/hmac-gcry

[Qemu-devel] [PATCH v4 15/18] crypto: hmac: add af_alg hmac support

2017-07-04 Thread Longpeng(Mike)
Adds afalg-backend hmac support: introduces some private APIs firstly, and then intergrates them into qcrypto_hmac_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/hash-afalg.c | 104 +--- crypto/hmac.c | 22 +-- crypto

[Qemu-devel] [PATCH v4 10/18] crypto: hmac: introduce qcrypto_hmac_ctx_new for glib-backend

2017-07-04 Thread Longpeng(Mike)
Extracts qcrypto_hmac_ctx_new() from qcrypto_hmac_new() for glib-backend impls. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Longpeng(Mike) --- crypto/hmac-glib.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a

[Qemu-devel] [PATCH v4 16/18] tests: crypto: add cipher speed benchmark support

2017-07-04 Thread Longpeng(Mike)
Now we have two qcrypto backends, libiary-backend and afalg-backend, but which one is faster? This patch add a cipher speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-cipher" directly. Signed-off-by: Longpe

[Qemu-devel] [PATCH v4 14/18] crypto: hash: add afalg-backend hash support

2017-07-04 Thread Longpeng(Mike)
Adds afalg-backend hash support: introduces some private APIs firstly, and then intergrates them into qcrypto_hash_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/Makefile.objs | 1 + crypto/afalgpriv.h | 1 + crypto/hash-afalg.c | 139

[Qemu-devel] [PATCH v4 18/18] tests: crypto: add hmac speed benchmark support

2017-07-04 Thread Longpeng(Mike)
This patch add a hmac speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-hmac" directly. Signed-off-by: Longpeng(Mike) --- tests/Makefile.include| 2 + tests/benchmar

[Qemu-devel] [PATCH v4 13/18] crypto: cipher: add afalg-backend cipher support

2017-07-04 Thread Longpeng(Mike)
Adds afalg-backend cipher support: introduces some private APIs firstly, and then intergrates them into qcrypto_cipher_afalg_driver. Signed-off-by: Longpeng(Mike) --- crypto/Makefile.objs | 1 + crypto/afalgpriv.h| 9 ++ crypto/cipher-afalg.c | 223

[Qemu-devel] [PATCH v4 17/18] tests: crypto: add hash speed benchmark support

2017-07-04 Thread Longpeng(Mike)
This patch add a hash speed benchmark, it helps us to measure the performance by using "make check-speed" or using "./tests/benchmark-crypto-cipher" directly. Signed-off-by: Longpeng(Mike) --- tests/Makefile.include| 2 ++ tests/benchmar

[Qemu-devel] [PATCH v4 05/18] crypto: cipher: add cipher driver framework

2017-07-04 Thread Longpeng(Mike)
1) makes the public APIs in cipher-nettle/gcrypt/builtin static, and rename them with "nettle/gcrypt/builtin" prefix. 2) introduces cipher framework, including QCryptoCipherDriver and new public APIs. Reviewed-by: Daniel P. Berrange Reviewed-by: Gonglei Signed-off-by: Lon

[Qemu-devel] [PATCH v4 12/18] crypto: introduce some common functions for af_alg backend

2017-07-04 Thread Longpeng(Mike)
The AF_ALG socket family is the userspace interface for linux crypto API, this patch adds af_alg family support and some common functions for af_alg backend. It'll be used by afalg-backend crypto latter. Signed-off-by: Longpeng(Mike) --- configure| 22 ++ c

[Qemu-devel] [PATCH v19 0/2] virtio-crypto: virtio crypto device specification

2017-08-26 Thread Longpeng(Mike)
Hi guys, I'll work on the virtio-crypto spec with Gonglei together, Because He is so busy on the inner production project. --- v19 -> v18: - fix some typos and grammar fixes [Stefan, Halil] - rename VIRTIO_CRYPTO_F_STATELESS_MODE to VIRTIO_CRYPTO_F_MUX_MODE - describe the VIRTIO_CRYPTO_STATUS

[Qemu-devel] [PATCH v19 1/2] virtio-crypto: Add virtio crypto device specification

2017-08-26 Thread Longpeng(Mike)
-off-by: Gonglei Signed-off-by: Longpeng(Mike) --- acknowledgements.tex |3 + content.tex |2 + virtio-crypto.tex| 1479 ++ 3 files changed, 1484 insertions(+) create mode 100644 virtio-crypto.tex diff --git a

[Qemu-devel] [PATCH v19 2/2] virtio-crypto: Add conformance clauses

2017-08-26 Thread Longpeng(Mike)
From: Gonglei Add the conformance targets and clauses for virtio-crypto device. Signed-off-by: Gonglei Signed-off-by: Longpeng(Mike) --- conformance.tex | 29 + 1 file changed, 29 insertions(+) diff --git a/conformance.tex b/conformance.tex index 7b7df32..266a22f

Re: [Qemu-devel] [PATCH] tests: fix incorrect size_t format in benchmark-crypto

2017-08-28 Thread Longpeng (Mike)
On 2017/8/29 8:21, Longpeng (Mike) wrote: > > > On 2017/8/28 19:37, Philippe Mathieu-Daudé wrote: > >> $ make check-speed >> tests/benchmark-crypto-hash.c: In function 'test_hash_speed': >> tests/benchmark-crypto-hash.c:44:5: error: format 

Re: [Qemu-devel] [PATCH] tests: fix incorrect size_t format in benchmark-crypto

2017-08-28 Thread Longpeng (Mike)
sts/benchmark-crypto-hash.o' failed > make: *** [tests/benchmark-crypto-hash.o] Error 1 > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Longpeng(Mike) > --- > testing v2.10.0-rc4 > > tests/benchmark-crypto-cipher.c | 4 ++-- > tests/benchmark-crypt

Re: [Qemu-devel] [PATCH v2 0/2] Add global device ID in virt machine

2017-07-21 Thread Mike Caraman
Peter, thanks for feedback. Diana will return from vacation next week, I am trying clarify some of the questions. >From: Peter Maydell >Sent: Monday, July 10, 2017 8:10 PM >To: Diana Madalina Craciun >Cc: QEMU Developers; Michael S. Tsirkin; Eric Auger; Mike Caraman; qemu-arm; >M

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [RFC 0/8] virtio-crypto: add multiplexing mode support

2017-10-10 Thread Longpeng (Mike)
my stuff. >>>> >>>> Please let me know about your opinion. >>>> >>> Thanks for your work, Halil. What's your opinion about virtio crypto spec >>> v20? >> >> I'm on it. I've already started witting on Friday but things turned out a >> bit more >> interesting that expected. So I've postponed to today. Of course the two >> things >> are >> connected. I will try to give some feedback today. >> > Sounds good. > > Thanks, > -Gonglei > -- Regards, Longpeng(Mike)

Re: [Qemu-devel] [v20 1/2] virtio-crypto: Add virtio crypto device specification

2017-10-10 Thread Longpeng (Mike)
On 2017/10/9 23:43, Halil Pasic wrote: > > > On 09/29/2017 07:24 AM, Longpeng(Mike) wrote: >> From: Gonglei >> >> The virtio crypto device is a virtual crypto device (ie. hardware >> crypto accelerator card). Currently, the virtio crypto device provides

Re: [Qemu-devel] [PATCH] i386: turn off l3-cache property by default

2017-11-30 Thread Longpeng (Mike)
On 2017/11/29 21:35, Roman Kagan wrote: > On Wed, Nov 29, 2017 at 07:58:19PM +0800, Longpeng (Mike) wrote: >> On 2017/11/29 18:41, Eduardo Habkost wrote: >>> On Wed, Nov 29, 2017 at 01:20:38PM +0800, Longpeng (Mike) wrote: >>>> On 2017/11/29 5:13, Eduardo Habko

[Qemu-devel] [v22 0/2] virtio-crypto: virtio crypto device specification

2017-12-05 Thread Longpeng(Mike)
This is the specification about the new virtio crypto device. --- v22 -> v21 - fix some typos and grammar fixes [Halil, Stefan] - reorder names in alphabetical order [Stefan] - redescribe the date format [Halil] v21 -> v20 - rename 'queue_id' to 'reserved' [Halil] - redescribe the format of

[Qemu-devel] [v22 1/2] virtio-crypto: Add virtio crypto device specification

2017-12-05 Thread Longpeng(Mike)
-off-by: Gonglei Signed-off-by: Zhoujian Signed-off-by: Longpeng(Mike) --- acknowledgements.tex |4 + content.tex |2 + virtio-crypto.tex| 1510 ++ 3 files changed, 1516 insertions(+) create mode 100644 virtio-crypto.tex diff

[Qemu-devel] [v22 2/2] virtio-crypto: Add conformance clauses

2017-12-05 Thread Longpeng(Mike)
From: Gonglei Add the conformance targets and clauses for virtio-crypto device. Signed-off-by: Gonglei Signed-off-by: Zhoujian Signed-off-by: Longpeng(Mike) --- conformance.tex | 29 + 1 file changed, 29 insertions(+) diff --git a/conformance.tex b

Re: [Qemu-devel] [v22 1/2] virtio-crypto: Add virtio crypto device specification

2017-12-11 Thread Longpeng (Mike)
On 2017/12/6 19:01, Halil Pasic wrote: > > > On 12/06/2017 08:37 AM, Longpeng(Mike) wrote: >> +\field{outcome_len} is the size of struct virtio_crypto_session_input or >> +ZERO for the session-destroy operation. > > This ain't correct. It

[Qemu-devel] [Question] why need to start all queues in vhost_net_start

2017-11-15 Thread Longpeng(Mike)
Hi guys, We got a BUG report from our testers yesterday, the testing scenario was migrating a VM (Windows guest, *4 vcpus*, 4GB, vhost-user net: *7 queues*). We found the cause reason, and we'll report the BUG or send a fix patch to upstream if necessary( we haven't test the upstream yet, sorry..

Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start

2017-11-15 Thread Longpeng(Mike)
2017-11-15 23:05 GMT+08:00 Jason Wang : > > > On 2017年11月15日 22:55, Longpeng(Mike) wrote: >> >> Hi guys, >> >> We got a BUG report from our testers yesterday, the testing scenario was >> migrating a VM (Windows guest, *4 vcpus*, 4GB, vhost-user net: *7 >&

Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start

2017-11-15 Thread Longpeng (Mike)
Hi Jason & Michael, Do you have any idea about this problem ? -- Regards, Longpeng(Mike) On 2017/11/15 23:54, Longpeng(Mike) wrote: > 2017-11-15 23:05 GMT+08:00 Jason Wang : >> >> >> On 2017年11月15日 22:55, Longpeng(Mike) wrote: >>> >>> Hi guys, &

Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start

2017-11-16 Thread Longpeng (Mike)
On 2017/11/16 16:54, Jason Wang wrote: > > > On 2017年11月16日 13:53, Longpeng (Mike) wrote: >> On 2017/11/15 23:54, Longpeng(Mike) wrote: >>> 2017-11-15 23:05 GMT+08:00 Jason Wang: >>>> On 2017年11月15日 22:55, Longpeng(Mike) wrote: >>>>> Hi guy

Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start

2017-11-16 Thread Longpeng (Mike)
ost_virtqueue_set_addr(dev, vq, vhost_vq_index, dev->log_enabled); if (r < 0) { r = -errno; goto fail_alloc; } Then the HVA is send to the vhost-user. I think this is wrong, because the '0' here means guest driver doesn't init this queues, it should not be used to calculate the HVA for this vq. > Thanks > >> >> Thanks, >> -Gonglei >> > > > > > . > -- Regards, Longpeng(Mike)

Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start

2017-11-16 Thread Longpeng (Mike)
On 2017/11/16 20:04, Jason Wang wrote: > > > On 2017年11月16日 17:32, Longpeng (Mike) wrote: >> Hi Jason, >> >> On 2017/11/16 17:13, Jason Wang wrote: >> >>> >>> On 2017年11月16日 17:01, Gonglei (Arei) wrote: >>>> No, Window

Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start

2017-11-16 Thread Longpeng (Mike)
On 2017/11/17 12:32, Michael S. Tsirkin wrote: > On Thu, Nov 16, 2017 at 08:04:34PM +0800, Jason Wang wrote: >> >> >> On 2017年11月16日 17:32, Longpeng (Mike) wrote: >>> Hi Jason, >>> >>> On 2017/11/16 17:13, Jason Wang wrote: >>> >&

[Qemu-devel] [PATCH] build: fix typo in error message

2017-11-27 Thread Mike Frysinger
Signed-off-by: Mike Frysinger --- scripts/git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index 030617b4ac0c..bc7224a27fe3 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -24,7 +24,7

Re: [Qemu-devel] [PATCH] i386: turn off l3-cache property by default

2017-11-28 Thread Longpeng (Mike)
the numbers if you use "-smp 8" >>> with no "cores" and "threads" options? >>> >> This is quite simple. A lot of software licenses are bound to the amount >> of CPU __sockets__. Thus it is mandatory in a lot of cases to set topology >> with 1 socket/xx cores to reduce the amount of money necessary to >> be paid for the software. > > In this case it looks like we're talking about the expected > meaning of "cores=N". My first interpretation would be that the > user obviously want the guest to see the multiple cores sharing a > L3 cache, because that's how real CPUs normally work. But I see > why you have different expectations. > > Numbers on dedicated-pCPU scenarios would be helpful to guide the > decision. I wouldn't like to cause a performance regression for > users that fine-tuned vCPU topology and set up CPU pinning. > -- Regards, Longpeng(Mike)

Re: [Qemu-devel] [PATCH] i386: turn off l3-cache property by default

2017-11-28 Thread Longpeng (Mike)
On 2017/11/29 14:01, Roman Kagan wrote: > On Wed, Nov 29, 2017 at 01:20:38PM +0800, Longpeng (Mike) wrote: >> On 2017/11/29 5:13, Eduardo Habkost wrote: >> >>> [CCing the people who were copied in the original patch that >>> enabled l3cache] >>> &g

Re: [Qemu-devel] [PATCH] i386: turn off l3-cache property by default

2017-11-29 Thread Longpeng (Mike)
On 2017/11/29 18:41, Eduardo Habkost wrote: > On Wed, Nov 29, 2017 at 01:20:38PM +0800, Longpeng (Mike) wrote: >> On 2017/11/29 5:13, Eduardo Habkost wrote: >>> [CCing the people who were copied in the original patch that >>> enabled l3cache] >>> >>

<    4   5   6   7   8   9   10   11   12   13   >