qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] a99761: exec: Fix MAP_RAM for cached access


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a99761: exec: Fix MAP_RAM for cached access
Date: Fri, 29 Jun 2018 07:03:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a99761d3c85679da380c0f597468acd3dc1b53b3
      
https://github.com/qemu/qemu/commit/a99761d3c85679da380c0f597468acd3dc1b53b3
  Author: Eric Auger <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M exec.c
    M memory_ldst.inc.c

  Log Message:
  -----------
  exec: Fix MAP_RAM for cached access

When an IOMMUMemoryRegion is in front of a virtio device,
address_space_cache_init does not set cache->ptr as the memory
region is not RAM. However when the device performs an access,
we end up in glue() which performs the translation and then uses
MAP_RAM. This latter uses the unset ptr and returns a wrong value
which leads to a SIGSEV in address_space_lduw_internal_cached_slow,
for instance.

In slow path cache->ptr is NULL and MAP_RAM must redirect to
qemu_map_ram_ptr((mr)->ram_block, ofs).

As MAP_RAM, IS_DIRECT and INVALIDATE are the same in _cached_slow
and non cached mode, let's remove those macros.

This fixes the use cases featuring vIOMMU (Intel and ARM SMMU)
which lead to a SIGSEV.

Fixes: 48564041a73a (exec: reintroduce MemoryRegion caching)
Signed-off-by: Eric Auger <address@hidden>

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


  Commit: 8bca9a03ec60d63b2ee6a959fe85dda4206811e0
      
https://github.com/qemu/qemu/commit/8bca9a03ec60d63b2ee6a959fe85dda4206811e0
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M accel/tcg/translate-all.c
    M accel/tcg/translate-all.h
    M exec.c
    M include/exec/exec-all.h
    M include/exec/ram_addr.h
    M linux-user/mmap.c
    M target/xtensa/op_helper.c
    M trace/control-target.c

  Log Message:
  -----------
  move public invalidate APIs out of translate-all.{c,h}, clean up

Place them in exec.c, exec-all.h and ram_addr.h.  This removes
knowledge of translate-all.h (which is an internal header) from
several files outside accel/tcg and removes knowledge of
AddressSpace from translate-all.c (as it only operates on ram_addr_t).

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


  Commit: 1507bd136fd9a516226fce8738d361a64f45b699
      
https://github.com/qemu/qemu/commit/1507bd136fd9a516226fce8738d361a64f45b699
  Author: Daniel P. Berrangé <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M chardev/char-stdio.c

  Log Message:
  -----------
  chardev: don't splatter terminal settings on exit if not previously set

The stdio chardev finalize method calls term_exit() to restore the
original terminal settings that were saved in the "oldtty" global. If
the qemu_chr_open_stdio() method exited with an error, we might not have
any original terminal settings saved in "oldtty" yet.

eg

  $ qemu-system-x86_64 -monitor stdio -daemonize
  qemu-system-x86_64: -monitor stdio: cannot use stdio with -daemonize

will cause QEMU to splatter the terminal settings with an all-zeros
"struct termios", with predictably unpleasant results. Fortunately the
existing "stdio_in_use" flag is suitable witness for whether "oldtty"
contains settings that need restoring.

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


  Commit: d29a8a1b0758a905b148929dd14b79bfeb297a80
      
https://github.com/qemu/qemu/commit/d29a8a1b0758a905b148929dd14b79bfeb297a80
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M include/qemu/main-loop.h

  Log Message:
  -----------
  main-loop: document IOCanReadHandler

Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>


  Commit: 019288bf137183bf3407c9824655b753bfafc99f
      
https://github.com/qemu/qemu/commit/019288bf137183bf3407c9824655b753bfafc99f
  Author: Sergio Lopez <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/char/serial.c

  Log Message:
  -----------
  hw/char/serial: Only retry if qemu_chr_fe_write returns 0

Only retry on serial_xmit if qemu_chr_fe_write returns 0, as this is the
only recoverable error.

Retrying with any other scenario, in addition to being a waste of CPU
cycles, can compromise the Guest stability if by the vCPU issuing the
write and the main loop thread are, by chance or explicit pinning,
running on the same pCPU.

Previous discussion:

https://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg06998.html

Signed-off-by: Sergio Lopez <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 13672386a93fef64cfd33bd72fbf3d80f2c00e94
      
https://github.com/qemu/qemu/commit/13672386a93fef64cfd33bd72fbf3d80f2c00e94
  Author: Richard Henderson <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M target/i386/translate.c

  Log Message:
  -----------
  target/i386: Fix BLSR and BLSI

The implementation of these two instructions was swapped.
At the same time, unify the setup of eflags for the insn group.

Reported-by: Ricardo Ribalda Delgado <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 93d1499c8119989e3eb9a6936c5a18aaaaca6330
      
https://github.com/qemu/qemu/commit/93d1499c8119989e3eb9a6936c5a18aaaaca6330
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    A target/i386/whp-dispatch.h

  Log Message:
  -----------
  whpx: commit missing file

Not included by mistake in commit 327fccb288976f95808efa968082fc9d4a9ced84.

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


  Commit: 4d8938a05db15dea2c86c4ab9c5f872f160d2188
      
https://github.com/qemu/qemu/commit/4d8938a05db15dea2c86c4ab9c5f872f160d2188
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/mem/memory-device.c

  Log Message:
  -----------
  memory-device: turn alignment assert into check

The start of the address space indicates which maximum alignment is
supported by our machine (e.g. ppc, x86 1GB). This is helpful to
catch fragmenting guest physical memory in strange fashions.

Right now we can crash QEMU by e.g. (there might be easier examples)

qemu-system-x86_64 -m 256M,maxmem=20G,slots=2 \
 -object memory-backend-file,id=mem0,size=8192M,mem-path=/dev/zero,align=8192M \
 -device pc-dimm,id=dimm1,memdev=mem0

Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 61362b71c105ccb151ca16897a7d56534423f390
      
https://github.com/qemu/qemu/commit/61362b71c105ccb151ca16897a7d56534423f390
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: check that alignment is a power of two

