qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 081446: qemu-ga: clean up TOOLS variable


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 081446: qemu-ga: clean up TOOLS variable
Date: Thu, 22 Aug 2019 06:16:21 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0814465ab8a1440a6587fd9b489d13ed63595166
      
https://github.com/qemu/qemu/commit/0814465ab8a1440a6587fd9b489d13ed63595166
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M Makefile
    M configure

  Log Message:
  -----------
  qemu-ga: clean up TOOLS variable

qemu-ga is included in the TOOLS variable without the .exe suffix, and this is
then worked around twice in the Makefile.  Do the right thing in configure
instead.

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


  Commit: c932ce3144d92b3032336d02b59e6a14be68098d
      
https://github.com/qemu/qemu/commit/c932ce3144d92b3032336d02b59e6a14be68098d
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M Makefile
    M configure

  Log Message:
  -----------
  configure: define CONFIG_TOOLS here

Defining CONFIG_TOOLS on the basis of $(TOOLS) has the disadvantage
of including it also if e.g. qemu-ga is requested.  The correct
information is available in configure, define it there.

This also has the benefit of not installing the manpages for block layer
tools if the only "tool" being built is the guest agent.

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


  Commit: 90629122d2ef536290882c71ca16bac3df842ca1
      
https://github.com/qemu/qemu/commit/90629122d2ef536290882c71ca16bac3df842ca1
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M util/module.c

  Log Message:
  -----------
  module: use g_hash_table_add()

The hashtable is used like a set, use the convenience
g_hash_table_add() function.

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


  Commit: 81d8ccb1bea4fb9eaaf4c8e30bd4021180a9a39f
      
https://github.com/qemu/qemu/commit/81d8ccb1bea4fb9eaaf4c8e30bd4021180a9a39f
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M include/qemu/module.h
    M util/module.c

  Log Message:
  -----------
  module: return success on module load

Let the caller know of load success.

Note that this also changes slightly the behaviour of the function to
try loading on subsequent calls if the previous ones failed.

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


  Commit: eb062cfa7331dd90837177b9a5a6becab305b1ca
      
https://github.com/qemu/qemu/commit/eb062cfa7331dd90837177b9a5a6becab305b1ca
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M qtest.c
    M tests/Makefile.include
    M tests/libqtest.c
    M tests/libqtest.h
    A tests/modules-test.c

  Log Message:
  -----------
  tests: add module loading test

This test will simply check that modules can be loaded, and no symbols
are missing.

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


  Commit: fbb04e760f4818a1ba9cfde0a2571a15cd4f49f7
      
https://github.com/qemu/qemu/commit/fbb04e760f4818a1ba9cfde0a2571a15cd4f49f7
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: remove AUTOCONF_HOST

This is a left-over from commit
c12b6d70e384c769ca372e15ffd19b3e9f563662 ("pixman: drop submodule")

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


  Commit: c5b35f03c3fcb8c8e0c6efc50f3a9e70dc028c00
      
https://github.com/qemu/qemu/commit/c5b35f03c3fcb8c8e0c6efc50f3a9e70dc028c00
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M scripts/minikconf.py

  Log Message:
  -----------
  minikconf: don't print CONFIG_FOO=n lines

qemu in general doesn't define CONFIG_FOO if it's false.  This also
helps with the dumb kconfig parser from meson, as source_set considers
any non-empty value as true.

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


  Commit: 9c1aa1c235c770d84462d482460a96e957e95b9c
      
https://github.com/qemu/qemu/commit/9c1aa1c235c770d84462d482460a96e957e95b9c
  Author: Peter Xu <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Refactor memory_region_clear_coalescing

Removing the update variable and quit earlier if the memory region has
no coalesced range.  This prepares for the next patch.

Fixes: 3ac7d43a6fbb5d4a3
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 23f1174aac4181f86bb7e13ca8bc2d4a0bdf1e5c
      
https://github.com/qemu/qemu/commit/23f1174aac4181f86bb7e13ca8bc2d4a0bdf1e5c
  Author: Peter Xu <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Split zones when do coalesced_io_del()

