Re: [RFC PATCH v4 07/18] kvm: page track: add support for preread, prewrite and preexec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 21 Dec 2017 17:01:02 -0500, Patrick Colp <patrick.colp@xxxxxxxxxx> wrote:
> On 2017-12-18 02:06 PM, Adalber Lazăr wrote:
> > From: Adalbert Lazar <alazar@xxxxxxxxxxxxxxx>
> > 
> > These callbacks return a boolean value. If false, the emulation should
> > stop and the instruction should be reexecuted in guest. The preread
> > callback can return the bytes needed by the read operation.
> > 
> > The kvm_page_track_create_memslot() was extended in order to track gfn-s
> > as soon as the memory slots are created.
> > 
> > +/*
> > + * Notify the node that an instruction is about to be executed.
> > + * Returning false doesn't stop the other nodes from being called,
> > + * but it will stop the emulation with ?!.
> 
> With what?
> 
> > +bool kvm_page_track_preexec(struct kvm_vcpu *vcpu, gpa_t gpa)
> > +{
> 
> Patrick

With X86EMUL_RETRY_INSTR, or some return value, depending on the context.

Currently, we call this function when the instruction is fetched, to
give the introspection tool more options. Depending on its policies,
the introspector could:
 - skip the instruction (and retry to guest)
 - remove the tracking for the "current" page (and retry to guest)
 - change the instruction (and continue the emulation)
 - do nothing but log (and continue the emulation)

Thanks for spotting this,
Adalbert

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux