mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
target/i386: support KVM_FEATURE_ASYNC_PF_INT
Linux-5.8 introduced interrupt based mechanism for 'page ready' events delivery and disabled the old, #PF based one (see commit 2635b5c4a0e4 "KVM: x86: interrupt based APF 'page ready' event delivery"). Linux guest switches to using in in 5.9 (see commit b1d405751cd5 "KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery"). The feature has a new KVM_FEATURE_ASYNC_PF_INT bit assigned and the interrupt vector is set in MSR_KVM_ASYNC_PF_INT MSR. Support this in QEMU. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20200908141206.357450-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
1b7e01d008
commit
db5daafab2
4 changed files with 32 additions and 1 deletions
|
@ -394,6 +394,13 @@ static bool async_pf_msr_needed(void *opaque)
|
|||
return cpu->env.async_pf_en_msr != 0;
|
||||
}
|
||||
|
||||
static bool async_pf_int_msr_needed(void *opaque)
|
||||
{
|
||||
X86CPU *cpu = opaque;
|
||||
|
||||
return cpu->env.async_pf_int_msr != 0;
|
||||
}
|
||||
|
||||
static bool pv_eoi_msr_needed(void *opaque)
|
||||
{
|
||||
X86CPU *cpu = opaque;
|
||||
|
@ -467,6 +474,17 @@ static const VMStateDescription vmstate_async_pf_msr = {
|
|||
}
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_async_pf_int_msr = {
|
||||
.name = "cpu/async_pf_int_msr",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = async_pf_int_msr_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT64(env.async_pf_int_msr, X86CPU),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_pv_eoi_msr = {
|
||||
.name = "cpu/async_pv_eoi_msr",
|
||||
.version_id = 1,
|
||||
|
@ -1438,6 +1456,7 @@ VMStateDescription vmstate_x86_cpu = {
|
|||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_exception_info,
|
||||
&vmstate_async_pf_msr,
|
||||
&vmstate_async_pf_int_msr,
|
||||
&vmstate_pv_eoi_msr,
|
||||
&vmstate_steal_time_msr,
|
||||
&vmstate_poll_control_msr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue