lkml.org 
[lkml]   [2023]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v13 09/35] KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace
From
On 11/2/23 10:35, Huang, Kai wrote:
> IIUC KVM can already handle the case of poisoned
> page by sending signal to user app:
>
> static int kvm_handle_error_pfn(struct kvm_vcpu *vcpu,
> struct kvm_page_fault *fault)
> {
> ...
>
> if (fault->pfn == KVM_PFN_ERR_HWPOISON) {
> kvm_send_hwpoison_signal(fault->slot, fault->gfn);
> return RET_PF_RETRY;
> }
> }

EHWPOISON is not implemented by this series, so it should be left out of
the documentation.


> Currently as mentioned above when
> vepc fault handler cannot allocate EPC page KVM returns -EFAULT to Qemu, and
> Qemu prints ...
>
> ...: Bad address
> <dump guest cpu registers>
>
> ... which is nonsense.
>
> If we can use memory_fault.flags (or is 'fault_reason' a better name?) to carry
> a specific value for EPC to let Qemu know and Qemu can then do more reasonable
> things.

Yes, that's a good idea that can be implemented on top.

Paolo

\
 
 \ /
  Last update: 2023-11-02 12:08    [W:0.096 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site