qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 87287a: accel/kvm: ensure ret always set


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 87287a: accel/kvm: ensure ret always set
Date: Mon, 07 Oct 2019 03:28:21 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 87287ac02c39a04041f727c633bb9cc7a0339d91
      
https://github.com/qemu/qemu/commit/87287ac02c39a04041f727c633bb9cc7a0339d91
  Author: Alex Bennée <address@hidden>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M accel/kvm/kvm-all.c

  Log Message:
  -----------
  accel/kvm: ensure ret always set

Some of the cross compilers rightly complain there are cases where ret
may not be set. 0 seems to be the reasonable default unless particular
slot explicitly returns -1.

Signed-off-by: Alex Bennée <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 8c51642b42630f3977f500e74a7125fa9338728f
      
https://github.com/qemu/qemu/commit/8c51642b42630f3977f500e74a7125fa9338728f
  Author: Yury Kotov <address@hidden>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M tests/migration-test.c

  Log Message:
  -----------
  tests/migration: Add a test for auto converge

Signed-off-by: Yury Kotov <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
[Reorganize check_migration_status for rebase. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b2aca78cb2faf96c2c96993c2f0d4ef3440e1d84
      
https://github.com/qemu/qemu/commit/b2aca78cb2faf96c2c96993c2f0d4ef3440e1d84
  Author: Maxim Levitsky <address@hidden>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

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

  Log Message:
  -----------
  qemu-pr-helper: fix crash in mpath_reconstruct_sense

The 'r' variable was accidently shadowed, and because of this
we were always passing 0 to mpath_generic_sense, instead of original
return value, which triggers an abort()

This is an attempt to fix the
https://bugzilla.redhat.com/show_bug.cgi?id=1720047
although there might be other places in the code
that trigger qemu-pr-helper crash, and this fix might
not be the root cause.

The crash was reproduced by creating an iscsi target on a test machine,
and passing it twice to the guest like that:

-blockdev node-name=idisk0,driver=iscsi,transport=...,target=...
-device 
scsi-block,drive=idisk0,bus=scsi0.0,bootindex=-1,scsi-id=1,lun=0,share-rw=on
-device 
scsi-block,drive=idisk0,bus=scsi0.0,bootindex=-1,scsi-id=1,lun=1,share-rw=on

Then in the guest, both /dev/sda and /dev/sdb were aggregated by multipath to 
/dev/mpatha,
which was passed to a nested guest like that

-object 
pr-manager-helper,id=qemu_pr_helper,path=/root/work/vm/testvm/.run/pr_helper.socket
-blockdev 
node-name=test,driver=host_device,filename=/dev/mapper/mpatha,pr-manager=qemu_pr_helper
-device scsi-block,drive=test,bus=scsi0.0,bootindex=-1,scsi-id=0,lun=0

The nested guest run:

sg_persist --no-inquiry  -v --out --register --param-sark 0x1234 /dev/sda

Strictly speaking this is wrong configuration since qemu is where
the multipath was split, and thus the iscsi target was not aware of
multipath, and thus when libmpathpersist code rightfully tried to register
the PR key on all paths, it failed to do so.

However qemu-pr-helper should not crash in this case.

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


  Commit: 86cf9e154632cb28d749db0ea47946fba8cf3f09
      
https://github.com/qemu/qemu/commit/86cf9e154632cb28d749db0ea47946fba8cf3f09
  Author: Pavel Dovgalyuk <address@hidden>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  replay: don't synchronize memory operations in replay mode

Commit 9458a9a1df1a4c719e24512394d548c1fc7abd22 added synchronization
of vCPU and migration operations through calling run_on_cpu operation.
However, in replay mode this synchronization is unneeded, because
I/O and vCPU threads are already synchronized.
This patch disables such synchronization for record/replay mode.

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


  Commit: c0ff379514347b1656c366ff2e878c041048231b
      
https://github.com/qemu/qemu/commit/c0ff379514347b1656c366ff2e878c041048231b
  Author: Thomas Huth <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M hw/isa/Kconfig
    M hw/isa/Makefile.objs
    M hw/mips/Kconfig

  Log Message:
  -----------
  hw/isa: Introduce a CONFIG_ISA_SUPERIO switch for isa-superio.c

Currently, isa-superio.c is always compiled as soon as CONFIG_ISA_BUS
is enabled. But there are also machines that have an ISA BUS without
any of the superio chips attached to it, so we should not compile
isa-superio.c in case we only compile a QEMU for such a machine.
Thus add a proper CONFIG_ISA_SUPERIO switch so that this file only gets
compiled when we really, really need it.

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


  Commit: f5f72e8f31f22ba5ee43db5cb9481206fc661f76
      
https://github.com/qemu/qemu/commit/f5f72e8f31f22ba5ee43db5cb9481206fc661f76
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M hw/ide/cmd646.c

  Log Message:
  -----------
  ide: fix leak from qemu_allocate_irqs

The array returned by qemu_allocate_irqs is malloced, free it.

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


  Commit: 100781a8cd61927d8442bd0b02dfc10c5bb89bcb
      
https://github.com/qemu/qemu/commit/100781a8cd61927d8442bd0b02dfc10c5bb89bcb
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M hw/microblaze/boot.c

  Log Message:
  -----------
  microblaze: fix leak of fdevice tree blob

The device tree blob returned by load_device_tree is malloced.
Free it before returning.

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


  Commit: 67c1ea9940afd73ebc66987672617b6694ba1e4a
      
https://github.com/qemu/qemu/commit/67c1ea9940afd73ebc66987672617b6694ba1e4a
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M hw/m68k/mcf5208.c

  Log Message:
  -----------
  mcf5208: fix leak from qemu_allocate_irqs

The array returned by qemu_allocate_irqs is malloced, free it.

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


  Commit: 266a880e31d58539a1c7f0177690a047f5016505
      
https://github.com/qemu/qemu/commit/266a880e31d58539a1c7f0177690a047f5016505
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M hw/hppa/dino.c
    M hw/hppa/machine.c

  Log Message:
  -----------
  hppa: fix leak from g_strdup_printf

memory_region_init_* takes care of copying the name into memory it owns.
Free it in the caller.

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


  Commit: 0287d89f3e3ef11b71e229b1928f1b9b0634a58a
      
https://github.com/qemu/qemu/commit/0287d89f3e3ef11b71e229b1928f1b9b0634a58a
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M hw/mips/mips_int.c
    M hw/mips/mips_jazz.c

  Log Message:
  -----------
  mips: fix memory leaks in board initialization

They are not a big deal, but they upset asan.

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


  Commit: 9739b11adcb81d0c4595ab5ea3fce1f5d50ce135
      
https://github.com/qemu/qemu/commit/9739b11adcb81d0c4595ab5ea3fce1f5d50ce135
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M disas/cris.c

  Log Message:
  -----------
  cris: do not leak struct cris_disasm_data

Use a stack-allocated struct to avoid a memory leak.

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


  Commit: e97dd6b2b3d67ca575c491382b522415904bd552
      
https://github.com/qemu/qemu/commit/e97dd6b2b3d67ca575c491382b522415904bd552
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M hw/timer/lm32_timer.c
    M hw/timer/milkymist-sysctl.c

  Log Message:
  -----------
  lm32: do not leak memory on object_new/object_unref

Bottom halves and ptimers are malloced, but nothing in these
files is freeing memory allocated by instance_init.  Since
these are sysctl devices that are never unrealized, just moving
the allocations to realize is enough to avoid the leak in
practice (and also to avoid upsetting asan when running
device-introspect-test).

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


  Commit: 6f89ec7442ef4a7c7a826ab0809c5583f75de4bf
      
https://github.com/qemu/qemu/commit/6f89ec7442ef4a7c7a826ab0809c5583f75de4bf
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M tests/docker/test-debug

  Log Message:
  -----------
  docker: test-debug: disable LeakSanitizer

There are just too many leaks in device-introspect-test (especially for
the plethora of arm and aarch64 boards) to make LeakSanitizer useful;
disable it for now.

Whoever is interested in debugging leaks can also use valgrind like this:

   QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64 \
   QTEST_QEMU_IMG=qemu-img \
   valgrind --trace-children=yes --leak-check=full \
   tests/device-introspect-test -p 
/aarch64/device/introspect/concrete/defaults/none

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


  Commit: e900135dcfb676a4019dc206395e02db5d1de0d6
      
https://github.com/qemu/qemu/commit/e900135dcfb676a4019dc206395e02db5d1de0d6
  Author: Sebastian Andrzej Siewior <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

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

  Log Message:
  -----------
  i386: Add CPUID bit for CLZERO and XSAVEERPTR

The CPUID bits CLZERO and XSAVEERPTR are availble on AMD's ZEN platform
and could be passed to the guest.

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


  Commit: d7d8783647841a4c18349fe60d0d99e0de865ce5
      
https://github.com/qemu/qemu/commit/d7d8783647841a4c18349fe60d0d99e0de865ce5
  Author: Eric Auger <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M hw/vfio/common.c
    M hw/vfio/spapr.c
    M include/hw/vfio/vfio-common.h

  Log Message:
  -----------
  vfio: Turn the container error into an Error handle

The container error integer field is currently used to store
the first error potentially encountered during any
vfio_listener_region_add() call. However this fails to propagate
detailed error messages up to the vfio_connect_container caller.
Instead of using an integer, let's use an Error handle.

Messages are slightly reworded to accomodate the propagation.

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


  Commit: 549d4005874f602e957b07459949ae514ea96f20
      
https://github.com/qemu/qemu/commit/549d4005874f602e957b07459949ae514ea96f20
  Author: Eric Auger <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M exec.c
    M hw/arm/smmuv3.c
    M hw/i386/amd_iommu.c
    M hw/i386/intel_iommu.c
    M hw/ppc/spapr_iommu.c
    M hw/vfio/common.c
    M hw/virtio/vhost.c
    M include/exec/memory.h
    M memory.c

  Log Message:
  -----------
  memory: allow memory_region_register_iommu_notifier() to fail

Currently, when a notifier is attempted to be registered and its
flags are not supported (especially the MAP one) by the IOMMU MR,
we generally abruptly exit in the IOMMU code. The failure could be
handled more nicely in the caller and especially in the VFIO code.

So let's allow memory_region_register_iommu_notifier() to fail as
well as notify_flag_changed() callback.

All sites implementing the callback are updated. This patch does
not yet remove the exit(1) in the amd_iommu code.

in SMMUv3 we turn the warning message into an error message saying
that the assigned device would not work properly.

Signed-off-by: Eric Auger <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 56f997500aabbc1435a8cd2ea7c39d92c02755b0
      
https://github.com/qemu/qemu/commit/56f997500aabbc1435a8cd2ea7c39d92c02755b0
  Author: Dmitry Poletaev <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

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

  Log Message:
  -----------
  Fix wrong behavior of cpu_memory_rw_debug() function in SMM

There is a problem, that you don't have access to the data using 
cpu_memory_rw_debug() function when in SMM. You can't remotely debug SMM mode 
program because of that for example.
Likely attrs version of get_phys_page_debug should be used to get correct asidx 
at the end to handle access properly.
Here the patch to fix it.

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


  Commit: f1cd5d41efe0eef5d536466ee17464368b028dd2
      
https://github.com/qemu/qemu/commit/f1cd5d41efe0eef5d536466ee17464368b028dd2
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M util/oslib-win32.c

  Log Message:
  -----------
  util: WSAEWOULDBLOCK on connect should map to EINPROGRESS

In general, WSAEWOULDBLOCK can be mapped to EAGAIN as done by
socket_error() (or EWOULDBLOCK). But for connect() with non-blocking
sockets, it actually means the operation is in progress:

https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-connect
"The socket is marked as nonblocking and the connection cannot be completed 
immediately."

(this is also the behaviour implemented by GLib GSocket)

This fixes socket_can_bind_connect() test on win32.

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


  Commit: 2d18ec29ba455a150f29aa5ac4d21b0ebdc5cd4d
      
https://github.com/qemu/qemu/commit/2d18ec29ba455a150f29aa5ac4d21b0ebdc5cd4d
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M tests/test-char.c

  Log Message:
  -----------
  tests: skip serial test on windows

Serial test is currently hard-coded to /dev/null.

On Windows, serial chardev expect a COM: device, which may not be
availble.

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


  Commit: 873df2cec13138718466fc5f68d801971390542b
      
https://github.com/qemu/qemu/commit/873df2cec13138718466fc5f68d801971390542b
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M util/async.c

  Log Message:
  -----------
  win32: work around main-loop busy loop on socket/fd event

Commit 05e514b1d4d5bd4209e2c8bbc76ff05c85a235f3 introduced an AIO
context optimization to avoid calling event_notifier_test_and_clear() on
ctx->notifier. On Windows, the same notifier is being used to wakeup the
wait on socket events (see commit
d3385eb448e38f828c78f8f68ec5d79c66a58b5d).

The ctx->notifier event is added to the gpoll sources in
aio_set_event_notifier(), aio_ctx_check() should clear the event
regardless of ctx->notified, since Windows sets the event by itself,
bypassing the aio->notified. This fixes qemu not clearing the event
resulting in a busy loop.

Paolo suggested to me on irc to call event_notifier_test_and_clear()
after select() >0 from aio-win32.c's aio_prepare. Unfortunately, not all
fds associated with ctx->notifiers are in AIO fd handlers set.
(qemu_set_nonblock() in util/oslib-win32.c calls qemu_fd_register()).

This is essentially a v2 of a patch that was sent earlier:
https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg00420.html

that resurfaced when James investigated Spice performance issues on Windows:
https://gitlab.freedesktop.org/spice/spice/issues/36

In order to test that patch, I simply tried running test-char on
win32, and it hangs. Applying that patch solves it. QIO idle sources
are not dispatched. I haven't investigated much further, I suspect
source priorities and busy looping still come into play.

This version keeps the "notified" field, so event_notifier_poll()
should still work as expected.

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


  Commit: 9e5ef164911480c71388c1be3c638f231ca8f719
      
https://github.com/qemu/qemu/commit/9e5ef164911480c71388c1be3c638f231ca8f719
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M tests/docker/test-clang

  Log Message:
  -----------
  tests/docker: only enable ubsan for test-clang

-fsanitize=undefined is not the same thing as --enable-sanitizers.  After
commit 47c823e ("tests/docker: add sanitizers back to clang build", 2019-09-11)
test-clang is almost duplicating the asan (test-debug) test, so
partly revert commit 47c823e5b while leaving ubsan enabled.

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


  Commit: 245edd0cfb1481b7a0398cce45df23db50f00034
      
https://github.com/qemu/qemu/commit/245edd0cfb1481b7a0398cce45df23db50f00034
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M target/i386/cpu.c

  Log Message:
  -----------
  target/i386: handle filtered_features in a new function 
mark_unavailable_features

The next patch will add a different reason for filtering features, unrelated
to host feature support.  Extract a new function that takes care of disabling
the features and optionally reporting them.

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


  Commit: 99e24dbdaa682c7b9d0bb5b463638c585bcee1c3
      
https://github.com/qemu/qemu/commit/99e24dbdaa682c7b9d0bb5b463638c585bcee1c3
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M target/i386/cpu.c

  Log Message:
  -----------
  target/i386: introduce generic feature dependency mechanism

Sometimes a CPU feature does not make sense unless another is
present.  In the case of VMX features, KVM does not even allow
setting the VMX controls to some invalid combinations.

Therefore, this patch adds a generic mechanism that looks for bits
that the user explicitly cleared, and uses them to remove other bits
from the expanded CPU definition.  If these dependent bits were also
explicitly *set* by the user, this will be a warning for "-cpu check"
and an error for "-cpu enforce".  If not, then the dependent bits are
cleared silently, for convenience.

With VMX features, this will be used so that for example
"-cpu host,-rdrand" will also hide support for RDRAND exiting.

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


  Commit: ede146c2e720b670350c7ef5e9af44e80a73fe97
      
https://github.com/qemu/qemu/commit/ede146c2e720b670350c7ef5e9af44e80a73fe97
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M include/sysemu/kvm.h
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/kvm.c

  Log Message:
  -----------
  target/i386: expand feature words to 64 bits

VMX requires 64-bit feature words for the IA32_VMX_EPT_VPID_CAP
and IA32_VMX_BASIC MSRs.  (The VMX control MSRs are 64-bit wide but
actually have only 32 bits of information).

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


  Commit: 704798add83be4ac868ffcb495480065fb665794
      
https://github.com/qemu/qemu/commit/704798add83be4ac868ffcb495480065fb665794
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M target/i386/cpu.h

  Log Message:
  -----------
  target/i386: add VMX definitions

These will be used to compile the list of VMX features for named
CPU models, and/or by the code that sets up the VMX MSRs.

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


  Commit: 49d51b8927a9ea7267f4677a2e92f5046ce74025
      
https://github.com/qemu/qemu/commit/49d51b8927a9ea7267f4677a2e92f5046ce74025
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M scripts/kvm/vmxcap

  Log Message:
  -----------
  vmxcap: correct the name of the variables

The low bits are 1 if the control must be one, the high bits
are 1 if the control can be one.  Correct the variable names
as they are very confusing.

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


  Commit: 20a78b02d31534ae478779c2f2816c273601e869
      
https://github.com/qemu/qemu/commit/20a78b02d31534ae478779c2f2816c273601e869
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

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

  Log Message:
  -----------
  target/i386: add VMX features

Add code to convert the VMX feature words back into MSR values,
allowing the user to enable/disable VMX features as they wish.  The same
infrastructure enables support for limiting VMX features in named
CPU models.

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


  Commit: 048c95163b472ed737a2f0dca4f4e23a82ac2f8a
      
https://github.com/qemu/qemu/commit/048c95163b472ed737a2f0dca4f4e23a82ac2f8a
  Author: Paolo Bonzini <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M target/i386/kvm.c

  Log Message:
  -----------
  target/i386: work around KVM_GET_MSRS bug for secondary execution controls

Some secondary controls are automatically enabled/disabled based on the CPUID
values that are set for the guest.  However, they are still available at a
global level and therefore should be present when KVM_GET_MSRS is sent to
/dev/kvm.

Unfortunately KVM forgot to include those, so fix that.

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


  Commit: a1834d975f7d329b128965dd69bc3aaa7195f5a2
      
https://github.com/qemu/qemu/commit/a1834d975f7d329b128965dd69bc3aaa7195f5a2
  Author: Thomas Huth <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M target/i386/kvm.c

  Log Message:
  -----------
  target/i386/kvm: Silence warning from Valgrind about uninitialized bytes

When I run QEMU with KVM under Valgrind, I currently get this warning:

 Syscall param ioctl(generic) points to uninitialised byte(s)
    at 0x95BA45B: ioctl (in /usr/lib64/libc-2.28.so)
    by 0x429DC3: kvm_ioctl (kvm-all.c:2365)
    by 0x51B249: kvm_arch_get_supported_msr_feature (kvm.c:469)
    by 0x4C2A49: x86_cpu_get_supported_feature_word (cpu.c:3765)
    by 0x4C4116: x86_cpu_expand_features (cpu.c:5065)
    by 0x4C7F8D: x86_cpu_realizefn (cpu.c:5242)
    by 0x5961F3: device_set_realized (qdev.c:835)
    by 0x7038F6: property_set_bool (object.c:2080)
    by 0x707EFE: object_property_set_qobject (qom-qobject.c:26)
    by 0x705814: object_property_set_bool (object.c:1338)
    by 0x498435: pc_new_cpu (pc.c:1549)
    by 0x49C67D: pc_cpus_init (pc.c:1681)
  Address 0x1ffeffee74 is on thread 1's stack
  in frame #2, created by kvm_arch_get_supported_msr_feature (kvm.c:445)

It's harmless, but a little bit annoying, so silence it by properly
initializing the whole structure with zeroes.

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


  Commit: 9e5319ca52a5b9e84d55ad9c36e2c0b317a122bb
      
https://github.com/qemu/qemu/commit/9e5319ca52a5b9e84d55ad9c36e2c0b317a122bb
  Author: Peter Maydell <address@hidden>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M accel/kvm/kvm-all.c
    M disas/cris.c
    M exec.c
    M hw/arm/smmuv3.c
    M hw/hppa/dino.c
    M hw/hppa/machine.c
    M hw/i386/amd_iommu.c
    M hw/i386/intel_iommu.c
    M hw/ide/cmd646.c
    M hw/isa/Kconfig
    M hw/isa/Makefile.objs
    M hw/m68k/mcf5208.c
    M hw/microblaze/boot.c
    M hw/mips/Kconfig
    M hw/mips/mips_int.c
    M hw/mips/mips_jazz.c
    M hw/ppc/spapr_iommu.c
    M hw/timer/lm32_timer.c
    M hw/timer/milkymist-sysctl.c
    M hw/vfio/common.c
    M hw/vfio/spapr.c
    M hw/virtio/vhost.c
    M include/exec/memory.h
    M include/hw/vfio/vfio-common.h
    M include/sysemu/kvm.h
    M memory.c
    M scripts/kvm/vmxcap
    M scsi/qemu-pr-helper.c
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/helper.c
    M target/i386/kvm.c
    M tests/docker/test-clang
    M tests/docker/test-debug
    M tests/migration-test.c
    M tests/test-char.c
    M util/async.c
    M util/oslib-win32.c

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

* Compilation fix for KVM (Alex)
* SMM fix (Dmitry)
* VFIO error reporting (Eric)
* win32 fixes and workarounds (Marc-André)
* qemu-pr-helper crash bugfix (Maxim)
* Memory leak fixes (myself)
* VMX features (myself)
* Record-replay deadlock (Pavel)
* i386 CPUID bits (Sebastian)
* kconfig tweak (Thomas)
* Valgrind fix (Thomas)
* Autoconverge test (Yury)

# gpg: Signature made Fri 04 Oct 2019 17:57:48 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: (29 commits)
  target/i386/kvm: Silence warning from Valgrind about uninitialized bytes
  target/i386: work around KVM_GET_MSRS bug for secondary execution controls
  target/i386: add VMX features
  vmxcap: correct the name of the variables
  target/i386: add VMX definitions
  target/i386: expand feature words to 64 bits
  target/i386: introduce generic feature dependency mechanism
  target/i386: handle filtered_features in a new function 
mark_unavailable_features
  tests/docker: only enable ubsan for test-clang
  win32: work around main-loop busy loop on socket/fd event
  tests: skip serial test on windows
  util: WSAEWOULDBLOCK on connect should map to EINPROGRESS
  Fix wrong behavior of cpu_memory_rw_debug() function in SMM
  memory: allow memory_region_register_iommu_notifier() to fail
  vfio: Turn the container error into an Error handle
  i386: Add CPUID bit for CLZERO and XSAVEERPTR
  docker: test-debug: disable LeakSanitizer
  lm32: do not leak memory on object_new/object_unref
  cris: do not leak struct cris_disasm_data
  mips: fix memory leaks in board initialization
  ...

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


Compare: https://github.com/qemu/qemu/compare/4f59102571fc...9e5319ca52a5



reply via email to

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