Commit 86b9b37
Maxim Levitsky
KVM: x86: Allow vendor code to disable quirks
JIRA: https://issues.redhat.com/browse/RHEL-47242
commit a4dae7c
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: Mon Mar 3 11:18:38 2025 -0500
KVM: x86: Allow vendor code to disable quirks
In some cases, the handling of quirks is split between platform-specific
code and generic code, or it is done entirely in generic code, but the
relevant bug does not trigger on some platforms; for example,
this will be the case for "ignore guest PAT". Allow unaffected vendor
modules to disable handling of a quirk for all VMs via a new entry in
kvm_caps.
Such quirks remain available in KVM_CAP_DISABLE_QUIRKS2, because that API
tells userspace that KVM *knows* that some of its past behavior was bogus
or just undesirable. In other words, it's plausible for userspace to
refuse to run if a quirk is not listed by KVM_CAP_DISABLE_QUIRKS2, so
preserve that and make it part of the API.
As an example, mark KVM_X86_QUIRK_CD_NW_CLEARED as auto-disabled on
Intel systems.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>1 parent 93f073a commit 86b9b37
4 files changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2431 | 2431 | | |
2432 | 2432 | | |
2433 | 2433 | | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
2434 | 2437 | | |
2435 | 2438 | | |
2436 | 2439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5564 | 5564 | | |
5565 | 5565 | | |
5566 | 5566 | | |
| 5567 | + | |
5567 | 5568 | | |
5568 | 5569 | | |
5569 | 5570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9792 | 9792 | | |
9793 | 9793 | | |
9794 | 9794 | | |
| 9795 | + | |
9795 | 9796 | | |
9796 | 9797 | | |
9797 | 9798 | | |
| |||
12747 | 12748 | | |
12748 | 12749 | | |
12749 | 12750 | | |
| 12751 | + | |
12750 | 12752 | | |
12751 | 12753 | | |
12752 | 12754 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
0 commit comments