qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 41c6bc: libqemustub: Add qemu_[un]register_re


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 41c6bc: libqemustub: Add qemu_[un]register_reset() stubs
Date: Tue, 08 Jan 2013 14:37:12 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 41c6bcd912d1a2461313040566077b86e48eea31
      
https://github.com/qemu/qemu/commit/41c6bcd912d1a2461313040566077b86e48eea31
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M stubs/Makefile.objs
    A stubs/reset.c

  Log Message:
  -----------
  libqemustub: Add qemu_[un]register_reset() stubs

This will be useful for code that don't call qemu_devices_reset() (e.g.
*-user). If qemu_devices_reset() is never called, it means we don't need
to keep track of the reset handler list.

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


  Commit: 083a5f8731bb3c7e0eae99dcdb1209027d770aaf
      
https://github.com/qemu/qemu/commit/083a5f8731bb3c7e0eae99dcdb1209027d770aaf
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M stubs/Makefile.objs
    A stubs/vmstate.c

  Log Message:
  -----------
  libqemustub: vmstate register/unregister stubs

Add vmstate stub functions, so that qdev.o can be used without savevm.o
when vmstate support is not necessary (i.e. by *-user).

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


  Commit: 906709a151344805df4ff493a7d3a81fbce46fbe
      
https://github.com/qemu/qemu/commit/906709a151344805df4ff493a7d3a81fbce46fbe
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M stubs/Makefile.objs
    A stubs/sysbus.c

  Log Message:
  -----------
  libqemustub: sysbus_get_default() stub

The stub will be used on cases where sysbus.c is not compiled in (e.g.
*-user).

Note that code that uses NULL as the bus with qdev{_try,}_create()
implicitly uses sysbus_get_default() as the bus, and will still require
sysbus.c to be compiled in.

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


  Commit: 507066f8a9610c0088df19ce7b3e436f43165ec1
      
https://github.com/qemu/qemu/commit/507066f8a9610c0088df19ce7b3e436f43165ec1
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M Makefile.objs
    M hw/Makefile.objs

  Log Message:
  -----------
  qdev: Include qdev code into *-user, too

The code depends on some functions from qemu-option.o, so add
qemu-option.o to universal-obj-y to make sure it's included.

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


  Commit: 5d5b24d042072fb4d13e7027f6e52e44390a9896
      
https://github.com/qemu/qemu/commit/5d5b24d042072fb4d13e7027f6e52e44390a9896
  Author: Andreas Färber <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M hw/qdev.c

  Log Message:
  -----------
  qdev: Don't assume existence of parent bus on unparenting

Commit 667d22d1ae59da46b4c1fbd094ca61145f19b8c3 (qdev: move bus removal
to object_unparent) made the assumption that at unparenting time
parent_bus is not NULL. This assumption is unjustified since
object_unparent() may well be called directly after object_initialize(),
without any qdev_set_parent_bus().

This did not cause any issues yet because qdev_[try_]create() does call
qdev_set_parent_bus(), falling back to SysBus if unsupplied.

While at it, ensure that this new function uses the device_ prefix and
make the name more neutral in light of this semantic change.

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


  Commit: 961f839570f01d60a0b224248e6e56fc1d675793
      
https://github.com/qemu/qemu/commit/961f839570f01d60a0b224248e6e56fc1d675793
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M include/qom/cpu.h
    M qom/cpu.c

  Log Message:
  -----------
  cpu: Change parent type to Device

This finally makes the CPU class a subclass of the Device class,
allowing us to start using DeviceState properties on CPU subclasses.

It has no_user=1, as creating CPUs using -device doesn't work yet.

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


  Commit: fcb93c036053ca8a5cfc02ca72b1b80dd2062423
      
https://github.com/qemu/qemu/commit/fcb93c036053ca8a5cfc02ca72b1b80dd2062423
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: kvm: -cpu host: Use GET_SUPPORTED_CPUID for SVM features

The existing -cpu host code simply sets every bit inside svm_features
(initializing it to -1), and that makes it impossible to make the
enforce/check options work properly when the user asks for SVM features
explicitly in the command-line.

So, instead of initializing svm_features to -1, use GET_SUPPORTED_CPUID
to fill only the bits that are supported by the host (just like we do
for all other CPUID feature words inside kvm_cpu_fill_host()).

This will keep the existing behavior (as filter_features_for_kvm()
already uses GET_SUPPORTED_CPUID to filter svm_features), but will allow
us to properly check for KVM features inside
kvm_check_features_against_host() later.

For example, we will be able to make this:

  $ qemu-system-x86_64 -cpu ...,+pfthreshold,enforce

refuse to start if the SVM "pfthreshold" feature is not supported by the
host (after we fix kvm_check_features_against_host() to check SVM flags
as well).

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


  Commit: bd004beff8db09b5790b1bb19fad3974e112f007
      
