mirror of https://github.com/xemu-project/xemu.git
i386: Don't automatically enable FEAT_KVM_HINTS bits
Bug fix for "-cpu host" with newer kernels. -----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJa1NFhAAoJECgHk2+YTcWm1qgP/AuDGp7c/z23xMtuwDB1YoDo Jzovze97rP9RRlKt2F1WXyNLezxO9bpomTPozFF9UIcG6cavakKByBFFJyW8gjya yWpsq/kkbR14amYKBbBJgi5uTLBPClFqSAHnJfzkozT5oWOhU5R0/n26gv3Lfgh2 TTJg1+tMG0W3EIQ+MeJ2uXuop910134mtFge7//COIVVzPvC24+mNJqB5nlMUtQA 3PSWrMBRRXDkI9iTYfn58+ZHojdAGdK+VECpEBNI8bmkJgw4wnBfGEFHZiSZBLD2 EG4u924HxMhDtQ3Y3LcwgNcEPGBqNOseMQSYiN5sPHQtNCtFo9cZWq/5lKedKXDH sFSdaLFJwwCuvEDE/8U3MKtHxzxtP9yGXctu1KqEK+ZkC4nKLoZgbIQHtrCa7nzb 9PsA08L1XnNSnodfPKwxl8ZfRFRrUeFLbhFML9588jhG2dktWeIMwTOrIvVHail2 75hr65SPxAzERTX9stEv4tcGgN+z1yDdUrfONK4GSH9/CRbDt73yuH/Gc26t1x/8 PbleeDltMLKZRoXhR8SzcwTDmq5J7PQAnPTGghPe2tCyjNz1ax+yYkPfIGtR4ovc 6M+s9STs9Au+k2YSr4ISttps/ofY8D3vKCVYsUrRnle7qBDDoe07GGmI1f3sybVi tb9v82dy71QOGWgz7Ols =oq3l -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging i386: Don't automatically enable FEAT_KVM_HINTS bits Bug fix for "-cpu host" with newer kernels. # gpg: Signature made Mon 16 Apr 2018 17:37:53 BST # gpg: using RSA key 2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/x86-next-pull-request: i386: Don't automatically enable FEAT_KVM_HINTS bits Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
0df2121693
|
@ -295,6 +295,8 @@ typedef struct FeatureWordInfo {
|
|||
uint32_t tcg_features; /* Feature flags supported by TCG */
|
||||
uint32_t unmigratable_flags; /* Feature flags known to be unmigratable */
|
||||
uint32_t migratable_flags; /* Feature flags known to be migratable */
|
||||
/* Features that shouldn't be auto-enabled by "-cpu host" */
|
||||
uint32_t no_autoenable_flags;
|
||||
} FeatureWordInfo;
|
||||
|
||||
static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
|
||||
|
@ -400,6 +402,11 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
|
|||
},
|
||||
.cpuid_eax = KVM_CPUID_FEATURES, .cpuid_reg = R_EDX,
|
||||
.tcg_features = TCG_KVM_FEATURES,
|
||||
/*
|
||||
* KVM hints aren't auto-enabled by -cpu host, they need to be
|
||||
* explicitly enabled in the command-line.
|
||||
*/
|
||||
.no_autoenable_flags = ~0U,
|
||||
},
|
||||
[FEAT_HYPERV_EAX] = {
|
||||
.feat_names = {
|
||||
|
@ -4062,7 +4069,8 @@ static void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
|
|||
*/
|
||||
env->features[w] |=
|
||||
x86_cpu_get_supported_feature_word(w, cpu->migratable) &
|
||||
~env->user_features[w];
|
||||
~env->user_features[w] & \
|
||||
~feature_word_info[w].no_autoenable_flags;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue