qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] e8f5fe: memory_region: Fix name comments


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] e8f5fe: memory_region: Fix name comments
Date: Tue, 14 Mar 2017 12:30:13 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e8f5fe2de125a0bfbefbaa6a69af81f4817cb7a0
      
https://github.com/qemu/qemu/commit/e8f5fe2de125a0bfbefbaa6a69af81f4817cb7a0
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M include/exec/memory.h

  Log Message:
  -----------
  memory_region: Fix name comments

The 'name' parameter to memory_region_init_* had been marked as debug
only, however vmstate_region_ram uses it as a parameter to
qemu_ram_set_idstr to set RAMBlock names and these form part of the
migration stream.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c0d9f7d0bcedeaa65d5c984fbe0d351e1402eab5
      
https://github.com/qemu/qemu/commit/c0d9f7d0bcedeaa65d5c984fbe0d351e1402eab5
  Author: Thomas Huth <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M docs/bootindex.txt
    M qemu-options.hx

  Log Message:
  -----------
  docs: Add a note about mixing bootindex with "-boot order"

Occasionally the users try to mix the bootindex properties with the
"-boot order" parameter - and this likely does not give the expected
results. So let's add a proper statement that these two concepts
should not be used together.

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


  Commit: 1e356fc14beaa3ece6c0e961bd479af58be3198b
      
https://github.com/qemu/qemu/commit/1e356fc14beaa3ece6c0e961bd479af58be3198b
  Author: Jitendra Kolhe <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M backends/hostmem.c
    M exec.c
    M include/qemu/osdep.h
    M util/oslib-posix.c
    M util/oslib-win32.c

  Log Message:
  -----------
  mem-prealloc: reduce large guest start-up and migration time.

Using "-mem-prealloc" option for a large guest leads to higher guest
start-up and migration time. This is because with "-mem-prealloc" option
qemu tries to map every guest page (create address translations), and
make sure the pages are available during runtime. virsh/libvirt by
default, seems to use "-mem-prealloc" option in case the guest is
configured to use huge pages. The patch tries to map all guest pages
simultaneously by spawning multiple threads. Currently limiting the
change to QEMU library functions on POSIX compliant host only, as we are
not sure if the problem exists on win32. Below are some stats with
"-mem-prealloc" option for guest configured to use huge pages.

------------------------------------------------------------------------
Idle Guest      | Start-up time | Migration time
------------------------------------------------------------------------
Guest stats with 2M HugePage usage - single threaded (existing code)
------------------------------------------------------------------------
64 Core - 4TB   | 54m11.796s    | 75m43.843s
64 Core - 1TB   | 8m56.576s     | 14m29.049s
64 Core - 256GB | 2m11.245s     | 3m26.598s
------------------------------------------------------------------------
Guest stats with 2M HugePage usage - map guest pages using 8 threads
------------------------------------------------------------------------
64 Core - 4TB   | 5m1.027s      | 34m10.565s
64 Core - 1TB   | 1m10.366s     | 8m28.188s
64 Core - 256GB | 0m19.040s     | 2m10.148s
-----------------------------------------------------------------------
Guest stats with 2M HugePage usage - map guest pages using 16 threads
-----------------------------------------------------------------------
64 Core - 4TB   | 1m58.970s     | 31m43.400s
64 Core - 1TB   | 0m39.885s     | 7m55.289s
64 Core - 256GB | 0m11.960s     | 2m0.135s
-----------------------------------------------------------------------

Changed in v2:
 - modify number of memset threads spawned to min(smp_cpus, 16).
 - removed 64GB memory restriction for spawning memset threads.

Changed in v3:
 - limit number of threads spawned based on
   min(sysconf(_SC_NPROCESSORS_ONLN), 16, smp_cpus)
 - implement memset thread specific siglongjmp in SIGBUS signal_handler.

Changed in v4
 - remove sigsetjmp/siglongjmp and SIGBUS unblock/block for main thread
   as main thread no longer touches any pages.
 - simplify code my returning memset_thread_failed status from
   touch_all_pages.

Signed-off-by: Jitendra Kolhe <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 79ca7a1b898eb97c4192f3c78027a0f20485e7b4
      
https://github.com/qemu/qemu/commit/79ca7a1b898eb97c4192f3c78027a0f20485e7b4
  Author: Christian Borntraeger <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: add cpu_synchronize_state to cpu_memory_rw_debug

