qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 3c0ed2: kvm-all: don't use stale dbg_data->cp


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 3c0ed2: kvm-all: don't use stale dbg_data->cpu
Date: Mon, 24 Oct 2016 08:30:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 3c0ed2a342e5acb97bdd2c7b64d33a904ad75940
      
https://github.com/qemu/qemu/commit/3c0ed2a342e5acb97bdd2c7b64d33a904ad75940
  Author: Alex Bennée <address@hidden>
  Date:   2016-10-23 (Sun, 23 Oct 2016)

  Changed paths:
    M kvm-all.c

  Log Message:
  -----------
  kvm-all: don't use stale dbg_data->cpu

The changes to run_on_cpu and friends mean that all helpers are passed
the CPUState of vCPU they are running on. The conversion missed the
field in commit e0eeb4a21a3ca4b296220ce4449d8acef9de9049 which
introduced bugs.

Reported-by: Claudio Imbrenda <address@hidden>
Tested-by: Claudio Imbrenda <address@hidden>
Signed-off-by: Alex Bennée <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e948f663e9334249c394b88926addcdd3f9e35cd
      
https://github.com/qemu/qemu/commit/e948f663e9334249c394b88926addcdd3f9e35cd
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-23 (Sun, 23 Oct 2016)

  Changed paths:
    M block/rbd.c

  Log Message:
  -----------
  rbd: shift byte count as a 64-bit value

Otherwise, reads of more than 2GB fail.  Until commit
7bbca9e290a9c7c217b5a24fc6094e91e54bd05d, reads of 2^41
bytes succeeded at least theoretically.

In fact, pdiscard ought to receive a 64-bit integer as the
count for the same reason.

Reported by Coverity.

Fixes: 7bbca9e290a9c7c217b5a24fc6094e91e54bd05d
Cc: address@hidden
Cc: address@hidden
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 583ec22e2385fda19e2207cab1b688b816d95de0
      
https://github.com/qemu/qemu/commit/583ec22e2385fda19e2207cab1b688b816d95de0
  Author: Roy Shterman <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: Introducing new zero-copy API

A new API to deploy zero-copy command submission. The new API takes I/O
vectors list and number of I/O vectors to submit as input parameters
when initiating the command. New API must be used if working with
iSER transport option.

Signed-off-by: Roy Shterman <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e0ae49871ae697b5d1a8853e79cbee35fda2145b
      
https://github.com/qemu/qemu/commit/e0ae49871ae697b5d1a8853e79cbee35fda2145b
  Author: Roy Shterman <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  block/iscsi: Adding new iSER transport layer option

iSER is a new transport layer supported in Libiscsi,
iSER provides a zero-copy RDMA capable interface that can
improve performance.

In order to use the new iSER transport one need to have RDMA supported HW
and to choose iser as the protocol name in Libiscsi URI.

For now iSER memory buffers are pre-allocated and pre-registered,
hence in order to work with iSER from QEMU, one need to enable
MEMLOCK attribute in the VM to be large enough for all iSER buffers and RDMA
resources.

Signed-off-by: Roy Shterman <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 0781dd6e79df78c6e162ea7282e8c973c0a4cd1f
      
https://github.com/qemu/qemu/commit/0781dd6e79df78c6e162ea7282e8c973c0a4cd1f
  Author: Thomas Huth <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M bsd-user/main.c
    M linux-user/main.c
    M qemu-img.c
    M vl.c

  Log Message:
  -----------
  Put the copyright information on a separate line

The output string QEMU with "--version" is very long, it does
not fit into a normal line of a terminal window anymore. By
putting the copyright information on a separate line instead,
the output looks much nicer.

Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f1ee86963b9a7bc6a60b823dbf682fd0a62ffcc4
      
https://github.com/qemu/qemu/commit/f1ee86963b9a7bc6a60b823dbf682fd0a62ffcc4
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M docs/atomics.txt
    M include/qemu/atomic.h

  Log Message:
  -----------
  atomic: introduce smp_mb_acquire and smp_mb_release

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 374293ca6fb060f0302e5ca76ddccbc2bbb075c9
      
https://github.com/qemu/qemu/commit/374293ca6fb060f0302e5ca76ddccbc2bbb075c9
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M util/qemu-thread-posix.c
    M util/qemu-thread-win32.c

  Log Message:
  -----------
  qemu-thread: use acquire/release to clarify semantics of QemuEvent

Do not use the somewhat mysterious atomic_mb_read/atomic_mb_set,
instead make sure that the operations on QemuEvent are annotated
with the desired acquire and release semantics.

In particular, qemu_event_set wakes up the waiting thread, so it must
be a release from the POV of the waker (compare with qemu_mutex_unlock).
And it actually needs a full barrier, because that's the only thing that
provides something like a "load-release".

Use smp_mb_acquire until we have atomic_load_acquire and
atomic_store_release in atomic.h.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e11131b02584ddea93deef1caad8e4f945dd7340
      
https://github.com/qemu/qemu/commit/e11131b02584ddea93deef1caad8e4f945dd7340
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M util/rcu.c

  Log Message:
  -----------
  rcu: simplify memory barriers

Thanks to the acquire semantics of qemu_event_reset and qemu_event_wait,
some memory barriers can be removed.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 803cf26a9e019b5d2256a8edeb22e3538c4f3261
      