It is a workaround of current KVM's KVM_UNREGISTER_COALESCED_MMIO
interface.  The kernel interface only allows to unregister an mmio
device with exactly the zone size when registered, or any smaller zone
that is included in the device mmio zone.  It does not support the
userspace to specify a very large zone to remove all the small mmio
devices within the zone covered.

Logically speaking it would be nicer to fix this from KVM side, though
in all cases we still need to coop with old kernels so let's do this.

Fixes: 3ac7d43a6fbb5d4a3
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 264ef5a5c52c249ff51a16d141fc03df71714a13
      
https://github.com/qemu/qemu/commit/264ef5a5c52c249ff51a16d141fc03df71714a13
  Author: Peter Xu <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Remove has_coalesced_range counter

The has_coalesced_range could potentially be problematic in that it
only works for additions of coalesced mmio ranges but not deletions.
The reason is that has_coalesced_range information can be lost when
the FlatView updates the topology again when the updated region is not
covering the coalesced regions. When that happens, due to
flatrange_equal() is not checking against has_coalesced_range, the new
FlatRange will be seen as the same one as the old and the new
instance (whose has_coalesced_range will be zero) will replace the old
instance (whose has_coalesced_range _could_ be non-zero).

The counter was originally used to make sure every FlatRange will only
notify once for coalesced_io_{add|del} memory listeners, because each
FlatRange can be used by multiple address spaces, so logically
speaking it could be called multiple times.  However we should not
limit that, because memory listeners should will only be registered
with specific address space rather than multiple address spaces.

So let's fix this up by simply removing the whole has_coalesced_range.

Fixes: 3ac7d43a6fbb5d4a3
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b960fc1796fb078c21121abf01499603b66b3f57
      
https://github.com/qemu/qemu/commit/b960fc1796fb078c21121abf01499603b66b3f57
  Author: Peter Xu <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Fix up memory_region_{add|del}_coalescing

The old memory_region_{add|clear}_coalescing() has some defects
because they both changed mr->coalesced before updating the regions
using memory_region_update_coalesced_range_as().  Then when the
regions were updated in memory_region_update_coalesced_range_as() the
mr->coalesced will always be either one more or one less.  So:

- For memory_region_add_coalescing: it'll always trying to remove the
  newly added coalesced region while it shouldn't, and,

- For memory_region_clear_coalescing: when it calls the update there
  will be no coalesced ranges on mr->coalesced because they were all
  removed before hand so the update will probably do nothing for real.

Let's fix this.  Now we've got flat_range_coalesced_io_notify() to
notify a single CoalescedMemoryRange instance change, so use it in the
existing memory_region_update_coalesced_range() logic by only notify
either an addition or deletion.  Then we hammer both the
memory_region_{add|clear}_coalescing() to use it.

Fixes: 3ac7d43a6fbb5d4a3
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b65cb867cc13b581baeea7648a9f45899cb7a714
      
https://github.com/qemu/qemu/commit/b65cb867cc13b581baeea7648a9f45899cb7a714
  Author: Alberto Garcia <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M io/task.c

  Log Message:
  -----------
  main-loop: Fix GSource leak in qio_task_thread_worker()

After g_source_attach() the GMainContext holds a reference to the
GSource, so the caller does not need to keep it.

qio_task_thread_worker() is not releasing its reference so the GSource
is being leaked since a17536c594bfed94d05667b419f747b692f5fc7f.

Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 78d01598aea85841f0e4f8baf62c42b76230a81c
      
https://github.com/qemu/qemu/commit/78d01598aea85841f0e4f8baf62c42b76230a81c
  Author: Alberto Garcia <address@hidden>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M chardev/char-socket.c

  Log Message:
  -----------
  char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout()

There's a race condition in which the tcp_chr_read() ioc handler can
close a connection that is being written to from another thread.

Running iotest 136 in a loop triggers this problem and crashes QEMU.

 (gdb) bt
 #0  0x00005558b842902d in object_get_class (obj=0x0) at qom/object.c:860
 #1  0x00005558b84f92db in qio_channel_writev_full (ioc=0x0, 
iov=0x7ffc355decf0, niov=1, fds=0x0, nfds=0, errp=0x0) at io/channel.c:76
 #2  0x00005558b84e0e9e in io_channel_send_full (ioc=0x0, buf=0x5558baf5beb0, 
