Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1661145
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection |
| Date | 2017-06-08 14:50 +0200 |
| Message-ID | <tQ52X-4l3-31@gated-at.bofh.it> (permalink) |
| References | <tQ255-2wu-33@gated-at.bofh.it> <tQ4gy-3MZ-15@gated-at.bofh.it> <tQ4Tg-4hK-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 08/06/2017 14:32, Wanpeng Li wrote:
>>> I change the
>>> condition to "nr == PF_VECTOR && error_code == 0" to intercept async_pf, however,
>>> the below bug will be splatted:
>> Right, because error_code == 0 is a valid error code.
>>
>> For stable releases, this should be enough:
>
> We should also take care PAGE_READY async_pfs injection. I will send a
> patch to avoid async pf injection stuff in guest mode for stable
> release.
Right, the simplest thing to do here is another is_guest_mode check in
kvm_arch_can_inject_async_page_present. That would delay the signaling
of ready pages while L2 runs, but hopefully we're under memory pressure
so L2 will get a page fault too.
In fact, kvm_arch_can_inject_async_page_present should just be
if (!(vcpu->arch.apf.msr_val & KVM_ASYNC_PF_ENABLED))
return true;
else
return can_do_async_pf(vcpu);
where can_do_async_pf becomes nonstatic.
Paolo
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RFC] KVM: async_pf: fix async_pf exception injection Wanpeng Li <kernellwp@gmail.com> - 2017-06-08 11:40 +0200
Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection Paolo Bonzini <pbonzini@redhat.com> - 2017-06-08 14:00 +0200
Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection Wanpeng Li <kernellwp@gmail.com> - 2017-06-08 14:40 +0200
Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection Paolo Bonzini <pbonzini@redhat.com> - 2017-06-08 14:50 +0200
Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection Wanpeng Li <kernellwp@gmail.com> - 2017-06-09 07:40 +0200
Re: [PATCH RFC] KVM: async_pf: fix async_pf exception injection Paolo Bonzini <pbonzini@redhat.com> - 2017-06-09 13:40 +0200
csiph-web