Right now we can crash QEMU using e.g.

qemu-system-x86_64 -m 256M,maxmem=20G,slots=2 \
 -object memory-backend-file,id=mem0,size=12288,mem-path=/dev/zero,align=12288 \
 -device pc-dimm,id=dimm1,memdev=mem0

qemu-system-x86_64: util/mmap-alloc.c:115:
 qemu_ram_mmap: Assertion `is_power_of_2(align)' failed

Fix this by adding a proper check.

Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6c090d4a755bb6245461450869130a517e18a3dc
      
https://github.com/qemu/qemu/commit/6c090d4a755bb6245461450869130a517e18a3dc
  Author: Shannon Zhao <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M accel/kvm/kvm-all.c
    M include/sysemu/kvm_int.h

  Log Message:
  -----------
  kvm: Delete the slot if and only if the KVM_MEM_READONLY flag is changed

According to KVM commit 75d61fbc, it needs to delete the slot before
changing the KVM_MEM_READONLY flag. But QEMU commit 235e8982 only check
whether KVM_MEM_READONLY flag is set instead of changing. It doesn't
need to delete the slot if the KVM_MEM_READONLY flag is not changed.

This fixes a issue that migrating a VM at the OVMF startup stage and
VM is executing the codes in rom. Between the deleting and adding the
slot in kvm_set_user_memory_region, there is a chance that guest access
rom and trap to KVM, then KVM can't find the corresponding memslot.
While KVM (on ARM) injects an abort to guest due to the broken hva, then
guest will get stuck.

Signed-off-by: Shannon Zhao <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 70c31264afd1f50c3b93a9007d97215ed5485e32
      
https://github.com/qemu/qemu/commit/70c31264afd1f50c3b93a9007d97215ed5485e32
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M tests/atomic_add-bench.c

  Log Message:
  -----------
  tests/atomic_add-bench: add -m option to use mutexes

This allows us to use atomic-add-bench as a microbenchmark
for evaluating qemu_mutex_lock's performance.

Signed-off-by: Emilio G. Cota <address@hidden>
[cherry picked from https://github.com/cota/qemu/commit/f04f34df]
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f1aff7aa8e6f238909bd0b0e7a1fe235802843f2
      
https://github.com/qemu/qemu/commit/f1aff7aa8e6f238909bd0b0e7a1fe235802843f2
  Author: Peter Xu <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

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

  Log Message:
  -----------
  qemu-thread: introduce qemu-thread-common.h

Introduce some hooks for the shared part of qemu thread between POSIX
and Windows implementations.  Note that in qemu_mutex_unlock_impl() we
moved the call before unlock operation which should make more sense.
And we don't need qemu_mutex_post_unlock() hook.

Put all these shared hooks into the header files.  It should be internal
to qemu-thread but not for qemu-thread users, hence put into util/
directory.

Reviewed-by: Emilio G. Cota <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ba59fb778ec68b072196cff9af11c7612a6e52f2
      
https://github.com/qemu/qemu/commit/ba59fb778ec68b072196cff9af11c7612a6e52f2
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M configure
    M include/qemu/thread-posix.h
    M include/qemu/thread-win32.h
    M util/qemu-thread-common.h

  Log Message:
  -----------
  QemuMutex: support --enable-debug-mutex

We have had some tracing tools for mutex but it's not easy to use them
for e.g. dead locks.  Let's provide "--enable-debug-mutex" parameter
when configure to allow QemuMutex to store the last owner that took
specific lock.  It will be easy to use this tool to debug deadlocks
since we can directly know who took the lock then as long as we can have
a debugger attached to the process.

Reviewed-by: Emilio G. Cota <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 1fcc6d42e78c5fbccef63f47a380361ee81d344a
      
https://github.com/qemu/qemu/commit/1fcc6d42e78c5fbccef63f47a380361ee81d344a
  Author: Peter Xu <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: enable debug-mutex if debug enabled

Reviewed-by: Emilio G. Cota <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a1d30f285ebc0ba89d8dcba0b10a6b2516c2e470
      
https://github.com/qemu/qemu/commit/a1d30f285ebc0ba89d8dcba0b10a6b2516c2e470
  Author: Thomas Huth <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M docs/COLO-FT.txt
    M docs/can.txt
    M docs/multi-thread-compression.txt
    M docs/multiseat.txt
    M docs/specs/tpm.txt
    M hw/block/dataplane/virtio-blk.c
    M hw/scsi/virtio-scsi-dataplane.c

  Log Message:
  -----------
  Replace '-enable-kvm' with '-accel kvm' in docs and help texts

The preferred way to select the KVM accelerator is to use "-accel kvm"
these days, so let's be consistent in our documentation and help texts.

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


  Commit: 0b3c5c81bf0a9e32fd08c532acde3caa446b3712
      
https://github.com/qemu/qemu/commit/0b3c5c81bf0a9e32fd08c532acde3caa446b3712
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M qemu-options.hx

  Log Message:
  -----------
  qemu-options: Add missing newline to -accel help text

The newline was removed by commit c97d6d2c, and broke -help output:

Before this patch:

  $ qemu-system-x86_64 -help | grep smp
            thread=single|multi (enable multi-threaded TCG)-smp [...]

After this patch:

  $ qemu-system-x86_64 -help  | grep smp
  -smp [cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets]

Fixes: c97d6d2cdf97edb4aebe832fdba65d701ad7bcb6
Cc: Sergio Andres Gomez Del Real <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 1e695fd7c3147ed2fde3225f5c534bfc4774d5f2
      
https://github.com/qemu/qemu/commit/1e695fd7c3147ed2fde3225f5c534bfc4774d5f2
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/mem/pc-dimm.c

  Log Message:
  -----------
  pc-dimm: remove leftover "struct pc_dimms_capacity"

Not needed anymore, let's drop it.

Reviewed-by: David Gibson <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: bb6e2f7a54dfa791510f64bc3a551e5a152ea5f7
      
https://github.com/qemu/qemu/commit/bb6e2f7a54dfa791510f64bc3a551e5a152ea5f7
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  pc: rename pc_dimm_(plug|unplug|...)* into pc_memory_(plug|unplug|...)*

Use a similar naming scheme as spapr. This way, we can go ahead and
rename e.g. pc_dimm_memory_plug to pc_dimm_plug, which avoids
confusion.

Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 284878ee98d682b1d4c859dd0e6334df421d3a50
      
https://github.com/qemu/qemu/commit/284878ee98d682b1d4c859dd0e6334df421d3a50
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/i386/pc.c
    M hw/mem/pc-dimm.c
    M hw/ppc/spapr.c
    M include/hw/mem/pc-dimm.h

  Log Message:
  -----------
  pc-dimm: rename pc_dimm_memory_* to pc_dimm_*

Let's rename it to make it look more consistent.

Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9995c759510391ad9d3f7997c93c1ecdc6ed08b8
      
https://github.com/qemu/qemu/commit/9995c759510391ad9d3f7997c93c1ecdc6ed08b8
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/mem/pc-dimm.c
    M include/hw/mem/pc-dimm.h

  Log Message:
  -----------
  pc-dimm: remove pc_dimm_get_free_slot() from header

Not used outside of pc-dimm.c and there shouldn't be other users. If
other devices (e.g. memory devices) ever have to also use slots, then we
will have to factor this out.

Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d468115b1c7a4d0843f18bc9da41f2c44f93877e
      
https://github.com/qemu/qemu/commit/d468115b1c7a4d0843f18bc9da41f2c44f93877e
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  pc: factor out pc specific dimm checks into pc_memory_pre_plug()

We can perform these checks before the device is actually realized.

Reviewed-by: David Gibson <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 4ab56d04ede6e0f979fc8e4a54b381e99cf0a255
      
https://github.com/qemu/qemu/commit/4ab56d04ede6e0f979fc8e4a54b381e99cf0a255
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/mem/nvdimm.c

  Log Message:
  -----------
  nvdimm: no need to overwrite get_vmstate_memory_region()

Our parent class (PC_DIMM) provides exactly the same function.

Reviewed-by: David Gibson <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 7943e97b858e64eddf0f3395427e58c5cc00a7d9
      
https://github.com/qemu/qemu/commit/7943e97b858e64eddf0f3395427e58c5cc00a7d9
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M backends/hostmem.c
    M hw/mem/nvdimm.c
    M hw/mem/pc-dimm.c
    M hw/misc/ivshmem.c
    M include/sysemu/hostmem.h
    M numa.c

  Log Message:
  -----------
  hostmem: drop error variable from host_memory_backend_get_memory()

Unused, so let's remove it.

Reviewed-by: David Gibson <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a57d1911222bba79bda543568e925635461ead82
      
https://github.com/qemu/qemu/commit/a57d1911222bba79bda543568e925635461ead82
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/mem/pc-dimm.c
    M include/hw/mem/pc-dimm.h

  Log Message:
  -----------
  pc-dimm: merge get_(vmstate_)memory_region()

Importantly, get_vmstate_memory_region() should also fail with a proper
error if called before the device is realized. For a PCDIMM, both functions
are to return the same thing, so share the implementation.

All current users are called after the device has been realized, so we
can expect the calls to succeed.

Reviewed-by: David Gibson <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 5d10a0e12bf3d00958fee73c1b795cfab921873b
      
https://github.com/qemu/qemu/commit/5d10a0e12bf3d00958fee73c1b795cfab921873b
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/mem/nvdimm.c

  Log Message:
  -----------
  nvdimm: convert "unarmed" into a static property

We don't allow to modify it after realization. So we can simply turn
it into a static property.

Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: eb7fd4d0f64fcab2da9ae454a1f214174e881372
      
https://github.com/qemu/qemu/commit/eb7fd4d0f64fcab2da9ae454a1f214174e881372
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/mem/nvdimm.c
    M include/hw/mem/nvdimm.h

  Log Message:
  -----------
  nvdimm: convert nvdimm_mr into a pointer

This way we can easily check if the region has already been inititalized
without having to rely on the size of an uninitialized region being 0.

Free the region in nvdimm_finalize() and not in unrealize() as we will
allow to create the region before realization in following patches.

Reviewed-by: David Gibson <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a4659a8ef424928f654707ca637ba133cbe22396
      
https://github.com/qemu/qemu/commit/a4659a8ef424928f654707ca637ba133cbe22396
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/mem/nvdimm.c

  Log Message:
  -----------
  nvdimm: make get_memory_region() perform checks and initialization

We might get a call to get_memory_region() before the device has been
realized. We should return a consistent value, as the return value
will e.g. later on be used in the pre_plug handler.

To avoid duplicating too much code, factor the initialization and checks
out into a helper function.

Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f0b7bca64dbe8a15c1f4285c6061ce3c81a4a5c7
      
https://github.com/qemu/qemu/commit/f0b7bca64dbe8a15c1f4285c6061ce3c81a4a5c7
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/i386/pc.c
    M hw/mem/pc-dimm.c
    M hw/ppc/spapr.c
    M include/hw/mem/pc-dimm.h

  Log Message:
  -----------
  pc-dimm: get_memory_region() will not fail after realize

Let's try to reduce error handling a bit. In the plug/unplug case, the
device was realized and therefore we can assume that getting access to
the memory region will not fail.

For get_vmstate_memory_region() this is already handled that way.
Document both cases.

Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 178003ea49aef4273d94c3c002b8f15858070f68
      
https://github.com/qemu/qemu/commit/178003ea49aef4273d94c3c002b8f15858070f68
  Author: David Hildenbrand <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M numa.c

  Log Message:
  -----------
  numa: report all DIMM/NVDIMMs as plugged memory

Right now, there is some inconsistency between hotplugged and
coldplugged memory. DIMMs added via "-device" result in different stats
than DIMMs added using "device_add".

E.g.
    [...]
    -numa node,nodeid=0,cpus=0-1 -numa node,nodeid=1,cpus=2-3 \
    -m 4G,maxmem=20G,slots=2 \
    -object memory-backend-ram,id=mem0,size=8G \
    -device pc-dimm,id=dimm0,memdev=mem0 \
    -object memory-backend-ram,id=mem1,size=8G \
    -device nvdimm,id=dimm1,memdev=mem1,node=1

Results in NUMA info
    (qemu) info numa
    info numa
    2 nodes
    node 0 cpus: 0 1
    node 0 size: 10240 MB
    node 0 plugged: 0 MB
    node 1 cpus: 2 3
    node 1 size: 10240 MB
    node 1 plugged: 0 MB

But in memory size summary:
    (qemu) info memory_size_summary
    info memory_size_summary
    base memory: 4294967296
    plugged memory: 17179869184

Make this consistent by reporting all hot and coldplugged
memory a.k.a. DIMM and NVDIMM as "plugged".

Fixes: 31959e82fb0 ("hmp: extend "info numa" with hotplugged memory 
information")
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a1a98357e3fdfce92b5ed0c6728489b9992fecb5
      
https://github.com/qemu/qemu/commit/a1a98357e3fdfce92b5ed0c6728489b9992fecb5
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M include/qemu/osdep.h

  Log Message:
  -----------
  osdep: work around Coverity parsing errors

Coverity does not like the new _Float* types that are used by
recent glibc, and croaks on every single file that includes
stdlib.h.  Add dummy typedefs to please it.

Reviewed-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c44df2ff9be326b218f6655ee17ddd914ece8d5a
      
https://github.com/qemu/qemu/commit/c44df2ff9be326b218f6655ee17ddd914ece8d5a
  Author: Thomas Huth <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M qemu-doc.texi
    M qemu-options.hx
    M vl.c

  Log Message:
  -----------
  Deprecate the -enable-hax option

We currently have got three ways of turning on the HAX accelerator:
"-machine accel=hax", "-accel hax" and "-enable-hax". That's really
confusing and overloaded. Since "-accel" is our preferred way to enable
an accelerator nowadays, and "-accel hax" is even less to type than
"-enable-hax", let's deprecate the "-enable-hax" option now.

Note: While "-enable-kvm" is available since a long time and can hardly be
removed since it is used in a lot of upper layer tools and scripts, the
"-enable-hax" option is still rather new and not very widespread yet, so
I think that it should be OK if we remove this in a couple of releases again
(we'll see whether someone complains after seeing the deprecation message -
then we could still reconsider to keep it if there a well-founded reasons).

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


  Commit: 50fa332516d5e42695811f43396b749185e21b9c
      
https://github.com/qemu/qemu/commit/50fa332516d5e42695811f43396b749185e21b9c
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M scsi/qemu-pr-helper.c

  Log Message:
  -----------
  pr-helper: fix --socket-path default in help

Currently --help shows "(default '(null)')" for the -k/--socket-path
option.  Fix it by getting the default path in /var/run.

Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>


  Commit: 86933b4e7879e427e03365bf352c0964640cb37b
      
https://github.com/qemu/qemu/commit/86933b4e7879e427e03365bf352c0964640cb37b
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M scsi/qemu-pr-helper.c

  Log Message:
  -----------
  pr-helper: fix assertion failure on failed multipath PERSISTENT RESERVE IN

The response size is expected to be zero if the SCSI status is not
"GOOD", but nothing was resetting it.

This can be reproduced simply by "sg_persist -s /dev/sdb" where /dev/sdb
in the guest is a scsi-block device corresponding to a multipath device
on the host.

Before:

  PR in (Read full status): Aborted command

and on the host:

  prh_write_response: Assertion `resp->sz == 0' failed.

