[Qemu-devel] [PATCH 20/40] char: create chardev-obj-y

2017-01-11 Thread Marc-André Lureau
This will help to split char.c in several units without having to reference them all everywhere. This is useful in particular for tests. Signed-off-by: Marc-André Lureau --- Makefile | 3 ++- Makefile.objs | 4 +++- Makefile.target| 3

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

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-pipe.c | 168 ++ chardev/char.c| 166 - chardev/Makefile.objs | 1 + 3 files changed, 169 insertions(+), 166

[Qemu-devel] [PATCH v5 wave 1 2/4] fw-cfg: turn FW_CFG_FILE_SLOTS into a device property

2017-01-11 Thread Laszlo Ersek
We'd like to raise the value of FW_CFG_FILE_SLOTS. Doing it naively could lead to problems with backward migration: a more recent QEMU (running an older machine type) would allow the guest, in fw_cfg_select(), to select a high key value that is unavailable in the same machine type implemented by

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

2017-01-11 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

[Qemu-devel] [PATCH 12/40] char-win: do not override chr_free

2017-01-11 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.

[Qemu-devel] [PATCH 34/40] char: move stdio in its own file

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-stdio.c | 141 ++ chardev/char.c| 120 -- chardev/Makefile.objs | 1 + 3 files changed, 142 insertions(+), 120

[Qemu-devel] [PATCH 35/40] char: move console in its own file

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

[Qemu-devel] [PATCH 16/40] char: get rid of CharDriver

