qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 46fac1: dump: add kernel_gs_base to QEMU CPU


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 46fac1: dump: add kernel_gs_base to QEMU CPU state
Date: Tue, 17 Jul 2018 10:14:51 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 46fac17dca19e52506e05530ad3bd01f6d5722e3
      
https://github.com/qemu/qemu/commit/46fac17dca19e52506e05530ad3bd01f6d5722e3
  Author: Viktor Prutyanov <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M target/i386/arch_dump.c

  Log Message:
  -----------
  dump: add kernel_gs_base to QEMU CPU state

This patch adds field with content of KERNEL_GS_BASE MSR to QEMU note in
ELF dump.

On Windows, if all vCPUs are running usermode tasks at the time the dump is
created, this can be helpful in the discovery of guest system structures
during conversion ELF dump to MEMORY.DMP dump.

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


  Commit: 696c706642023e60fcce6b38f425910cd01ec0a6
      
https://github.com/qemu/qemu/commit/696c706642023e60fcce6b38f425910cd01ec0a6
  Author: Stefan Weil <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M accel/tcg/translate-all.c

  Log Message:
  -----------
  accel: Fix typo and grammar in comment

The typo was found by codespell.

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


  Commit: 1b2013ea5ddfd7d6a1426bd716dd6528ec91a8a7
      
https://github.com/qemu/qemu/commit/1b2013ea5ddfd7d6a1426bd716dd6528ec91a8a7
  Author: Roman Kagan <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M hw/misc/hyperv_testdev.c
    M target/i386/hyperv.c
    M target/i386/hyperv.h

  Log Message:
  -----------
  hyperv: rename vcpu_id to vp_index

In Hyper-V-related code, vCPUs are identified by their VP (virtual
processor) index.  Since it's customary for "vcpu_id" in QEMU to mean
APIC id, rename the respective variables to "vp_index" to make the
distinction clear.

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


  Commit: e9688fabc32b532c9a93794c37e343facd5ecd36
      
https://github.com/qemu/qemu/commit/e9688fabc32b532c9a93794c37e343facd5ecd36
  Author: Roman Kagan <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M hw/i386/pc.c
    M target/i386/hyperv.c
    M target/i386/hyperv.h
    M target/i386/kvm-stub.c
    M target/i386/kvm.c
    M target/i386/kvm_i386.h

  Log Message:
  -----------
  hyperv: ensure VP index equal to QEMU cpu_index

Hyper-V identifies vCPUs by Virtual Processor (VP) index which can be
queried by the guest via HV_X64_MSR_VP_INDEX msr.  It is defined by the
spec as a sequential number which can't exceed the maximum number of
vCPUs per VM.

It has to be owned by QEMU in order to preserve it across migration.

However, the initial implementation in KVM didn't allow to set this
msr, and KVM used its own notion of VP index.  Fortunately, the way
vCPUs are created in QEMU/KVM makes it likely that the KVM value is
equal to QEMU cpu_index.

So choose cpu_index as the value for vp_index, and push that to KVM on
kernels that support setting the msr.  On older ones that don't, query
the kernel value and assert that it's in sync with QEMU.

Besides, since handling errors from vCPU init at hotplug time is
impossible, disable vCPU hotplug.

This patch also introduces accessor functions to encapsulate the mapping
between a vCPU and its vp_index.

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


  Commit: 9ee8a692f1da77d798842fdc1e0dc2a5ff0fc0c1
      
https://github.com/qemu/qemu/commit/9ee8a692f1da77d798842fdc1e0dc2a5ff0fc0c1
  Author: Emanuele Giuseppe Esposito <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M tests/vhost-user-test.c

  Log Message:
  -----------
  vhost-user-test: added proper TestServer *dest initialization in 
test_migrate()

server->bus in _test_server_free() could be NULL, since TestServer
*dest in test_migrate() was not properly initialized like TestServer *s.
Added init_virtio_dev(dest) and uninit_virtio_dev(dest), so the fields
are properly set and when test_server_free(dest); is called, they can
be correctly freed.

The reason for that is init_virtio_dev() calls qpci_init_pc(), that
creates a QPCIBusPC * (returned as QPCIBus *), while test_server_free()
calls qpci_free_pc(), that frees the QPCIBus *. Not calling
init_virtio_dev() would leave the QPCIBus * of TestServer unset.