I sometimes got "Cannot access memory" when using the x command
on the monitor. Turns out that the cpu env did contain stale data
(e.g. wrong control register content for page table origin).
We must synchronize the state of the CPU before walking the page
tables. A similar issues happens for a remote gdb, so lets
do the cpu_synchronize_state in cpu_memory_rw_debug.

Signed-off-by: Christian Borntraeger <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c70b11d160c6bca8e994d40639fcb41558c9fa0a
      
https://github.com/qemu/qemu/commit/c70b11d160c6bca8e994d40639fcb41558c9fa0a
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M target/i386/kvm.c

  Log Message:
  -----------
  kvm: Print MSR information if KVM_{GET,SET}_MSRS failed

When a KVM_{GET,SET}_MSRS ioctl() fails, it is difficult to find
out which MSR caused the problem. Print an error message for
debugging, before we trigger the (ret == cpu->kvm_msr_buf->nmsrs)
assert.

Suggested-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ca2edcd35cd1a8589dfa0533c19ff232fec7b4b5
      
https://github.com/qemu/qemu/commit/ca2edcd35cd1a8589dfa0533c19ff232fec7b4b5
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M hw/i386/kvm/clock.c

  Log Message:
  -----------
  kvmclock: Don't crash QEMU if KVM is disabled

Most machines don't allow sysbus devices like "kvmclock" to be
created from the command-line, but some of them do (the ones with
has_dynamic_sysbus=true). In those cases, it's possible to
manually create a kvmclock device without KVM being enabled,
making QEMU crash:

  $ qemu-system-x86_64 -machine q35,accel=tcg -device kvmclock
  Segmentation fault (core dumped)

This changes kvmclock's realize method to return an error if KVM
is disabled, to ensure it won't crash QEMU.

Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9b4b157ef6edc5cf060aef3402bdece7f581b5a2
      
https://github.com/qemu/qemu/commit/9b4b157ef6edc5cf060aef3402bdece7f581b5a2
  Author: Marc-André Lureau <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M scripts/dump-guest-memory.py

  Log Message:
  -----------
  scripts/dump-guest-memory.py: fix int128_get64 on recent gcc

The Int128 is no longer a struct, reaching a python exception:
Python Exception <class 'gdb.error'> Attempt to extract a component of a value 
that is not a (null).:

Replace struct access with a cast to uint64[] instead.

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1427466

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


  Commit: c12d66aac1aaacbc8495dd11712b06cc64259d92
      
https://github.com/qemu/qemu/commit/c12d66aac1aaacbc8495dd11712b06cc64259d92
  Author: Lin Ma <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: add the missing help output for optional features

Signed-off-by: Lin Ma <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: bd5d983fa87e5a0230a2bc6a54972f53e39ad978
      
https://github.com/qemu/qemu/commit/bd5d983fa87e5a0230a2bc6a54972f53e39ad978
  Author: Suramya Shah <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M util/path.c

  Log Message:
  -----------
  util: Removed unneeded header from path.c

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


  Commit: b01a2d07c963e96dbd151f0db1eaa06f273acf34
      
https://github.com/qemu/qemu/commit/b01a2d07c963e96dbd151f0db1eaa06f273acf34
  Author: Li Qiang <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M hw/scsi/mptsas.c

  Log Message:
  -----------
  scsi: mptsas: fix the wrong reading size in fetch request

When fetching request, it should read sizeof(*hdr), not the
pointer hdr.

Signed-off-by: Li Qiang <address@hidden>
Message-Id: <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c0d24e7f70816c8af51ebe9dc74aa276a81858dd
      
https://github.com/qemu/qemu/commit/c0d24e7f70816c8af51ebe9dc74aa276a81858dd
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M target/nios2/op_helper.c

  Log Message:
  -----------
  target/nios2: take BQL around interrupt check

The interrupt controller does not have its own locking.

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


  Commit: 33bef0b9948b85000221d32c758d9d4a9276aaaf
      
https://github.com/qemu/qemu/commit/33bef0b9948b85000221d32c758d9d4a9276aaaf
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M util/qemu-timer.c

  Log Message:
  -----------
  qemu-timer: fix off-by-one

If the first timer is exactly at the current value of the clock, the
deadline is met and the timer should fire.  This fixes itself on the next
iteration of the loop without icount; with icount, however, execution
of instructions will stop exactly at the deadline and won't proceed.

Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Edgar E. Iglesias <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d2528bdc19988db73056be75dd9bf52eeee620f5
      
https://github.com/qemu/qemu/commit/d2528bdc19988db73056be75dd9bf52eeee620f5
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M cpu-exec.c
    M hw/core/ptimer.c
    M hw/ppc/pnv.c
    M include/qemu/timer.h
    M include/sysemu/cpus.h
    M kvm-all.c
    M monitor.c
    M replay/replay.c
    M target/alpha/translate.c
    M translate-all.c
    M util/main-loop.c
    M util/qemu-timer.c

  Log Message:
  -----------
  qemu-timer: do not include sysemu/cpus.h from util/qemu-timer.h

This dependency is the wrong way, and we will need util/qemu-timer.h from
sysemu/cpus.h in the next patch.

Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Edgar E. Iglesias <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3f53bc61a404cd1d13fdba8441282a33a755f8c6
      
https://github.com/qemu/qemu/commit/3f53bc61a404cd1d13fdba8441282a33a755f8c6
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M cpus.c
    M include/qemu/timer.h
    M include/sysemu/cpus.h
    M stubs/cpu-get-icount.c
    M tests/test-aio-multithread.c
    M tests/test-aio.c
    M util/async.c
    M util/main-loop.c
    M util/qemu-timer.c

  Log Message:
  -----------
  cpus: define QEMUTimerListNotifyCB for QEMU system emulation

There is no change for now, because the callback just invokes
qemu_notify_event.

Reviewed-by: Edgar E. Iglesias <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e330c118f2a5a5365409b123cd0dd2c7d575bf05
      
https://github.com/qemu/qemu/commit/e330c118f2a5a5365409b123cd0dd2c7d575bf05
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  main-loop: remove now unnecessary optimization

This optimization is not necessary anymore, because the vCPU now drops
the I/O thread lock even with TCG.  Drop it to simplify the code and
avoid the "I/O thread spun for 1000 iterations" warning.

Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Edgar E. Iglesias <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6b8f0187a4d7c263e356302f8d308655372a4b5b
      
https://github.com/qemu/qemu/commit/6b8f0187a4d7c263e356302f8d308655372a4b5b
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M cpus.c
    M include/qemu/timer.h
    M util/qemu-timer.c

  Log Message:
  -----------
  icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread

icount has become much slower after tcg_cpu_exec has stopped
using the BQL.  There is also a latent bug that is masked by
the slowness.

The slowness happens because every occurrence of a QEMU_CLOCK_VIRTUAL
timer now has to wake up the I/O thread and wait for it.  The rendez-vous
is mediated by the BQL QemuMutex:

- handle_icount_deadline wakes up the I/O thread with BQL taken
- the I/O thread wakes up and waits on the BQL
- the VCPU thread releases the BQL a little later
- the I/O thread raises an interrupt, which calls qemu_cpu_kick
- the VCPU thread notices the interrupt, takes the BQL to
  process it and waits on it

All this back and forth is extremely expensive, causing a 6 to 8-fold
slowdown when icount is turned on.

One may think that the issue is that the VCPU thread is too dependent
on the BQL, but then the latent bug comes in.  I first tried removing
the BQL completely from the x86 cpu_exec, only to see everything break.
The only way to fix it (and make everything slow again) was to add a dummy
BQL lock/unlock pair.

This is because in -icount mode you really have to process the events
before the CPU restarts executing the next instruction.  Therefore, this
series moves the processing of QEMU_CLOCK_VIRTUAL timers straight in
the vCPU thread when running in icount mode.

The required changes include:

- make the timer notification callback wake up TCG's single vCPU thread
  when run from another thread.  By using async_run_on_cpu, the callback
  can override all_cpu_threads_idle() when the CPU is halted.

- move handle_icount_deadline after qemu_tcg_wait_io_event, so that
  the timer notification callback is invoked after the dummy work item
  wakes up the vCPU thread

- make handle_icount_deadline run the timers instead of just waking the
  I/O thread.

- stop processing the timers in the main loop

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


  Commit: b31f84126215e3fd4b8acbc3083ae30d407329e8
      
