Re: [Qemu-devel] [PATCH v2 1/4] target/ppc: export ppc_cpu_pvr_match() helper

2017-10-10 Thread David Gibson
On Mon, Oct 09, 2017 at 05:49:27PM +0200, Cédric Le Goater wrote: > It will be used to test the family of a CPU. > > Signed-off-by: Cédric Le Goater I don't think this is useful, see comments on later patches. > --- > include/hw/ppc/ppc.h | 1 + > target/ppc/machine.c | 5 +++-- > 2 files chan

Re: [Qemu-devel] [PATCH v2 2/4] spapr/rtas: disable the decrementer interrupt when a CPU is unplugged

2017-10-10 Thread David Gibson
On Mon, Oct 09, 2017 at 05:49:28PM +0200, Cédric Le Goater wrote: > When a CPU is stopped with the 'stop-self' RTAS call, its state > 'halted' is switched to 1 and, in this case, the MSR is not taken into > account anymore in the cpu_has_work() routine. Only the pending > hardware interrupts are ch

Re: [Qemu-devel] [PATCH] pci: allow 32-bit PCI IO accesses to pass through the PCI bridge

2017-10-10 Thread Mark Cave-Ayland
On 01/10/17 22:44, Mark Cave-Ayland wrote: > On 28/09/17 08:56, Laszlo Ersek wrote: > >> On 09/28/17 09:31, Mark Cave-Ayland wrote: >>> On 25/09/17 09:11, Dr. David Alan Gilbert wrote: >>> * Marcel Apfelbaum (mar...@redhat.com) wrote: > On 23/09/2017 11:23, Mark Cave-Ayland wrote: >>

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

2017-10-10 Thread Gerd Hoffmann
On Tue, 2017-10-10 at 19:12 +0200, Martin Schrodt wrote: > Please see > > https://www.reddit.com/r/VFIO/comments/74vokw/improved_pulse_audio_dr > iver_for_qemu/ > > for motivation, and more coverage. > > Changes: > > - Remove PA reader/writer threads from paaudio.c, and do IO from the > audio t

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

2017-10-10 Thread Greg Kurz
On Wed, 11 Oct 2017 11:06:49 +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 Hashed Page Table (HPT) it is allowed to allocated, based on > its RAM size.

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

2017-10-10 Thread Wei Wang
On 10/10/2017 11:15 PM, Michael S. Tsirkin wrote: On Mon, Oct 02, 2017 at 04:38:01PM +, Wang, Wei W wrote: On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote: On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote: +static void ctrlq_send_cmd(struct virtio_balloon *vb, +

[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 --- hw/display/cirrus_vga.c | 10 -- 1 file changed, 8 insertions(+)

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 --- scripts/ch

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 4f47dbc8b0..b2978c3bae 100644 > >> --- a/hw/s390x/css.c > >> +++ b/hw/s39

[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 added

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 co

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 handled in a less ambiguous w

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 sp

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 t

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 fai

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&NSC 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 ins

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 n

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 possib

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 === #!/bin/b

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 >= dc->next_pag

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

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 total

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 virtballoon_oom_noti

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 bdrv_inactivate_

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 16:27:24 +0100) are availab

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 ++- 1 file changed, 2 insertion

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 i

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 insns).

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 > ++-- > 1 file changed, 127 inserti

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 is a bug. "extern int fo

[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 up

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 memory (or host kernel memory, in

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 Hashe

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 ba

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 tcg_global_reg_n

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 > --- > target/arm/translate.c | 4 > 1 file chan

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 | 3

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 b/hw/i386

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 - > hw/i386/xen/xen_platform.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

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 it

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 wou

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 tcg_global_reg_new_{ptr,i32,i64}

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 > > -- > > tpm.c

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 restric

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 insertions(+), 13 deletions(-) > > > >

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 xen_remap_bucket() (no bzero required), > renamed X86 -> hw/xen and few ot

[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 b

[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 a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c

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 correc

[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 +++ 1 file changed, 9 insertions(+), 87 dele

[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 --- contrib/libvhost-user/libvhost-user-glib.h | 32 ++ contrib/libvhost-user/libvhost-user

[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 | 46 +++ 1 file 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 changed, 24 insertions(+), 53 deletions(-) diff --git

[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 a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi

[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 b/contrib/vhost-user-scsi/vhost-user-scsi.c index 057

[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é --- contrib/vhost-user-scsi/vhost-use

[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 deletions(-) diff --git a/contrib/vhost-user-scsi/vhost

[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 --- contrib/vhost-user-scsi/vhost-user-scsi.c | 22 +---

[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 a/contrib/vhost-user-scsi/vhost-user-scsi.c b

[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 --- 1 file changed, 9 i

[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(+), 5 deletions(-) diff --git a/contrib/vhost-use

[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 --- hw/display/cirrus_vga.c | 10 -- 1 file changed, 8 insertions(+)

[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 b/contrib/vhost-user-scsi/vhost-user-scsi.c index 6b55cc

[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 b/contrib/vhost-user-scsi/vhost-user-scsi.c index a9a4066eeb..dd0de1fc

[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 deletions(-) diff --git a/contrib/vhost-user-scsi/vhost-user

[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(-) diff --git a/contrib/vhost-user-scsi/vhost-user-

[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 b/contrib/vhost-user-scsi/vhost-user-scsi.c inde

[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 b/contrib/vhost-user-scsi/vhost-user-scsi.c index e3ae2bbd72..17f676bf00 100644 --- a/

[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 a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-sc

[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 deletions(-) diff --git a/contrib/vhost-user-sc

[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 b/contrib/libvhost-user/libvhost-user.h index 4021f1124e..5825b66880 100644 --- a/con

[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 deletions(-) diff --git a/contrib/vhost-user-scsi/vhost-u

[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é --- contrib/libvhost-user/libvhost-user.c | 29 +++

[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 +++ b/Makefile @@ -480,7 +480,7 @@ ivshmem-client$(EXESU

[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 a/Makefile b/Makefile index cee6e28659..64d3a9e244 10

[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 tags/vus-pull-

[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 a/include/glib-compat.h b/include/glib-compat.h index

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 b/hw/xen/xen-comm

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 ; xen- de...@lists.xenproject.org; Stefano Stabellini

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 changed, 60 deletions(-) dif

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, NULL);

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(+), 5 deletions(-) diff --git a/

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 ++-- hw/i386/acpi-build.

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 b/hw/tpm/tpm_tis.c index 3c8d246ac8..e7e8b112e8 100644 ---

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 | 2 +- tpm.c| 2 +- 3 fi

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 af

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 a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.

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 | 9 +++-- tpm.c| 3 ++- 4 f

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 changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/tpm/

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 backen

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 > +- > 2 file

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 > +-- > 2 files changed, 100 inse

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 Reviewed-by: Stefan

  1   2   3   4   5   >