[Qemu-devel] [PATCH v1] cirrus: keep vga vram pointer within bounds

2017-10-10 Thread P J P
From: Prasad J Pandit 'dst' pointer could exceed vga vram size when writing to the cirrus memory area; it'd lead to an OOB access issue. Add check to avoid it. Reported-by: Niu Guoxiang Signed-off-by: Prasad J Pandit ---

Re: [Qemu-devel] [PATCH] checkpatch: replace ERROR with WARN for extern checking.

2017-10-10 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1507696406-11168-1-git-send-email-jiang.bi...@zte.com.cn Subject: [Qemu-devel] [PATCH] checkpatch: replace ERROR with WARN for extern checking. === TEST SCRIPT BEGIN ===

[Qemu-devel] [PATCH] checkpatch: replace ERROR with WARN for extern checking.

2017-10-10 Thread Jiang Biao
There are some rare cases which need external declarations in .c files. patchew.org and checkpatch.pl will complain errors on patches for these declarations. Degrade ERROR to WARN to erase the error complaints taking checkpatch.pl in kernel as reference. Signed-off-by: Jiang Biao

Re: [Qemu-devel] [PATCH v2 3/8] s390x: improve error handling for SSCH and RSCH

2017-10-10 Thread Dong Jia Shi
* Halil Pasic [2017-10-10 12:06:23 +0200]: > > > On 10/10/2017 10:13 AM, Dong Jia Shi wrote: > > * Halil Pasic [2017-10-04 17:41:39 +0200]: > > > > [...] > > > >> diff --git a/hw/s390x/css.c b/hw/s390x/css.c > >> index

[Qemu-devel] [Bug 1659901] Re: Regression: SIGSEGV running Java

2017-10-10 Thread Edward Vielmetti
Similar issue reported in two other places on the net: https://github.com/multiarch/qemu-user-static/issues/18 "qemu-arm-static 2.8 and Java+Maven setup not working" https://bugs.linaro.org/show_bug.cgi?id=3259#c4 Bug 3259 - Javac fails within qemu-aarch64-static chroot on x86 ** Bug watch

Re: [Qemu-devel] [PATCH v2 1/6] aspeed: add support for the witherspoon-bmc board

2017-10-10 Thread Andrew Jeffery
On Tue, 2017-10-10 at 15:30 +0200, Cédric Le Goater wrote: > On 10/09/2017 02:04 AM, Andrew Jeffery wrote: > > On Wed, 2017-09-20 at 09:01 +0200, Cédric Le Goater wrote: > > > The Witherspoon boards are OpenPOWER system hosting POWER9 Processors. > > > Let's add support for their BMC including a

Re: [Qemu-devel] [PATCH v2 3/8] s390x: improve error handling for SSCH and RSCH

2017-10-10 Thread Dong Jia Shi
* Halil Pasic [2017-10-04 17:41:39 +0200]: > Simplify the error handling of the SSCH and RSCH handler avoiding > arbitrary and cryptic error codes being used to tell how the instruction > is supposed to end. Let the code detecting the condition tell how it's > to be

Re: [Qemu-devel] [PATCH v3] net: fix check for number of parameters to -netdev socket

2017-10-10 Thread Jason Wang
On 2017年10月04日 15:48, Jens Freimann wrote: ping On Wed, Sep 27, 2017 at 03:21:18PM +, Jens Freimann wrote: Since commit 0f8c289ad "net: fix -netdev socket,fd= for UDP sockets" we allow more than one parameter for -netdev socket. But now we run into an assert when no parameter at all is

