Re: [patch 0/4] mmu audit update

Avi Kivity
2009-06-07T07:14:04Z

Marcelo Tosatti wrote:
> Some updates to the MMU audit code.
>
> The third patch is "guessy" because I could not find the notrap spte
> documentation, all I can see is the page-fault error code mask and match
> fields in the VMCS, but can't see the link of that to sptes. Can someone
> point it out please?
>

When bypass_guest_pf is set, we tell vmx not to trap if the fault is due
to page-not-present. So if we know gpte.p == 0, we set spte.p = 0 and
allow not-present page faults to go directly to the guest without trapping.

Of course, we still need to trap cases where gpte.p = 1 but we haven't
mapped the page yet. So we set a reserved bit in the spte and trap on that.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.