qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 14a10f: cpu: Partially revert "cpu: Change qe


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 14a10f: cpu: Partially revert "cpu: Change qemu_init_vcpu(...
Date: Mon, 29 Jul 2013 10:30:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 14a10fc39923b3af07c8c46d22cb20843bee3a72
      
https://github.com/qemu/qemu/commit/14a10fc39923b3af07c8c46d22cb20843bee3a72
  Author: Andreas Färber <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M qom/cpu.c
    M target-alpha/cpu.c
    M target-arm/cpu.c
    M target-cris/cpu.c
    M target-i386/cpu.c
    M target-lm32/cpu.c
    M target-m68k/cpu.c
    M target-microblaze/cpu.c
    M target-mips/cpu.c
    M target-moxie/cpu.c
    M target-openrisc/cpu.c
    M target-ppc/translate_init.c
    M target-s390x/cpu.c
    M target-sh4/cpu.c
    M target-sparc/cpu.c
    M target-unicore32/cpu.c
    M target-xtensa/cpu.c

  Log Message:
  -----------
  cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"

Commit c643bed99 moved qemu_init_vcpu() calls to common CPUState code.
This causes x86 cpu-add to fail with "KVM: setting VAPIC address failed".

The reason for the failure is that CPUClass::kvm_fd is not yet
initialized in the following call graph:
->x86_cpu_realizefn
 ->x86_cpu_apic_realize
  ->qdev_init
   ->device_set_realized
    ->device_reset (hotplugged == 1)
     ->apic_reset_common
      ->vapic_base_update
       ->kvm_apic_vapic_base_update
This causes attempted KVM vCPU ioctls to fail.

By contrast, in the non-hotplug case the APIC is reset much later, when
the vCPU is already initialized.

As a quick and safe solution, move the qemu_init_vcpu() call back into
the targets' realize functions.

Reported-by: Chen Fan <address@hidden>
Acked-by: Igor Mammedov <address@hidden> (for i386)
Tested-by: Jia Liu <address@hidden> (for openrisc)
Signed-off-by: Andreas Färber <address@hidden>


  Commit: c139911261c5acc9dae56b1180db320ba25636bd
      
https://github.com/qemu/qemu/commit/c139911261c5acc9dae56b1180db320ba25636bd
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Pass X86CPU object to cpu_x86_find_by_name()

This will help us change the initialization code to not require carrying
some intermediate values in a x86_def_t struct (and eventually kill the
x86_def_t struct entirely).

Signed-off-by: Eduardo Habkost <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>


  Commit: 9337e3b6e1d779215423d9b419d42200506deaab
      
https://github.com/qemu/qemu/commit/9337e3b6e1d779215423d9b419d42200506deaab
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M include/hw/i386/pc.h
    M target-i386/cpu-qom.h
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Disable PMU CPUID leaf by default

Bug description: QEMU currently gets all bits from GET_SUPPORTED_CPUID
for CPUID leaf 0xA and passes them directly to the guest. This makes
the guest ABI depend on host kernel and host CPU capabilities, and
breaks live migration if we migrate between hosts with different
capabilities (e.g., different number of PMU counters).

Add a "pmu" property to X86CPU, and set it to true only on "-cpu host",
or on pc-*-1.5 and older machine-types.

For now, setting pmu=on will enable the current passthrough mode that
doesn't have any ABI stability guarantees, but in the future we may
implement a mode where the PMU CPUID bits are stable and configurable.

Signed-off-by: Eduardo Habkost <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>


  Commit: 42ec24e2851674e0899f71933e0d7d9125f31d76
      
https://github.com/qemu/qemu/commit/42ec24e2851674e0899f71933e0d7d9125f31d76
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M block/gluster.c

  Log Message:
  -----------
  gluster: Add image resize support

Implement .bdrv_truncate in GlusterFS block driver so that GlusterFS backend
can support image resizing.

Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Bharata B Rao <address@hidden>
Tested-by: Bharata B Rao <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: b681a1c73e15e08c70c10cccd9c9f5b65cca12e8
      
https://github.com/qemu/qemu/commit/b681a1c73e15e08c70c10cccd9c9f5b65cca12e8
  Author: Benoît Canet <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M block.c
    M include/block/coroutine.h
    M qemu-coroutine-lock.c

  Log Message:
  -----------
  block: Repair the throttling code.

The throttling code was segfaulting since commit
02ffb504485f0920cfc75a0982a602f824a9a4f4 because some qemu_co_queue_next caller
does not run in a coroutine.
qemu_co_queue_do_restart assume that the caller is a coroutinne.
As suggested by Stefan fix this by entering the coroutine directly.
Also make sure like suggested that qemu_co_queue_next() and
qemu_co_queue_restart_all() can be called only in coroutines.

Signed-off-by: Benoit Canet <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 9287ac271d83166f99e050a0e0a4ebd462f7eb2b
      
https://github.com/qemu/qemu/commit/9287ac271d83166f99e050a0e0a4ebd462f7eb2b
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M migration.c

  Log Message:
  -----------
  migration: notify migration state before starting thread

The migration thread runs outside the QEMU global mutex when possible.
Therefore we must notify migration state change *before* starting the
migration thread.