len=138, fds=0x0, nfds=0) at chardev/char-io.c:123
 #3  0x00005558b84e4a69 in tcp_chr_write (chr=0x5558ba460380, 
buf=0x5558baf5beb0 "...", len=138) at chardev/char-socket.c:135
 #4  0x00005558b84dca55 in qemu_chr_write_buffer (s=0x5558ba460380, 
buf=0x5558baf5beb0 "...", len=138, offset=0x7ffc355dedd0, write_all=false) at 
chardev/char.c:112
 #5  0x00005558b84dcbc2 in qemu_chr_write (s=0x5558ba460380, buf=0x5558baf5beb0 
"...", len=138, write_all=false) at chardev/char.c:147
 #6  0x00005558b84dfb26 in qemu_chr_fe_write (be=0x5558ba476610, 
buf=0x5558baf5beb0 "...", len=138) at chardev/char-fe.c:42
 #7  0x00005558b8088c86 in monitor_flush_locked (mon=0x5558ba476610) at 
monitor.c:406
 #8  0x00005558b8088e8c in monitor_puts (mon=0x5558ba476610, str=0x5558ba921e49 
"") at monitor.c:449
 #9  0x00005558b8089178 in qmp_send_response (mon=0x5558ba476610, 
rsp=0x5558bb161600) at monitor.c:498
 #10 0x00005558b808920c in monitor_qapi_event_emit (event=QAPI_EVENT_SHUTDOWN, 
qdict=0x5558bb161600) at monitor.c:526
 #11 0x00005558b8089307 in monitor_qapi_event_queue_no_reenter 
(event=QAPI_EVENT_SHUTDOWN, qdict=0x5558bb161600) at monitor.c:551
 #12 0x00005558b80896c0 in qapi_event_emit (event=QAPI_EVENT_SHUTDOWN, 
qdict=0x5558bb161600) at monitor.c:626
 #13 0x00005558b855f23b in qapi_event_send_shutdown (guest=false, 
reason=SHUTDOWN_CAUSE_HOST_QMP_QUIT) at qapi/qapi-events-run-state.c:43
 #14 0x00005558b81911ef in qemu_system_shutdown 
(cause=SHUTDOWN_CAUSE_HOST_QMP_QUIT) at vl.c:1837
 #15 0x00005558b8191308 in main_loop_should_exit () at vl.c:1885
 #16 0x00005558b819140d in main_loop () at vl.c:1924
 #17 0x00005558b8198c84 in main (argc=18, argv=0x7ffc355df3f8, 
envp=0x7ffc355df490) at vl.c:4665

This patch adds a lock to protect tcp_chr_disconnect() and
socket_reconnect_timeout()

Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Andrey Shinkevich <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 810923480863c43ecb22ae124156298385439339
      
https://github.com/qemu/qemu/commit/810923480863c43ecb22ae124156298385439339
  Author: Peter Maydell <address@hidden>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M Makefile
    M chardev/char-socket.c
    M configure
    M include/qemu/module.h
    M io/task.c
    M memory.c
    M qtest.c
    M scripts/minikconf.py
    M tests/Makefile.include
    M tests/libqtest.c
    M tests/libqtest.h
    A tests/modules-test.c
    M util/module.c

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

* Longstanding chardev race condition fix (Berto)
* Cleanups and tests from the Meson POC (Marc-André, myself)
* Coalesced range cleanup (Peter)

# gpg: Signature made Wed 21 Aug 2019 18:27:43 BST
# gpg:                using RSA key BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>" [full]
# gpg:                 aka "Paolo Bonzini <address@hidden>" [full]
# 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:
  char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout()
  main-loop: Fix GSource leak in qio_task_thread_worker()
  memory: Fix up memory_region_{add|del}_coalescing
  memory: Remove has_coalesced_range counter
  memory: Split zones when do coalesced_io_del()
  memory: Refactor memory_region_clear_coalescing
  minikconf: don't print CONFIG_FOO=n lines
  configure: remove AUTOCONF_HOST
  tests: add module loading test
  module: return success on module load
  module: use g_hash_table_add()
  configure: define CONFIG_TOOLS here
  qemu-ga: clean up TOOLS variable

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


Compare: https://github.com/qemu/qemu/compare/f3b8f18ebf34...810923480863



reply via email to

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