[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/7] vm-event: VM_EVENT_FLAG_DENY requires VM_EVENT_FLAG_VCPU_PAUSED
For VM_EVENT_FLAG_DENY to work, the vcpu must be paused (sync = 1) until the vm-event is handled. A vm-event response having VM_EVENT_FLAG_DENY flag set should also set the VM_EVENT_FLAG_VCPU_PAUSED flag. Enforce that in vm_event_register_write_resume(). Signed-off-by: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx> --- xen/arch/x86/vm_event.c | 3 ++- xen/include/public/vm_event.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c index 5635603..75647c4 100644 --- a/xen/arch/x86/vm_event.c +++ b/xen/arch/x86/vm_event.c @@ -70,7 +70,8 @@ void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v) void vm_event_register_write_resume(struct vcpu *v, vm_event_response_t *rsp) { - if ( rsp->flags & VM_EVENT_FLAG_DENY ) + if ( (rsp->flags & VM_EVENT_FLAG_DENY) && + (rsp->flags & VM_EVENT_FLAG_VCPU_PAUSED) ) { struct monitor_write_data *w = &v->arch.vm_event->write_data; diff --git a/xen/include/public/vm_event.h b/xen/include/public/vm_event.h index 586f43b..8f94e20 100644 --- a/xen/include/public/vm_event.h +++ b/xen/include/public/vm_event.h @@ -77,6 +77,7 @@ /* * Deny completion of the operation that triggered the event. * Currently only useful for MSR and control-register write events. + * Requires the vCPU to be paused already (synchronous events only). */ #define VM_EVENT_FLAG_DENY (1 << 6) /* -- 2.5.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |