Re: [PATCH] Add ability to drop pages through testdev

Avi Kivity
2010-12-29T10:05:38Z

On 12/29/2010 12:03 PM, Gleb Natapov wrote:
> > >> Icky. This is much better done through the api tests. Applied it
> > >> so as not to spoil all the effort.
> > >>
> > >How would you do that there?
> >
> > Set up all the state using the KVM_SET_REGS family, pointing to the
> > instruction you want to test, and KVM_RUN that. You can even queue
> > exceptions and interrupts for complicated cases.
> >
> I mean how do you drop a page from shadow/ept tables? Wouldn't you have
> to do the same trick there?
>

Yes, but you just call munmap(), you don't have to go through testdev.