After:

  PR in (Read full status): bad field in cdb or parameter list
  (perhaps unsupported service action)

Reported-by: Jiri Belka <address@hidden>
Reviewed-by: Michal Privoznik <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>


  Commit: aad10040d411d21542dc9ae58a2854c89ccedd78
      
https://github.com/qemu/qemu/commit/aad10040d411d21542dc9ae58a2854c89ccedd78
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M scsi/pr-manager-helper.c

  Log Message:
  -----------
  pr-manager-helper: avoid SIGSEGV when writing to the socket fail

When writing to the qemu-pr-helper socket failed, the persistent
reservation manager was correctly disconnecting the socket, but it
did not clear pr_mgr->ioc.  So the rest of the code did not know
that the socket had been disconnected, accessed pr_mgr->ioc and
happily caused a crash.

To reproduce, it is enough to stop qemu-pr-helper between QEMU
startup and executing e.g. sg_persist -k /dev/sdb.

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


  Commit: 58b3017f7fba15e8c440115dfd5d380f490d0b61
      
https://github.com/qemu/qemu/commit/58b3017f7fba15e8c440115dfd5d380f490d0b61
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M include/scsi/pr-manager.h
    M scsi/Makefile.objs
    A scsi/pr-manager-stub.c

  Log Message:
  -----------
  pr-manager: put stubs in .c file

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


  Commit: 5f64089416f0d77c87683401838f064c51a292ed
      
https://github.com/qemu/qemu/commit/5f64089416f0d77c87683401838f064c51a292ed
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M include/scsi/pr-manager.h
    M qapi/block.json
    M scsi/pr-manager-helper.c
    M scsi/pr-manager-stub.c
    M scsi/pr-manager.c

  Log Message:
  -----------
  pr-manager: add query-pr-managers QMP command

This command lets you query the connection status of each pr-manager-helper
object.

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


  Commit: e2c81a45101fdddfd47477a1805806f2c76639bf
      
https://github.com/qemu/qemu/commit/e2c81a45101fdddfd47477a1805806f2c76639bf
  Author: Paolo Bonzini <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M qapi/block.json
    M scsi/pr-manager-helper.c

  Log Message:
  -----------
  pr-manager-helper: report event on connection/disconnection

Let management know if there were any problems communicating with
qemu-pr-helper.  The event is edge-triggered, and is sent every time
the connection status of the pr-manager-helper object changes.

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


  Commit: 09eb69a573521b90cfa5b2c1c02e01adceb5405f
      
https://github.com/qemu/qemu/commit/09eb69a573521b90cfa5b2c1c02e01adceb5405f
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/mips/mips_jazz.c

  Log Message:
  -----------
  hw/mips/jazz: create ESP device directly via qdev

