* What's a good way of skipping an instruction for a HVM guest?
@ 2013-05-16 15:04 Razvan Cojocaru
2013-05-16 15:49 ` Keir Fraser
0 siblings, 1 reply; 2+ messages in thread
From: Razvan Cojocaru @ 2013-05-16 15:04 UTC (permalink / raw)
To: xen-devel
Hello,
how do I skip the current instruction from the HV? That is, how do I
know what instruction length to add to guest_cpu_user_regs()->eip to
achieve this?
Could this be done by hvm_emulate_one() with a copy of
guest_cpu_user_regs() and then setting guest_cpu_user_regs()->eip to
the eip in the hvmemul_ctxt? Would this have side-effects?
Thanks,
Razvan Cojocaru
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: What's a good way of skipping an instruction for a HVM guest?
2013-05-16 15:04 What's a good way of skipping an instruction for a HVM guest? Razvan Cojocaru
@ 2013-05-16 15:49 ` Keir Fraser
0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2013-05-16 15:49 UTC (permalink / raw)
To: Razvan Cojocaru, xen-devel
On 16/05/2013 16:04, "Razvan Cojocaru" <rzvncj@gmail.com> wrote:
> Hello,
>
> how do I skip the current instruction from the HV? That is, how do I
> know what instruction length to add to guest_cpu_user_regs()->eip to
> achieve this?
>
> Could this be done by hvm_emulate_one() with a copy of
> guest_cpu_user_regs() and then setting guest_cpu_user_regs()->eip to
> the eip in the hvmemul_ctxt? Would this have side-effects?
You would also need to provide a set of x86_emulate_ops that are side-effect
free (e.g., to avoid modifying CRn, DRn, memory, MSRs, ...).
There is no other fully generic way to do it though. VMX provides the
trapping instruction length on vmexit, but not in all cases. Our SVM code
also has a limited instruction-length helper function, but only for a few
instructions for which it is required.
-- Keir
>
> Thanks,
> Razvan Cojocaru
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-16 15:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-16 15:04 What's a good way of skipping an instruction for a HVM guest? Razvan Cojocaru
2013-05-16 15:49 ` Keir Fraser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).