Paolo Bonzini <pbonzini <at>> writes:
> On 15/12/2015 18:02, Hebbal Yacine wrote:
> > What I want to do is: when a controlled process is in user mode, i
> > change its cpl to 0, force it to execute a code that is injected in the
> > VM, set back its cpl to 3 and let it run like if nothing happened
> Could you inject an SMI and place your code in the guest firmware's SMM
> handler?  What input is needed by this CPL=0 code?
> Paolo

I think the the solution follows this logic, meaning we inject an interrupt,
intercept execution of its handler (cpl is 0), save cpu context, execute the
code we want, push a return address, and force the process to execute IRET
instruction which will complete the cleaning, restore cpl to 3 and let the
process resume its normal execution. I'll continue to dig this to see if
there is any better approach, thanks for your help :)


To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to
More majordomo info at

Reply via email to