Problem came out once I modified  pci-pc.c and pci-pc.h, modifying
QPCIBusPC by adding another field before QPCIBus bus. Re-running the
tests showed vhost-user-test failing.

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


  Commit: 0147883450fe84bb8de2d4a58381881f4262ce9b
      
https://github.com/qemu/qemu/commit/0147883450fe84bb8de2d4a58381881f4262ce9b
  Author: Calvin Lee <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M hw/char/serial.c

  Log Message:
  -----------
  PC Chipset: Improve serial divisor calculation

This fixes several problems I found in the UART serial implementation.
Now all divisor values are allowed, while before divisor values of zero
and below the base baud rate were rejected. All changes are in reference
to http://www.sci.muni.cz/docs/pc/serport.txt

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


  Commit: f3575af130c700cea060b51a89008a76dae22259
      
https://github.com/qemu/qemu/commit/f3575af130c700cea060b51a89008a76dae22259
  Author: Marc-André Lureau <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M hw/char/serial.c

  Log Message:
  -----------
  hw/char/serial: retry write if EAGAIN

If the chardev returns -1 with EAGAIN errno on write(), it should try
to send it again (EINTR is handled by the chardev itself).

This fixes commit 019288bf137183bf3407c9824655b753bfafc99f
"hw/char/serial: Only retry if qemu_chr_fe_write returns 0"

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


  Commit: 25e8978817a54745c44d956d8303e6be6f2c4047
      
https://github.com/qemu/qemu/commit/25e8978817a54745c44d956d8303e6be6f2c4047
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M hw/core/hotplug.c
    M hw/core/qdev.c
    M include/hw/hotplug.h

  Log Message:
  -----------
  qdev: add HotplugHandler->post_plug() callback

The ->pre_plug() callback is invoked before the device is realized.  The
->plug() callback is invoked when the device is being realized but
before it is reset.

This patch adds a ->post_plug() callback which is invoked after the
device has been reset.  This callback is needed by HotplugHandlers that
need to wait until after ->reset().

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


  Commit: 8449bcf94986156a1476d6647c75ec1ce3db64d0
      
https://github.com/qemu/qemu/commit/8449bcf94986156a1476d6647c75ec1ce3db64d0
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2018-07-16 (Mon, 16 Jul 2018)

  Changed paths:
    M hw/scsi/virtio-scsi.c

  Log Message:
  -----------
  virtio-scsi: fix hotplug ->reset() vs event race

There is a race condition during hotplug when iothread is used.  It
occurs because virtio-scsi may be processing command queues in the
iothread while the monitor performs SCSI device hotplug.

When a SCSI device is hotplugged the HotplugHandler->plug() callback is
invoked and virtio-scsi emits a rescan event to the guest.

If the guest submits a SCSI command at this point then it may be
cancelled before hotplug completes.  This happens because ->reset() is
called by hw/core/qdev.c:device_set_realized() after
HotplugHandler->plug() has been called and
hw/scsi/scsi-disk.c:scsi_disk_reset() purges all requests.

This patch uses the new HotplugHandler->post_plug() callback to emit the
rescan event after ->reset().  This eliminates the race conditions where
requests could be cancelled.

Reported-by: l00284672 <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Fam Zheng <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6e3ad3f0e31b8e31c6c0769d0f474bcd9673e0e5
      
https://github.com/qemu/qemu/commit/6e3ad3f0e31b8e31c6c0769d0f474bcd9673e0e5
  Author: Daniel P. Berrangé <address@hidden>
  Date:   2018-07-17 (Tue, 17 Jul 2018)

  Changed paths:
    M hw/i386/multiboot.c
    M util/qemu-option.c

  Log Message:
  -----------
  i386: fix regression parsing multiboot initrd modules

The logic for parsing the multiboot initrd modules was messed up in

  commit 950c4e6c94b15cd0d8b63891dddd7a8dbf458e6a
  Author: Daniel P. Berrangé <address@hidden>
  Date:   Mon Apr 16 12:17:43 2018 +0100

    opts: don't silently truncate long option values

