qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 823efc: qdev: Don't stop applying globals on


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 823efc: qdev: Don't stop applying globals on first error
Date: Mon, 11 Jul 2016 08:00:04 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 823efc5d26671e4737b2951d65b0565806ee43ab
      
https://github.com/qemu/qemu/commit/823efc5d26671e4737b2951d65b0565806ee43ab
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

  Changed paths:
    M hw/core/qdev-properties.c

  Log Message:
  -----------
  qdev: Don't stop applying globals on first error

qdev_prop_set_globals_for_type() stops applying global properties
on the first error. It is a leftover from when QEMU exited on any
error when applying global property. Commit 25f8dd9 changed the
fatal error to a warning, but neglected to drop the stopping.
Fix that.

For example, the following command-line will not set CPUID level
to 3, but will warn only about "x86_64-cpu.vendor" being ignored.

  $ ./x86_64-softmmu/qemu-system-x86_64 \
      -global x86_64-cpu.vendor=x \
      -global x86_64-cpu.level=3
  qemu-system-x86_64: Warning: global x86_64-cpu.vendor=x ignored: Property 
'.vendor' doesn't take value 'x'

Fix this by not returning from qdev_prop_set_globals_for_type()
on the first error.

Cc: Markus Armbruster <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 8d76bfe8f8dbc7995bc0682d14f5f92583ae5b0a
      
https://github.com/qemu/qemu/commit/8d76bfe8f8dbc7995bc0682d14f5f92583ae5b0a
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

  Changed paths:
    M hw/core/qdev-properties-system.c
    M include/qemu/config-file.h
    M vl.c

  Log Message:
  -----------
  qdev: Eliminate qemu_add_globals() function

The function is just a helper to handle the -global options, it
can stay in vl.c like most qemu_opts_foreach() calls.

Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 77280adbdf308af855844d921e5f16a873840568
      
https://github.com/qemu/qemu/commit/77280adbdf308af855844d921e5f16a873840568
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

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

  Log Message:
  -----------
  qdev: GlobalProperty.errp field

The new field will allow error handling to be configured by
qdev_prop_register_global() callers: &error_fatal and
&error_abort can be used to make QEMU exit or abort if any errors
are reported when applying the properties.

While doing it, change the error message from "global %s.%s=%s
ignored" to "can't apply global %s.%s=%s".

Suggested-by: Paolo Bonzini <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 39a3b377b89506ad15b8bc91fe2296f65b9f755a
      
https://github.com/qemu/qemu/commit/39a3b377b89506ad15b8bc91fe2296f65b9f755a
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

  Changed paths:
    M hw/core/machine.c
    M include/hw/boards.h
    M vl.c

  Log Message:
  -----------
  machine: Add machine_register_compat_props() function

Move the compat_props handling to core machine code.

Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: adae837d40dea7100040136647e3de44898994df
      
https://github.com/qemu/qemu/commit/adae837d40dea7100040136647e3de44898994df
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

  Changed paths:
    M hw/core/machine.c

  Log Message:
  -----------
  vl: Set errp to &error_abort on machine compat_props

Use the new GlobalProperty.errp field to handle compat_props
errors.

Example output before this change:
(with an intentionally broken entry added to PC_COMPAT_1_3 just
for testing)

  $ qemu-system-x86_64 -machine pc-1.3
  qemu-system-x86_64: hw/core/qdev-properties.c:1091: 