https://github.com/qemu/qemu/commit/bd004beff8db09b5790b1bb19fad3974e112f007
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: kvm: Enable all supported KVM features for -cpu host

When using -cpu host, we don't need to use the kvm_default_features
variable, as the user is explicitly asking QEMU to enable all feature
supported by the host.

This changes the kvm_cpu_fill_host() code to use GET_SUPPORTED_CPUID to
initialize the kvm_features field, so we get all host KVM features
enabled.

This will also allow us to properly check/enforce KVM features inside
kvm_check_features_against_host() later. For example, we will be able to
make this:

  $ qemu-system-x86_64 -cpu ...,+kvm_pv_eoi,enforce

refuse to start if kvm_pv_eoi is not supported by the host (after we fix
kvm_check_features_against_host() to check KVM flags as well).

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


  Commit: 8b4beddc6bead9d7c85fe690b62f2621574eb195
      
https://github.com/qemu/qemu/commit/8b4beddc6bead9d7c85fe690b62f2621574eb195
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

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

  Log Message:
  -----------
  target-i386: check/enforce: Fix CPUID leaf numbers on error messages

The -cpu check/enforce warnings are printing incorrect information about the
missing flags. There are no feature flags on CPUID leaves 0 and 0x80000000, but
there were references to 0 and 0x80000000 in the table at
kvm_check_features_against_host().

This changes the model_features_t struct to contain the register number as
well, so the error messages print the correct CPUID leaf+register information,
instead of wrong CPUID leaf numbers.

This also changes the format of the error messages, so they follow the
"CPUID.<leaf>.<register>.<name> [bit <offset>]" convention used in Intel
documentation. Example output:

    $ qemu-system-x86_64 -machine pc-1.0,accel=kvm -cpu Opteron_G4,+ia64,enforce
    warning: host doesn't support requested feature: CPUID.01H:EDX.ia64 [bit 30]
    warning: host doesn't support requested feature: CPUID.01H:ECX.xsave [bit 
26]
    warning: host doesn't support requested feature: CPUID.01H:ECX.avx [bit 28]
    warning: host doesn't support requested feature: CPUID.80000001H:ECX.abm 
[bit 5]
    warning: host doesn't support requested feature: CPUID.80000001H:ECX.sse4a 
[bit 6]
    warning: host doesn't support requested feature: 
CPUID.80000001H:ECX.misalignsse [bit 7]
    warning: host doesn't support requested feature: 
CPUID.80000001H:ECX.3dnowprefetch [bit 8]
    warning: host doesn't support requested feature: CPUID.80000001H:ECX.xop 
[bit 11]
    warning: host doesn't support requested feature: CPUID.80000001H:ECX.fma4 
[bit 16]
    Unable to find x86 CPU definition
    $

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


  Commit: 54830ff84df5d1fb182e91bf40e3d7c66c2559a4
      
https://github.com/qemu/qemu/commit/54830ff84df5d1fb182e91bf40e3d7c66c2559a4
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: check/enforce: Do not ignore "hypervisor" flag

We don't need any hack to ignore CPUID_EXT_HYPERVISOR anymore, because
kvm_arch_get_supported_cpuid() now sets CPUID_EXT_HYPERVISOR properly.
So, this shouldn't introduce any behavior change, but it makes the code
simpler.

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


  Commit: 227146259e8deb14b7b30e7718e61512e0f524a9
      
https://github.com/qemu/qemu/commit/227146259e8deb14b7b30e7718e61512e0f524a9
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: check/enforce: Check all CPUID.80000001H.EDX bits

I have no idea why PPRO_FEATURES was being ignored on the check of the
CPUID.80000001H.EDX bits. I believe it was a mistake, and it was
supposed to be ~(PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES) or just
~CPUID_EXT2_AMD_ALIASES, because some time ago kvm_cpu_fill_host() used
the CPUID instruction directly (instead of
kvm_arch_get_supported_cpuid()).

But now kvm_cpu_fill_host() uses kvm_arch_get_supported_cpuid(), and
kvm_arch_get_supported_cpuid() returns all supported bits for
CPUID.80000001H.EDX, even the AMD aliases (that are explicitly copied
from CPUID.01H.EDX), so we can make the code check/enforce all the
CPUID.80000001H.EDX bits.

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


  Commit: 396d2cfccdc1a46a8c66d9d9baaa59071a553b1c
      
https://github.com/qemu/qemu/commit/396d2cfccdc1a46a8c66d9d9baaa59071a553b1c
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: check/enforce: Check SVM flag support as well

When nested SVM is supported, the kernel returns the SVM flag on
GET_SUPPORTED_CPUID[1], so we can check the SVM flag safely in
kvm_check_features_against_host().