MIPS jazz is the last user of the legacy esp_init() function so move creation
of the ESP device over to use qdev.

Note that the esp_reset and dma_enable qemu_irqs are currently unused and so
we do not wire these up and instead remove the variables to prevent the
compiler emitting unused variable warnings.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Tested-by: Hervé Poussineau <address@hidden>


  Commit: e7d99825f018cf4e658c3eb10c0163e75e653a23
      
https://github.com/qemu/qemu/commit/e7d99825f018cf4e658c3eb10c0163e75e653a23
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/scsi/esp.c
    M include/hw/scsi/esp.h

  Log Message:
  -----------
  esp: remove legacy esp_init() function

Remove the legacy esp_init() function now that there are no more remaining
users.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Tested-by: Hervé Poussineau <address@hidden>


  Commit: e1753a7e1d8174f5861367504c5cea5fbcd85953
      
https://github.com/qemu/qemu/commit/e1753a7e1d8174f5861367504c5cea5fbcd85953
  Author: Justin Terry (VM) <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M target/i386/whpx-all.c

  Log Message:
  -----------
  WHPX workaround bug in OSVW handling

Adds a workaround to an incorrect value setting
CPUID Fn8000_0001_ECX[bit 9 OSVW] = 1. This can cause a guest linux kernel
to panic when an issue to rdmsr C001_0140h returns 0. Disabling this feature
correctly allows the guest to boot without accessing the osv workarounds.

Signed-off-by: Justin Terry (VM) <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e7ca549fc8caf9b1c79814f3854622448815f2bf
      
https://github.com/qemu/qemu/commit/e7ca549fc8caf9b1c79814f3854622448815f2bf
  Author: Justin Terry (VM) <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M target/i386/whpx-all.c

  Log Message:
  -----------
  WHPX: register for unrecognized MSR exits

Some variations of Linux kernels end up accessing MSR's that the Windows
Hypervisor doesn't implement which causes a GP to be returned to the guest.
This fix registers QEMU for unimplemented MSR access and globally returns 0 on
reads and ignores writes. This behavior is allows the Linux kernel to probe the
MSR with a write/read/check sequence it does often without failing the access.

Signed-off-by: Justin Terry (VM) <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fc051ae6c42216ca87145106b509fa3bdfa98e00
      
https://github.com/qemu/qemu/commit/fc051ae6c42216ca87145106b509fa3bdfa98e00
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hmp-commands-info.hx
    M include/exec/memory.h
    M memory.c
    M monitor.c

  Log Message:
  -----------
  memory/hmp: Print owners/parents in "info mtree"

This adds owners/parents (which are the same, just occasionally
owner==NULL) printing for memory regions; a new '-o' flag
enabled new output.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 02f7fd25a446a220905c2e5cb0fc3655d7f63b29
      
https://github.com/qemu/qemu/commit/02f7fd25a446a220905c2e5cb0fc3655d7f63b29
  Author: Jan Kiszka <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M target/i386/seg_helper.c

  Log Message:
  -----------
  target-i386: Add NMI interception to SVM

Check for SVM interception prior to injecting an NMI. Tested via the
Jailhouse hypervisor.

Signed-off-by: Jan Kiszka <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: df2518aa587a0157bbfbc635fe47295629d9914a
      
https://github.com/qemu/qemu/commit/df2518aa587a0157bbfbc635fe47295629d9914a
  Author: Jan Kiszka <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M target/i386/translate.c

  Log Message:
  -----------
  target-i386: Allow interrupt injection after STGI

We need to terminate the translation block after STGI so that pending
interrupts can be injected.

This fixes pending NMI injection for Jailhouse which uses "stgi; clgi"
to open a brief injection window.

Signed-off-by: Jan Kiszka <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 50b3de6e5cd464dcc20e3a48f5a09e0299a184ac
      
https://github.com/qemu/qemu/commit/50b3de6e5cd464dcc20e3a48f5a09e0299a184ac
  Author: Jan Kiszka <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M target/i386/cpu.h
    M target/i386/svm_helper.c

  Log Message:
  -----------
  target-i386: Mark cpu_vmexit noreturn

It calls cpu_loop_exit in system emulation mode (and should never be
called in user emulation mode).

Signed-off-by: Jan Kiszka <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 0cda9d876c7d4b05cac164020e8cbafa4adb3728
      
https://github.com/qemu/qemu/commit/0cda9d876c7d4b05cac164020e8cbafa4adb3728
  Author: Peter Xu <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hmp-commands-info.hx

  Log Message:
  -----------
  doc: another fix to "info pic"

