Commit 988896b
x86/kvm/fpu: Remove kvm_vcpu_arch.guest_supported_xcr0
kvm_vcpu_arch currently contains the guest supported features in both
guest_supported_xcr0 and guest_fpu.fpstate->user_xfeatures field.
Currently both fields are set to the same value in
kvm_vcpu_after_set_cpuid() and are not changed anywhere else after that.
Since it's not good to keep duplicated data, remove guest_supported_xcr0.
To keep the code more readable, introduce kvm_guest_supported_xcr()
and kvm_guest_supported_xfd() to replace the previous usages of
guest_supported_xcr0.
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Message-Id: <20220217053028.96432-3-leobras@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent ad85628 commit 988896b
3 files changed
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
706 | | - | |
707 | 706 | | |
708 | 707 | | |
709 | 708 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
| |||
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
296 | | - | |
| 297 | + | |
297 | 298 | | |
298 | 299 | | |
299 | | - | |
| 300 | + | |
300 | 301 | | |
301 | 302 | | |
302 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
987 | 997 | | |
988 | 998 | | |
989 | 999 | | |
| |||
1003 | 1013 | | |
1004 | 1014 | | |
1005 | 1015 | | |
1006 | | - | |
| 1016 | + | |
1007 | 1017 | | |
1008 | 1018 | | |
1009 | 1019 | | |
| |||
3706 | 3716 | | |
3707 | 3717 | | |
3708 | 3718 | | |
3709 | | - | |
3710 | | - | |
| 3719 | + | |
3711 | 3720 | | |
3712 | 3721 | | |
3713 | 3722 | | |
| |||
3717 | 3726 | | |
3718 | 3727 | | |
3719 | 3728 | | |
3720 | | - | |
3721 | | - | |
| 3729 | + | |
3722 | 3730 | | |
3723 | 3731 | | |
3724 | 3732 | | |
| |||
0 commit comments