https://github.com/qemu/qemu/commit/b31f84126215e3fd4b8acbc3083ae30d407329e8
  Author: Peter Xu <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: info mtree check mr range overflow

The address of memory regions might overflow when something wrong
happened, like reported in:

https://lists.gnu.org/archive/html/qemu-devel/2017-03/msg02043.html

For easier debugging, let's try to detect it.

Reported-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2563c9c6b8670400c48e562034b321a7cf3d9a85
      
https://github.com/qemu/qemu/commit/2563c9c6b8670400c48e562034b321a7cf3d9a85
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M nbd/client.c

  Log Message:
  -----------
  nbd/client: fix drop_sync [CVE-2017-2630]

Comparison symbol is misused. It may lead to memory corruption.
Introduced in commit 7d3123e.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
[eblake: add CVE details, update conditional]
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 64c358a33ad984c9c4348b64f9507676f6c9db26
      
https://github.com/qemu/qemu/commit/64c358a33ad984c9c4348b64f9507676f6c9db26
  Author: Peter Maydell <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M backends/hostmem.c
    M configure
    M cpu-exec.c
    M cpus.c
    M docs/bootindex.txt
    M exec.c
    M hw/core/ptimer.c
    M hw/i386/kvm/clock.c
    M hw/ppc/pnv.c
    M hw/scsi/mptsas.c
    M include/exec/memory.h
    M include/qemu/osdep.h
    M include/qemu/timer.h
    M include/sysemu/cpus.h
    M kvm-all.c
    M memory.c
    M monitor.c
    M nbd/client.c
    M qemu-options.hx
    M replay/replay.c
    M scripts/dump-guest-memory.py
    M stubs/cpu-get-icount.c
    M target/alpha/translate.c
    M target/i386/kvm.c
    M target/nios2/op_helper.c
    M tests/test-aio-multithread.c
    M tests/test-aio.c
    M translate-all.c
    M util/async.c
    M util/main-loop.c
    M util/oslib-posix.c
    M util/oslib-win32.c
    M util/path.c
    M util/qemu-timer.c
    M vl.c

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

* "x" monitor command fix for KVM (Christian)
* MemoryRegion name documentation (David)
* mem-prealloc optimization (Jitendra)
* -icount/MTTCG fixes (me)
* "info mtree" niceness (Peter)
* NBD drop_sync buffer overflow (Vladimir/Eric)
* small cleanups and bugfixes (Li, Lin, Suramya, Thomas)
* fix for "-device kvmclock" w/TCG (Eduardo)
* debug output before crashing on KVM_{GET,SET}_MSRS (Eduardo)

# gpg: Signature made Tue 14 Mar 2017 13:42:05 GMT
# 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:
  nbd/client: fix drop_sync [CVE-2017-2630]
  memory: info mtree check mr range overflow
  icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread
  main-loop: remove now unnecessary optimization
  cpus: define QEMUTimerListNotifyCB for QEMU system emulation
  qemu-timer: do not include sysemu/cpus.h from util/qemu-timer.h
  qemu-timer: fix off-by-one
  target/nios2: take BQL around interrupt check
  scsi: mptsas: fix the wrong reading size in fetch request
  util: Removed unneeded header from path.c
  configure: add the missing help output for optional features
  scripts/dump-guest-memory.py: fix int128_get64 on recent gcc
  kvmclock: Don't crash QEMU if KVM is disabled
  kvm: Print MSR information if KVM_{GET,SET}_MSRS failed
  exec: add cpu_synchronize_state to cpu_memory_rw_debug
  mem-prealloc: reduce large guest start-up and migration time.
  docs: Add a note about mixing bootindex with "-boot order"
  memory_region: Fix name comments

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


  Commit: d84f714eafedd8bb9d4aaec8b76417bef8e3535e
      
https://github.com/qemu/qemu/commit/d84f714eafedd8bb9d4aaec8b76417bef8e3535e
  Author: Peter Maydell <address@hidden>
  Date:   2017-03-14 (Tue, 14 Mar 2017)

  Changed paths:
    M VERSION

  Log Message:
  -----------
  Update version for v2.9.0-rc0 release

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


Compare: https://github.com/qemu/qemu/compare/5e2fb7c598c6...d84f714eafed

reply via email to

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