2017-01-11 Thread Marc-André Lureau
qemu_chr_new_from_opts() is modified to not need CharDriver backend[] array, but uses instead objectified qmp_query_chardev_backends() and char_get_class(). The alias field is moved outside in a ChardevAlias[], similar to QDevAlias for devices. "kind" and "parse" are moved to ChardevClass ("kind"

[Qemu-devel] [PATCH 09/40] char-parallel: convert parallel to finalize

2017-01-11 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 98d4a17990..2579b0be31 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2025,17 +2025,6

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

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-udp.c| 210 ++ chardev/char.c| 198 --- chardev/Makefile.objs | 1 + 3 files changed, 211 insertions(+), 198

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

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-win.h| 30 ++ chardev/char-win.c| 242 +++ chardev/char.c| 253 +- chardev/Makefile.objs | 1 + 4

[Qemu-devel] [PATCH 17/40] char: rename remaining CharDriver to Chardev

2017-01-11 Thread Marc-André Lureau
CharDriver no longer exists, it has been replaced with Chardev. Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 40 qemu-char.c | 12 ++-- 2 files changed, 26 insertions(+), 26 deletions(-)

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

2017-01-11 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 f710a01c9b..ea8903c0d7 100644 --- a/chardev/char.c +++

[Qemu-devel] [PATCH 08/40] char-ringbuf: convert to finalize

2017-01-11 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 1d8a7bc732..98d4a17990 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3548,9 +3548,9 @@ static int

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

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-io.h | 24 +++ chardev/char-io.c | 168 chardev/char.c| 174 +- chardev/Makefile.objs | 1 + 4

[Qemu-devel] [PATCH 11/40] char-win-stdio: convert to finalize

2017-01-11 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 1c79526a65..ad8e5e7ebf 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2594,9 +2594,9 @@ static void

[Qemu-devel] [PATCH 07/40] char-pty: convert to finalize

2017-01-11 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 b9f14d7070..1d8a7bc732 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1659,9 +1659,10 @@ static void

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

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- chardev/char-ringbuf.c | 226 + chardev/char.c | 218 --- chardev/Makefile.objs | 1 + 3 files changed, 227 insertions(+), 218

[Qemu-devel] [PATCH 25/40] char: rename and move to header CHR_READ_BUF_LEN

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

[Qemu-devel] [PATCH 10/40] char-stdio: convert to finalize

2017-01-11 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 2579b0be31..1c79526a65 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1422,10 +1422,10 @@ static void

[Qemu-devel] [PATCH 02/40] baum: convert to finalize

2017-01-11 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 0f418ed358..39c9365024 100644 --- a/backends/baum.c +++ b/backends/baum.c @@ -616,9 +616,9 @@ static

[Qemu-devel] [PATCH 19/40] char: move to chardev/

2017-01-11 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 MAINTAINERS | 2 +- Makefile.objs | 2 +- chardev/Makefile.objs

[Qemu-devel] [PATCH 18/40] char: remove class kind field

2017-01-11 Thread Marc-André Lureau
The class kind is necessary to lookup the chardev name in qmp_chardev_add() after calling qemu_chr_new_from_opts() and to set the appropriate ChardevBackend (mainly to free the right fields). qemu_chr_new_from_opts() can be changed to use a non-qmp function using the chardev class typename.

[Qemu-devel] [PATCH 05/40] char-udp: convert to finalize

2017-01-11 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 8e301af3e5..7e2a412954 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2779,9 +2779,10 @@ static void

[Qemu-devel] [PATCH 15/40] char: remove chr_free

2017-01-11 Thread Marc-André Lureau
Now it uses Object instance_finalize instead. Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 8 qemu-char.c | 10 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/include/sysemu/char.h

[Qemu-devel] [PATCH 01/40] spice-qemu-char: convert to finalize

2017-01-11 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 dd97c17fca..3902202a35 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -210,9 +210,9

[Qemu-devel] [PATCH 14/40] char-fd: convert to finalize

2017-01-11 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 4cbcc29bd5..b106f6ef33 100644 --- a/qemu-char.c +++

[Qemu-devel] [PATCH 04/40] mux: convert to finalize

2017-01-11 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 947c880868..8e301af3e5 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -859,9 +859,9 @@ static GSource

[Qemu-devel] [PATCH 00/40] chardev: qom clean-up and split in various backend files

2017-01-11 Thread Marc-André Lureau
Finish qom-ification by using instance finalizers and split the big qemu-char.c file in many backend-specific units. This is part of a larger refactoring series that I try to keep up to date here: https://github.com/elmarco/qemu/commits/chrfe It is based after qom-ify v2 series. Marc-André

[Qemu-devel] [PATCH 06/40] char-socket: convert to finalize

2017-01-11 Thread Marc-André Lureau
Notice that finalize() will be run after a failure to open(), so cleanup code must be adjusted. Signed-off-by: Marc-André Lureau --- qemu-char.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index

[Qemu-devel] [PATCH 13/40] char-win: convert to finalize

2017-01-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qemu-char.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 1954dec9b8..4cbcc29bd5 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2150,8 +2150,9 @@ typedef struct {

[Qemu-devel] [PATCH 03/40] msmouse: convert to finalize

2017-01-11 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

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file

2017-01-11 Thread Daniel P. Berrange
On Tue, Jan 10, 2017 at 04:38:58PM +, Stefan Hajnoczi wrote: > On Fri, Jan 06, 2017 at 03:54:58PM +, Daniel P. Berrange wrote: > > diff --git a/io/Makefile.objs b/io/Makefile.objs > > index 9d8337d..94cb74e 100644 > > --- a/io/Makefile.objs > > +++ b/io/Makefile.objs > > @@ -8,3 +8,5 @@

Re: [Qemu-devel] assert hit on master with q35 machine type

2017-01-11 Thread Stefan Hajnoczi
On Tue, Jan 10, 2017 at 07:22:24PM -0600, Doug Goldstein wrote: > On 1/10/17 10:01 AM, Stefan Hajnoczi wrote: > > On Mon, Jan 09, 2017 at 01:08:53PM +, Dr. David Alan Gilbert wrote: > >> copying in Stefan since it's his commit. > > > > I can't reproduce the assertion failure. > > > > Are you

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file

2017-01-11 Thread Daniel P. Berrange
On Wed, Jan 11, 2017 at 05:12:02PM +, Stefan Hajnoczi wrote: > On Tue, Jan 10, 2017 at 10:51:29AM -0600, Eric Blake wrote: > > On 01/10/2017 10:37 AM, Stefan Hajnoczi wrote: > > > On Fri, Jan 06, 2017 at 03:54:58PM +, Daniel P. Berrange wrote: > > >> diff --git a/io/channel-buffer.c

Re: [Qemu-devel] [Bug 1655708] [NEW] target/ppc/int_helper.c:2806: strange expression ?

2017-01-11 Thread Thomas Huth
On 11.01.2017 18:12, Eric Blake wrote: > On 01/11/2017 10:41 AM, dcb wrote: >> so I think the compiler warning is for the i * 2 lhs of the ?. > > Yes - the compiler is complaining that 'i * 2' can only be non-zero if > 'i' was non-zero (given that the code occurs in a loop for i between 0 > and

Re: [Qemu-devel] [PATCH v2 1/2] memory: provide common macros for mtree_print_mr()

2017-01-11 Thread Paolo Bonzini
On 21/12/2016 08:58, Peter Xu wrote: > - mr->romd_mode ? 'R' : '-', > - !mr->readonly && !(mr->rom_device && mr->romd_mode) ? 'W' > - : '-', > + MR_CHAR_RD(mr), > +

Re: [Qemu-devel] [PATCH v1 00/30] target-sparc: add niagara OpenSPARC T1 sun4v emulation

2017-01-11 Thread Mark Cave-Ayland
On 11/01/17 16:56, Richard Henderson wrote: > On 12/30/2016 09:35 AM, Mark Cave-Ayland wrote: >> On 15/12/16 17:04, Artyom Tarasenko wrote: >> >>> Ping? >>> Richard & Mark, can you please review the patches >>> 04, 05, 08, 10, 11,12, 14, 15, 16, 18-23 and 25-28? >>> >>> Hope I haven't missed

Re: [Qemu-devel] [PATCH v2 2/2] memory: hmp: dump flat view for 'info mtree'

2017-01-11 Thread Paolo Bonzini
On 21/12/2016 08:58, Peter Xu wrote: > Dumping flat view will be useful to debug the memory rendering logic, > also it'll be much easier with it to know what memory region is handling > what address range. > > Signed-off-by: Peter Xu This is useful, but dumping both makes

Re: [Qemu-devel] [Bug 1655708] [NEW] target/ppc/int_helper.c:2806: strange expression ?

2017-01-11 Thread Eric Blake
On 01/11/2017 10:41 AM, dcb wrote: > Public bug reported: > > target/ppc/int_helper.c:2806:25: warning: ‘*’ in boolean context, > suggest ‘&&’ instead [-Wint-in-bool-context] > > Source code is > >zone_digit = (i * 2) ? b->u8[BCD_DIG_BYTE(i * 2)] >> 4 : > zone_lead; Also, looking at

Re: [Qemu-devel] [PATCH v3 22/25] block: Do not copy exact_filename from format file

2017-01-11 Thread Max Reitz
On 11.01.2017 17:29, Max Reitz wrote: > On 30.11.2016 02:18, Max Reitz wrote: >> If the a format BDS's file BDS is in turn a format BDS, we cannot simply >> use the same filename, because when opening a BDS tree based on a >> filename alone, qemu will create only one format node on top of one >>

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file

2017-01-11 Thread Stefan Hajnoczi
On Tue, Jan 10, 2017 at 10:51:29AM -0600, Eric Blake wrote: > On 01/10/2017 10:37 AM, Stefan Hajnoczi wrote: > > On Fri, Jan 06, 2017 at 03:54:58PM +, Daniel P. Berrange wrote: > >> diff --git a/io/channel-buffer.c b/io/channel-buffer.c > >> index 43d7959..b4e50d6 100644 > >> ---

Re: [Qemu-devel] [PATCH 07/10] aio-posix: remove walking_handlers, protecting AioHandler list with list_lock

2017-01-11 Thread Stefan Hajnoczi
On Wed, Jan 04, 2017 at 02:26:22PM +0100, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > aio-posix.c | 65 > - > 1 file changed, 39 insertions(+), 26 deletions(-) Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v2 1/2] qom/cpu: move tlb_flush to cpu_common_reset

2017-01-11 Thread Eduardo Habkost
On Mon, Jan 09, 2017 at 03:05:11PM +, Alex Bennée wrote: > > Eduardo Habkost writes: > > > On Thu, Dec 15, 2016 at 12:36:55PM +, Alex Bennée wrote: > >> It is a common thing amongst the various cpu reset functions want to > >> flush the SoftMMU's TLB entries. This

Re: [Qemu-devel] [PATCH v5] hw/ssi/imx_spi.c: fix CS handling during SPI access.

2017-01-11 Thread Jean-Christophe DUBOIS
Marcin, I think that things have changed enough so that you could check again this version. JC Le 11/01/2017 à 17:52, Jean-Christophe Dubois a écrit : The i.MX SPI device was not de-asserting the CS line at the end of memory access. This triggered a SIGSEGV in Qemu when the sabrelite

Re: [Qemu-devel] [PATCH 0/6] ppc: add a IBM 40p machine (RS/6000, PReP)

2017-01-11 Thread Artyom Tarasenko
Hi Hervé, nice work! On Thu, Dec 29, 2016 at 11:12 PM, Hervé Poussineau wrote: > Hi, > > This patchset adds the emulation of the IBM RS/6000 7020 (40p). The real > machine is > able to run AIX (up to 4.3.3), Windows NT (up to 4.0 SP1), the beta of OS/2 > PowerPC, >

Re: [Qemu-devel] [PATCH 05/10] aio-posix: split aio_dispatch_handlers out of aio_dispatch

2017-01-11 Thread Stefan Hajnoczi
On Wed, Jan 04, 2017 at 02:26:20PM +0100, Paolo Bonzini wrote: > This simplifies the handling of dispatch_fds. > > Signed-off-by: Paolo Bonzini > --- > aio-posix.c | 43 +-- > 1 file changed, 25 insertions(+), 18 deletions(-)

Re: [Qemu-devel] [PATCH 02/10] qemu-thread: introduce QemuLockCnt

2017-01-11 Thread Stefan Hajnoczi
On Wed, Jan 04, 2017 at 02:26:17PM +0100, Paolo Bonzini wrote: > +/* Decrement a counter, and return locked if it is decremented to zero. > + * It is impossible for the counter to become nonzero while the mutex > + * is taken. > + */ > +bool qemu_lockcnt_dec_and_lock(QemuLockCnt *lockcnt) > +{ > +

Re: [Qemu-devel] [PATCH v1 00/30] target-sparc: add niagara OpenSPARC T1 sun4v emulation

2017-01-11 Thread Richard Henderson
On 12/30/2016 09:35 AM, Mark Cave-Ayland wrote: On 15/12/16 17:04, Artyom Tarasenko wrote: Ping? Richard & Mark, can you please review the patches 04, 05, 08, 10, 11,12, 14, 15, 16, 18-23 and 25-28? Hope I haven't missed anything from the v0 review. It would be nice to get it into the 2.9

[Qemu-devel] [PATCH v5] hw/ssi/imx_spi.c: fix CS handling during SPI access.

2017-01-11 Thread Jean-Christophe Dubois
The i.MX SPI device was not de-asserting the CS line at the end of memory access. This triggered a SIGSEGV in Qemu when the sabrelite emulator was acessing a SPI flash memory. Whith this path the CS signal is correctly asserted and deasserted arround memory access. Assertion level is now based

Re: [Qemu-devel] [PATCH 04/10] qemu-thread: optimize QemuLockCnt with futexes on Linux

2017-01-11 Thread Paolo Bonzini
On 11/01/2017 17:50, Stefan Hajnoczi wrote: > On Wed, Jan 04, 2017 at 02:26:19PM +0100, Paolo Bonzini wrote: >> +unsigned qemu_lockcnt_count(QemuLockCnt *lockcnt) >> +{ >> +return lockcnt->count >> QEMU_LOCKCNT_COUNT_SHIFT; > > According to docs/atomics.txt at least atomic_read() should be

Re: [Qemu-devel] [PATCH 02/10] qemu-thread: introduce QemuLockCnt

2017-01-11 Thread Paolo Bonzini
On 11/01/2017 17:35, Stefan Hajnoczi wrote: > On Wed, Jan 04, 2017 at 02:26:17PM +0100, Paolo Bonzini wrote: >> +/* Decrement a counter, and return locked if it is decremented to zero. >> + * It is impossible for the counter to become nonzero while the mutex >> + * is taken. >> + */ >> +bool

[Qemu-devel] [Bug 1655708] [NEW] target/ppc/int_helper.c:2806: strange expression ?

2017-01-11 Thread dcb
Public bug reported: target/ppc/int_helper.c:2806:25: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context] Source code is zone_digit = (i * 2) ? b->u8[BCD_DIG_BYTE(i * 2)] >> 4 : zone_lead; Which I read as zone_digit = (i * 2) ? (b->u8[BCD_DIG_BYTE(i *

Re: [Qemu-devel] [PATCH 04/10] qemu-thread: optimize QemuLockCnt with futexes on Linux

2017-01-11 Thread Stefan Hajnoczi
On Wed, Jan 04, 2017 at 02:26:19PM +0100, Paolo Bonzini wrote: > +unsigned qemu_lockcnt_count(QemuLockCnt *lockcnt) > +{ > +return lockcnt->count >> QEMU_LOCKCNT_COUNT_SHIFT; According to docs/atomics.txt at least atomic_read() should be used here otherwise sanitizers could flag up this

[Qemu-devel] [Bug 1653384] Re: Assertion failed with USB pass through with XHCI controller

2017-01-11 Thread Fabian Lesniak
I examined xhci_kick_epctx (frame 6) and looked into xfer and xfer->packet, maybe this helps: (gdb) bt #0 0x7fffdccb304f in raise () at /usr/lib/libc.so.6 #1 0x7fffdccb447a in abort () at /usr/lib/libc.so.6 #2 0x7fffdccabea7 in __assert_fail_base () at /usr/lib/libc.so.6 #3

Re: [Qemu-devel] [PATCH 02/10] qemu-thread: introduce QemuLockCnt

2017-01-11 Thread Stefan Hajnoczi
On Wed, Jan 04, 2017 at 02:26:17PM +0100, Paolo Bonzini wrote: > +/* Decrement a counter, and return locked if it is decremented to zero. > + * It is impossible for the counter to become nonzero while the mutex > + * is taken. > + */ > +bool qemu_lockcnt_dec_and_lock(QemuLockCnt *lockcnt) > +{ > +

[Qemu-devel] [Bug 1655702] [NEW] qemu/hw/char/exynos4210_uart.c: possible pointless local variable ?

2017-01-11 Thread dcb
Public bug reported: $ fgrep frame_size qemu/hw/char/exynos4210_uart.c int speed, parity, data_bits, stop_bits, frame_size; frame_size = 1; /* start bit */ frame_size++; /* parity bit */ frame_size += data_bits + stop_bits; $ Suggest either use it or delete it. ** Affects:

Re: [Qemu-devel] [PATCH v3 22/25] block: Do not copy exact_filename from format file

2017-01-11 Thread Max Reitz
On 30.11.2016 02:18, Max Reitz wrote: > If the a format BDS's file BDS is in turn a format BDS, we cannot simply > use the same filename, because when opening a BDS tree based on a > filename alone, qemu will create only one format node on top of one > protocol node (disregarding a potential

Re: [Qemu-devel] [PATCH v7 15/21] qapi: add qapi2texi script

2017-01-11 Thread Marc-André Lureau
Hi - Original Message - > Marc-André Lureau writes: > > > As the name suggests, the qapi2texi script converts JSON QAPI > > description into a texi file suitable for different target > > formats (info/man/txt/pdf/html...). > > > > It parses the following

[Qemu-devel] [Bug 1655700] [NEW] disas/libvixl/vixl/invalset.h: possible dodgy code in binary search ?

2017-01-11 Thread dcb
Public bug reported: [qemu/disas/libvixl/vixl/invalset.h:442]: (style) Array index 'low' is used before limits check. Source code is while (!IsValid(elements[low]) && (low < high)) ++low; Also: qemu/disas/libvixl/vixl/invalset.h:450]: (style) Array index 'middle' is used before limits

Re: [Qemu-devel] [PATCH v6 3/7] trace: [tcg] Delay changes to dynamic state when translating

2017-01-11 Thread Stefan Hajnoczi
On Tue, Jan 10, 2017 at 05:31:37PM +0100, Paolo Bonzini wrote: > On 09/01/2017 18:01, Stefan Hajnoczi wrote: > > Or use a simpler scheme: > > > > struct CPUState { > > ... > > uint32_t dstate_update_count; > > }; > > > > In trace_event_set_vcpu_state_dynamic(): > > > > if (state) {

Re: [Qemu-devel] [PATCH v4] [i.MX] fix CS handling during SPI access.

2017-01-11 Thread Jean-Christophe DUBOIS
Le 10/01/2017 à 00:02, Peter Maydell a écrit : On 9 January 2017 at 22:27, Jean-Christophe DUBOIS wrote: I might be wrong but I think they are coming out of reset with their CS line set to low (so they are selected by default) because this is the default level at reset.

Re: [Qemu-devel] [PATCH 02/10] qemu-thread: introduce QemuLockCnt

2017-01-11 Thread Paolo Bonzini
On 11/01/2017 16:48, Fam Zheng wrote: > On Wed, 01/04 14:26, Paolo Bonzini wrote: >> +For example, QEMU uses QemuLockCnt to manage an AioContext's list of >> +bottom halves and file descriptor handlers. Modifications to the list >> +of file descriptor handlers are rare. Creation of a new

Re: [Qemu-devel] [PATCH] nvdimm acpi: fix g_array_free() with NULL pointer

2017-01-11 Thread Igor Mammedov
On Wed, 11 Jan 2017 09:44:43 + Stefan Hajnoczi wrote: > Unlike g_free(), g_array_free() does not accept a NULL pointer argument. > The following error is logged when an nvdimm device is realized: > > GLib-CRITICAL **: g_array_free: assertion 'array' failed > > Cc:

Re: [Qemu-devel] [PATCH 02/10] qemu-thread: introduce QemuLockCnt

2017-01-11 Thread Fam Zheng
On Wed, 01/04 14:26, Paolo Bonzini wrote: > +For example, QEMU uses QemuLockCnt to manage an AioContext's list of > +bottom halves and file descriptor handlers. Modifications to the list > +of file descriptor handlers are rare. Creation of a new bottom half is > +frequent and can happen on a

Re: [Qemu-devel] [PATCH] Further tidy-up on block status

2017-01-11 Thread Vladimir Sementsov-Ogievskiy
from current version: >>> If an error occurs, the server SHOULD set the appropriate error code in the error field of an error chunk. However, if the error does not involve invalid usage (such as a request beyond the bounds of the file), a server MAY reply with a single block status descriptor

Re: [Qemu-devel] [PATCH v7 00/10] Convert msix_init() to error

2017-01-11 Thread Cao jin
On 01/10/2017 05:45 AM, Michael S. Tsirkin wrote: > On Mon, Nov 14, 2016 at 03:25:30PM +0800, Cao jin wrote: >> v7 changelog: >> 1. fix the segfaut bug in patch 2. So drop the all the R-b of it, >>please take a look, there is detailed description in the patch. >> 2. add the R-b from Hannes

Re: [Qemu-devel] vhost-user: fix crash when chardev-remove

2017-01-11 Thread Marc-André Lureau
Hi On Wed, Jan 11, 2017 at 3:32 PM 黄淮 wrote: > From: Huai Huang > > > Could you describe a bit more the crash and provide a backtrace? > diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c > index f2d49ad..4037cf4 100644 > --- a/hw/net/vhost_net.c > +++

Re: [Qemu-devel] [PATCH] display: cirrus: check vga bits per pixel(bpp) value

2017-01-11 Thread Alberto Garcia
On Mon, Nov 28, 2016 at 11:52:08AM +0530, P J P wrote: > | > --- a/hw/display/cirrus_vga.c > | > +++ b/hw/display/cirrus_vga.c > | > @@ -272,6 +272,9 @@ static void cirrus_update_memory_access(CirrusVGAState > | > *s); > | > static bool blit_region_is_unsafe(struct CirrusVGAState *s, > | >

[Qemu-devel] [Bug 1653384] Re: Assertion failed with USB pass through with XHCI controller

2017-01-11 Thread Fabian Lesniak
Hi, using qemu commit f634151b02ce5c80605383894f1f63f2c12e0033 configured with --python=/usr/bin/python2 --target-list=x86_64-softmmu --audio-drv-list="oss alsa sdl pa" --enable-debug running with -m 1024 -drive if=pflash,file=ovmf-arch.bin,format=raw -drive file=arch.raw,format=raw,if=virtio

Re: [Qemu-devel] [PATCH v7 00/21] qapi doc generation (whole version, squashed)

2017-01-11 Thread Marc-André Lureau
Hi On Wed, Jan 11, 2017 at 3:41 PM Markus Armbruster wrote: > Marc-André Lureau writes: > > > Add a qapi2texi script to generate the documentation from the qapi > > schemas. > > > > The SQUASHED patch in this series is a squashed version of the >

Re: [Qemu-devel] [PATCH v7 00/21] qapi doc generation (whole version, squashed)

2017-01-11 Thread Markus Armbruster
Marc-André Lureau writes: > Add a qapi2texi script to generate the documentation from the qapi > schemas. > > The SQUASHED patch in this series is a squashed version of the > documentation move from qmp-commands.txt to the schemas. The whole > version (not sent on

[Qemu-devel] vhost-user: fix crash when chardev-remove

2017-01-11 Thread 黄淮
From: Huai Huang diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index f2d49ad..4037cf4 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -412,7 +412,6 @@ VHostNetState *get_vhost_net(NetClientState *nc) break; case NET_CLIENT_DRIVER_VHOST_USER:

Re: [Qemu-devel] [PATCH v7 21/21] build-sys: add qapi doc generation targets

2017-01-11 Thread Markus Armbruster
Marc-André Lureau writes: > Generate and install the man, txt and html versions of QAPI > documentation (generate and install qemu-doc.txt too). > > Add it also to optional pdf/info targets. > > Signed-off-by: Marc-André Lureau

Re: [Qemu-devel] [PATCH v7 15/21] qapi: add qapi2texi script

2017-01-11 Thread Markus Armbruster
Marc-André Lureau writes: > As the name suggests, the qapi2texi script converts JSON QAPI > description into a texi file suitable for different target > formats (info/man/txt/pdf/html...). > > It parses the following kind of blocks: > > Free-form: > > ## > # =

Re: [Qemu-devel] [PATCH] libqtest: handle zero length memwrite/memread

2017-01-11 Thread Eric Blake
On 01/11/2017 02:49 AM, Greg Kurz wrote: > Some recently added tests pass a zero length to qtest_memwrite(). > Unfortunately, the qtest protocol doesn't implement an on-the-wire > syntax for zero-length writes and the current code happily sends > garbage to QEMU. This causes intermittent failures.

Re: [Qemu-devel] Exporting kvm_max_guest_tsc_khz to userspace (was Re: [PATCH 4/4] kvm: Allow migration with invtsc)

2017-01-11 Thread Paolo Bonzini
On 11/01/2017 14:26, Eduardo Habkost wrote: > On Mon, Jan 09, 2017 at 03:58:11PM +0100, Paolo Bonzini wrote: >> >> >> On 08/01/2017 21:28, Eduardo Habkost wrote: Well just export KVM_GET_TSC_KHZ in a QMP command right? Its pretty easy. Let me know if you need any help coding

[Qemu-devel] [Bug 1626972] Re: QEMU memfd_create fallback mechanism change for security drivers

2017-01-11 Thread Rafael David Tinoco
Yakkety Verification (with 3.13 kernel from Trusty since a <= 3.17 kernel is needed). This verifies that Ubuntu Cloud Archive repositories will be alright with this new packages (from Xenial / Yakkety). ## CURRENT inaddy@(ykvm01):~$ apt-cache policy qemu-kvm qemu-kvm: Installed:

[Qemu-devel] [PULL 2/5] target-tricore: Added MADD.F and MSUB.F instructions

2017-01-11 Thread Bastian Koppelmann
Multiplies D[a] and D[b] and adds/subtracts the result to/from D[d]. The result is put in D[c]. All operands are floating-point numbers. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target/tricore/fpu_helper.c | 93

[Qemu-devel] [PULL 0/5] tricore-patches

2017-01-11 Thread Bastian Koppelmann
The following changes since commit 50788a3fdbade5f8ed1c8296988578133c52c6aa:

[Qemu-devel] [PULL 3/5] target-tricore: Added new MOV instruction variant

2017-01-11 Thread Bastian Koppelmann
From: Peer Adelt Puts the content of data register D[a] into E[c][63:32] and the content of data register D[b] into E[c][31:0]. [BK: fix style error] [BK: Allocate temporaries only when needed] Signed-off-by: Peer Adelt Message-Id:

[Qemu-devel] [PULL 1/5] target-tricore: Added FTOUZ instruction

2017-01-11 Thread Bastian Koppelmann
Converts a 32-bit floating point number to an unsigned int. The result is rounded towards zero. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target/tricore/fpu_helper.c | 27 +++

[Qemu-devel] [PULL 5/5] target-tricore: Add updfl instruction

2017-01-11 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target/tricore/fpu_helper.c | 14 ++ target/tricore/helper.h | 1 + target/tricore/translate.c | 3 +++ 3 files changed, 18 insertions(+) diff --git

[Qemu-devel] [PULL 4/5] target-tricore: Added new JNE instruction variant

2017-01-11 Thread Bastian Koppelmann
From: Peer Adelt If D[15] is != sign_ext(const4) then PC will be set to (PC + zero_ext(disp4 + 16)). [BK: fixed style errors] Signed-off-by: Peer Adelt Message-Id: <1465314555-11501-5-git-send-email-peer.ad...@c-lab.de> Signed-off-by: Bastian

Re: [Qemu-devel] Exporting kvm_max_guest_tsc_khz to userspace (was Re: [PATCH 4/4] kvm: Allow migration with invtsc)

2017-01-11 Thread Eduardo Habkost
On Mon, Jan 09, 2017 at 03:58:11PM +0100, Paolo Bonzini wrote: > > > On 08/01/2017 21:28, Eduardo Habkost wrote: > >> Well just export KVM_GET_TSC_KHZ in a QMP command right? Its pretty > >> easy. > >> > >> Let me know if you need any help coding or testing. > > I just found out that KVM doesn't

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 2/2] run_tests: allow run tests in parallel

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 12:00:23PM +0100, Andrew Jones wrote: > On Wed, Jan 11, 2017 at 01:29:35PM +0800, Peter Xu wrote: > > run_task.sh is getting slow. This patch is trying to make it faster by > > running the tests concurrently. > > > > We provide a new parameter "-j" for the run_tests.sh,

Re: [Qemu-devel] [PATCH v2 1/6] Add cfgend parameter for ARM CPU selection.

2017-01-11 Thread Julian Brown
On Thu, 5 Jan 2017 17:17:13 + Peter Maydell wrote: > > +qdev_property_add_static(DEVICE(obj), _cpu_cfgend_property, > > + _abort); > > + > > +qdev_prop_set_globals(DEVICE(obj)); > > + > > +if (object_property_get_bool(obj,

Re: [Qemu-devel] [PATCH v6 08/17] qapi: add qapi2texi script

2017-01-11 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > - Original Message - >> Marc-André Lureau writes: >> >> > As the name suggests, the qapi2texi script converts JSON QAPI >> > description into a texi file suitable for different target >> > formats

[Qemu-devel] [PATCH V2 1/3] hw/pcie: Introduce a base class for PCI Express Root Ports

2017-01-11 Thread Marcel Apfelbaum
The 'base' PCI Express Root Port includes the common code to be re-used for all Root Ports implementations. Most of the code was taken from the current implementation of Intel's IOH 3420 Root Port. Signed-off-by: Marcel Apfelbaum --- default-configs/arm-softmmu.mak| 1 +

[Qemu-devel] [PATCH V2 3/3] hw/pcie: Introduce Generic PCI Express Root Port

2017-01-11 Thread Marcel Apfelbaum
The Generic Root Port behaves the same as the Intel's IOH device with id 3420, without having Intel specific attributes. The device has two purposes: (1) Can be used on both X86 and ARM machines. (2) It will allow us to tweak the behaviour (e.g add vendor-specific PCI capabilities) -

[Qemu-devel] [PATCH V2 2/3] hw/ioh3420: derive from PCI Express Root Port base class

2017-01-11 Thread Marcel Apfelbaum
Preserve only Intel specific details. Signed-off-by: Marcel Apfelbaum --- hw/pci-bridge/ioh3420.c | 152 +++- 1 file changed, 7 insertions(+), 145 deletions(-) diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c index

[Qemu-devel] [PATCH V2 0/3] hw/pcie: Introduce Generic PCI Express Root Port

2017-01-11 Thread Marcel Apfelbaum
v1 -> v2: - Rebased on master. The Generic Root Port behaves the same as the Intel's IOH device with id 3420, without having Intel specific attributes. The device has two purposes: (1) Can be used on both X86 and ARM machines. (2) It will allow us to tweak the behaviour (e.g add

Re: [Qemu-devel] TSC frequency configuration & invtsc migration (was Re: [PATCH 4/4] kvm: Allow migration with invtsc)

2017-01-11 Thread Eduardo Habkost
On Tue, Jan 10, 2017 at 05:36:48PM +0100, Paolo Bonzini wrote: > > > On 05/01/2017 11:48, Marcelo Tosatti wrote: > >> Host A has TSC scaling, host B doesn't have TSC scaling. We want > >> to be able to start the VM on host A, and migrate to B. In this > >> case, the only possible solution is to

Re: [Qemu-devel] qemu-2.8-rc4 is broken

2017-01-11 Thread Alex Bennée
Pavel Dovgalyuk writes: >> From: Stefan Hajnoczi [mailto:stefa...@gmail.com] >> On Wed, Dec 21, 2016 at 5:57 AM, Pavel Dovgalyuk wrote: >> >> -Original Message- >> >> From: Stefan Hajnoczi [mailto:stefa...@gmail.com] >> >> On Tue, Dec 20, 2016 at

[Qemu-devel] [PATCH V2] hw/pci: disable pci-bridge's shpc by default

2017-01-11 Thread Marcel Apfelbaum
The shpc component is optional while ACPI hotplug is used for hot-plugging PCI devices into a PCI-PCI bridge. Disabling the shpc by default will make slot 0 usable at boot time and not only for hot-plug, without loosing any functionality. Older machines will have shpc enabled for compatibility

[Qemu-devel] [PATCH v2 8/9] Add memfd based hostmem

2017-01-11 Thread Marc-André Lureau
Add a new memory backend, similar to hostmem-file, except that it doesn't need to create files. It also enforces memory sealing. This backend is mainly useful for sharing the memory with other processes. Note that Linux supports transparent huge-pages of shmem/memfd memory since 4.8. It is

[Qemu-devel] [PATCH v2 9/9] tests: use memfd in vhost-user-test

2017-01-11 Thread Marc-André Lureau
This will exercise the memfd memory backend and should generally be better for testing than memory-backend-file (thanks to anonymous files and sealing). The test is already Linux-specific, but will now require Linux with memfd (since 3.17). Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v2 5/9] ivshmem: use ram_from_fd()

2017-01-11 Thread Marc-André Lureau
Instead of having its own mmap handling code, reuse the code from exec.c. Note: memory_region_init_ram_from_fd() adds some restrictions (check for xen, kvm sync-mmu, etc) and changes (such as size alignment). This may actually be more correct. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v2 4/9] Add memory_region_init_ram_from_fd()

2017-01-11 Thread Marc-André Lureau
Add a new function to initialize a RAM memory region with a file descriptor to be mmap-ed. Signed-off-by: Marc-André Lureau --- include/exec/memory.h | 20 memory.c | 16 2 files changed, 36 insertions(+) diff

[Qemu-devel] [PATCH v2 7/9] memfd: split qemu_memfd_alloc()

2017-01-11 Thread Marc-André Lureau
Add a function to only create a memfd, without mmap. The function is used in the following memory backend. Signed-off-by: Marc-André Lureau --- include/qemu/memfd.h | 2 ++ util/memfd.c | 42 +- 2 files changed, 27

<    1   2   3   4   5   >