Commit 9e05d9b
KVM: x86: Check irqchip mode before create PIT
As the kvm api(https://docs.kernel.org/virt/kvm/api.html) reads,
KVM_CREATE_PIT2 call is only valid after enabling in-kernel irqchip
support via KVM_CREATE_IRQCHIP.
Without this check, I can create PIT first and enable irqchip-split
then, which may cause the PIT invalid because of lacking of in-kernel
PIC to inject the interrupt.
Signed-off-by: Tengfei Yu <moehanabichan@gmail.com>
Message-Id: <20240125050823.4893-1-moehanabichan@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 11f5633 commit 9e05d9b
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7016 | 7016 | | |
7017 | 7017 | | |
7018 | 7018 | | |
| 7019 | + | |
| 7020 | + | |
| 7021 | + | |
7019 | 7022 | | |
7020 | 7023 | | |
7021 | 7024 | | |
| |||
0 commit comments