From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH 2/3] x86/gdbsx: Invert preconditions for XEN_DOMCTL_gdbsx_{, un}pausevcpu hypercalls Date: Thu, 24 Jul 2014 11:56:49 +0100 Message-ID: <1406199410-15823-3-git-send-email-andrew.cooper3@citrix.com> References: <1406199410-15823-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1406199410-15823-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Jan Beulich List-Id: xen-devel@lists.xenproject.org c/s 3eb1c708ab "properly reference count DOMCTL_{,un}pausedomain hypercalls" accidentally inverted the use of d->controller_pause_count. Revert back to how it was originally, i.e. the XEN_DOMCTL_gdbsx_{,un}pausevcpu hypercalls are only valid for a domain already paused by the system controller. Signed-off-by: Andrew Cooper CC: Jan Beulich CC: Mukesh Rathor --- xen/arch/x86/domctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index d62c715..243f42f 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -1027,7 +1027,7 @@ long arch_do_domctl( struct vcpu *v; ret = -EBUSY; - if ( d->controller_pause_count > 0 ) + if ( !d->controller_pause_count ) break; ret = -EINVAL; if ( domctl->u.gdbsx_pauseunp_vcpu.vcpu >= MAX_VIRT_CPUS || @@ -1043,7 +1043,7 @@ long arch_do_domctl( struct vcpu *v; ret = -EBUSY; - if ( d->controller_pause_count > 0 ) + if ( !d->controller_pause_count ) break; ret = -EINVAL; if ( domctl->u.gdbsx_pauseunp_vcpu.vcpu >= MAX_VIRT_CPUS || -- 1.7.10.4