Re: [Qemu-devel] [PATCH 4/4] qtest: add ivshmem-test for ppc64

2016-12-12 Thread Markus Armbruster
Laurent Vivier writes: > Signed-off-by: Laurent Vivier > --- > tests/Makefile.include | 3 ++- > tests/ivshmem-test.c | 46 +- > 2 files changed, 31 insertions(+), 18 deletions(-) > > diff --git a/tests/Makefile.include b/tests/Makefile.include > i

Re: [Qemu-devel] [RFC PATCH 00/13] VT-d replay and misc cleanup

2016-12-12 Thread Peter Xu
On Tue, Dec 06, 2016 at 06:36:15PM +0800, Peter Xu wrote: > This RFC series is a continue work for Aviv B.D.'s vfio enablement > series with vt-d. Aviv has done a great job there, and what we still > lack there are mostly the following: > > (1) VFIO got duplicated IOTLB notifications due to splitt

Re: [Qemu-devel] [Qemu-block] [Nbd] [PATCH] doc: Propose NBD_FLAG_INIT_ZEROES extension

2016-12-12 Thread Kevin Wolf
Am 12.12.2016 um 19:12 hat Wouter Verhelst geschrieben: > I'm not opposed to this proposal, per se, but there seems to be some > disagreement (by Kevin, for instance) on whether this extension is at > all useful. FWIW, I'm not opposed to adding the flag. I don't think it can hurt, but I wanted to

Re: [Qemu-devel] [PATCH for-2.9 v3 0/6] crypto: add HMAC algorithms support

2016-12-12 Thread Longpeng (Mike)
Hi Daniel, The error is due to auto-build environment doesn't support both gcrypt and nettle, and it's glibc(2.28) is too old, so I think I should add no-op in hmac-glib.c when glibc is older than 2.30. for example: #include <...> #if GLIB_CHECK_VERSION(2, 30, 0) #else ...(n

[Qemu-devel] [PATCH for-2.9 v2 2/2] intel_iommu: provide "aw-bits" parameter

2016-12-12 Thread Peter Xu
Previously vt-d codes only supports 39 bits iova address width. This patch provide a new parameter for Intel IOMMU to extend its address width to 48 bits. After enabling larger address width (48), we should be able to map larger iova addresses in the guest. To check whether 48 bits aw is enabled,

Re: [Qemu-devel] aarch64-linux-user compilation error

2016-12-12 Thread Alex Bennée
Pranith Kumar writes: > Hi Alex, > > On Mon, Dec 12, 2016 at 6:39 AM, Alex Bennée wrote: >> >> Sounds like it. How did you ensure you had your QEMU build dependencies >> installed on your system? >> > > I did: > > $ sudo apt-get build-dep qemu > > to get all the build dependencies. I must have

[Qemu-devel] [PATCH for-2.9 v2 1/2] intel_iommu: check validity for GAW bits in CE

2016-12-12 Thread Peter Xu
Currently vt-d Context Entry (CE) only allows 39/48 bits address width. If guest software configured more than that, we complain and report. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 17 - hw/i386/intel_iommu_internal.h | 2 ++ 2 files changed, 18 insertions(+

[Qemu-devel] [PATCH for-2.9 v2 0/2] VT-d supports 48 bits address width

2016-12-12 Thread Peter Xu
(V2 is mostly a re-written of V1, so no change log is appended) The first patch did some check to make sure the CE GAW bits are always valid. The second patch extended VT-d GAW (Guest Address Width) from 39 bits to 48 bits by providing "aw-bits" parameter for intel-iommu. Test done: - boot vm w

Re: [Qemu-devel] experience with SDL2, event loop & main thread

2016-12-12 Thread Liviu Ionescu
> On 13 Dec 2016, at 09:04, Fam Zheng wrote: > > using qemu_bh_schedule_idle in the QEMU main loop and poll event there > periodically. ok, so my TODO list includes two items: to move user events on an event notifier and to run the SDL_PollEvent() on qemu_bh_schedule_idle. I'll do this, but a

[Qemu-devel] [PATCH] display: virtio-gpu-3d: check virgl capabilities max_size

2016-12-12 Thread P J P
From: Prasad J Pandit Virtio GPU device while processing 'VIRTIO_GPU_CMD_GET_CAPSET' command, retrieves the maximum capabilities size to fill in the response object. It continues to fill in capabilities even if retrieved 'max_size' is zero(0), thus resulting in OOB access. Add check to avoid it.

Re: [Qemu-devel] [PATCH for-2.9 v3 0/6] crypto: add HMAC algorithms support

2016-12-12 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [Qemu-devel] [PATCH for-2.9 v3 0/6] crypto: add HMAC algorithms support Type: series Message-id: 1481612513-28556-1-g

Re: [Qemu-devel] [PATCH for-2.9 v2 7/7] crypto: add HMAC algorithms testcases

2016-12-12 Thread Longpeng (Mike)
Hi Daniel, Thanks for your review, and I fix them as your suggestion in V3, please review V3 when you're free. :) Regards, On 2016/12/12 18:31, Daniel P. Berrange wrote: > On Mon, Dec 12, 2016 at 04:08:12PM +0800, Longpeng(Mike) wrote: >> This patch add HMAC algorithms testcases >> >> Signed-of

[Qemu-devel] [PATCH for-2.9 v3 6/6] crypto: add HMAC algorithms testcases

2016-12-12 Thread Longpeng(Mike)
This patch add HMAC algorithms testcases Signed-off-by: Longpeng(Mike) --- tests/Makefile.include | 2 + tests/test-crypto-hmac.c | 266 +++ 2 files changed, 268 insertions(+) create mode 100644 tests/test-crypto-hmac.c diff --git a/tests/Makefil

Re: [Qemu-devel] experience with SDL2, event loop & main thread

2016-12-12 Thread Fam Zheng
On Mon, 12/12 17:07, Liviu Ionescu wrote: > > > On 12 Dec 2016, at 16:51, Fam Zheng wrote: > > > > On Mon, 12/12 15:22, Liviu Ionescu wrote: > >> so, back to square one; any suggestion on how to avoid the periodic timer > >> required to poll SDL system events? > > > > Good question, I've missed

[Qemu-devel] [PATCH for-2.9 v3 3/6] crypto: support HMAC algorithms based on libgcrypt

2016-12-12 Thread Longpeng(Mike)
This patch add HMAC algorithms based on libgcrypt support Signed-off-by: Longpeng(Mike) --- crypto/hmac-gcrypt.c | 111 ++- 1 file changed, 109 insertions(+), 2 deletions(-) diff --git a/crypto/hmac-gcrypt.c b/crypto/hmac-gcrypt.c index 6e07415..2

[Qemu-devel] [PATCH for-2.9 v3 1/6] configure: add CONFIG_GCRYPT_HMAC item

2016-12-12 Thread Longpeng(Mike)
This item will be used for support libcrypt-backed HMAC algorithms. Support for hmac has been added in Libgcrypt 1.6.0, but we cannot use pkg-config to get libcrypt's version. However we can make a in configure to know whether current libcrypt support hmac. Signed-off-by: Longpeng(Mike) --- con

[Qemu-devel] [PATCH for-2.9 v3 4/6] crypto: support HMAC algorithms based on glibc

2016-12-12 Thread Longpeng(Mike)
This patch add glibc-backed HMAC algorithms support Signed-off-by: Longpeng(Mike) --- crypto/hmac-glib.c | 99 -- 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/crypto/hmac-glib.c b/crypto/hmac-glib.c index 3e2a933..f07c841 1006

[Qemu-devel] [PATCH for-2.9 v3 0/6] crypto: add HMAC algorithms support

2016-12-12 Thread Longpeng(Mike)
Since QEMU has been supported cryptodev, so it is necessary to support more crypto algorithms(i.e. hmac,aead) in QEMU backend. This patchset add HMAC algorithms support. --- Changes since v2: - remove QCryptoHmacAlgorithm defination in qapi, just use QCryptoHashAlgorithm as some funcs f

[Qemu-devel] [PATCH for-2.9 v3 5/6] crypto: support HMAC algorithms based on nettle

2016-12-12 Thread Longpeng(Mike)
This patch add nettle-backed HMAC algorithms support Signed-off-by: Longpeng(Mike) --- crypto/hmac-nettle.c | 136 +-- 1 file changed, 133 insertions(+), 3 deletions(-) diff --git a/crypto/hmac-nettle.c b/crypto/hmac-nettle.c index 95f3dcc..4a9e6b

[Qemu-devel] [PATCH for-2.9 v3 2/6] crypto: add HMAC algorithms framework

2016-12-12 Thread Longpeng(Mike)
This patch introduce HMAC algorithms framework. Signed-off-by: Longpeng(Mike) --- crypto/Makefile.objs | 4 ++ crypto/hmac-gcrypt.c | 45 ++ crypto/hmac-glib.c | 44 ++ crypto/hmac-nettle.c | 45 ++ crypto/hmac.c| 72 ++ cry

Re: [Qemu-devel] [Qemu-block] Meeting notes on -blockdev, dynamic backend reconfiguration

2016-12-12 Thread Fam Zheng
On Mon, 12/12 19:23, Markus Armbruster wrote: > Fam Zheng writes: > > > On Mon, 12/12 14:58, Markus Armbruster wrote: > >> Fam Zheng writes: > >> > >> > On Thu, 12/08 13:46, Markus Armbruster wrote: > >> >> Fam Zheng writes: > >> >> > >> >> > On Wed, 12/07 10:48, Kevin Wolf wrote: > >> >> >>

Re: [Qemu-devel] [PATCH for-2.9 2/2] intel_iommu: extend supported guest aw to 48 bits

2016-12-12 Thread Peter Xu
On Mon, Dec 12, 2016 at 10:48:28PM -0700, Alex Williamson wrote: > On Tue, 13 Dec 2016 13:24:29 +0800 > Peter Xu wrote: > > > On Mon, Dec 12, 2016 at 08:51:50PM -0700, Alex Williamson wrote: > > > > [...] > > > > > > > I'm not sure how the vIOMMU supporting 39 bits or 48 bits is directly > > >

Re: [Qemu-devel] [PATCH for-2.9 2/2] intel_iommu: extend supported guest aw to 48 bits

2016-12-12 Thread Alex Williamson
On Tue, 13 Dec 2016 13:24:29 +0800 Peter Xu wrote: > On Mon, Dec 12, 2016 at 08:51:50PM -0700, Alex Williamson wrote: > > [...] > > > > > I'm not sure how the vIOMMU supporting 39 bits or 48 bits is directly > > > > relevant to vfio, we're not sharing page tables. There is already a > > > > ca

Re: [Qemu-devel] [PATCH for-2.9 2/2] intel_iommu: extend supported guest aw to 48 bits

2016-12-12 Thread Alex Williamson
On Tue, 13 Dec 2016 05:00:07 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Tuesday, December 13, 2016 3:36 AM > > > > On Mon, 12 Dec 2016 10:01:15 +0800 > > Peter Xu wrote: > > > > > On Sun, Dec 11, 2016 at 05:13:45AM +0200, Michael S. Tsirkin wrote: > > > > On Wed, Dec 07

Re: [Qemu-devel] [PATCH for-2.9 2/2] intel_iommu: extend supported guest aw to 48 bits

2016-12-12 Thread Peter Xu
On Mon, Dec 12, 2016 at 08:51:50PM -0700, Alex Williamson wrote: [...] > > > I'm not sure how the vIOMMU supporting 39 bits or 48 bits is directly > > > relevant to vfio, we're not sharing page tables. There is already a > > > case today, without vIOMMU that you can make a guest which has more >

Re: [Qemu-devel] [PATCH for-2.9 2/2] intel_iommu: extend supported guest aw to 48 bits

2016-12-12 Thread Tian, Kevin
> From: Alex Williamson > Sent: Tuesday, December 13, 2016 3:36 AM > > On Mon, 12 Dec 2016 10:01:15 +0800 > Peter Xu wrote: > > > On Sun, Dec 11, 2016 at 05:13:45AM +0200, Michael S. Tsirkin wrote: > > > On Wed, Dec 07, 2016 at 01:52:45PM +0800, Peter Xu wrote: > > > > Previously vt-d codes only

Re: [Qemu-devel] [PATCH for-2.9 2/2] intel_iommu: extend supported guest aw to 48 bits

2016-12-12 Thread Alex Williamson
On Tue, 13 Dec 2016 11:33:41 +0800 Peter Xu wrote: > On Mon, Dec 12, 2016 at 12:35:44PM -0700, Alex Williamson wrote: > > On Mon, 12 Dec 2016 10:01:15 +0800 > > Peter Xu wrote: > > > > > On Sun, Dec 11, 2016 at 05:13:45AM +0200, Michael S. Tsirkin wrote: > > > > On Wed, Dec 07, 2016 at 01:5

Re: [Qemu-devel] [PATCH for-2.9 2/2] intel_iommu: extend supported guest aw to 48 bits

2016-12-12 Thread Peter Xu
On Mon, Dec 12, 2016 at 12:35:44PM -0700, Alex Williamson wrote: > On Mon, 12 Dec 2016 10:01:15 +0800 > Peter Xu wrote: > > > On Sun, Dec 11, 2016 at 05:13:45AM +0200, Michael S. Tsirkin wrote: > > > On Wed, Dec 07, 2016 at 01:52:45PM +0800, Peter Xu wrote: > > > > Previously vt-d codes only su

Re: [Qemu-devel] [PATCH v6 2/2] crypto: add virtio-crypto driver

2016-12-12 Thread Herbert Xu
On Tue, Dec 13, 2016 at 12:05:19AM +0200, Michael S. Tsirkin wrote: > > > Sorry but it's too late for 4.10. It needed to have been in my > > tree before the merge window opened to make it for this cycle. > > Objections to me merging this? I'm preparing my tree right now. Sure feel free to merge

Re: [Qemu-devel] Reproducible crash on PCIe hotplug

2016-12-12 Thread Cao jin
On 12/13/2016 06:09 AM, Michael S. Tsirkin wrote: > On Mon, Dec 12, 2016 at 04:57:30PM -0200, Eduardo Habkost wrote: >> On Mon, Dec 12, 2016 at 08:41:41PM +0200, Michael S. Tsirkin wrote: >>> On Mon, Dec 12, 2016 at 05:29:15PM +, Stefan Hajnoczi wrote: On Mon, Dec 12, 2016 at 01:34:05PM

Re: [Qemu-devel] aarch64-linux-user compilation error

2016-12-12 Thread Pranith Kumar
Hi Alex, On Mon, Dec 12, 2016 at 6:39 AM, Alex Bennée wrote: > > Sounds like it. How did you ensure you had your QEMU build dependencies > installed on your system? > I did: $ sudo apt-get build-dep qemu to get all the build dependencies. I must have recently installed oss4-dev through some ot

Re: [Qemu-devel] [qemu patch V4 2/2] kvmclock: reduce kvmclock difference on migration

2016-12-12 Thread Pankaj Gupta
> > > > > On Mon, Dec 12, 2016 at 02:36:55AM -0500, Pankaj Gupta wrote: > > > > > > Hello Marcelo, > > > > Hi Pankaj, > > > > > > Check for KVM_CAP_ADJUST_CLOCK capability KVM_CLOCK_TSC_STABLE, which > > > > indicates that KVM_GET_CLOCK returns a value as seen by the guest at > > > > that mom

Re: [Qemu-devel] [PATCH v6 2/2] crypto: add virtio-crypto driver

2016-12-12 Thread Gonglei (Arei)
> > Subject: Re: [PATCH v6 2/2] crypto: add virtio-crypto driver > > On Mon, Dec 12, 2016 at 06:54:07PM +0800, Herbert Xu wrote: > > On Mon, Dec 12, 2016 at 06:25:12AM +, Gonglei (Arei) wrote: > > > Hi, Michael & Herbert > > > > > > Because the virtio-crypto device emulation had been in QEMU 2

Re: [Qemu-devel] [PATCH 00/54] WIP: chardev: qom-ify

2016-12-12 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 00/54] WIP: chardev: qom-ify Type: series Message-id: 20161212224325.20790-1-marcandre.lur...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git

