All of lore.kernel.org
 help / color / mirror / Atom feed
* VM_EVENT_FLAG_SET_REGISTERS and sync_vcpu_execstate()
@ 2016-08-08 10:31 Razvan Cojocaru
  2016-08-08 12:01 ` Andrew Cooper
  0 siblings, 1 reply; 12+ messages in thread
From: Razvan Cojocaru @ 2016-08-08 10:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Tamas K Lengyel

Hello,

We've been mostly setting registers by using xc_vcpu_setcontext():

https://github.com/razvan-cojocaru/libbdvmi/blob/master/src/bdvmixendriver.cpp#L504

but lately trying to push as much of that as possible to the
VM_EVENT_FLAG_SET_REGISTERS-related code (i.e. via the vm_event replies)
to save processing time.

So with the xc_vcpu_setcontext() call removed, I've found that there are
cases where vm_event_set_registers() won't work properly unless I kept
the xc_vcpu_getcontext() call. This would appear to be not because of
anything that arch_get_info_guest() does (please see the implementation
for XEN_DOMCTL_getvcpucontext), but because of the vcpu_pause() call, or
more specifically, because of its calling sync_vcpu_execstate().

So it would appear that a sync_vcpu_execstate(v) call is necessary at
the start of vm_event_set_registers() for the vcpu struct instance to be
synchronized with the current VCPU state.

Any objections to a patch with this simple modification?


Thanks,
Razvan

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-08-09 17:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-08 10:31 VM_EVENT_FLAG_SET_REGISTERS and sync_vcpu_execstate() Razvan Cojocaru
2016-08-08 12:01 ` Andrew Cooper
2016-08-08 12:47   ` Razvan Cojocaru
2016-08-08 15:10     ` Razvan Cojocaru
2016-08-08 15:52       ` Tamas K Lengyel
2016-08-08 16:29         ` Razvan Cojocaru
2016-08-08 18:01           ` Tamas K Lengyel
2016-08-09  8:19             ` Razvan Cojocaru
2016-08-09  9:01               ` Razvan Cojocaru
2016-08-09  9:41           ` Tim Deegan
2016-08-09  9:46             ` Razvan Cojocaru
2016-08-09 17:19             ` Tamas K Lengyel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.