Causing the length to be undercounter, and the number of modules over
counted. It also passes NULL to get_opt_value() which was not robust
at accepting a NULL value.

Signed-off-by: Daniel P. Berrangé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Tested-by: Roman Kagan <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f8da93a0ffa09268815c1942732cbc616a7db847
      
https://github.com/qemu/qemu/commit/f8da93a0ffa09268815c1942732cbc616a7db847
  Author: Daniel P. Berrangé <address@hidden>
  Date:   2018-07-17 (Tue, 17 Jul 2018)

  Changed paths:
    M hw/i386/multiboot.c

  Log Message:
  -----------
  i386: only parse the initrd_filename once for multiboot modules

The multiboot code parses the initrd_filename twice, first to count how
many entries there are, and second to process each entry. This changes
the first loop to store the parse module names in a list, and the second
loop can now use these names. This avoids having to pass NULL to the
get_opt_value() method which means it can safely assume a non-NULL param.

Signed-off-by: Daniel P. Berrangé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Tested-by: Roman Kagan <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 0c2f6e7ee99517449b4ed6cf333c2d9456d8fe35
      
https://github.com/qemu/qemu/commit/0c2f6e7ee99517449b4ed6cf333c2d9456d8fe35
  Author: Daniel P. Berrangé <address@hidden>
  Date:   2018-07-17 (Tue, 17 Jul 2018)

  Changed paths:
    M util/qemu-option.c

  Log Message:
  -----------
  opts: remove redundant check for NULL parameter

No callers of get_opt_value() pass in a NULL for the "value" parameter,
so the check is redundant.

Signed-off-by: Daniel P. Berrangé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Tested-by: Roman Kagan <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: dfaa7d50b0f72060764096ffcae4a0c06ce24f9b
      
https://github.com/qemu/qemu/commit/dfaa7d50b0f72060764096ffcae4a0c06ce24f9b
  Author: BALATON Zoltan <address@hidden>
  Date:   2018-07-17 (Tue, 17 Jul 2018)

  Changed paths:
    M qemu-options.hx

  Log Message:
  -----------
  Document command line options with single dash

QEMU options have a single dash (but also work as double dash for
convenience and compatibility). Most options are listed with single
dash in command line help but some were listed with two dashes.
Normalize these to have the same format as the others.

Left --preconfig as that is mentioned as double dash everywhere so I
assume that is the preferred form for that.

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


  Commit: 59b5552f020b739e273e969a0933c23d8f4e2284
      
https://github.com/qemu/qemu/commit/59b5552f020b739e273e969a0933c23d8f4e2284
  Author: Peter Maydell <address@hidden>
  Date:   2018-07-17 (Tue, 17 Jul 2018)

  Changed paths:
    M accel/tcg/translate-all.c
    M hw/char/serial.c
    M hw/core/hotplug.c
    M hw/core/qdev.c
    M hw/i386/multiboot.c
    M hw/i386/pc.c
    M hw/misc/hyperv_testdev.c
    M hw/scsi/virtio-scsi.c
    M include/hw/hotplug.h
    M qemu-options.hx
    M target/i386/arch_dump.c
    M target/i386/hyperv.c
    M target/i386/hyperv.h
    M target/i386/kvm-stub.c
    M target/i386/kvm.c
    M target/i386/kvm_i386.h
    M tests/vhost-user-test.c
    M util/qemu-option.c

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

Bug fixes.

# gpg: Signature made Tue 17 Jul 2018 16:06:07 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:
  Document command line options with single dash
  opts: remove redundant check for NULL parameter
  i386: only parse the initrd_filename once for multiboot modules
  i386: fix regression parsing multiboot initrd modules
  virtio-scsi: fix hotplug ->reset() vs event race
  qdev: add HotplugHandler->post_plug() callback
  hw/char/serial: retry write if EAGAIN
  PC Chipset: Improve serial divisor calculation
  vhost-user-test: added proper TestServer *dest initialization in 
test_migrate()
  hyperv: ensure VP index equal to QEMU cpu_index
  hyperv: rename vcpu_id to vp_index
  accel: Fix typo and grammar in comment
  dump: add kernel_gs_base to QEMU CPU state

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


Compare: https://github.com/qemu/qemu/compare/ccf02d73d189...59b5552f020b
      **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]