qdev_prop_set_globals_for_type: Assertion `prop->user_provided' failed.
  Aborted (core dumped)

After:

  $ qemu-system-x86_64 -machine pc-1.3
  Unexpected error in x86_cpuid_set_vendor() at 
/home/ehabkost/rh/proj/virt/qemu/target-i386/cpu.c:1688:
  qemu-system-x86_64: can't apply global cpu.vendor=x: Property '.vendor' 
doesn't take value 'x'
  Aborted (core dumped)

Suggested-by: Paolo Bonzini <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: fb02d56e96d553088c5b4267a3c954a3e952a50a
      
https://github.com/qemu/qemu/commit/fb02d56e96d553088c5b4267a3c954a3e952a50a
  Author: Igor Mammedov <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

  Changed paths:
    M target-sparc/cpu.c

  Log Message:
  -----------
  target-sparc: Use sparc_cpu_parse_features() directly

Make SPARC target use sparc_cpu_parse_features() directly
so it won't get in the way of switching other propertified
targets to handling features as global properties.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 7eb24386dbfb0b66464c7f856c1074c606efccda
      
https://github.com/qemu/qemu/commit/7eb24386dbfb0b66464c7f856c1074c606efccda
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: TCG can support CPUID.07H:EBX.erms

ERMS just says "rep movsb" and "rep stosb" are fast.  It does not
imply any new instruction, so we can support it easily.

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


  Commit: cf2887c9738451eb989c6c102af070dee2dc172a
      
https://github.com/qemu/qemu/commit/cf2887c9738451eb989c6c102af070dee2dc172a
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Avoid using locals outside their scope

x86_cpu_parse_featurestr has a "val = num;" assignment just before num
goes out of scope.  Push num up to fix the issue.

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


  Commit: 62a48a2a5798425997152dea3fc48708f9116c04
      
https://github.com/qemu/qemu/commit/62a48a2a5798425997152dea3fc48708f9116c04
  Author: Igor Mammedov <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

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

  Log Message:
  -----------
  cpu: Use CPUClass->parse_features() as convertor to global properties

Currently CPUClass->parse_features() is used to parse -cpu
features string and set properties on created CPU instances.

But considering that features specified by -cpu apply to every
created CPU instance, it doesn't make sense to parse the same
features string for every CPU created. It also makes every target
that cares about parsing features string explicitly call
CPUClass->parse_features() parser, which gets in a way if we
consider using generic device_add for CPU hotplug as device_add
has not a clue about CPU specific hooks.

Turns out we can use global properties mechanism to set
properties on every created CPU instance for a given type. That
way it's possible to convert CPU features into a set of global
properties for CPU type specified by -cpu cpu_model and common
Device.device_post_init() will apply them to CPU of given type
automatically regardless whether it's manually created CPU or CPU
created with help of device_add.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 09f71b054a95161950a03fafc9023637929bd404
      
https://github.com/qemu/qemu/commit/09f71b054a95161950a03fafc9023637929bd404
  Author: Igor Mammedov <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

  Changed paths:
    M hw/arm/virt.c
    M qom/cpu.c

  Log Message:
  -----------
  arm: virt: Parse cpu_model only once

Considering that features are converted to global properties and
global properties are automatically applied to every new instance
of created CPU (at object_new() time), there is no point in
parsing cpu_model string every time a CPU created. So move
parsing outside CPU creation loop and do it only once.

Parsing also should be done before any CPU is created so that
features would affect the first CPU a well.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 6aff24c6a61c6fec31e555c7748ba6085b7b2c06
      
https://github.com/qemu/qemu/commit/6aff24c6a61c6fec31e555c7748ba6085b7b2c06
  Author: Igor Mammedov <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

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

  Log Message:
  -----------
  pc: Parse CPU features only once

Considering that features are converted to global properties and
global properties are automatically applied to every new instance
of created CPU (at object_new() time), there is no point in
parsing cpu_model string every time a CPU created. So move
parsing outside CPU creation loop and do it only once.

Parsing also should be done before any CPU is created so that
features would affect the first CPU a well.

Signed-off-by: Igor Mammedov <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: d6276d26bd92c683c7ca194b6f6f48fd8994c1ed
      
https://github.com/qemu/qemu/commit/d6276d26bd92c683c7ca194b6f6f48fd8994c1ed
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

  Changed paths:
    M target-i386/kvm.c

  Log Message:
  -----------
  target-i386: Show host and VM TSC frequencies on mismatch

Improve the TSC frequency mismatch warning to show the host and
VM TSC frequencies.

Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Marcelo Tosatti <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: c35bd19a5c9140bce8b913cc5cefe6f071135bdb
      
https://github.com/qemu/qemu/commit/c35bd19a5c9140bce8b913cc5cefe6f071135bdb
  Author: Evgeny Yakovlev <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

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

  Log Message:
  -----------
  target-i386: Report hyperv feature words through qom

This change adds hyperv feature words report through qom rpc.

When VM is configured with hyperv features enabled
libvirt will check that required feature words are set
in cpuid leaf 40000003 through qom request.

Currently qemu does not report hyperv feature words
which prevents windows guests from starting with libvirt.

To avoid conflicting with current hyperv properties all added feature
words cannot be set directly with -cpu +feature yet.

Signed-off-by: Evgeny Yakovlev <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
CC: Paolo Bonzini <address@hidden>
CC: Richard Henderson <address@hidden>
CC: Eduardo Habkost <address@hidden>
CC: Marcelo Tosatti <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 87f8b626041ceaea9adcfdbd549359f0ca7b871d
      
https://github.com/qemu/qemu/commit/87f8b626041ceaea9adcfdbd549359f0ca7b871d
  Author: Ashok Raj <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

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

  Log Message:
  -----------
  target-i386: kvm: Add basic Intel LMCE support

This patch adds the support to inject SRAR and SRAO as LMCE, i.e. they
are injected to only one VCPU rather than broadcast to all VCPUs. As KVM
reports LMCE support on Intel platforms, this features is only available
on Intel platforms.

LMCE is disabled by default and can be enabled/disabled by cpu option
'lmce=on/off'.

Signed-off-by: Ashok Raj <address@hidden>
[Haozhong: Enable LMCE only on Intel platforms
     Disable LMCE by default and add a cpu option 'lmce'
     Handle the error if LMCE is enabled w/o host support
     Remove MCG_LMCE_P from MCE_CAP_DEF
     Add migration support for LMCE
     Minor code style changes]
Signed-off-by: Haozhong Zhang <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 217f1b4a72153cf8d556e9d45919e9222c38d25e
      
https://github.com/qemu/qemu/commit/217f1b4a72153cf8d556e9d45919e9222c38d25e
  Author: Haozhong Zhang <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

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

  Log Message:
  -----------
  target-i386: Publish advised value of MSR_IA32_FEATURE_CONTROL via fw_cfg

It's a prerequisite that certain bits of MSR_IA32_FEATURE_CONTROL should
be set before some features (e.g. VMX and LMCE) can be used, which is
usually done by the firmware. This patch adds a fw_cfg file
"etc/msr_feature_control" which contains the advised value of
MSR_IA32_FEATURE_CONTROL and can be used by guest firmware (e.g. SeaBIOS).

Suggested-by: Paolo Bonzini <address@hidden>
Signed-off-by: Haozhong Zhang <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 40bfe48f1c78bb7905d58d8d603ca27063566bc9
      
https://github.com/qemu/qemu/commit/40bfe48f1c78bb7905d58d8d603ca27063566bc9
  Author: Haozhong Zhang <address@hidden>
  Date:   2016-07-07 (Thu, 07 Jul 2016)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: Enable LMCE for '-cpu host' if supported by host

If -cpu host is used, LMCE will be automatically enabled when it's
supported by host.

Signed-off-by: Haozhong Zhang <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: a91a4e7d8cfe6ece610aacf7c52738188f5b5cb5
      
https://github.com/qemu/qemu/commit/a91a4e7d8cfe6ece610aacf7c52738188f5b5cb5
  Author: Peter Maydell <address@hidden>
  Date:   2016-07-11 (Mon, 11 Jul 2016)

  Changed paths:
    M hw/arm/virt.c
    M hw/core/machine.c
    M hw/core/qdev-properties-system.c
    M hw/core/qdev-properties.c
    M hw/i386/pc.c
    M include/hw/boards.h
    M include/hw/qdev-core.h
    M include/qemu/config-file.h
    M include/qom/cpu.h
    M qom/cpu.c
    M target-i386/cpu.c
    M target-i386/cpu.h
    M target-i386/kvm.c
    M target-i386/machine.c
    M target-sparc/cpu.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into 
staging

x86 and machine queue, 2016-07-07

Highlights:
* Improvements on global property error handling
* Translate -cpu options to global properties
* LMCE support

# gpg: Signature made Thu 07 Jul 2016 20:59:01 BST
# gpg:                using RSA key 0x2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <address@hidden>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/x86-pull-request:
  target-i386: Enable LMCE for '-cpu host' if supported by host
  target-i386: Publish advised value of MSR_IA32_FEATURE_CONTROL via fw_cfg
  target-i386: kvm: Add basic Intel LMCE support
  target-i386: Report hyperv feature words through qom
  target-i386: Show host and VM TSC frequencies on mismatch
  pc: Parse CPU features only once
  arm: virt: Parse cpu_model only once
  cpu: Use CPUClass->parse_features() as convertor to global properties
  target-i386: Avoid using locals outside their scope
  target-i386: TCG can support CPUID.07H:EBX.erms
  target-sparc: Use sparc_cpu_parse_features() directly
  vl: Set errp to &error_abort on machine compat_props
  machine: Add machine_register_compat_props() function
  qdev: GlobalProperty.errp field
  qdev: Eliminate qemu_add_globals() function
  qdev: Don't stop applying globals on first error

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


Compare: https://github.com/qemu/qemu/compare/b3b22db69fde...a91a4e7d8cfe

reply via email to

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