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

Re: [Xen-devel] Foreign VCPU register change?


  • To: Cutter 409 <cutter409@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Thu, 23 Aug 2012 18:34:46 +0100
  • Delivery-date: Thu, 23 Aug 2012 17:35:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac2BVZZzWtfqYph+RUm6PR7KXK8Zyw==
  • Thread-topic: [Xen-devel] Foreign VCPU register change?

On 23/08/2012 18:25, "Cutter 409" <cutter409@xxxxxxxxx> wrote:

> With Xen-4.1.2:
> 
> I'm trying to change a register value in a paused vmx vcpu. The general
> process looks like this:
> 
> 1. Some vmexit calls vcpu_sleep_nosync(v) on the vcpu
> 2. From dom0, I issue a domctl to change a register via
> v->arch.guest_context.user_reg, then vcpu_wake(v)

Which domctl? From dom0 userspace you can use the libxc functions
xc_vcpu_getcontext() and xc_vcpu_setcontext() to read/modify register state.

You can read the libxc sources to see what hypercall these map to, if you
don't want to use libxc for any reason.

 -- Keir

> However, the guest register does not seem to be changed when I do it this way.
> Is there something I need to do to mark the registers as "dirty" ? Is there a
> way to force the foreign vcpu to update the changed registers? Or maybe I just
> have to change the registers somewhere else?
> 
> I've tried directly using vmcs_enter(v), __vmwrite(), vmcs_exit(v) also, but
> that doesn't seem to make a change either.
> 
> Thanks!
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.