Re: [Qemu-devel] [PATCH v16 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-10-10 Thread Wei Wang
On 10/11/2017 10:26 AM, Tetsuo Handa wrote: > Wei Wang wrote: >> On 10/10/2017 09:09 PM, Tetsuo Handa wrote: >>> Wei Wang wrote: > And even if we could remove balloon_lock, you still cannot use > __GFP_DIRECT_RECLAIM at xb_set_page(). I think you will need to use > "whether it is safe

Re: [Qemu-devel] [RFC v2 10/33] migration: allow dst vm pause on postcopy

2017-10-10 Thread Peter Xu
On Tue, Oct 10, 2017 at 01:30:18PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Mon, Oct 09, 2017 at 07:58:13PM +0100, Dr. David Alan Gilbert wrote: [...] > > > We have to be careful about this; a network can fail in a way it > > > gets stuck rather than

Re: [Qemu-devel] [PATCH 9/9] target/arm: Implement SG instruction corner cases

2017-10-10 Thread Richard Henderson
On 10/09/2017 06:48 AM, Peter Maydell wrote: > The common situation of the SG instruction is that it is > executed from S memory by a CPU in NS state. That case > is handled by v7m_handle_execute_nsc(). However the instruction > also has defined behaviour in a couple of other cases: > * SG

Re: [Qemu-devel] [PATCH 8/9] target/arm: Support some Thumb insns being always unconditional

2017-10-10 Thread Richard Henderson
On 10/09/2017 06:48 AM, Peter Maydell wrote: > -if (dc->condexec_mask) { > +if (dc->condexec_mask && !thumb_insn_is_unconditional(dc, insn)) { > uint32_t cond = dc->condexec_cond; > > if (cond != 0x0e) { /* Skip conditional when condition is AL. */ Don't you still

Re: [Qemu-devel] [PATCH v16 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-10-10 Thread Tetsuo Handa
Wei Wang wrote: >On 10/10/2017 09:09 PM, Tetsuo Handa wrote: >> Wei Wang wrote: And even if we could remove balloon_lock, you still cannot use __GFP_DIRECT_RECLAIM at xb_set_page(). I think you will need to use "whether it is safe to wait" flag from "[PATCH] virtio: avoid

Re: [Qemu-devel] [PATCH] Several fixes for the Pulse Audio driver, and the HDA device.

2017-10-10 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20171010174538.25074-1-q...@martin.schrodt.org Subject: [Qemu-devel] [PATCH] Several fixes for the Pulse Audio driver, and the HDA device. === TEST SCRIPT BEGIN ===

Re: [Qemu-devel] [PATCH 7/9] target-arm: Simplify insn_crosses_page()

2017-10-10 Thread Richard Henderson
On 10/09/2017 06:48 AM, Peter Maydell wrote: > Recent changes have left insn_crosses_page() more complicated > than it needed to be: > * it's only called from thumb_tr_translate_insn() so we know >for certain that we're looking at a Thumb insn > * the caller's check for dc->pc >=

Re: [Qemu-devel] [PATCH 6/9] target/arm: Pull Thumb insn word loads up to top level

2017-10-10 Thread Richard Henderson
On 10/09/2017 06:48 AM, Peter Maydell wrote: > +if ((insn >> 11) == 0x1e && (s->pc < s->next_page_start - 3)) { > +/* 0b_0xxx__ : BL/BLX prefix, and the suffix > + * is not on the next page; we merge this into a 32-bit > + * insn. > + */ > +

Re: [Qemu-devel] [PATCH] cirrus: keep vga vram pointer within bounds

2017-10-10 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20171010213608.31567-1-ppan...@redhat.com Subject: [Qemu-devel] [PATCH] cirrus: keep vga vram pointer within bounds === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PATCH v16 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-10-10 Thread Wei Wang
On 10/10/2017 09:09 PM, Tetsuo Handa wrote: Wei Wang wrote: And even if we could remove balloon_lock, you still cannot use __GFP_DIRECT_RECLAIM at xb_set_page(). I think you will need to use "whether it is safe to wait" flag from "[PATCH] virtio: avoid possible OOM lockup at

Re: [Qemu-devel] ping RE: question: I found a qemu crash about migration

2017-10-10 Thread wangjie (P)
I found the real culprit, the bug begin to occur since the committed as following: https://github.com/qemu/qemu/commit/e253f4b89796967d03a455d1df2ae6bda8cc7d01 since the patch committed, the mirror target bs begin to use BlockBackend, So the mirror target bs will be inactived in

Re: [Qemu-devel] [PULL v2 00/10] Merge tpm 2017/10/04

2017-10-10 Thread Stefan Berger
On 10/10/2017 11:08 AM, Peter Maydell wrote: On 10 October 2017 at 02:33, Stefan Berger wrote: The following changes since commit d147f7e815f97cb477e223586bcb80c316ae10ea: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-10-03

Re: [Qemu-devel] [PATCH 27/42] tpm: remove unused opened code

2017-10-10 Thread Stefan Berger
On 10/10/2017 06:27 PM, Marc-André Lureau wrote: Hi - Original Message - On 10/09/2017 06:56 PM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau --- include/sysemu/tpm_backend.h | 12 backends/tpm.c | 42

Re: [Qemu-devel] [PATCH 33/42] tpm-passthrough: remove error cleanup from handle_device_opts

2017-10-10 Thread Stefan Berger
On 10/10/2017 06:19 PM, Marc-André Lureau wrote: Hi - Original Message - On 10/09/2017 06:56 PM, Marc-André Lureau wrote: Clean-up is handled by the create() function. Signed-off-by: Marc-André Lureau --- hw/tpm/tpm_passthrough.c | 15 ++-

Re: [Qemu-devel] [PATCH 14/42] tpm: add TPMBackendCmd to hold the request state

2017-10-10 Thread Stefan Berger
On 10/10/2017 12:16 PM, Marc-André Lureau wrote: Hi - Original Message - On 10/09/2017 06:55 PM, Marc-André Lureau wrote: This simplifies a bit locality handling, and argument passing, and could pave the way to queuing requests (if that makes sense). We won't queue requests. The TPM

Re: [Qemu-devel] [PATCH 5/9] target-arm: Don't check for "Thumb2 or M profile" for not-Thumb1

2017-10-10 Thread Richard Henderson
On 10/09/2017 06:48 AM, Peter Maydell wrote: > The code which implements the Thumb1 split BL/BLX instructions > is guarded by a check on "not M or THUMB2". All we really need > to check here is "not THUMB2" (and we assume that elsewhere too, > eg in the ARCH(6T2) test that UNDEFs the Thumb2

Re: [Qemu-devel] [PATCH 2/9] target/arm: Implement SG instruction

2017-10-10 Thread Richard Henderson
On 10/09/2017 06:48 AM, Peter Maydell wrote: > Implement the SG instruction, which we emulate 'by hand' in the > exception handling code path. > > Signed-off-by: Peter Maydell > --- > target/arm/helper.c | 132 > ++-- >

Re: [Qemu-devel] [PULL v2 00/20] Queued TCG patches

2017-10-10 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20171010193003.28857-1-richard.hender...@linaro.org Subject: [Qemu-devel] [PULL v2 00/20] Queued TCG patches === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git

Re: [Qemu-devel] [PATCH] scripts/checkpatch.pl: fix false error ofexterns checking.

2017-10-10 Thread jiang.biao2
> On 10 October 2017 at 08:54, Jiang Biao wrote: > > When adding a function declaration in a .c file without extern > >keywork decoration, checkpatch.pl will report *externs should be > > avoided in .c files* false error. This patch fixes the bug. > > I don't think this

[Qemu-devel] [PATCHv2] spapr: Correct RAM size calculation for HPT resizing

2017-10-10 Thread David Gibson
In order to prevent the guest from forcing the allocation of large amounts of qemu memory (or host kernel memory, in the case of KVM HV), we limit the size of Hashed Page Table (HPT) it is allowed to allocated, based on its RAM size. However, the current calculation is not correct: it only adds

Re: [Qemu-devel] [PATCH] spapr: Correct RAM size calculation for HPT resizing

2017-10-10 Thread David Gibson
On Tue, Oct 10, 2017 at 05:21:53PM +0200, Laurent Vivier wrote: > On 10/10/2017 16:44, Greg Kurz wrote: > > On Wed, 11 Oct 2017 00:21:59 +1100 > > David Gibson wrote: > > > >> In order to prevent the guest from forcing the allocation of large amounts > >> of qemu

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: Correct RAM size calculation for HPT resizing

2017-10-10 Thread David Gibson
On Tue, Oct 10, 2017 at 05:10:27PM +0200, Andrea Bolognani wrote: > On Wed, 2017-10-11 at 00:21 +1100, David Gibson wrote: > > In order to prevent the guest from forcing the allocation of large amounts > > of qemu memory (or host kernel memory, in the case of KVM HV), we limit > > the size of

Re: [Qemu-devel] [PATCH 3/3 v4] xenfb: Add [feature|request]-raw-pointer

2017-10-10 Thread Stefano Stabellini
On Mon, 2 Oct 2017, Anthony PERARD wrote: > On Tue, Sep 26, 2017 at 02:43:39PM +, Owen Smith wrote: > > Writes "feature-raw-pointer" during init to indicate the backend > > can pass raw unscaled values for absolute axes to the frontend. > > Frontends set "request-raw-pointer" to indicate the

Re: [Qemu-devel] [PATCH] tcg: Initialize cpu_env generically

2017-10-10 Thread Emilio G. Cota
On Tue, Oct 10, 2017 at 14:45:40 -0700, Richard Henderson wrote: > This is identical for each target. So, move the initialization to > common code. Move the variable itself out of tcg_ctx and name it > cpu_env to minimize changes within targets. > > This also means we can remove

Re: [Qemu-devel] [PATCH 1/9] target/arm: Add M profile secure MMU index values to get_a32_user_mem_index()

2017-10-10 Thread Richard Henderson
On 10/09/2017 06:48 AM, Peter Maydell wrote: > Add the M profile secure MMU index values to the switch in > get_a32_user_mem_index() so that LDRT/STRT work correctly > rather than asserting at translate time. > > Signed-off-by: Peter Maydell > --- >

Re: [Qemu-devel] [PATCH] Several fixes for the Pulse Audio driver, and the HDA device.

2017-10-10 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20171010174403.24660-1-mar...@schrodt.org Subject: [Qemu-devel] [PATCH] Several fixes for the Pulse Audio driver, and the HDA device. === TEST SCRIPT BEGIN === #!/bin/bash

Re: [Qemu-devel] [PATCH] Several fixes for the Pulse Audio driver, and the HDA device.

2017-10-10 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20171010171218.14298-1-mar...@schrodt.org Subject: [Qemu-devel] [PATCH] Several fixes for the Pulse Audio driver, and the HDA device. === TEST SCRIPT BEGIN === #!/bin/bash

Re: [Qemu-devel] [PATCH 05/34] misc: remove duplicated includes

2017-10-10 Thread Anthony PERARD
On Fri, Sep 22, 2017 at 12:39:45PM -0300, Philippe Mathieu-Daudé wrote: > exec: housekeeping (funny since 02d0e095031) > > applied using ./scripts/clean-includes > > Signed-off-by: Philippe Mathieu-Daudé > --- > accel/tcg/translate-all.c | 1 - > exec.c

Re: [Qemu-devel] [PATCH v2 15/47] hw/i386: Replace fprintf(stderr, "*\n" with error_report()

2017-10-10 Thread Anthony PERARD
On Fri, Sep 29, 2017 at 05:15:46PM -0700, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. [...] > diff --git a/hw/i386/xen/xen-hvm.c

Re: [Qemu-devel] [PATCH 12/34] misc: remove old i386 dependency

2017-10-10 Thread Anthony PERARD
On Fri, Sep 22, 2017 at 12:39:52PM -0300, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/audio/pcspk.c| 1 - > hw/i386/kvm/pci-assign.c| 1 - > hw/i386/pci-assign-load-rom.c | 1 - >

Re: [Qemu-devel] [PATCH 3/8] xen: defer call to xen_restrict until after os_setup_post

2017-10-10 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH 3/8] xen: defer call to xen_restrict until after os_setup_post"): > I'm tring to find out what does calling xen_restrict_all(0), when > running an non-Xen guest. I think it would just lock(), then unlock() > then there should not be any handle to restrict, and

Re: [Qemu-devel] [PATCH 1/8] xen: link against xentoolcore

2017-10-10 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH 1/8] xen: link against xentoolcore"): > On Mon, Oct 09, 2017 at 05:28:08PM +0100, Ian Jackson wrote: > > The xentoolcore library was just committed to xen.git#staging, so at > > least this patch (or something like it) should go into qemu RSN. > > I don't think

Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-10 Thread Ian Jackson
Markus Armbruster writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > Actually, a numeric UID without group name or ID could be made to work > just fine as long as it maps to a user name. The use case may not be > worth the bother, though. In libxl's use case, it

Re: [Qemu-devel] [PATCH] tcg: Initialize cpu_env generically

2017-10-10 Thread Philippe Mathieu-Daudé
On 10/10/2017 06:45 PM, Richard Henderson wrote: > This is identical for each target. So, move the initialization to > common code. Move the variable itself out of tcg_ctx and name it > cpu_env to minimize changes within targets. > > This also means we can remove

Re: [Qemu-devel] [PATCH 37/42] tpm: lookup the the TPM interface instead of TIS device

2017-10-10 Thread Marc-André Lureau
Hi - Original Message - > On 10/10/2017 04:21 PM, Eduardo Habkost wrote: > > On Tue, Oct 10, 2017 at 12:56:18AM +0200, Marc-André Lureau wrote: > > [...] > >> -static inline TPMVersion tpm_get_version(void) > >> +static inline TPMIf *tpm_find(void) > >> { > >> -#ifdef CONFIG_TPM > >> -

Re: [Qemu-devel] [PATCH 27/42] tpm: remove unused opened code

2017-10-10 Thread Marc-André Lureau
Hi - Original Message - > On 10/09/2017 06:56 PM, Marc-André Lureau wrote: > > Signed-off-by: Marc-André Lureau > > --- > > include/sysemu/tpm_backend.h | 12 > > backends/tpm.c | 42 > >

Re: [Qemu-devel] [Xen-devel] [PATCH v2 0/*] xen: xen-domid-restrict improvements

2017-10-10 Thread Ian Jackson
Ross Lagerwall writes ("Re: [Xen-devel] [PATCH v2 0/*] xen: xen-domid-restrict improvements"): > If no one objects, I propose adding the following calls to > libxendevicemodel (with underlying Xen implementations, of course) that > would be usable after the xendevicemodel handle has been

Re: [Qemu-devel] [PATCH 33/42] tpm-passthrough: remove error cleanup from handle_device_opts

2017-10-10 Thread Marc-André Lureau
Hi - Original Message - > On 10/09/2017 06:56 PM, Marc-André Lureau wrote: > > Clean-up is handled by the create() function. > > > > Signed-off-by: Marc-André Lureau > > --- > > hw/tpm/tpm_passthrough.c | 15 ++- > > 1 file changed, 2

Re: [Qemu-devel] [PATCH 40/88] hw/xen: use g_new() family of functions

2017-10-10 Thread Anthony PERARD
On Fri, Oct 06, 2017 at 08:49:35PM -0300, Philippe Mathieu-Daudé wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Signed-off-by: Philippe Mathieu-Daudé > [PMD: replaced g_new0() -> g_new() in

[Qemu-devel] [PATCH] tcg: Initialize cpu_env generically

2017-10-10 Thread Richard Henderson
This is identical for each target. So, move the initialization to common code. Move the variable itself out of tcg_ctx and name it cpu_env to minimize changes within targets. This also means we can remove tcg_global_reg_new_{ptr,i32,i64}, since there are no longer global-register temps created

[Qemu-devel] [PULL v2 26/27] vhost-user-scsi: use libvhost-user glib helper

2017-10-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Paolo Bonzini --- contrib/vhost-user-scsi/vhost-user-scsi.c | 162 +++--- 1 file changed, 16 insertions(+), 146 deletions(-) diff --git

Re: [Qemu-devel] [PATCH RFC] file-posix: make lock_fd read-only

2017-10-10 Thread Eric Blake
On 10/10/2017 02:30 PM, Denis V. Lunev wrote: > On 10/10/2017 09:50 PM, Eric Blake wrote: >> On 10/10/2017 08:42 AM, Vladimir Sementsov-Ogievskiy wrote: >>> We do not reopen lock_fd on bdrv_reopen which leads to problems on >>> reopen image RO. So, lets make lock_fd be always RO. >>> This is

[Qemu-devel] [PULL v2 21/27] vhost-user-scsi: don't copy iscsi/scsi-lowlevel.h

2017-10-10 Thread Marc-André Lureau
There is no need to include hw/virtio/virtio-scsi.h, then the conflict with SCSI_XFER enum goes away. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 96

[Qemu-devel] [PULL v2 25/27] libvhost-user: add glib source helper

2017-10-10 Thread Marc-André Lureau
This file implements a bridge from the vu_init API of libvhost-user to GSource, so that libvhost-user can be used inside a GLib main loop. Signed-off-by: Marc-André Lureau Reviewed-by: Paolo Bonzini ---

[Qemu-devel] [PULL v2 19/27] vhost-user-scsi: rename VUS types

2017-10-10 Thread Marc-André Lureau
- use Vus prefix consistently - use CamelCase, since that's glib & libvhost-user style - avoid _t postfix, usually for system headers Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c

[Qemu-devel] [PULL v2 27/27] vhost-user-scsi: remove server_sock from VusDev

2017-10-10 Thread Marc-André Lureau
It is unneeded in the VusDev device structure, and also simplify a bit the code. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 77 ++- 1 file

[Qemu-devel] [PULL v2 23/27] vhost-user-scsi: simplify source handling

2017-10-10 Thread Marc-André Lureau
Using a hashtable. Signed-off-by: Marc-André Lureau Reviewed-by: Paolo Bonzini --- contrib/vhost-user-scsi/vhost-user-scsi.c | 45 +-- 1 file changed, 12 insertions(+), 33 deletions(-) diff --git

[Qemu-devel] [PULL v2 16/27] vhost-user-scsi: remove vdev_scsi_add_iscsi_lun()

2017-10-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c

[Qemu-devel] [PULL v2 24/27] vhost-user-scsi: use glib logging

2017-10-10 Thread Marc-André Lureau
- PLOG is unused - code is compiled out unless debug is enabled - logging is too verbose - you can pipe to ts to have timestamp if needed, or use structured logging with more recent glib Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL v2 22/27] vhost-user-scsi: drop extra callback pointer

2017-10-10 Thread Marc-André Lureau
Use the one from the source with casting, like any other glib source. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 12 +++- 1 file changed, 3 insertions(+), 9

[Qemu-devel] [PULL v2 13/27] vhost-user-scsi: simplify unix path cleanup

2017-10-10 Thread Marc-André Lureau
Always remove the unix path when leaving the program (instead of when freeing scsi_dev). Note that unix_sock_new() also unlink() exisiting path before creating the socket. Signed-off-by: Marc-André Lureau Reviewed-by: Paolo Bonzini ---

[Qemu-devel] [PULL v2 20/27] vhost-user-scsi: avoid use of iscsi_ namespace

2017-10-10 Thread Marc-André Lureau
It is confusing and could easily conflict with future versions. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PULL v2 09/27] vhost-user-scsi: use glib allocation

2017-10-10 Thread Marc-André Lureau
Use g_new/g_free instead of plain malloc. This simplify a bit memory handling since glib will abort if it cannot allocate. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 35

[Qemu-devel] [PULL v2 15/27] vhost-user-scsi: assert() in iscsi_add_lun()

2017-10-10 Thread Marc-André Lureau
Instead of a preliminary check, add an assert to the function that has the pre-condition. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 6 +- 1 file changed, 1 insertion(+),

[Qemu-devel] [PATCH] cirrus: keep vga vram pointer within bounds

2017-10-10 Thread P J P
From: Prasad J Pandit 'dst' pointer could exceed vga vram size when writing to the cirrus memory area; it'd lead to an OOB access issue. Add check to avoid it. Reported-by: Niu Guoxiang Signed-off-by: Prasad J Pandit ---

[Qemu-devel] [PULL v2 18/27] vhost-user-scsi: remove unimplemented functions

2017-10-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Paolo Bonzini --- contrib/vhost-user-scsi/vhost-user-scsi.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c

[Qemu-devel] [PULL v2 14/27] vhost-user-scsi: use NULL pointer

2017-10-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c

[Qemu-devel] [PULL v2 10/27] vhost-user-scsi: glib calls that allocate don't return NULL

2017-10-10 Thread Marc-André Lureau
They abort instead, so get rid of failure conditions. Signed-off-by: Marc-André Lureau Reviewed-by: Paolo Bonzini --- contrib/vhost-user-scsi/vhost-user-scsi.c | 52 +-- 1 file changed, 7 insertions(+), 45

[Qemu-devel] [PULL v2 17/27] vhost-user-scsi: remove VUS_MAX_LUNS

2017-10-10 Thread Marc-André Lureau
There is no code to support more than 1 yet, no need for that today. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-)

[Qemu-devel] [PULL v2 08/27] vhost-user-scsi: code style fixes

2017-10-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c

[Qemu-devel] [PULL v2 11/27] vhost-user-scsi: also free the gtree

2017-10-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c

[Qemu-devel] [PULL v2 06/27] vhost-user-scsi: use g_strdup()

2017-10-10 Thread Marc-André Lureau
Since vhost-user-scsi uses glib. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git

[Qemu-devel] [PULL v2 07/27] vhost-user-scsi: connect unix socket before allocating

2017-10-10 Thread Marc-André Lureau
This simplify a little bit memory management in the following patches. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- contrib/vhost-user-scsi/vhost-user-scsi.c | 18 -- 1 file changed, 8 insertions(+), 10

[Qemu-devel] [PULL v2 05/27] libvhost-user: improve vu_queue_pop() doc

2017-10-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Paolo Bonzini --- contrib/libvhost-user/libvhost-user.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/libvhost-user/libvhost-user.h

[Qemu-devel] [PULL v2 12/27] vhost-user-scsi: remove vdev_scsi_find_by_vu()

2017-10-10 Thread Marc-André Lureau
The *dev pointer belongs to the vhost_scsi_dev_t parent. Signed-off-by: Marc-André Lureau Reviewed-by: Paolo Bonzini --- contrib/vhost-user-scsi/vhost-user-scsi.c | 47 +++ 1 file changed, 4 insertions(+), 43

[Qemu-devel] [PULL v2 04/27] libvhost-user: drop dependency on glib

2017-10-10 Thread Marc-André Lureau
libvhost-user is meant to be free of glib dependency. Make sure it is by droping qemu/osdep.h (which included glib.h) This fixes a bad malloc()/g_free() pair. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé ---

[Qemu-devel] [PULL v2 03/27] build-sys: make vhost-user-scsi depend on libvhost-user.a

2017-10-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Paolo Bonzini --- Makefile | 2 +- Makefile.objs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 64d3a9e244..97b4508d7d 100644 --- a/Makefile +++

[Qemu-devel] [PULL v2 02/27] build-sys: fix libvhost-user.a build

2017-10-10 Thread Marc-André Lureau
And actually link to it from vhost-user-bridge. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- Makefile | 1 + tests/Makefile.include | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL v2 00/27] vhost-user patches

2017-10-10 Thread Marc-André Lureau
The following changes since commit 567d0a19c7998fa366598b83d5a6e5f0759d3ea9: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging (2017-10-10 13:25:46 +0100) are available in the Git repository at: https://github.com/elmarco/qemu.git

[Qemu-devel] [PULL v2 01/27] glib-compat: move G_SOURCE_CONTINUE/REMOVE there

2017-10-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Acked-by: Philippe Mathieu-Daudé --- include/glib-compat.h | 7 +++ contrib/vhost-user-scsi/vhost-user-scsi.c | 8 2 files changed, 7 insertions(+), 8 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v2 42/47] hw/xen*: Replace fprintf(stderr, "*\n" with error_report()

2017-10-10 Thread Anthony PERARD
On Fri, Sep 29, 2017 at 05:17:12PM -0700, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. > diff --git a/hw/xen/xen-common.c

Re: [Qemu-devel] [Xen-devel] [PATCH v2 0/*] xen: xen-domid-restrict improvements

2017-10-10 Thread Ross Lagerwall
On 10/06/2017 02:19 PM, Paul Durrant wrote: -Original Message- From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of Ross Lagerwall Sent: 06 October 2017 13:58 To: Ian Jackson ; qemu-devel@nongnu.org Cc: Anthony Perard ;

Re: [Qemu-devel] [PATCH 27/42] tpm: remove unused opened code

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau --- include/sysemu/tpm_backend.h | 12 backends/tpm.c | 42 -- tpm.c| 6 -- 3 files

Re: [Qemu-devel] [PATCH 37/42] tpm: lookup the the TPM interface instead of TIS device

2017-10-10 Thread Stefan Berger
On 10/10/2017 04:21 PM, Eduardo Habkost wrote: On Tue, Oct 10, 2017 at 12:56:18AM +0200, Marc-André Lureau wrote: [...] -static inline TPMVersion tpm_get_version(void) +static inline TPMIf *tpm_find(void) { -#ifdef CONFIG_TPM -Object *obj = object_resolve_path_type("", TYPE_TPM_TIS,

Re: [Qemu-devel] [PATCH 38/42] tpm: add TPM interface to lookup TPM version

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: Do not hardcode TPM device model to lookup version, use an interface instead. Signed-off-by: Marc-André Lureau --- include/sysemu/tpm.h | 5 ++--- hw/tpm/tpm_tis.c | 5 +++-- 2 files changed, 5 insertions(+),

Re: [Qemu-devel] [PATCH 37/42] tpm: lookup the the TPM interface instead of TIS device

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: This will allow to introduce new devices implementing TPM. Signed-off-by: Marc-André Lureau --- hw/tpm/tpm_int.h | 19 --- include/sysemu/tpm.h | 52

Re: [Qemu-devel] [PATCH 35/42] tpm-tis: simplify header inclusion

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- hw/tpm/tpm_tis.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/hw/tpm/tpm_tis.c

Re: [Qemu-devel] [PATCH 36/42] tpm: rename qemu_find_tpm() -> qemu_find_tpm_be()

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: find_tpm() will be introduced to lookup the TPM device. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- include/sysemu/tpm_backend.h | 2 +- hw/tpm/tpm_tis.c

Re: [Qemu-devel] [PATCH 34/42] tpm-passthrough: workaround a possible race

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: The TPM backend processing thread has common shared variable race issues. (they should not be so easy to reach since guest interaction with the device is slow compared to host emulation) An obvious one is setting op_cancelled from device thread

Re: [Qemu-devel] [PATCH 33/42] tpm-passthrough: remove error cleanup from handle_device_opts

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: Clean-up is handled by the create() function. Signed-off-by: Marc-André Lureau --- hw/tpm/tpm_passthrough.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 31/42] tpm-backend: move set 'id' to common code

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- include/sysemu/tpm_backend.h | 2 +- hw/tpm/tpm_emulator.c| 12 +++- hw/tpm/tpm_passthrough.c |

Re: [Qemu-devel] [PATCH 30/42] tpm-passthrough: pass TPMPassthruState to handle_device_opts

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: It doesn't need TPMBackend. Also reorder arguments for consistency. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- hw/tpm/tpm_passthrough.c | 6 +++--- 1 file

Re: [Qemu-devel] [PATCH 29/42] tpm-be: update optional function pointers

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: QEMU code doesn't generally have assert() for mandatory callbacks/function pointers, probably because the crash is pretty obvious. Document the methods instead of going into the code. Make get_tpm_options() mandatory to implement (since all

Re: [Qemu-devel] [RfC PATCH 6/6] vfio/display: add dmabuf support (v15)

2017-10-10 Thread Alex Williamson
On Tue, 10 Oct 2017 16:03:34 +0200 Gerd Hoffmann wrote: > Wire up dma-buf based display. > > TODO: drop debug code and messages. > > Signed-off-by: Gerd Hoffmann > --- > hw/vfio/pci.h | 12 > hw/vfio/display.c | 183 >

Re: [Qemu-devel] [RfC PATCH 5/6] vfio/display: adding region support

2017-10-10 Thread Alex Williamson
[cc +Kirti] On Tue, 10 Oct 2017 16:03:33 +0200 Gerd Hoffmann wrote: > Wire up region-based display. UNTESTED. > > Signed-off-by: Gerd Hoffmann > --- > hw/vfio/pci.h | 6 > hw/vfio/display.c | 96 >

Re: [Qemu-devel] [PATCH 28/42] tpm-passthrough: don't save guessed cancel_path in options

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: The value is later unneeded, and may leak if the free visitor doesn't consider it since has_cancel_path is false. And for consistency with "path" it shouldn't be returned in get_tpm_options(). Signed-off-by: Marc-André Lureau

Re: [Qemu-devel] [PATCH 26/42] tpm-be: ask model to the TPM interface

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: No need to store the mode in the backend, or to let the frontend set it itself. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- hw/tpm/tpm_int.h | 1 +

Re: [Qemu-devel] [PATCH 37/42] tpm: lookup the the TPM interface instead of TIS device

2017-10-10 Thread Eduardo Habkost
On Tue, Oct 10, 2017 at 12:56:18AM +0200, Marc-André Lureau wrote: [...] > -static inline TPMVersion tpm_get_version(void) > +static inline TPMIf *tpm_find(void) > { > -#ifdef CONFIG_TPM > -Object *obj = object_resolve_path_type("", TYPE_TPM_TIS, NULL); > +Object *obj =

Re: [Qemu-devel] [PATCH 25/42] tpm-be: report error instead of front-end

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: Backend can give more accurate error description, and lift out the job from the frontend. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger ---

Re: [Qemu-devel] [PATCH 42/42] WIP: add TPM CRB device

2017-10-10 Thread Eduardo Habkost
On Tue, Oct 10, 2017 at 02:28:19PM -0400, Stefan Berger wrote: > On 10/09/2017 06:56 PM, Marc-André Lureau wrote: > > + > > +static void tpm_crb_realizefn(DeviceState *dev, Error **errp) > > +{ > > +CRBState *s = CRB(dev); > > +SysBusDevice *sbd = SYS_BUS_DEVICE(dev); > > + > > +if

Re: [Qemu-devel] [PATCH 23/42] tpm-tis: no longer expose TPMState

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: Now that there is an interface instead. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- include/sysemu/tpm.h | 2 -- hw/tpm/tpm_tis.c | 4 ++-- 2 files

Re: [Qemu-devel] [PATCH 21/42] tpm: move recv_data_callback to TPM interface

2017-10-10 Thread Stefan Berger
On 10/09/2017 06:56 PM, Marc-André Lureau wrote: Simplify the TPM backend setup, move callback to TPM interface. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger --- hw/tpm/tpm_int.h | 3 +++

  1   2   3   4   5   >