This allows registered listeners to act before live migration iterations
begin.  Therefore they can get into a state that allows for live
migration.  When the migration thread starts everything will be ready.

Without this patch there is a race condition during migration setup,
depending on whether the migration thread has already transitioned from
SETUP to ACTIVE state.

Acked-by: Paolo Bonzini <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 02edd2e7665bceb307bedd8afe625c0f7e8d7cfa
      
https://github.com/qemu/qemu/commit/02edd2e7665bceb307bedd8afe625c0f7e8d7cfa
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M include/migration/migration.h
    M migration.c
    M ui/spice-core.c

  Log Message:
  -----------
  migration: fix spice migration

Commit 29ae8a4133082e16970c9d4be09f4b6a15034617 ("rdma: introduce
MIG_STATE_NONE and change MIG_STATE_SETUP state transition") changed the
state transitions during migration setup.

Spice used to be notified with MIG_STATE_ACTIVE and it detected this
using migration_is_active().  Spice is now notified with
MIG_STATE_SETUP and migration_is_active() no longer works.

Replace migration_is_active() with migration_in_setup() to fix spice
migration.

Cc: Michael R. Hines <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 84db52d059f3296abf7783968645c4a96d21b099
      
https://github.com/qemu/qemu/commit/84db52d059f3296abf7783968645c4a96d21b099
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/block/dataplane/virtio-blk.c
    M hw/block/virtio-blk.c
    M include/hw/virtio/virtio-blk.h

  Log Message:
  -----------
  dataplane: enable virtio-blk x-data-plane=on live migration

Although the dataplane thread does not cooperate with dirty memory
logging yet it's fairly easy to temporarily disable dataplane during
live migration.  This way virtio-blk can live migrate when
x-data-plane=on.

The dataplane thread will restart after migration is cancelled or if the
guest resuming virtio-blk operation after migration completes.

Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: b0f2027cde31c645524256763672e09eeb204a9a
      
https://github.com/qemu/qemu/commit/b0f2027cde31c645524256763672e09eeb204a9a
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M hw/block/dataplane/virtio-blk.c

  Log Message:
  -----------
  dataplane: refuse to start if device is already in use

Dataplane must check whether a block device is in use before launching
the dataplane thread.  This is necessary since the thread does not
synchronize with the main loop and I/O requests could cause corruption.

One example is when a drive is added and a block job is started before
hotplugging the virtio-blk-pci adapter.  In this case we must not use
dataplane mode.

Cc: address@hidden
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 4ff1fac4305f78d9cf987ca8abf3bda7f29c856e
      
https://github.com/qemu/qemu/commit/4ff1fac4305f78d9cf987ca8abf3bda7f29c856e
  Author: Anthony Liguori <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M include/hw/i386/pc.h
    M qom/cpu.c
    M target-alpha/cpu.c
    M target-arm/cpu.c
    M target-cris/cpu.c
    M target-i386/cpu-qom.h
    M target-i386/cpu.c
    M target-lm32/cpu.c
    M target-m68k/cpu.c
    M target-microblaze/cpu.c
    M target-mips/cpu.c
    M target-moxie/cpu.c
    M target-openrisc/cpu.c
    M target-ppc/translate_init.c
    M target-s390x/cpu.c
    M target-sh4/cpu.c
    M target-sparc/cpu.c
    M target-unicore32/cpu.c
    M target-xtensa/cpu.c

  Log Message:
  -----------
  Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging

QOM CPUState refactorings

* Fix x86 cpu-add
* Change KVM PMU behavior for 1.6

# gpg: Signature made Mon 29 Jul 2013 10:28:18 AM CDT using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found

# By Eduardo Habkost (2) and Andreas Färber (1)
# Via Andreas Färber
* afaerber/tags/qom-cpu-for-anthony:
  target-i386: Disable PMU CPUID leaf by default
  target-i386: Pass X86CPU object to cpu_x86_find_by_name()
  cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"


  Commit: eddbf0ab9db8385d7cb57e23891c1d41488b303e
      
https://github.com/qemu/qemu/commit/eddbf0ab9db8385d7cb57e23891c1d41488b303e
  Author: Anthony Liguori <address@hidden>
  Date:   2013-07-29 (Mon, 29 Jul 2013)

  Changed paths:
    M block.c
    M block/gluster.c
    M hw/block/dataplane/virtio-blk.c
    M hw/block/virtio-blk.c
    M include/block/coroutine.h
    M include/hw/virtio/virtio-blk.h
    M include/migration/migration.h
    M migration.c
    M qemu-coroutine-lock.c
    M ui/spice-core.c

  Log Message:
  -----------
  Merge remote-tracking branch 'stefanha/block' into staging

# By Stefan Hajnoczi (4) and others
# Via Stefan Hajnoczi
* stefanha/block:
  dataplane: refuse to start if device is already in use
  dataplane: enable virtio-blk x-data-plane=on live migration
  migration: fix spice migration
  migration: notify migration state before starting thread
  block: Repair the throttling code.
  gluster: Add image resize support

Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


Compare: https://github.com/qemu/qemu/compare/3a1da42eb35a...eddbf0ab9db8

reply via email to

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