qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] a7b0ff: i386: Replace uint32_t* with FeatureW


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a7b0ff: i386: Replace uint32_t* with FeatureWord on featur...
Date: Thu, 30 Mar 2017 05:00:11 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a7b0ffacc125f06ef277a2afa54a52e7f22e11fe
      
https://github.com/qemu/qemu/commit/a7b0ffacc125f06ef277a2afa54a52e7f22e11fe
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-03-28 (Tue, 28 Mar 2017)

  Changed paths:
    M target/i386/cpu.c

  Log Message:
  -----------
  i386: Replace uint32_t* with FeatureWord on feature getter/setter

Instead of passing a pointer to the feature property getter and
setter functions, pass a FeatureWord enum so they can perform
other actions related to the feature flag.

This will be used to add a new "user_features" field to keep
track of features that were explicitly set by the user.

Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Tested-by: Jiri Denemark <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: d4a606b38b5d4b3689b86cc1575908e82179ecfb
      
https://github.com/qemu/qemu/commit/d4a606b38b5d4b3689b86cc1575908e82179ecfb
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-03-28 (Tue, 28 Mar 2017)

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

  Log Message:
  -----------
  i386: Don't override -cpu options on -cpu host/max

The existing code for "host" and "max" CPU models overrides every
single feature in the CPU object at realize time, even the ones
that were explicitly enabled or disabled by the user using
"feat=on" or "feat=off", while features set using +feat/-feat are
kept.

This means "-cpu host,+invtsc" works as expected, while
"-cpu host,invtsc=on" doesn't.

This was a known bug, already documented in a comment inside
x86_cpu_expand_features(). What makes this bug worse now is that
libvirt 3.0.0 and newer now use "feat=on|off" instead of
+feat/-feat when it detects a QEMU version that supports it (see
libvirt commit d47db7b16dd5422c7e487c8c8ee5b181a2f9cd66).

Change the feature property getter/setter to set a
env->user_features field, to keep track of features that were
explicitly changed using QOM properties. Then make the
max_features code not override user features when handling "-cpu
host" and "-cpu max".

This will also allow us to remove the plus_features/minus_features
hack in the future, but I plan to do that after 2.9.0 is
released.

Reported-by: Jiri Denemark <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Tested-by: Jiri Denemark <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: b529aec1ee1cbb642f236893bf46a712d0187e4d
      
https://github.com/qemu/qemu/commit/b529aec1ee1cbb642f236893bf46a712d0187e4d
  Author: Peter Maydell <address@hidden>
  Date:   2017-03-30 (Thu, 30 Mar 2017)

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

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

i386: Fix for "-cpu host,invtsc=on" bug

# gpg: Signature made Tue 28 Mar 2017 20:50:33 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:
  i386: Don't override -cpu options on -cpu host/max
  i386: Replace uint32_t* with FeatureWord on feature getter/setter

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


Compare: https://github.com/qemu/qemu/compare/df9046363220...b529aec1ee1c

reply via email to

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