I don't know why the original code ignored the SVM flag. Maybe it was
because kvm_cpu_fill_host() used the CPUID instruction directly instead
of GET_SUPPORTED_CPUID

[1] Older kernels (before v2.6.37) returned the SVM flag even if nested
    SVM was _not_ supported. So the only cases where this patch should
    change behavior is when SVM is being requested by the user or the
    CPU model, but not supported by the host. And on these cases we
    really want QEMU to abort if the "enforce" option is set.

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


  Commit: e8beac00bd26a60e788ab336f38bc12a95b20f0d
      
https://github.com/qemu/qemu/commit/e8beac00bd26a60e788ab336f38bc12a95b20f0d
  Author: Eduardo Habkost <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: check/enforce: Eliminate check_feat field

Now that all entries have check_feat=~0 in
kvm_check_features_against_host(), we can eliminate check_feat entirely
and make the code check all bits.

This patch shouldn't introduce any behavior change, as check_feat is set
to ~0 on all entries.

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


  Commit: 75a192aa68e7801ab8465b3345ac74d6d3cdceca
      
https://github.com/qemu/qemu/commit/75a192aa68e7801ab8465b3345ac74d6d3cdceca
  Author: Andreas Färber <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M include/qemu-common.h
    M target-alpha/cpu.c

  Log Message:
  -----------
  qemu-common.h: Make qemu_init_vcpu() stub static inline

Turn the *-user macro into a no-op inline function to avoid
unused-variable warnings and band-aiding #ifdef'ery.

This allows to drop an #ifdef for alpha and avoids more for unicore32
and other upcoming trivial realizefn implementations.

Suggested-by: Lluís Vilanova <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>


  Commit: 4586f157757acc5c8edcc954289c7aa51661235c
      
https://github.com/qemu/qemu/commit/4586f157757acc5c8edcc954289c7aa51661235c
  Author: Igor Mammedov <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Filter out unsupported features at realize time

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


  Commit: 9b15cd9e7a1ab0827f4d01c4be77eb41f195073f
      
https://github.com/qemu/qemu/commit/9b15cd9e7a1ab0827f4d01c4be77eb41f195073f
  Author: Igor Mammedov <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Sanitize AMD's ext2_features at realize time

When CPU properties are implemented, ext2_features may change
between object_new(CPU) and cpu_realize_fn(). Sanitizing
ext2_features for AMD based CPU at realize() time will keep
current behavior after CPU features are converted to properties.

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


  Commit: ebe8b9c6eb6e425d44805288b6b5dabd69368f46
      
https://github.com/qemu/qemu/commit/ebe8b9c6eb6e425d44805288b6b5dabd69368f46
  Author: Igor Mammedov <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Explicitly set vendor for each built-in cpudef

Since cpudef config is not supported anymore and all remaining sources
now always set x86_def_t.vendor[123] fields, remove setting default
vendor to simplify future re-factoring.

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


  Commit: 4b274b1603e1d15ef51aedc8b6b7ebbae0b555ce
      
https://github.com/qemu/qemu/commit/4b274b1603e1d15ef51aedc8b6b7ebbae0b555ce
  Author: Anthony Liguori <address@hidden>
  Date:   2013-01-08 (Tue, 08 Jan 2013)

  Changed paths:
    M Makefile.objs
    M hw/Makefile.objs
    M hw/qdev.c
    M include/qemu-common.h
    M include/qom/cpu.h
    M qom/cpu.c
    M stubs/Makefile.objs
    A stubs/reset.c
    A stubs/sysbus.c
    A stubs/vmstate.c
    M target-alpha/cpu.c
    M target-i386/cpu.c
    M target-i386/cpu.h

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

* afaerber/qom-cpu:
  target-i386: Explicitly set vendor for each built-in cpudef
  target-i386: Sanitize AMD's ext2_features at realize time
  target-i386: Filter out unsupported features at realize time
  qemu-common.h: Make qemu_init_vcpu() stub static inline
  target-i386: check/enforce: Eliminate check_feat field
  target-i386: check/enforce: Check SVM flag support as well
  target-i386: check/enforce: Check all CPUID.80000001H.EDX bits
  target-i386: check/enforce: Do not ignore "hypervisor" flag
  target-i386: check/enforce: Fix CPUID leaf numbers on error messages
  target-i386: kvm: Enable all supported KVM features for -cpu host
  target-i386: kvm: -cpu host: Use GET_SUPPORTED_CPUID for SVM features
  cpu: Change parent type to Device
  qdev: Don't assume existence of parent bus on unparenting
  qdev: Include qdev code into *-user, too
  libqemustub: sysbus_get_default() stub
  libqemustub: vmstate register/unregister stubs
  libqemustub: Add qemu_[un]register_reset() stubs

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


Compare: https://github.com/qemu/qemu/compare/560c30b1db1d...4b274b1603e1

reply via email to

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