[Qemu-devel] [PATCH 3/4] libqos: fix spapr qpci_map()

2016-12-12 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- tests/libqos/pci-spapr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/libqos/pci-spapr.c b/tests/libqos/pci-spapr.c index 1e5d015..2043f1e 100644 --- a/tests/libqos/pci-spapr.c +++ b/tests/libqos/pci-spapr.c @@ -193,8 +193,8 @@ QP

[Qemu-devel] [PATCH 0/4] qtest: enable several tests for ppc64

2016-12-12 Thread Laurent Vivier
This series enables some tests existing for i386 and which can also work on ppc64. VGA tests and netfilter tests are trivial, but ivshmem test needs to enable the SPAPR PCI framework. We also fix a bug in qpci_map() for SPAPR, where the PCI base is not correctly set in the CPU address space. Laur

[Qemu-devel] [PATCH 52/54] char: move serial chardev to itw own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-serial.c | 294 ++ chardev/char.c| 280 +-- chardev/Makefile.objs | 1 + chardev/char-serial.h | 12 +++ 4 files changed, 309 insertions(+), 278

[Qemu-devel] [PATCH 4/4] qtest: add ivshmem-test for ppc64

2016-12-12 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- tests/Makefile.include | 3 ++- tests/ivshmem-test.c | 46 +- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index b574964..09fe5b6 100644 --- a/tests

