From: Keir Fraser Subject: Re: Crash with paravirt-ops 2.6.31.6 kernel Date: Mon, 23 Nov 2009 17:13:15 +0000 Message-ID: References: <1258994658.7590.80.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1258994658.7590.80.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell , Jan Beulich Cc: Jeremy Fitzhardinge , "xen-devel@lists.xensource.com" , Bastian Blank , "544145@bugs.debian.org" <544145@bugs.debian.org> List-Id: xen-devel@lists.xenproject.org On 23/11/2009 16:44, "Ian Campbell" wrote: >> But this is not just the return-to-user-space path you're changing, but >> also the hypercall one. You certainly don't want an iret in that case. > > Don't the hypercalls already always go via iret? > - testw $TRAP_syscall,4(%rsp) > - jz iret_exit_to_guest > IOW if TRAP_syscall is not set (i.e. this is a hypercall not a syscall) > then exit via iret. I think not -- here TRAP_syscall means 'entered Xen via SYSCALL instruction', not 'entered to do a syscall'. TRAP_syscall should be set regardless of whether the SYSCALL instruction was executed by guest userland or guest kernel. -- Keir