qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] c8e208: kvm: run cpu state synchronization on


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] c8e208: kvm: run cpu state synchronization on target vcpu ...
Date: Thu, 28 Aug 2014 09:30:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c8e2085d8e7a64d753eb2a43e4aeae674a99d2ff
      
https://github.com/qemu/qemu/commit/c8e2085d8e7a64d753eb2a43e4aeae674a99d2ff
  Author: David Hildenbrand <address@hidden>
  Date:   2014-08-20 (Wed, 20 Aug 2014)

  Changed paths:
    M kvm-all.c

  Log Message:
  -----------
  kvm: run cpu state synchronization on target vcpu thread

As already done for kvm_cpu_synchronize_state(), let's trigger
kvm_arch_put_registers() via run_on_cpu() for kvm_cpu_synchronize_post_reset()
and kvm_cpu_synchronize_post_init().

This way, we make sure that the register synchronizing ioctls are
called from the proper vcpu thread; this avoids calls to
synchronize_rcu() in the kernel.

Reviewed-by: Cornelia Huck <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9cb805fd2674f474d058fee6d7aa9e83fcd3d336
      
https://github.com/qemu/qemu/commit/9cb805fd2674f474d058fee6d7aa9e83fcd3d336
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2014-08-25 (Mon, 25 Aug 2014)

  Changed paths:
    M cpus.c
    M hmp-commands.hx
    M hw/core/Makefile.objs
    A hw/core/nmi.c
    A include/hw/nmi.h
    M qapi-schema.json
    M qmp-commands.hx

  Log Message:
  -----------
  cpus: Define callback for QEMU "nmi" command

This introduces an NMI (Non Maskable Interrupt) interface with
a single nmi_monitor_handler() method. A machine or a device can
implement it. This searches for an QOM object with this interface
and if it is implemented, calls it. The callback implements an action
required to cause debug crash dump on in-kernel debugger invocation.
The callback returns Error**.

This adds a nmi_monitor_handle() helper which walks through
all objects to find the interface. The interface method is called
for all found instances.

This adds support for it in qmp_inject_nmi(). Since no architecture
supports it at the moment, there is no change in behaviour.

This changes inject-nmi command description for HMP and QMP.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: Alexander Graf <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d07aa7c7bb06fdc9973059889b33dfca1d2efe55
      
https://github.com/qemu/qemu/commit/d07aa7c7bb06fdc9973059889b33dfca1d2efe55
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2014-08-25 (Mon, 25 Aug 2014)

  Changed paths:
    M hw/s390x/s390-virtio-ccw.c
    M hw/s390x/s390-virtio.c

  Log Message:
  -----------
  s390x: Convert QEMUMachine to MachineClass

This converts s390-virtio and s390-ccw-virtio machines to QOM MachineClass.
This brings ability to add interfaces to the machine classes. The first
interface for addition will be NMI.

The patch is mechanical so no change in behavior is expected.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Alexander Graf <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3dd7852f1925ec1b3eca32c894e1a84882e145f1
      
https://github.com/qemu/qemu/commit/3dd7852f1925ec1b3eca32c894e1a84882e145f1
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2014-08-25 (Mon, 25 Aug 2014)

  Changed paths:
    M cpus.c
    M hw/s390x/s390-virtio-ccw.c
    M hw/s390x/s390-virtio.c
    M hw/s390x/s390-virtio.h

  Log Message:
  -----------
  s390x: Migrate to new NMI interface

This implements an NMI interface for s390 and s390-ccw machines.

This removes #ifdef s390 branch in qmp_inject_nmi so new s390's
nmi_monitor_handler() callback is going to be used for NMI.

Since nmi_monitor_handler()-calling code is platform independent,
CPUState::cpu_index is used instead of S390CPU::env.cpu_num.
There should not be any change in behaviour as both @cpu_index and
@cpu_num are global CPU numbers.

Note that s390_cpu_restart() already takes care of the specified cpu,
so we don't need to schedule via async_run_on_cpu().

Since the only error s390_cpu_restart() can return is ENOSYS, convert
it to QERR_UNSUPPORTED.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: Alexander Graf <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3431648272d317ed768fe46183c7a1cea4803732
      
https://github.com/qemu/qemu/commit/3431648272d317ed768fe46183c7a1cea4803732
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2014-08-25 (Mon, 25 Aug 2014)

  Changed paths:
    M hw/ppc/spapr.c
    M target-ppc/cpu-qom.h
    M target-ppc/excp_helper.c

  Log Message:
  -----------
  spapr: Add support for new NMI interface

This implements an NMI interface POWERPC SPAPR machine.
This enables an "nmi" HMP/QMP command supported on SPAPR.

This calls POWERPC_EXCP_RESET (vector 0x100) in the guest to deliver NMI
to every CPU. The expected result is XMON (in-kernel debugger) invocation.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: Alexander Graf <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 1844e68ecabbdfdf0228774bcd5cf0f63ffc2e57
      
https://github.com/qemu/qemu/commit/1844e68ecabbdfdf0228774bcd5cf0f63ffc2e57
  Author: William Grant <address@hidden>
  Date:   2014-08-25 (Mon, 25 Aug 2014)

  Changed paths:
    M target-i386/helper.c

  Log Message:
  -----------
  target-i386: Don't forbid NX bit on PAE PDEs and PTEs

Commit e8f6d00c30ed88910d0d985f4b2bf41654172ceb ("target-i386: raise
page fault for reserved physical address bits") added a check that the
NX bit is not set on PAE PDPEs, but it also added it to rsvd_mask for
the rest of the function. This caused any PDEs or PTEs with NX set to be
erroneously rejected, making PAE guests with NX support unusable.

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


  Commit: d8b5c67b05420d966664664ff287af05b884bdd1
      
https://github.com/qemu/qemu/commit/d8b5c67b05420d966664664ff287af05b884bdd1
  Author: Alex Williamson <address@hidden>
  Date:   2014-08-25 (Mon, 25 Aug 2014)

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

  Log Message:
  -----------
  x86: Use common variable range MTRR counts

We currently define the number of variable range MTRR registers as 8
in the CPUX86State structure and vmstate, but use MSR_MTRRcap_VCNT
(also 8) to report to guests the number available.  Change this to
use MSR_MTRRcap_VCNT consistently.

Signed-off-by: Alex Williamson <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d1ae67f626c5ed5729e1d8212834291b409d26df
      
https://github.com/qemu/qemu/commit/d1ae67f626c5ed5729e1d8212834291b409d26df
  Author: Alex Williamson <address@hidden>
  Date:   2014-08-25 (Mon, 25 Aug 2014)

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

  Log Message:
  -----------
  x86: kvm: Add MTRR support for kvm_get|put_msrs()

The MTRR state in KVM currently runs completely independent of the
QEMU state in CPUX86State.mtrr_*.  This means that on migration, the
target loses MTRR state from the source.  Generally that's ok though
because KVM ignores it and maps everything as write-back anyway.  The
exception to this rule is when we have an assigned device and an IOMMU
that doesn't promote NoSnoop transactions from that device to be cache
coherent.  In that case KVM trusts the guest mapping of memory as
configured in the MTRR.

This patch updates kvm_get|put_msrs() so that we retrieve the actual
vCPU MTRR settings and therefore keep CPUX86State synchronized for
migration.  kvm_put_msrs() is also used on vCPU reset and therefore
allows future modificaitons of MTRR state at reset to be realized.

Note that the entries array used by both functions was already
slightly undersized for holding every possible MSR, so this patch
increases it beyond the 28 new entries necessary for MTRR state.

Signed-off-by: Alex Williamson <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9db2efd95e13330075bff027cd682a063d725332
      
https://github.com/qemu/qemu/commit/9db2efd95e13330075bff027cd682a063d725332
  Author: Alex Williamson <address@hidden>
  Date:   2014-08-25 (Mon, 25 Aug 2014)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  x86: Clear MTRRs on vCPU reset

The SDM specifies (June 2014 Vol3 11.11.5):

    On a hardware reset, the P6 and more recent processors clear the
    valid flags in variable-range MTRRs and clear the E flag in the
    IA32_MTRR_DEF_TYPE MSR to disable all MTRRs. All other bits in the
    MTRRs are undefined.

We currently do none of that, so whatever MTRR settings you had prior
to reset is what you have after reset.  Usually this doesn't matter
because KVM often ignores the guest mappings and uses write-back
anyway.  However, if you have an assigned device and an IOMMU that
allows NoSnoop for that device, KVM defers to the guest memory
mappings which are now stale after reset.  The result is that OVMF
rebooting on such a configuration takes a full minute to LZMA
decompress the firmware volume, a process that is nearly instant on
the initial boot.

Signed-off-by: Alex Williamson <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a6859deb6908261c9a9adf9cc4b8863fc0897b5c
      
https://github.com/qemu/qemu/commit/a6859deb6908261c9a9adf9cc4b8863fc0897b5c
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-26 (Tue, 26 Aug 2014)

  Changed paths:
    M scripts/checkpatch.pl

  Log Message:
  -----------
  checkpatch.pl: adjust typedef definition to QEMU coding style

Most QEMU typedefs are camelcase, starting with one uppercase letter
and containing at least one lowercase letter.  There are a few
all-uppercase types, add the most common too.

This fixes recognition of types in lines such as

    static __attribute__((unused)) inline void tcg_out8(TCGContext *s, uint8_t 
v)

(Example provided by Peter Maydell).

Reported-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Stefan Weil <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 7b71758d79106a63a0b8aba02df752d9995ea50c
      
https://github.com/qemu/qemu/commit/7b71758d79106a63a0b8aba02df752d9995ea50c
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-26 (Tue, 26 Aug 2014)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: process -object after other backend options

QOM backends can refer to chardevs, but not vice versa.  So
process -chardev and -fsdev options before -object

This fixes the rng-egd backend to virtio-rng.

Reported-by: Amos Kong <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 5bd8ff07e65d066f1e90f05d49ee634f3ccd2664
      
https://github.com/qemu/qemu/commit/5bd8ff07e65d066f1e90f05d49ee634f3ccd2664
  Author: Eduardo Habkost <address@hidden>
  Date:   2014-08-26 (Tue, 26 Aug 2014)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Add "mpx" CPU feature name

Migration support for MPX is already implemented (commit
79e9ebebbf2a00c46fcedb6dc7dd5e12bbd30216), so we can add it to the list
of known feature names.

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


  Commit: 7b458bfd12a71b3da6b531daedc417492c9334e0
      
https://github.com/qemu/qemu/commit/7b458bfd12a71b3da6b531daedc417492c9334e0
  Author: Eduardo Habkost <address@hidden>
  Date:   2014-08-26 (Tue, 26 Aug 2014)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Add "tsc_adjust" CPU feature name

tsc_adjust migration support is already implemented (commit
f28558d3d37ad3bc4e35e8ac93f7bf81a0d5622c), so we can add it to the list
of known feature names.

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


  Commit: 172dbc52b39c86d7569af5251cca78cb2c74c912
      
https://github.com/qemu/qemu/commit/172dbc52b39c86d7569af5251cca78cb2c74c912
  Author: Paolo Bonzini <address@hidden>
  Date:   2014-08-27 (Wed, 27 Aug 2014)

  Changed paths:
    M hw/timer/mc146818rtc.c

  Log Message:
  -----------
  mc146818rtc: reinitialize irq_reinject_on_ack_count on reset

This field was forgotten, and it makes the state after reset
non-deterministic.

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


  Commit: 38a01e55d268aeba68c84eea425252e7f810feaf
      
https://github.com/qemu/qemu/commit/38a01e55d268aeba68c84eea425252e7f810feaf
  Author: Peter Maydell <address@hidden>
  Date:   2014-08-28 (Thu, 28 Aug 2014)

  Changed paths:
    M cpus.c
    M hmp-commands.hx
    M hw/core/Makefile.objs
    A hw/core/nmi.c
    M hw/ppc/spapr.c
    M hw/s390x/s390-virtio-ccw.c
    M hw/s390x/s390-virtio.c
    M hw/s390x/s390-virtio.h
    M hw/timer/mc146818rtc.c
    A include/hw/nmi.h
    M kvm-all.c
    M qapi-schema.json
    M qmp-commands.hx
    M scripts/checkpatch.pl
    M target-i386/cpu.c
    M target-i386/cpu.h
    M target-i386/helper.c
    M target-i386/kvm.c
    M target-i386/machine.c
    M target-ppc/cpu-qom.h
    M target-ppc/excp_helper.c
    M vl.c

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

Mostly bugfixes + Alexey's interface-based implementation
of the NMI monitor command.

# gpg: Signature made Thu 28 Aug 2014 15:07:22 BST using RSA key ID 9B4D86F2
# gpg: Good signature from "Paolo Bonzini <address@hidden>"
# gpg:                 aka "Paolo Bonzini <address@hidden>"

* remotes/kvm/tags/for-upstream:
  mc146818rtc: reinitialize irq_reinject_on_ack_count on reset
  target-i386: Add "tsc_adjust" CPU feature name
  target-i386: Add "mpx" CPU feature name
  vl: process -object after other backend options
  checkpatch.pl: adjust typedef definition to QEMU coding style
  x86: Clear MTRRs on vCPU reset
  x86: kvm: Add MTRR support for kvm_get|put_msrs()
  x86: Use common variable range MTRR counts
  target-i386: Don't forbid NX bit on PAE PDEs and PTEs
  spapr: Add support for new NMI interface
  s390x: Migrate to new NMI interface
  s390x: Convert QEMUMachine to MachineClass
  cpus: Define callback for QEMU "nmi" command
  kvm: run cpu state synchronization on target vcpu thread

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


Compare: https://github.com/qemu/qemu/compare/795c050e379a...38a01e55d268

reply via email to

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