[Qemu-devel] [PATCH 51/54] char: move pty chardev in its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-pty.c| 277 ++ chardev/char.c| 258 -- chardev/Makefile.objs | 1 + 3 files changed, 278 insertions(+), 258 deletions(-) create mode 100644

[Qemu-devel] [PATCH 49/54] char: move console in its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-console.c | 30 ++ chardev/char.c | 24 chardev/Makefile.objs | 1 + 3 files changed, 31 insertions(+), 24 deletions(-) create mode 100644 chardev/char-console.c diff --git a/chardev

[Qemu-devel] [PATCH 53/54] char: move parallel chardev in its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-parallel.c | 292 chardev/char.c | 287 +-- chardev/Makefile.objs | 1 + chardev/char-parallel.h | 9 ++ 4 files changed, 303 insertions(+)

[Qemu-devel] [PATCH 2/4] qtest: add display-vga-test to ppc64

2016-12-12 Thread Laurent Vivier
Only enable for ppc64 in the Makefile, but added code in the file to check cirrus card only on architectures supporting it (alpha, mips, i386, x86_64). Signed-off-by: Laurent Vivier --- tests/Makefile.include | 1 + tests/display-vga-test.c | 7 ++- 2 files changed, 7 insertions(+), 1 dele

[Qemu-devel] [PATCH 48/54] char: move stdio in its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-stdio.c | 140 ++ chardev/char.c| 122 +-- chardev/Makefile.objs | 1 + 3 files changed, 142 insertions(+), 121 deletions(-) create mode 100644 cha

