On 2017/11/24 18:05, Paolo Bonzini wrote: > On 24/11/2017 10:53, gengdongjiu wrote: >>>> When hardware detects a memory error on a stage2 page table page >>> The stage2 page tables are not guest application page table, those are >>> hypervisor page tables. In that case, indeed the host would kill the guest. >> thanks for the reply. >> yes, For the stage2. guest should be killed. >> what about the stage 1, I have sent another mail to discuss the stage1 guest page table fault. >> > > What mail is it? I attached that. thanks > > For stage1, the guest will get an AR machine check and cross its fingers: If guest happen stage1 page table RAS error, it should be trapped to host KVM, and host KVM call memory error handler. KVM will judge whether the error physical address has poisoned flag, if having, KVM will deliver BUS_MCEERR_AR SIGBUS. For this page table RAS error, I am afraid the error address that KVM use to judge is the target address that want translation to,[2], not the page table itself address. So may be SIGBUS is not delivered. For example: When guest GVA "A" translate to HPA "B", it go through this GVA->IPA->HPA steps. If the translate is fault, such as page table error, KVM finally get the fault HPA address "B" and use it to judge whether it has poisoned flag, but in fact the error address is the page table address, not "B", so may be SIGBUS is not delivered > > /* > * Error hit kernel page. > * Do nothing, try to be lucky and not touch this instead. For a few cases we > * could be more sophisticated. > */ > static int me_kernel(struct page *p, unsigned long pfn) > { > return MF_IGNORED; > } > > Thanks, > > Paolo > >
Attachment:
Re x86 RAS question what is the behavior that guest happen machine check exceptions(MCEs) on page table.msg
Description: Binary data