https://github.com/qemu/qemu/commit/803cf26a9e019b5d2256a8edeb22e3538c4f3261
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M docs/atomics.txt
    M include/qemu/atomic.h

  Log Message:
  -----------
  atomic: base mb_read/mb_set on load-acquire and store-release

This introduces load-acquire and store-release operations in QEMU.
For now, just use them as an implementation detail of atomic_mb_read
and atomic_mb_set.

Since docs/atomics.txt documents that atomic_mb_read only synchronizes
with an atomic_mb_set of the same variable, we can use the new implementation
everywhere instead of seq-cst loads and stores.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 977ec47de06bdcb24f01c93bc125b7c6c221a1c5
      
https://github.com/qemu/qemu/commit/977ec47de06bdcb24f01c93bc125b7c6c221a1c5
  Author: Emilio G. Cota <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M tests/qht-bench.c

  Log Message:
  -----------
  qht-bench: relax test_start/stop atomic accesses

test_start/stop are used only as flags to loop on. Barriers are unnecessary,
since no dependent data is transferred among threads apart from the flags
themselves.

This commit relaxes the three accesses to test_start/stop that were
not yet relaxed.

Signed-off-by: Emilio G. Cota <address@hidden>


  Commit: 03514ac25c40ec3f2ffc493f1862ddd1353419f8
      
https://github.com/qemu/qemu/commit/03514ac25c40ec3f2ffc493f1862ddd1353419f8
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M tests/tcg/test-i386.c

  Log Message:
  -----------
  test-i386: fix bitrot for 64-bit

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 620abfb004543404bef1953e25da2ad77352941a
      
https://github.com/qemu/qemu/commit/620abfb004543404bef1953e25da2ad77352941a
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M target-i386/translate.c

  Log Message:
  -----------
  target-i386: fix 32-bit addresses in LEA

This was found with test-i386.  The issue is that instructions
such as

    addr32 lea (%eax), %rax

did not perform a 32-bit extension, because the LEA translation
skipped the gen_lea_v_seg step.  That step does not just add
segments, it also takes care of extending from address size to
pointer size.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 0fe4fca4e1a5e06a270127dd80bb753d4dda61c6
      
https://github.com/qemu/qemu/commit/0fe4fca4e1a5e06a270127dd80bb753d4dda61c6
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M tcg/tcg.c

  Log Message:
  -----------
  tcg: try sti when moving a constant into a dead memory temp

This comes from free from unifying tcg_reg_alloc_mov and
tcg_reg_alloc_movi's handling of TEMP_VAL_CONST.  It triggers
often on moves to cc_dst, such as the following translation
of "sub $0x3c,%esp":

  before:                          after:
  subl   $0x3c,%ebp                subl   $0x3c,%ebp
  movl   %ebp,0x10(%r14)           movl   %ebp,0x10(%r14)
  movl   $0x3c,%ebx                movl   $0x3c,0x2c(%r14)
  movl   %ebx,0x2c(%r14)

Signed-off-by: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d45fa784cd0c111131696808d1168259d66b7519
      
https://github.com/qemu/qemu/commit/d45fa784cd0c111131696808d1168259d66b7519
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M include/exec/memory.h
    M memory.c

  Log Message:
  -----------
  memory: eliminate global MemoryListeners

There is none, so just drop the code.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9a54635dcb51a3fcf7507af630168f514a8cd4e7
      
https://github.com/qemu/qemu/commit/9a54635dcb51a3fcf7507af630168f514a8cd4e7
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M include/exec/memory.h
    M memory.c

  Log Message:
  -----------
  memory: add a per-AddressSpace list of listeners

This speeds up MEMORY_LISTENER_CALL noticeably.  Right now,
with many PCI devices you have N regions added to M AddressSpaces
(M = # PCI devices with bus-master enabled) and each call looks
up the whole listener list, with at least M listeners in it.
Because most of the regions in N are BARs, which are also roughly
proportional to M, the whole thing is O(M^3).  This changes it
to O(M^2), which is the best we can do without rewriting the
whole thing.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: adaad61c3c8efb5b4f21ad70c6e141215fdbb304
      
https://github.com/qemu/qemu/commit/adaad61c3c8efb5b4f21ad70c6e141215fdbb304
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: optimize memory_global_dirty_log_sync

Only return a nonzero dirty_log_mask for RAM/ROM memory regions.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 0a752eeea810a1c37f5de4edba355c35cfa42524
      
https://github.com/qemu/qemu/commit/0a752eeea810a1c37f5de4edba355c35cfa42524
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: optimize memory_region_sync_dirty_bitmap

Avoid walking the FlatView of all address spaces.  Most of the
address spaces will have no log_sync callback on their listeners.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3592fe0c919cf27a81d8e9f9b4f269553418bb01
      
https://github.com/qemu/qemu/commit/3592fe0c919cf27a81d8e9f9b4f269553418bb01
  Author: Prasad J Pandit <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M hw/char/serial.c

  Log Message:
  -----------
  char: serial: check divider value against baud base

16550A UART device uses an oscillator to generate frequencies
(baud base), which decide communication speed. This speed could
be changed by dividing it by a divider. If the divider is
greater than the baud base, speed is set to zero, leading to a
divide by zero error. Add check to avoid it.

Reported-by: Huawei PSIRT <address@hidden>
Signed-off-by: Prasad J Pandit <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f0b454ebf8a3c51acead0d53e5f2b53576159dcb
      
https://github.com/qemu/qemu/commit/f0b454ebf8a3c51acead0d53e5f2b53576159dcb
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M include/sysemu/char.h

  Log Message:
  -----------
  char.h: misc doc fix

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2c9bf30bdf1e17b340c9e5e70923cf76c9e66d9e
      
https://github.com/qemu/qemu/commit/2c9bf30bdf1e17b340c9e5e70923cf76c9e66d9e
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M backends/rng-egd.c

  Log Message:
  -----------
  rng: remove unused included header

DEFINE_PROP_CHR is not used (rng is not of TYPE_DEVICE)

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ba60e727b0a824baa1762264be5ef67dc30a6bac
      
https://github.com/qemu/qemu/commit/ba60e727b0a824baa1762264be5ef67dc30a6bac
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  char: remove use-after-free on win-stdio

Found by reviewing the code, win_stdio_close() is called by
qemu_chr_free() which then call qemu_chr_free_common() taking care of
freeing CharDriverState*.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 5c936a83c3301f6919d2e0ba9eb977370a8a1ac7
      
https://github.com/qemu/qemu/commit/5c936a83c3301f6919d2e0ba9eb977370a8a1ac7
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  ringbuf: fix chr_write return value

It should return the number of written bytes.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 4496dc49ec9a6e24e9eeb2da970ed0ec0051968e
      
https://github.com/qemu/qemu/commit/4496dc49ec9a6e24e9eeb2da970ed0ec0051968e
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M hw/alpha/dp264.c
    M hw/char/serial-isa.c
    M hw/i386/pc.c
    M hw/mips/mips_fulong2e.c
    M hw/mips/mips_malta.c
    M hw/mips/mips_r4k.c
    M hw/sparc64/sun4u.c
    M include/hw/char/serial.h

  Log Message:
  -----------
  sun4uv: fix serial initialization regression

Since commit b6607a1a204d, serial_hds_isa_init() was introduced to
factor out serial_isa_init() loops. However, sun4uv shouldn't start from
0 when there is a mm serial on 0 already. Add a "from" argument to
serial_hds_isa_init().

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9850b05d216b3a835f92100fed64ffad77e5cf3b
      
https://github.com/qemu/qemu/commit/9850b05d216b3a835f92100fed64ffad77e5cf3b
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M hw/mips/mips_malta.c

  Log Message:
  -----------
  malta: replace chr init by CHR_EVENT_OPENED handler

The CharDriverState.init() callback was introduced in commit
ceecf1d158. It is only called from text_console_do_init(), but it is no
longer set since commit a61ae7f88 (init assignment has been removed by
accident).

It seems correct to use an event callback instead and print the console
text on CHR_EVENT_OPENED. That way we can remove the single user of
CharDriverState init().

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b4948be93e53c3b471666e51ce59303082626a2f
      
https://github.com/qemu/qemu/commit/b4948be93e53c3b471666e51ce59303082626a2f
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M gdbstub.c
    M hmp.c
    M hw/arm/fsl-imx25.c
    M hw/arm/fsl-imx31.c
    M hw/arm/fsl-imx6.c
    M hw/arm/omap2.c
    M hw/char/exynos4210_uart.c
    M hw/char/omap_uart.c
    M hw/char/xen_console.c
    M hw/isa/pc87312.c
    M hw/mips/mips_malta.c
    M hw/usb/dev-serial.c
    M hw/xtensa/xtfpga.c
    M include/sysemu/char.h
    M net/slirp.c
    M qemu-char.c
    M qtest.c
    M tests/vhost-user-test.c
    M ui/console.c
    M ui/gtk.c
    M vl.c

  Log Message:
  -----------
  char: remove init callback

The CharDriverState.init() callback is no longer set since commit
a61ae7f88ce and thus unused. The only user, the malta FGPA display has
been converted to use an event "opened" callback instead.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c8cccba3125d8d1a7ca66fc593a89543f3fe823d
      
https://github.com/qemu/qemu/commit/c8cccba3125d8d1a7ca66fc593a89543f3fe823d
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M hw/ssi/xilinx_spips.c

  Log Message:
  -----------
  xilinx: fix buffer overflow on realize

ASAN complains about buffer overflow when running:
aarch64-softmmu/qemu-system-aarch64 -machine xilinx-zynq-a9

==476==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000035e38 
at pc 0x000000f75253 bp 0x7ffc597e0ec0 sp 0x7ffc597e0eb0
READ of size 8 at 0x602000035e38 thread T0
    #0 0xf75252 in xilinx_spips_realize hw/ssi/xilinx_spips.c:623
    #1 0xb9ef6c in device_set_realized hw/core/qdev.c:918
    #2 0x129ae01 in property_set_bool qom/object.c:1854
    #3 0x1296e70 in object_property_set qom/object.c:1088
    #4 0x129dd1b in object_property_set_qobject qom/qom-qobject.c:27
    #5 0x1297168 in object_property_set_bool qom/object.c:1157
    #6 0xb9aeac in qdev_init_nofail hw/core/qdev.c:358
    #7 0x78a5bf in zynq_init_spi_flashes 
/home/elmarco/src/qemu/hw/arm/xilinx_zynq.c:125
    #8 0x78af60 in zynq_init /home/elmarco/src/qemu/hw/arm/xilinx_zynq.c:238
    #9 0x998eac in main /home/elmarco/src/qemu/vl.c:4534
    #10 0x7f96ed692730 in __libc_start_main (/lib64/libc.so.6+0x20730)
    #11 0x41d0a8 in _start 
(/home/elmarco/src/qemu/aarch64-softmmu/qemu-system-aarch64+0x41d0a8)

0x602000035e38 is located 0 bytes to the right of 8-byte region 
[0x602000035e30,0x602000035e38)
allocated by thread T0 here:
    #0 0x7f970b014e60 in malloc (/lib64/libasan.so.3+0xc6e60)
    #1 0x7f96f15b0e18 in g_malloc (/lib64/libglib-2.0.so.0+0x4ee18)
    #2 0xb9ef6c in device_set_realized hw/core/qdev.c:918
    #3 0x129ae01 in property_set_bool qom/object.c:1854
    #4 0x1296e70 in object_property_set qom/object.c:1088
    #5 0x129dd1b in object_property_set_qobject qom/qom-qobject.c:27
    #6 0x1297168 in object_property_set_bool qom/object.c:1157
    #7 0xb9aeac in qdev_init_nofail hw/core/qdev.c:358
    #8 0x78a5bf in zynq_init_spi_flashes 
/home/elmarco/src/qemu/hw/arm/xilinx_zynq.c:125
    #9 0x78af60 in zynq_init /home/elmarco/src/qemu/hw/arm/xilinx_zynq.c:238
    #10 0x998eac in main /home/elmarco/src/qemu/vl.c:4534
    #11 0x7f96ed692730 in __libc_start_main (/lib64/libc.so.6+0x20730)

s->spi is allocated with the size of num_busses which may be 1 (by
default).  Change to use a loop up to s->num_busses also for the
call to ssi_auto_connect_slaves().

Reported-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6dfa8298faa0fce47c68659fd4d92e76745d4edb
      
https://github.com/qemu/qemu/commit/6dfa8298faa0fce47c68659fd4d92e76745d4edb
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M include/sysemu/char.h
    M qemu-char.c

  Log Message:
  -----------
  mux: split mux_chr_update_read_handler()

Make qemu_chr_add_handlers_full() aware of mux handling. This allows
introduction of a tag associated with the fe handlers and a
qemu_chr_set_handlers() function to set the handler for a particular
tag. That will allow to get rid of qemu_chr_add_handlers*() in later
changes, in favor of qemu_chr_fe_set_handler().

To this end, chr_update_read_handler callback is enhanced with a tag
argument, and mux_chr_update_read_handler() is splitted in new
functions: mux_chr_new_handler_tag(), mux_chr_set_handlers(),
mux_set_focus().

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 94a40fc56036b5058b0b194d9e372a22e65ce7be
      
https://github.com/qemu/qemu/commit/94a40fc56036b5058b0b194d9e372a22e65ce7be
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M include/sysemu/char.h
    M qemu-char.c

  Log Message:
  -----------
  char: introduce CharBackend

This new structure is meant to keep the details associated with a char
driver usage. On initialization, it gets a tag from the mux backend.
It can change its handlers thanks to qemu_chr_fe_set_handlers().

This structure is introduced so that all frontend will be moved to hold
and use a CharBackend. This will allow to better track char usage and
allocation, and help prevent some memory leaks or corruption.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ecb672d14f092f481000ac9cd9d7dc0500692eba
      
https://github.com/qemu/qemu/commit/ecb672d14f092f481000ac9cd9d7dc0500692eba
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  char: start converting mux driver to use CharBackend

Start using qemu_chr_fe* CharBackend functions:
initialize a CharBackend and use qemu_chr_fe_set_handlers().

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: becdfa00cfa2995e859ccefa4b7d72a72eb96581
      
https://github.com/qemu/qemu/commit/becdfa00cfa2995e859ccefa4b7d72a72eb96581
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M hw/arm/pxa2xx.c
    M hw/arm/strongarm.c
    M hw/char/bcm2835_aux.c
    M hw/char/cadence_uart.c
    M hw/char/debugcon.c
    M hw/char/digic-uart.c
    M hw/char/escc.c
    M hw/char/etraxfs_ser.c
    M hw/char/exynos4210_uart.c
    M hw/char/grlib_apbuart.c
    M hw/char/imx_serial.c
    M hw/char/ipoctal232.c
    M hw/char/lm32_juart.c
    M hw/char/lm32_uart.c
    M hw/char/milkymist-uart.c
    M hw/char/parallel.c
    M hw/char/pl011.c
    M hw/char/sclpconsole-lm.c
    M hw/char/sclpconsole.c
    M hw/char/serial.c
    M hw/char/spapr_vty.c
    M hw/char/stm32f2xx_usart.c
    M hw/char/virtio-console.c
    M hw/char/xilinx_uartlite.c
    M hw/core/qdev-properties-system.c
    M hw/ipmi/ipmi_bmc_extern.c
    M hw/misc/ivshmem.c
    M hw/usb/ccid-card-passthru.c
    M hw/usb/dev-serial.c
    M hw/usb/redirect.c
    M include/hw/char/bcm2835_aux.h
    M include/hw/char/cadence_uart.h
    M include/hw/char/digic-uart.h
    M include/hw/char/imx_serial.h
    M include/hw/char/serial.h
    M include/hw/char/stm32f2xx_usart.h
    M include/hw/qdev-properties.h

  Log Message:
  -----------
  char: replace PROP_CHR with CharBackend

Store the property in a CharBackend instead of CharDriverState*.  This
also replace systematically chr by chr.chr to access the
CharDriverState*. The following patches will replace it with calls to
qemu_chr_fe CharBackend functions.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 32a6ebecd2ffe82ffade5edf9e054e20cb48f281
      
https://github.com/qemu/qemu/commit/32a6ebecd2ffe82ffade5edf9e054e20cb48f281
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M backends/rng-egd.c
    M gdbstub.c
    M hw/arm/omap2.c
    M hw/char/mcf_uart.c
    M hw/char/sh_serial.c
    M hw/char/xen_console.c
    M hw/mips/mips_malta.c
    M monitor.c
    M net/colo-compare.c
    M net/filter-mirror.c
    M net/slirp.c
    M net/vhost-user.c
    M qtest.c
    M tests/vhost-user-test.c

  Log Message:
  -----------
  char: remaining switch to CharBackend in frontend

Similar to previous change, for the remaining CharDriverState front ends
users.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 7fa47e2a80e1c204533340f65909b7fc7c6b276f
      
https://github.com/qemu/qemu/commit/7fa47e2a80e1c204533340f65909b7fc7c6b276f
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M hw/char/bcm2835_aux.c
    M hw/char/cadence_uart.c
    M hw/char/escc.c
    M hw/char/imx_serial.c
    M hw/char/ipoctal232.c
    M hw/char/lm32_uart.c
    M hw/char/mcf_uart.c
    M hw/char/milkymist-uart.c
    M hw/char/pl011.c
    M hw/char/serial.c
    M hw/char/spapr_vty.c
    M hw/char/stm32f2xx_usart.c
    M hw/char/virtio-console.c
    M hw/char/xilinx_uartlite.c
    M include/sysemu/char.h
    M net/vhost-user.c
    M qemu-char.c
    M tests/vhost-user-test.c

  Log Message:
  -----------
  char: rename some frontend functions

qemu_chr_accept_input() and qemu_chr_disconnect() are only used by
frontend, so use qemu_chr_fe prefix.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fbf3cc3a67a7131e258764aa1f19d5324e9e9f7a
      
https://github.com/qemu/qemu/commit/fbf3cc3a67a7131e258764aa1f19d5324e9e9f7a
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M net/colo-compare.c

  Log Message:
  -----------
  colo: claim in find_and_check_chardev

This factors out claiming of chardev, and changes the call to
non-fatal to return an error like the rest of the chardev checks.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 5345fdb4467816c44f6752b3a1f4e73aa25919f9
      
https://github.com/qemu/qemu/commit/5345fdb4467816c44f6752b3a1f4e73aa25919f9
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M backends/rng-egd.c
    M gdbstub.c
    M hw/arm/omap2.c
    M hw/arm/pxa2xx.c
    M hw/arm/strongarm.c
    M hw/char/bcm2835_aux.c
    M hw/char/cadence_uart.c
    M hw/char/debugcon.c
    M hw/char/digic-uart.c
    M hw/char/escc.c
    M hw/char/etraxfs_ser.c
    M hw/char/exynos4210_uart.c
    M hw/char/grlib_apbuart.c
    M hw/char/imx_serial.c
    M hw/char/ipoctal232.c
    M hw/char/lm32_juart.c
    M hw/char/lm32_uart.c
    M hw/char/mcf_uart.c
    M hw/char/milkymist-uart.c
    M hw/char/parallel.c
    M hw/char/pl011.c
    M hw/char/sclpconsole-lm.c
    M hw/char/sclpconsole.c
    M hw/char/serial.c
    M hw/char/sh_serial.c
    M hw/char/spapr_vty.c
    M hw/char/stm32f2xx_usart.c
    M hw/char/virtio-console.c
    M hw/char/xen_console.c
    M hw/char/xilinx_uartlite.c
    M hw/ipmi/ipmi_bmc_extern.c
    M hw/mips/mips_malta.c
    M hw/misc/ivshmem.c
    M hw/usb/ccid-card-passthru.c
    M hw/usb/dev-serial.c
    M hw/usb/redirect.c
    M hw/virtio/vhost-user.c
    M include/hw/char/serial.h
    M include/sysemu/char.h
    M monitor.c
    M net/colo-compare.c
    M net/filter-mirror.c
    M net/slirp.c
    M net/vhost-user.c
    M qemu-char.c
    M qtest.c
    M tests/vhost-user-test.c

  Log Message:
  -----------
  char: use qemu_chr_fe* functions with CharBackend argument

This also switches from qemu_chr_add_handlers() to
qemu_chr_fe_set_handlers(). Note that qemu_chr_fe_set_handlers() now
takes the focus when fe_open (qemu_chr_add_handlers() did take the
focus)

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 386f07d1fc02fb4316039994b855c4feb9b091ce
      
https://github.com/qemu/qemu/commit/386f07d1fc02fb4316039994b855c4feb9b091ce
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M include/sysemu/char.h
    M qemu-char.c

  Log Message:
  -----------
  char: fold qemu_chr_set_handlers in qemu_chr_fe_set_handlers

qemu_chr_add_handlers*() have been removed in previous change, so the
common qemu_chr_set_handlers() is no longer needed.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 5d300164d00cf9d37a4481831d2c993255dfa0e8
      
https://github.com/qemu/qemu/commit/5d300164d00cf9d37a4481831d2c993255dfa0e8
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M net/vhost-user.c

  Log Message:
  -----------
  vhost-user: only initialize queue 0 CharBackend

All the queues share the same chardev. Initialize only the first queue
CharBackend, and pass it to other queues. This will allow to claim the
chardev only once in a later change.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c39860e6dc90f6ee2e82ee078f978c5d7f3df86a
      
https://github.com/qemu/qemu/commit/c39860e6dc90f6ee2e82ee078f978c5d7f3df86a
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M backends/rng-egd.c
    M gdbstub.c
    M hw/arm/pxa2xx.c
    M hw/char/mcf_uart.c
    M hw/char/serial.c
    M hw/char/sh_serial.c
    M hw/char/xen_console.c
    M hw/core/qdev-properties-system.c
    M hw/usb/ccid-card-passthru.c
    M hw/usb/redirect.c
    M include/sysemu/char.h
    M monitor.c
    M net/colo-compare.c
    M net/filter-mirror.c
    M net/slirp.c
    M net/vhost-user.c
    M qemu-char.c
    M tests/vhost-user-test.c
    M vl.c

  Log Message:
  -----------
  char: replace qemu_chr_claim/release with qemu_chr_fe_init/deinit

Now that all front end use qemu_chr_fe_init(), we can move chardev
claiming in init(), and add a function deinit() to release the chardev
and cleanup handlers.

The qemu_chr_fe_claim_no_fail() for property are gone, since the
property will raise an error instead. In other cases, where there is
already an error path, an error is raised instead. Finally, other cases
are handled by &error_abort in qemu_chr_fe_init().

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fa394ed625731c18f904578903718bf16617fe92
      
https://github.com/qemu/qemu/commit/fa394ed625731c18f904578903718bf16617fe92
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M hw/arm/pxa2xx.c
    M hw/arm/strongarm.c
    M hw/char/bcm2835_aux.c
    M hw/char/cadence_uart.c
    M hw/char/digic-uart.c
    M hw/char/escc.c
    M hw/char/etraxfs_ser.c
    M hw/char/imx_serial.c
    M hw/char/ipoctal232.c
    M hw/char/lm32_juart.c
    M hw/char/lm32_uart.c
    M hw/char/mcf_uart.c
    M hw/char/milkymist-uart.c
    M hw/char/pl011.c
    M hw/char/sclpconsole-lm.c
    M hw/char/sclpconsole.c
    M hw/char/stm32f2xx_usart.c
    M hw/char/virtio-console.c
    M hw/char/xen_console.c
    M hw/char/xilinx_uartlite.c
    M include/sysemu/char.h
    M qemu-char.c

  Log Message:
  -----------
  char: make some qemu_chr_fe skip if no driver

In most cases, front ends do not care about the side effect of
CharBackend, so we can simply skip the checks and call the qemu_chr_fe
functions even without associated CharDriver.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ea3af47d75335d9247dfa33554ddd935957f77cd
      
https://github.com/qemu/qemu/commit/ea3af47d75335d9247dfa33554ddd935957f77cd
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M tests/Makefile.include
    A tests/test-char.c

  Log Message:
  -----------
  tests: start chardev unit tests

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
      
https://github.com/qemu/qemu/commit/a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M hw/bt/hci-csr.c
    M include/sysemu/char.h
    M qemu-char.c
    M ui/console.c

  Log Message:
  -----------
  char: move front end handlers in CharBackend

Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
directly.

Also a mux CharDriver should go through mux->backends[focused], since
chr->be will stay NULL. Before that, it was possible to call
chr->handler by mistake with surprising results, for ex through
qemu_chr_be_can_write(), which would result in calling the last set
handler front end, not the one with focus.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 72ac876248ca2d33b3e1170b2f86fb68daaacdc8
      
https://github.com/qemu/qemu/commit/72ac876248ca2d33b3e1170b2f86fb68daaacdc8
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M backends/baum.c
    M backends/msmouse.c
    M backends/testdev.c
    M include/sysemu/char.h
    M qemu-char.c
    M spice-qemu-char.c

  Log Message:
  -----------
  char: rename chr_close/chr_free

The function is used to free the backend opaque pointer, let's name it
accordingly.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 39ab61c6d0757ed95badc9315857effdb64e4aa0
      
https://github.com/qemu/qemu/commit/39ab61c6d0757ed95badc9315857effdb64e4aa0
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M backends/rng-egd.c
    M gdbstub.c
    M hw/arm/pxa2xx.c
    M hw/arm/strongarm.c
    M hw/char/bcm2835_aux.c
    M hw/char/cadence_uart.c
    M hw/char/debugcon.c
    M hw/char/digic-uart.c
    M hw/char/escc.c
    M hw/char/etraxfs_ser.c
    M hw/char/exynos4210_uart.c
    M hw/char/grlib_apbuart.c
    M hw/char/imx_serial.c
    M hw/char/ipoctal232.c
    M hw/char/lm32_juart.c
    M hw/char/lm32_uart.c
    M hw/char/mcf_uart.c
    M hw/char/milkymist-uart.c
    M hw/char/pl011.c
    M hw/char/sclpconsole-lm.c
    M hw/char/sclpconsole.c
    M hw/char/serial.c
    M hw/char/sh_serial.c
    M hw/char/spapr_vty.c
    M hw/char/stm32f2xx_usart.c
    M hw/char/virtio-console.c
    M hw/char/xen_console.c
    M hw/char/xilinx_uartlite.c
    M hw/ipmi/ipmi_bmc_extern.c
    M hw/mips/mips_malta.c
    M hw/misc/ivshmem.c
    M hw/usb/ccid-card-passthru.c
    M hw/usb/dev-serial.c
    M hw/usb/redirect.c
    M include/sysemu/char.h
    M monitor.c
    M net/colo-compare.c
    M net/filter-mirror.c
    M net/slirp.c
    M net/vhost-user.c
    M qemu-char.c
    M qtest.c
    M tests/test-char.c
    M tests/vhost-user-test.c

  Log Message:
  -----------
  char: remove explicit_fe_open, use a set_handlers argument

No need to keep explicit_fe_open around if it affects only a
qemu_chr_fe_set_handlers(). Use an additional argument instead.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 830896afe3d0ba74f023faba88eac2b5ef91a11b
      
https://github.com/qemu/qemu/commit/830896afe3d0ba74f023faba88eac2b5ef91a11b
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M include/sysemu/char.h
    M qemu-char.c

  Log Message:
  -----------
  char: move fe_open in CharBackend

The fe_open state belongs to front end.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 8cd35662af605a253a629a1adff0cfe8d7045a87
      
https://github.com/qemu/qemu/commit/8cd35662af605a253a629a1adff0cfe8d7045a87
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M hw/usb/ccid-card-passthru.c
    M hw/usb/dev-serial.c
    M include/sysemu/char.h

  Log Message:
  -----------
  char: remove unused CHR_EVENT_FOCUS

Usage has long been removed, since commit f220174de8d9.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 8c260cb13c2d9a889b660e829c3f5769ae030ec4
      
https://github.com/qemu/qemu/commit/8c260cb13c2d9a889b660e829c3f5769ae030ec4
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M include/sysemu/char.h

  Log Message:
  -----------
  char: use an enum for CHR_EVENT

This may help to catch unhandled cases, and avoid having to maintain
numbering.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 58fa54947e6b8a26aaeb1b719eabfd0e1461a2b3
      
https://github.com/qemu/qemu/commit/58fa54947e6b8a26aaeb1b719eabfd0e1461a2b3
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M include/sysemu/char.h
    M qemu-char.c
    M spice-qemu-char.c

  Log Message:
  -----------
  char: remove unused qemu_chr_fe_event

I introduced this function in d61b0c9a2f7f, but it isn't
used. Furthermore, it was incomplete, as it would need to translate QEMU
chr events to Spice port events.

(presumably it was used in the follow-up NBD-spice series that was not
completed: http://lists.gnu.org/archive/html/qemu-devel/2013-11/msg02024.html)

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3aef23d7d8ba559c6e74e931702c63b4c5e23dcd
      
https://github.com/qemu/qemu/commit/3aef23d7d8ba559c6e74e931702c63b4c5e23dcd
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M hw/bt/hci-csr.c
    M include/sysemu/char.h
    M qemu-char.c

  Log Message:
  -----------
  char: replace avail_connections

No need to count the users of a CharDriverState, it can rely on the fact
of whether there is a CharBackend associated or if there is enough space
in the muxer.

Simplify and fold chr_mux_new_fe() in qemu_chr_fe_init() since there is
a single user now. Also switch from fprintf to raising error instead.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ebf4c54d4b24badc88a9f3e23f1540003e1f7cd7
      
https://github.com/qemu/qemu/commit/ebf4c54d4b24badc88a9f3e23f1540003e1f7cd7
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  char: use common error path in qmp_chardev_add

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 82878dac6fcd16cb4fa47266bcd3dd03df436dae
      
https://github.com/qemu/qemu/commit/82878dac6fcd16cb4fa47266bcd3dd03df436dae
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M backends/baum.c
    M backends/msmouse.c
    M backends/testdev.c
    M include/sysemu/char.h
    M qemu-char.c
    M spice-qemu-char.c
    M ui/console.c
    M ui/gtk.c

  Log Message:
  -----------
  char: remove explicit_be_open from CharDriverState

It's only used in qmp_chardev_add(), so use a create() argument instead.

Also switched to typedef functions for CharDriverParse/CharDriverCreate.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 8360668e6988736bf621d8f3a3bae5d9f1a30bc5
      
https://github.com/qemu/qemu/commit/8360668e6988736bf621d8f3a3bae5d9f1a30bc5
  Author: Haozhong Zhang <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec.c: workaround regression caused by alignment change in d2f39ad

Commit d2f39ad "exec.c: Ensure right alignment also for file backed ram"
added an additional alignment requirement on the size of backend file
besides the previous page size. On x86, the alignment is changed from
4KB in QEMU 2.6 to 2MB in QEMU 2.7.

This change breaks certain usages in QEMU 2.7 on x86, e.g.
    -object memory-backend-file,id=mem1,mem-path=/tmp/,size=$SZ
    -device pc-dimm,id=dimm1,memdev=mem1
where $SZ is multiple of 4KB but not 2MB (e.g. 1023M). QEMU 2.7
reports the following error message and aborts:
qemu-system-x86_64: -device pc-dimm,memdev=mem1,id=nv1: backend memory size 
must be multiple of 0x200000

The same regression may also happen in other platforms as indicated by
Igor Mammedov. This change is however necessary for s390 according to
the commit message of d2f39ad, so we workaround the regression by taking
the change only on s390.

Signed-off-by: Haozhong Zhang <address@hidden>
Reported-by: "Xu, Anthony" <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a3ae21ec3fe036f536dc94cad735931777143103
      
https://github.com/qemu/qemu/commit/a3ae21ec3fe036f536dc94cad735931777143103
  Author: Peter Maydell <address@hidden>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M backends/baum.c
    M backends/msmouse.c
    M backends/rng-egd.c
    M backends/testdev.c
    M block/iscsi.c
    M block/rbd.c
    M bsd-user/main.c
    M docs/atomics.txt
    M exec.c
    M gdbstub.c
    M hmp.c
    M hw/alpha/dp264.c
    M hw/arm/fsl-imx25.c
    M hw/arm/fsl-imx31.c
    M hw/arm/fsl-imx6.c
    M hw/arm/omap2.c
    M hw/arm/pxa2xx.c
    M hw/arm/strongarm.c
    M hw/bt/hci-csr.c
    M hw/char/bcm2835_aux.c
    M hw/char/cadence_uart.c
    M hw/char/debugcon.c
    M hw/char/digic-uart.c
    M hw/char/escc.c
    M hw/char/etraxfs_ser.c
    M hw/char/exynos4210_uart.c
    M hw/char/grlib_apbuart.c
    M hw/char/imx_serial.c
    M hw/char/ipoctal232.c
    M hw/char/lm32_juart.c
    M hw/char/lm32_uart.c
    M hw/char/mcf_uart.c
    M hw/char/milkymist-uart.c
    M hw/char/omap_uart.c
    M hw/char/parallel.c
    M hw/char/pl011.c
    M hw/char/sclpconsole-lm.c
    M hw/char/sclpconsole.c
    M hw/char/serial-isa.c
    M hw/char/serial.c
    M hw/char/sh_serial.c
    M hw/char/spapr_vty.c
    M hw/char/stm32f2xx_usart.c
    M hw/char/virtio-console.c
    M hw/char/xen_console.c
    M hw/char/xilinx_uartlite.c
    M hw/core/qdev-properties-system.c
    M hw/i386/pc.c
    M hw/ipmi/ipmi_bmc_extern.c
    M hw/isa/pc87312.c
    M hw/mips/mips_fulong2e.c
    M hw/mips/mips_malta.c
    M hw/mips/mips_r4k.c
    M hw/misc/ivshmem.c
    M hw/sparc64/sun4u.c
    M hw/ssi/xilinx_spips.c
    M hw/usb/ccid-card-passthru.c
    M hw/usb/dev-serial.c
    M hw/usb/redirect.c
    M hw/virtio/vhost-user.c
    M hw/xtensa/xtfpga.c
    M include/exec/memory.h
    M include/hw/char/bcm2835_aux.h
    M include/hw/char/cadence_uart.h
    M include/hw/char/digic-uart.h
    M include/hw/char/imx_serial.h
    M include/hw/char/serial.h
    M include/hw/char/stm32f2xx_usart.h
    M include/hw/qdev-properties.h
    M include/qemu/atomic.h
    M include/sysemu/char.h
    M kvm-all.c
    M linux-user/main.c
    M memory.c
    M monitor.c
    M net/colo-compare.c
    M net/filter-mirror.c
    M net/slirp.c
    M net/vhost-user.c
    M qemu-char.c
    M qemu-img.c
    M qtest.c
    M spice-qemu-char.c
    M target-i386/translate.c
    M tcg/tcg.c
    M tests/Makefile.include
    M tests/qht-bench.c
    M tests/tcg/test-i386.c
    A tests/test-char.c
    M tests/vhost-user-test.c
    M ui/console.c
    M ui/gtk.c
    M util/qemu-thread-posix.c
    M util/qemu-thread-win32.c
    M util/rcu.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* KVM run_on_cpu fix (Alex)
* atomic usage fixes (Emilio, me)
* hugetlbfs alignment fix (Haozhong)
* CharBackend refactoring (Marc-André)
* test-i386 fixes (me)
* MemoryListener optimizations (me)
* Miscellaneous bugfixes (me)
* iSER support (Roy)
* --version formatting (Thomas)

# gpg: Signature made Mon 24 Oct 2016 14:46:19 BST
# gpg:                using RSA key 0xBFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>"
# gpg:                 aka "Paolo Bonzini <address@hidden>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream: (50 commits)
  exec.c: workaround regression caused by alignment change in d2f39ad
  char: remove explicit_be_open from CharDriverState
  char: use common error path in qmp_chardev_add
  char: replace avail_connections
  char: remove unused qemu_chr_fe_event
  char: use an enum for CHR_EVENT
  char: remove unused CHR_EVENT_FOCUS
  char: move fe_open in CharBackend
  char: remove explicit_fe_open, use a set_handlers argument
  char: rename chr_close/chr_free
  char: move front end handlers in CharBackend
  tests: start chardev unit tests
  char: make some qemu_chr_fe skip if no driver
  char: replace qemu_chr_claim/release with qemu_chr_fe_init/deinit
  vhost-user: only initialize queue 0 CharBackend
  char: fold qemu_chr_set_handlers in qemu_chr_fe_set_handlers
  char: use qemu_chr_fe* functions with CharBackend argument
  colo: claim in find_and_check_chardev
  char: rename some frontend functions
  char: remaining switch to CharBackend in frontend
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/4387f5671f96...a3ae21ec3fe0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]