[Qemu-devel] [PATCH 1/4] qtest: add netfilter tests for ppc64

2016-12-12 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- tests/Makefile.include | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Makefile.include b/tests/Makefile.include index e98d3b6..be6209d 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -283,6 +283,9 @@ gcov-files-ppc64-y += hw/usb/

[Qemu-devel] [PATCH 46/54] char: move udp chardev in its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-udp.c| 211 ++ chardev/char.c| 199 --- chardev/Makefile.objs | 1 + 3 files changed, 212 insertions(+), 199 deletions(-) create mode 100644

[Qemu-devel] [PATCH 47/54] char: move file chardev in its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-file.c | 115 ++ chardev/char.c| 104 - chardev/Makefile.objs | 1 + 3 files changed, 116 insertions(+), 104 deletions(-) create mode 100644 c

[Qemu-devel] [PATCH 42/54] char: move fd chardev in its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-fd.c | 147 ++ chardev/char.c| 147 +- chardev/Makefile.objs | 1 + chardev/char-fd.h | 21 4 files changed, 171 insertions

[Qemu-devel] [PATCH 54/54] char: headers clean-up

2016-12-12 Thread Marc-André Lureau
Those could probably be squashed with earlier patches, however I couldn't easily identify them, test them or check if there are still necessary on various platforms. Signed-off-by: Marc-André Lureau --- chardev/char.c | 39 --- 1 file changed, 39 deletions(-)

[Qemu-devel] [PATCH 45/54] char: move socket chardev to itw own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-socket.c | 995 ++ chardev/char.c| 980 + chardev/Makefile.objs | 1 + include/sysemu/char.h | 1 + 4 files changed, 998 insertions(+), 979

[Qemu-devel] [PATCH 39/54] char: rename and move to header CHR_READ_BUF_LEN

2016-12-12 Thread Marc-André Lureau
This define is used by several character devices, place it in char common header. Signed-off-by: Marc-André Lureau --- chardev/char.c| 13 ++--- include/sysemu/char.h | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/chardev/char.c b/chardev/char.c index 94b4

[Qemu-devel] [PATCH 50/54] char: move pipe chardev in its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-pipe.c | 167 ++ chardev/char.c| 141 -- chardev/Makefile.objs | 1 + 3 files changed, 168 insertions(+), 141 deletions(-) create mode 100644 char

[Qemu-devel] [PATCH 40/54] char: remove unused READ_RETRIES

2016-12-12 Thread Marc-André Lureau
Curiously unused since its introduction in commit 7b0bfdf52d69. Signed-off-by: Marc-André Lureau --- chardev/char.c | 1 - 1 file changed, 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c index 1fdfa98954..eb9fb8d984 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -87,7 +87,6 @@

[Qemu-devel] [PATCH 43/54] char: move win chardev base class in its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-win.c| 245 +++ chardev/char.c| 256 +- chardev/Makefile.objs | 1 + chardev/char-win.h| 30 ++ 4 files changed, 279 insertions(+),

[Qemu-devel] [PATCH 29/54] char-fd: convert to finalize

2016-12-12 Thread Marc-André Lureau
char-serial inherits from char-fd finalizer. Signed-off-by: Marc-André Lureau --- qemu-char.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 939c598c35..5d4cb85cea 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1291,9 +1291,10

[Qemu-devel] [PATCH 44/54] char: move win-stdio into its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-win-stdio.c | 243 +++ chardev/char.c | 231 +--- chardev/Makefile.objs| 1 + chardev/char-win-stdio.h | 6 ++ 4 files changed, 252 insertions(+)

[Qemu-devel] [PATCH 37/54] char: move mux to its own file

2016-12-12 Thread Marc-André Lureau
A mechanical move, except that qemu_chr_write_all() needs to be declared in char.h header to be used from chardev unit files. Signed-off-by: Marc-André Lureau --- chardev/char-mux.c| 332 +++ chardev/char.c| 348 +---

[Qemu-devel] [PATCH 38/54] char: move ringbuf/memory to its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-ringbuf.c | 225 + chardev/char.c | 217 --- chardev/Makefile.objs | 1 + 3 files changed, 226 insertions(+), 217 deletions(-) create mode 1006

[Qemu-devel] [PATCH 27/54] char-win: do not override chr_free

2016-12-12 Thread Marc-André Lureau
For some unclear reason to me, char-file does not have chr_free on win32. Since we want to switch to instance finalizer instead of class chr_free, we should be able to run the base WinChardev class finalizer in any case. Use a boolean to skip free to ease the transition to instance finalizer. Sign

[Qemu-devel] [PATCH 41/54] char: move QIOChannel-related in char-io.h

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-io.c | 168 chardev/char.c| 174 +- chardev/Makefile.objs | 1 + chardev/char-io.h | 24 +++ 4 files changed, 194 insertions(+)