Something that commit 254316fa1f ("intc: make HMP 'info irq' and 'info
pic' commands available on all targets", 2016-10-04) forgot to touch up.

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


  Commit: 4a499ad295e007891d2a27ad21269aee8e698e58
      
https://github.com/qemu/qemu/commit/4a499ad295e007891d2a27ad21269aee8e698e58
  Author: Peter Xu <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/intc/ioapic_common.c

  Log Message:
  -----------
  ioapic: support "info pic"

People start to use "info pic" for all kinds of irqchip dumps.  Let x86
ioapic join the family.  It dumps the same thing as "info ioapic".

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


  Commit: 6a218b032b2d62b3c13e9553593b75e445ce5f1a
      
https://github.com/qemu/qemu/commit/6a218b032b2d62b3c13e9553593b75e445ce5f1a
  Author: Peter Xu <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/intc/ioapic_common.c

  Log Message:
  -----------
  ioapic: some proper indents when dump info

So that now it looks better when with other irqchips.

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


  Commit: cce5405e0ebce0cd400cfd3d3d218a776ac6b333
      
https://github.com/qemu/qemu/commit/cce5405e0ebce0cd400cfd3d3d218a776ac6b333
  Author: Peter Xu <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/i386/kvm/ioapic.c
    M hw/intc/ioapic.c
    M hw/intc/ioapic_common.c
    M include/hw/i386/ioapic_internal.h

  Log Message:
  -----------
  ioapic: support "info irq"

This include both userspace and in-kernel ioapic.  Note that the numbers
can be inaccurate for kvm-ioapic.  One reason is the same with
kvm-i8259, that when irqfd is used, irqs can be delivered all inside
kernel without our notice.  Meanwhile, kvm-ioapic is specially treated
when irq numbers <ISA_NUM_IRQS, those irqs will be delivered in kernel
too via kvm-i8259 (please refer to kvm_pc_gsi_handler).

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


  Commit: 0c8465440d50c18a7bb13d0a866748f0593e193a
      
https://github.com/qemu/qemu/commit/0c8465440d50c18a7bb13d0a866748f0593e193a
  Author: Peter Xu <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M hw/i386/kvm/ioapic.c
    M hw/intc/ioapic.c
    M include/hw/i386/pc.h
    M target/i386/monitor.c

  Log Message:
  -----------
  hmp: obsolete "info ioapic"

Let's start to use "info pic" just like other platforms.  For now we
keep the command for a while so that old users can know what is the new
command to use.

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


  Commit: 6f131f13e68d648a8e4f083c667ab1acd88ce4cd
      
https://github.com/qemu/qemu/commit/6f131f13e68d648a8e4f083c667ab1acd88ce4cd
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2018-06-28 (Thu, 28 Jun 2018)

  Changed paths:
    M include/sysemu/sysemu.h
    M qemu-options.hx
    M target/i386/kvm.c
    M vl.c

  Log Message:
  -----------
  kvm: support -overcommit cpu-pm=on|off

With this flag, kvm allows guest to control host CPU power state.  This
increases latency for other processes using same host CPU in an
unpredictable way, but if decreases idle entry/exit times for the
running VCPU, so to use it QEMU needs a hint about whether host CPU is
overcommitted, hence the flag name.

Follow-up patches will expose this capability to guest
(using mwait leaf).

Based on a patch by Wanpeng Li <address@hidden> .

Signed-off-by: Michael S. Tsirkin <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2266d44311321a833d569cd4deb46cca6021d0e7
      
https://github.com/qemu/qemu/commit/2266d44311321a833d569cd4deb46cca6021d0e7
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M accel/tcg/user-exec-stub.c
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/kvm.c

  Log Message:
  -----------
  i386/cpu: make -cpu host support monitor/mwait

When guest CPU PM is enabled, and with -cpu host, expose the host CPU
MWAIT leaf in the CPUID so guest can make good PM decisions.

Note: the result is 100% CPU utilization reported by host as host
no longer knows that the CPU is halted.

Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2da91b54fe98faa8676264ac6e5a3aac5b69bec2
      
https://github.com/qemu/qemu/commit/2da91b54fe98faa8676264ac6e5a3aac5b69bec2
  Author: Viktor Prutyanov <address@hidden>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M Makefile.target
    M dump.c
    M hmp-commands.hx
    M hmp.c
    M qapi/misc.json
    A win_dump.c
    A win_dump.h

  Log Message:
  -----------
  dump: add Windows dump format to dump-guest-memory

This patch adds Windows crashdumping feature. Now QEMU can produce ELF-dump
containing Windows crashdump header, which can help to convert to a valid
WinDbg-understandable crashdump file, or immediately create such file.
The crashdump will be obtained by joining physical memory dump and 8K header
exposed through vmcoreinfo/fw_cfg device by guest driver at BSOD time. Option
'-w' was added to dump-guest-memory command. At the moment, only x64
configuration is supported.
Suitable driver can be found at
https://github.com/virtio-win/kvm-guest-drivers-windows/tree/master/fwcfg64

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


  Commit: 92d1b3d5086c182bab66fd1814c4a04ba1e59337
      
https://github.com/qemu/qemu/commit/92d1b3d5086c182bab66fd1814c4a04ba1e59337
  Author: Viktor Prutyanov <address@hidden>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M win_dump.c

  Log Message:
  -----------
  dump: use system context in Windows dump

We use CPU #0 to access guest virtual memory, but it can execute user
thread at that moment. So, switch CR3 to PageDirectoryBase from header
and restore original value at the end.

Signed-off-by: Viktor Prutyanov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2ababfcc0e5e778c9005abb57f4bf6a036145a57
      
https://github.com/qemu/qemu/commit/2ababfcc0e5e778c9005abb57f4bf6a036145a57
  Author: Viktor Prutyanov <address@hidden>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M win_dump.c

  Log Message:
  -----------
  dump: add fallback KDBG using in Windows dump

KdDebuggerDataBlock may be encrypted in guest memory and dump will be
useless in this case. But guest driver can obtain decrypted KDBG and
expose its address through BugcheckParameter1 field in raw header.
After this patch, QEMU will be able to use fallback KdDebuggerDataBlock.

Signed-off-by: Viktor Prutyanov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2ad9b50f713053dcd6c44b2b5e3bbdb0cfe8a52d
      
https://github.com/qemu/qemu/commit/2ad9b50f713053dcd6c44b2b5e3bbdb0cfe8a52d
  Author: Viktor Prutyanov <address@hidden>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M win_dump.c
    M win_dump.h

  Log Message:
  -----------
  dump: add Windows live system dump

Unlike dying Windows, live system memory doesn't contain
correct register contexts. But they can be populated with QEMU register
values.
After this patch, QEMU will be able to produce guest Windows live system
dump.

Signed-off-by: Viktor Prutyanov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 0a96ca2437646bad197b0108c5f4a93e7ead05a9
      
https://github.com/qemu/qemu/commit/0a96ca2437646bad197b0108c5f4a93e7ead05a9
  Author: Daniel Henrique Barboza <address@hidden>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M hw/scsi/scsi-disk.c
    M hw/scsi/scsi-generic.c
    M include/hw/scsi/scsi.h

  Log Message:
  -----------
  hw/scsi: cleanups before VPD BL emulation

To add support for the emulation of Block Limits VPD page
for passthrough devices, a few adjustments in the current code
base is required to avoid repetition and improve clarity.

In scsi-generic.c, detach the Inquiry handling from
scsi_read_complete and put it into a new function called
scsi_handle_inquiry_reply. This change aims to avoid
cluttering of scsi_read_complete when we more logic in the
Inquiry response handling is added in the next patches,
centralizing the changes in the new function.

In scsi-disk.c, take the build of all emulated VPD pages
from scsi_disk_emulate_inquiry and make it available to
other files into a non-static function called
scsi_disk_emulate_vpd_page. Making it public will allow
the future VPD BL emulation code for passthrough devices
to use it from scsi-generic.c, avoiding copy/pasting this
code solely for that purpose. It also has the advantage of
providing emulation of all VPD pages in case we need to
emulate other pages in other scenarios. As a bonus,
scsi_disk_emulate_inquiry got tidier.

Signed-off-by: Daniel Henrique Barboza <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a0c7e35b17b3d2cade8a5fc8e57904e02fb91fe4
      
https://github.com/qemu/qemu/commit/a0c7e35b17b3d2cade8a5fc8e57904e02fb91fe4
  Author: Daniel Henrique Barboza <address@hidden>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M hw/scsi/scsi-disk.c
    M hw/scsi/scsi-generic.c
    M include/hw/scsi/scsi.h

  Log Message:
  -----------
  hw/scsi: centralize SG_IO calls into single function

For the VPD Block Limits emulation with SCSI passthrough,
we'll issue an Inquiry request with EVPD set to retrieve
the available VPD pages of the device. This would be done in
a way similar of what scsi_generic_read_device_identification
does: create a SCSI command and a reply buffer, fill in the
sg_io_hdr_t structure, call blk_ioctl, check if an error
occurred, process the response.

This same process is done in other 2 functions, get_device_type
and get_stream_blocksize. They differ in the command/reply
buffer and post-processing, everything else is almost a
copy/paste.

Instead of adding a forth copy/pasted-ish code when adding
the passthrough VPD BL emulation, this patch extirpates
this repetition of those 3 functions and put it into
a new one called scsi_SG_IO_FROM_DEV. Any future code that
wants to execute an SG_DXFER_FROM_DEV to the device can
use it, avoiding filling sg_io_hdr_t again and et cetera.

Signed-off-by: Daniel Henrique Barboza <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a71c775b24ebc664129eb1d9b4c360590353efd5
      
https://github.com/qemu/qemu/commit/a71c775b24ebc664129eb1d9b4c360590353efd5
  Author: Daniel Henrique Barboza <address@hidden>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M hw/scsi/scsi-disk.c
    M hw/scsi/scsi-generic.c
    M include/hw/scsi/scsi.h

  Log Message:
  -----------
  hw/scsi: add VPD Block Limits emulation

The VPD Block Limits Inquiry page is optional, allowing SCSI devices
to not implement it. This is the case for devices like the MegaRAID
SAS 9361-8i and Microsemi PM8069.

In case of SCSI passthrough, the response of this request is used by
the QEMU SCSI layer to set the max_io_sectors that the guest
device will support, based on the value of the max_sectors_kb that
the device has set in the host at that time. Without this response,
the guest kernel is free to assume any value of max_io_sectors
for the SCSI device. If this value is greater than the value from
the host, SCSI Sense errors will occur because the guest will send
read/write requests that are larger than the underlying host device
is configured to support. An example of this behavior can be seen
in [1].

A workaround is to set the max_sectors_kb host value back in the guest
kernel (a process that can be automated using rc.local startup scripts
and the like), but this has several drawbacks:

- it can be troublesome if the guest has many passthrough devices that
needs this tuning;

- if a change in max_sectors_kb is made in the host side, manual change
in the guests will also be required;

- during an OS install it is difficult, and sometimes not possible, to
go to a terminal and change the max_sectors_kb prior to the installation.
This means that the disk can't be used during the install process. The
easiest alternative here is to roll back to scsi-hd, install the guest
and then go back to SCSI passthrough when the installation is done and
max_sectors_kb can be set.

An easier way would be to QEMU handle the absence of the Block Limits
VPD device response, setting max_io_sectors accordingly and allowing
the guest to use the device without the hassle.

This patch adds emulation of the Block Limits VPD response for
SCSI passthrough devices of type TYPE_DISK that doesn't support
it. The following changes were made:

- scsi_handle_inquiry_reply will now check the available VPD
pages from the Inquiry EVPD reply. In case the device does not

- a new function called scsi_generic_set_vpd_bl_emulation,
that is called during device realize,  was created to set a
new flag 'needs_vpd_bl_emulation' of the device. This function
retrieves the Inquiry EVPD response of the device to check for
VPD BL support.

- scsi_handle_inquiry_reply will now check the available VPD
pages from the Inquiry EVPD reply in case the device needs
VPD BL emulation, adding the Block Limits page (0xb0) to
the list. This will make the guest kernel aware of the
support that we're now providing by emulation.

- a new function scsi_emulate_block_limits creates the
emulated Block Limits response. This function is called
inside scsi_read_complete in case the device requires
Block Limits VPD emulation and we detected a SCSI Sense
error in the VPD Block Limits reply that was issued
from the guest kernel to the device. This error is
expected: we're reporting support from our side, but
the device isn't aware of it.

With this patch, the guest now queries the Block Limits
page during the device configuration because it is being
advertised in the Supported Pages response. It will either
receive the Block Limits page from the hardware, if it supports
it, or will receive an emulated response from QEMU. At any rate,
the guest now has the information to set the max_sectors_kb
parameter accordingly, sparing the user of SCSI sense errors
that would happen without the emulated response and in the
absence of Block Limits support from the hardware.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1566195

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1566195
Reported-by: Dac Nguyen <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 28a3cfc10b2e1a34985797357b4aa7558a63d08f
      
https://github.com/qemu/qemu/commit/28a3cfc10b2e1a34985797357b4aa7558a63d08f
  Author: Thomas Huth <address@hidden>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M tests/boot-serial-test.c

  Log Message:
  -----------
  tests/boot-serial: Do not delete the output file in case of errors

Peter reported that the boot-serial tester sometimes runs into timeouts
with SPARC guests. It's currently completely unclear whether this is due
to too much load on the host machine (so that the guest really just ran
too slow), or whether there is something wrong with the guest's firmware
boot. For further debugging, we need the serial output of the guest in
case of errors, so instead of unlinking the file immediately, this is
now only done in case of success. In case of error, print the name of the
file with the serial output via g_error() (which then also calls abort()
internally to mark the test as failed).

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


  Commit: 109b25045b3651f9c5d02c3766c0b3ff63e6d193
      
https://github.com/qemu/qemu/commit/109b25045b3651f9c5d02c3766c0b3ff63e6d193
  Author: Peter Maydell <address@hidden>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M Makefile.target
    M accel/kvm/kvm-all.c
    M accel/tcg/translate-all.c
    M accel/tcg/translate-all.h
    M accel/tcg/user-exec-stub.c
    M backends/hostmem.c
    M chardev/char-stdio.c
    M configure
    M docs/COLO-FT.txt
    M docs/can.txt
    M docs/multi-thread-compression.txt
    M docs/multiseat.txt
    M docs/specs/tpm.txt
    M dump.c
    M exec.c
    M hmp-commands-info.hx
    M hmp-commands.hx
    M hmp.c
    M hw/block/dataplane/virtio-blk.c
    M hw/char/serial.c
    M hw/i386/kvm/ioapic.c
    M hw/i386/pc.c
    M hw/intc/ioapic.c
    M hw/intc/ioapic_common.c
    M hw/mem/memory-device.c
    M hw/mem/nvdimm.c
    M hw/mem/pc-dimm.c
    M hw/mips/mips_jazz.c
    M hw/misc/ivshmem.c
    M hw/ppc/spapr.c
    M hw/scsi/esp.c
    M hw/scsi/scsi-disk.c
    M hw/scsi/scsi-generic.c
    M hw/scsi/virtio-scsi-dataplane.c
    M include/exec/exec-all.h
    M include/exec/memory.h
    M include/exec/ram_addr.h
    M include/hw/i386/ioapic_internal.h
    M include/hw/i386/pc.h
    M include/hw/mem/nvdimm.h
    M include/hw/mem/pc-dimm.h
    M include/hw/scsi/esp.h
    M include/hw/scsi/scsi.h
    M include/qemu/main-loop.h
    M include/qemu/osdep.h
    M include/qemu/thread-posix.h
    M include/qemu/thread-win32.h
    M include/scsi/pr-manager.h
    M include/sysemu/hostmem.h
    M include/sysemu/kvm_int.h
    M include/sysemu/sysemu.h
    M linux-user/mmap.c
    M memory.c
    M memory_ldst.inc.c
    M monitor.c
    M numa.c
    M qapi/block.json
    M qapi/misc.json
    M qemu-doc.texi
    M qemu-options.hx
    M scsi/Makefile.objs
    M scsi/pr-manager-helper.c
    A scsi/pr-manager-stub.c
    M scsi/pr-manager.c
    M scsi/qemu-pr-helper.c
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/kvm.c
    M target/i386/monitor.c
    M target/i386/seg_helper.c
    M target/i386/svm_helper.c
    M target/i386/translate.c
    A target/i386/whp-dispatch.h
    M target/i386/whpx-all.c
    M target/xtensa/op_helper.c
    M tests/atomic_add-bench.c
    M tests/boot-serial-test.c
    M trace/control-target.c
    A util/qemu-thread-common.h
    M util/qemu-thread-posix.c
    M util/qemu-thread-win32.c
    M vl.c
    A win_dump.c
    A win_dump.h

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

* "info mtree" improvements (Alexey)
* fake VPD block limits for SCSI passthrough (Daniel Barboza)
* chardev and main loop fixes (Daniel Berrangé, Sergio, Stefan)
* help fixes (Eduardo)
* pc-dimm refactoring (David)
* tests improvements and fixes (Emilio, Thomas)
* SVM emulation fixes (Jan)
* MemoryRegionCache fix (Eric)
* WHPX improvements (Justin)
* ESP cleanup (Mark)
* -overcommit option (Michael)
* qemu-pr-helper fixes (me)
* "info pic" improvements for x86 (Peter)
* x86 TCG emulation fixes (Richard)
* KVM slot handling fix (Shannon)
* Next round of deprecation (Thomas)
* Windows dump format support (Viktor)

# gpg: Signature made Fri 29 Jun 2018 12:03:05 BST
# gpg:                using RSA key BFFBD25F78C7AE83
# 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: (60 commits)
  tests/boot-serial: Do not delete the output file in case of errors
  hw/scsi: add VPD Block Limits emulation
  hw/scsi: centralize SG_IO calls into single function
  hw/scsi: cleanups before VPD BL emulation
  dump: add Windows live system dump
  dump: add fallback KDBG using in Windows dump
  dump: use system context in Windows dump
  dump: add Windows dump format to dump-guest-memory
  i386/cpu: make -cpu host support monitor/mwait
  kvm: support -overcommit cpu-pm=on|off
  hmp: obsolete "info ioapic"
  ioapic: support "info irq"
  ioapic: some proper indents when dump info
  ioapic: support "info pic"
  doc: another fix to "info pic"
  target-i386: Mark cpu_vmexit noreturn
  target-i386: Allow interrupt injection after STGI
  target-i386: Add NMI interception to SVM
  memory/hmp: Print owners/parents in "info mtree"
  WHPX: register for unrecognized MSR exits
  ...

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


Compare: https://github.com/qemu/qemu/compare/609ef9f45175...109b25045b36
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

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