[Qemu-devel] [PATCH 35/54] char: make null_chr_write() the default method

2016-12-12 Thread Marc-André Lureau
All chardev must implement chr_write(), but parallel and null chardev both use null_chr_write(). Move it to the base class, so we don't need to export the function when splitting the chardev in respective files. Signed-off-by: Marc-André Lureau --- chardev/char.c | 21 + 1 fi

[Qemu-devel] [PATCH 32/54] char: remove class kind field

2016-12-12 Thread Marc-André Lureau
The class kind is only necessary to lookup the chardev name in qmp_chardev_add() after calling qemu_chr_new_from_opts(). However, qemu_chr_new_from_opts() can be changed to use a non-qmp function using the chardev class typename. Introduce qemu_chardev_add() to be called from qemu_chr_new_from_opts

[Qemu-devel] [PATCH 25/54] char-stdio: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qemu-char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 403b8a3dc7..8a5953954c 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1417,10 +1417,10 @@ static void qemu_chr_set_echo_stdio(Chardev *chr, bo

[Qemu-devel] [PATCH 36/54] char: move null chardev to its own file

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-null.c | 31 +++ chardev/char.c| 23 --- chardev/Makefile.objs | 1 + 3 files changed, 32 insertions(+), 23 deletions(-) create mode 100644 chardev/char-null.c diff --git a/chardev/char-

[Qemu-devel] [PATCH 28/54] char-win: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qemu-char.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 63b254f632..939c598c35 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2145,8 +2145,9 @@ typedef struct { static int win_chr_poll(void *opaqu

[Qemu-devel] [PATCH 31/54] char: get rid of CharDriver

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- backends/baum.c | 6 +- backends/msmouse.c| 6 +- backends/testdev.c| 6 +- qemu-char.c | 281 +- spice-qemu-char.c | 15 +-- ui/console.c | 10 +- ui/gtk.c

[Qemu-devel] [PATCH 23/54] char-ringbuf: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qemu-char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 21eb2d9135..4d7f82a45b 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3543,9 +3543,9 @@ static int ringbuf_chr_read(Chardev *chr, uint8_t *buf

[Qemu-devel] [PATCH 34/54] char: create chardev-obj-y

2016-12-12 Thread Marc-André Lureau
This will help to split char.c in several units without having to reference them all everywhere. Signed-off-by: Marc-André Lureau --- Makefile | 3 ++- Makefile.objs | 4 +++- Makefile.target| 3 +++ chardev/Makefile.objs | 2 +- tests/Makefile.include | 4 ++-- 5

[Qemu-devel] [PATCH 24/54] char-parallel: convert parallel to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qemu-char.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 4d7f82a45b..403b8a3dc7 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2020,17 +2020,6 @@ static int pp_ioctl(Charde

[Qemu-devel] [PATCH 30/54] char: remove chr_free

2016-12-12 Thread Marc-André Lureau
Now it uses Object instance_finalize instead. Signed-off-by: Marc-André Lureau --- qemu-char.c | 10 +- include/sysemu/char.h | 8 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 5d4cb85cea..ce963d3875 100644 --- a/qemu-c

[Qemu-devel] [PATCH 22/54] char-pty: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qemu-char.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index ea8b12fa4f..21eb2d9135 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1654,9 +1654,10 @@ static void pty_chr_state(Chardev *chr, int connecte

[Qemu-devel] [PATCH 33/54] char: move to chardev/

2016-12-12 Thread Marc-André Lureau
The following commits will split char.c in several files. Let's put them in a subdirectory. Signed-off-by: Marc-André Lureau --- qemu-char.c => chardev/char.c | 0 Makefile.objs | 2 +- chardev/Makefile.objs | 1 + tests/Makefile.include| 6 +++--- MAINTAINERS

[Qemu-devel] [PATCH 21/54] char-socket: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qemu-char.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 06281c60e7..ea8b12fa4f 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3442,9 +3442,10 @@ int qemu_chr_fe_wait_connected(CharBackend *be, Erro

[Qemu-devel] [PATCH 15/54] chardev: qom-ify

2016-12-12 Thread Marc-André Lureau
Turn Chardev into Object. qemu_chr_alloc() is replaced by the qemu_chardev_new() constructor. It will call qemu_char_open() to open/intialize the chardev with the ChardevCommon *backend settings. The CharDriver::create() callback is turned into a ChardevClass::open() which is called from the newl

[Qemu-devel] [PATCH 18/54] msmouse: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- backends/msmouse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/msmouse.c b/backends/msmouse.c index 936a5476d5..55c344f0e1 100644 --- a/backends/msmouse.c +++ b/backends/msmouse.c @@ -139,9 +139,9 @@ static int msmouse_ch

[Qemu-devel] [PATCH 26/54] char-win-stdio: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qemu-char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 8a5953954c..3dfb249d81 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2589,9 +2589,9 @@ static void qemu_chr_set_echo_win_stdio(Chardev *chr,

[Qemu-devel] [PATCH 20/54] char-udp: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qemu-char.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 3b08155a8f..06281c60e7 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2774,9 +2774,10 @@ static void udp_chr_update_read_handler(Chardev *chr

[Qemu-devel] [PATCH 17/54] baum: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- backends/baum.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/baum.c b/backends/baum.c index 80103b6098..e6758a4dbc 100644 --- a/backends/baum.c +++ b/backends/baum.c @@ -631,9 +631,9 @@ static void baum_chr_read(void *opaq

[Qemu-devel] [PATCH 19/54] mux: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qemu-char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index d5656007da..3b08155a8f 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -859,9 +859,9 @@ static GSource *mux_chr_add_watch(Chardev *s, GIOConditi

[Qemu-devel] [PATCH 16/54] spice-qemu-char: convert to finalize

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- spice-qemu-char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spice-qemu-char.c b/spice-qemu-char.c index e27b86622a..af30143720 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -210,9 +210,9 @@ static int spice_chr_write

[Qemu-devel] [PATCH 12/54] spice-char: improve error reporting

2016-12-12 Thread Marc-André Lureau
Set errp to report errors up. Use error_report() to give hints about parameters on the right monitor, instead of a direct fprintf() call. Signed-off-by: Marc-André Lureau --- spice-qemu-char.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/spi

[Qemu-devel] [PATCH 14/54] gtk: overwrite the console.c char driver

2016-12-12 Thread Marc-André Lureau
Instead of registering a vc handler to allocate the Gtk VC Chardev, overwrite the console.c char driver. A later patch, when switching to QOM, will register a default console vc QOM class if none has been registered before. Signed-off-by: Marc-André Lureau --- ui/console.c | 24 +++

[Qemu-devel] [PATCH 09/54] bt: use qemu_chr_alloc()

2016-12-12 Thread Marc-André Lureau
Use common allocator for CharDriverState. Rename the now untouched parent field. Signed-off-by: Marc-André Lureau --- hw/bt/hci-csr.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hw/bt/hci-csr.c b/hw/bt/hci-csr.c index bf2deb0497..e2c78b8720 100644 --

[Qemu-devel] [PATCH 08/54] char: allocate CharDriverState as a single object

2016-12-12 Thread Marc-André Lureau
Use a single allocation for CharDriverState, this avoids extra allocations & pointers, and is a step towards more object-oriented CharDriver. Gtk console is a bit peculiar, gd_vc_chr_set_echo Signed-off-by: Marc-André Lureau --- backends/baum.c | 23 ++--- backends/msmouse.c| 16 +--

[Qemu-devel] [PATCH 13/54] char: use error_report()

2016-12-12 Thread Marc-André Lureau
Prefer error_report() over fprintf(stderr..) Signed-off-by: Marc-André Lureau --- qemu-char.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 9220001906..315037049b 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -45

[Qemu-devel] [PATCH 11/54] char: rename TCPChardev and NetChardev

2016-12-12 Thread Marc-André Lureau
Rename the types to follow the name of the chardev kind. - socket: TCPChardev -> SocketChardev - udp: NetChardev -> UdpChardev Signed-off-by: Marc-André Lureau --- qemu-char.c | 74 ++--- 1 file changed, 37 insertions(+), 37 deletions(-) d

[Qemu-devel] [PATCH 04/54] char: move callbacks in CharDriver

2016-12-12 Thread Marc-André Lureau
This makes the code more declarative, and avoids to duplicate the information on all instances. Signed-off-by: Marc-André Lureau --- backends/baum.c | 13 +- backends/msmouse.c| 13 +- backends/testdev.c| 10 +- gdbstub.c | 7 +- hw/bt/hci-csr.c | 8 +- qem

[Qemu-devel] [PATCH 07/54] char: use a feature bit for replay

2016-12-12 Thread Marc-André Lureau
Use a feature flag rather than a structure field for "replay". Signed-off-by: Marc-André Lureau --- qemu-char.c | 33 - include/sysemu/char.h | 3 ++- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 2302a

[Qemu-devel] [PATCH 05/54] char: fold single-user functions in caller

2016-12-12 Thread Marc-André Lureau
This shorten a bit the code. Signed-off-by: Marc-André Lureau --- qemu-char.c | 97 - 1 file changed, 31 insertions(+), 66 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index a81b61491a..cc7731a680 100644 --- a/qemu-char.c +++ b/

[Qemu-devel] [PATCH 06/54] char: introduce generic qemu_chr_get_kind()

2016-12-12 Thread Marc-André Lureau
This allows to remove the "is_mux" field from CharDriverState. Signed-off-by: Marc-André Lureau --- monitor.c | 2 +- qemu-char.c | 21 ++--- include/sysemu/char.h | 15 +-- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/monito

[Qemu-devel] [PATCH 00/54] WIP: chardev: qom-ify

2016-12-12 Thread Marc-André Lureau
Hi, This is a followup of the series "char: fixes and improvements", where I started to refactor a bit the code to allow qom-ification. Paolo quickly reviewed some of those patches already. qemu-char.c is quite a large file (~130k, 5000 loc) with may chardev and a lot of #ifdef. It doesn't use qe

[Qemu-devel] [PATCH 03/54] char: use a static array for backends

2016-12-12 Thread Marc-André Lureau
Number and kinds of backends is known at compile-time, use a fixed-sized static array to simplify iterations & lookups. Signed-off-by: Marc-André Lureau --- qemu-char.c | 101 -- include/sysemu/char.h | 1 + 2 files changed, 58 insertio

[Qemu-devel] [PATCH 02/54] char: use a const CharDriver

2016-12-12 Thread Marc-André Lureau
No need to allocate & copy fileds, let's use static const struct instead. Signed-off-by: Marc-André Lureau --- backends/baum.c | 8 +++- backends/msmouse.c| 7 +++- backends/testdev.c| 7 +++- qemu-char.c | 100 -- spi

[Qemu-devel] [PATCH 01/54] gtk: avoid oob array access

2016-12-12 Thread Marc-André Lureau
When too many consoles are created, vcs[] may be write out-of-bounds. Signed-off-by: Marc-André Lureau --- ui/gtk.c | 5 + 1 file changed, 5 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index e81642876a..67c52179ee 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1696,6 +1696,11 @@ static CharDri

[Qemu-devel] [PATCH] trace-events: spelling fix

2016-12-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace-events b/trace-events index f74e1d3d22..da5bbb3a3a 100644 --- a/trace-events +++ b/trace-events @@ -47,7 +47,7 @@ qemu_system_shutdown_request(void) "" qemu_system_powerdow

Re: [Qemu-devel] Reproducible crash on PCIe hotplug

2016-12-12 Thread Michael S. Tsirkin
On Mon, Dec 12, 2016 at 04:57:30PM -0200, Eduardo Habkost wrote: > On Mon, Dec 12, 2016 at 08:41:41PM +0200, Michael S. Tsirkin wrote: > > On Mon, Dec 12, 2016 at 05:29:15PM +, Stefan Hajnoczi wrote: > > > On Mon, Dec 12, 2016 at 01:34:05PM +0800, Cao jin wrote: > > > > > > > > > > > > On 12/

Re: [Qemu-devel] [PATCH v6 2/2] crypto: add virtio-crypto driver

2016-12-12 Thread Michael S. Tsirkin
On Mon, Dec 12, 2016 at 06:54:07PM +0800, Herbert Xu wrote: > On Mon, Dec 12, 2016 at 06:25:12AM +, Gonglei (Arei) wrote: > > Hi, Michael & Herbert > > > > Because the virtio-crypto device emulation had been in QEMU 2.8, > > would you please merge the virtio-crypto driver for 4.10 if no other

[Qemu-devel] [PATCH for-2.9] vfio-pci: Fix GTT wrap-around for Skylake+ IGD

2016-12-12 Thread Alex Williamson
Previous IGD, up through Broadwell, only seem to write GTT values into the first 1MB of space allocated for the BDSM, but clearly the GTT can be multiple MB in size. Our test in vfio_igd_quirk_data_write() correctly filters out indexes beyond 1MB, but given the 1MB mask we're using, we re-apply wr

Re: [Qemu-devel] [Nbd] [PATCH v4] doc: Add NBD_CMD_BLOCK_STATUS extension

2016-12-12 Thread Wouter Verhelst
On Mon, Dec 12, 2016 at 09:26:15PM +0100, Wouter Verhelst wrote: > > Do we still want to require servers to always send 16 extents (when not > > limited to exactly 1), or is it better to just state that as long as the > > server sends at least one extent (so that the client can make progress), > >

[Qemu-devel] [PATCH for-2.8.1 v2] machine: Convert abstract typename on compat_props to subclass names

2016-12-12 Thread Eduardo Habkost
Original problem description by Greg Kurz: > Since commit "9a4c0e220d8a hw/virtio-pci: fix virtio > behaviour", passing -device virtio-blk-pci.disable-modern=off > has no effect on 2.6 machine types because the internal > virtio-pci.disable-modern=on compat property always prevail. The same bug a

[Qemu-devel] [Nbd] [PATCH v5] doc: Add NBD_CMD_BLOCK_STATUS extension

2016-12-12 Thread Wouter Verhelst
v4 -> v5: - Editorial improvements as suggested by Eric (with the exception of absence/absense, which would really need to be done on master if valid) - Rework so that the NBD_STATE_* constants are defined in the "Metadata contexts" section *only*, where the `base:allocation` context is defi

  1   2   3   >