From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfY63-0007Kl-WE for qemu-devel@nongnu.org; Thu, 23 May 2013 12:10:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfY5b-0001j8-LY for qemu-devel@nongnu.org; Thu, 23 May 2013 12:10:31 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:32849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfY5b-0001g3-BB for qemu-devel@nongnu.org; Thu, 23 May 2013 12:10:03 -0400 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 May 2013 10:10:02 -0600 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 08D33C9004A for ; Thu, 23 May 2013 12:09:58 -0400 (EDT) Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r4NG9shT245736 for ; Thu, 23 May 2013 12:09:54 -0400 Received: from d03av05.boulder.ibm.com (loopback [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4NG8REu018829 for ; Thu, 23 May 2013 10:08:31 -0600 Message-ID: <519E3EE9.3040602@us.ibm.com> Date: Thu, 23 May 2013 09:08:09 -0700 From: Badari Pulavarty MIME-Version: 1.0 References: <519D6478.8060403@us.ibm.com> <20130523005355.GA11949@hj.localdomain> <20130523094809.GM4725@redhat.com> <519E2C21.3000103@us.ibm.com> <519E2E7D.4080502@redhat.com> In-Reply-To: <519E2E7D.4080502@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] qemu seabios issue with vhost-scsi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Stefan Hajnoczi , Asias He , qemu-devel , "Nicholas A. Bellinger" , Gleb Natapov On 05/23/2013 07:58 AM, Paolo Bonzini wrote: > Il 23/05/2013 16:48, Badari Pulavarty ha scritto: >>> The common virtio-scsi code in QEMU should guard against this. In >>> virtio-blk data plane I hit a similar case and ended up starting the >>> data plane thread (equivalent to vhost here) *before* the status >>> register is set to DRIVER_OK. >> Thats exactly what my debug in vhost_scsi_set_status() shows. >> >> set status started 0 val 0 >> set status started 0 val 0 >> set status started 0 val 0 >> set status started 0 val 0 >> set status started 0 val 0 >> set status started 0 val 3 >> Program received signal SIGSEGV, Segmentation fault. >> >> We never got a chance to call vhost_scsi_start() as we are waiting >> for DRIVER_OK. > This is the fix in SeaBIOS: > > commit 5a7730db57ab0715223421e65b54fb50d6fefe5c > Author: Asias He > Date: Fri Mar 15 09:45:15 2013 +0800 > > virtio-scsi: Set _DRIVER_OK flag before scsi target scanning > > Before we start scsi target scanning, we need to set the > VIRTIO_CONFIG_S_DRIVER_OK flag so the device can do setup properly. > > This fix a bug when booting tcm_vhost with seabios. > > Signed-off-by: Asias He > Acked-by: Paolo Bonzini > > > > Still, Gleb is right that SeaBIOS should not be able to crash QEMU; > exit(1) is fine, SIGSEGV is not. > > Paolo > This fixed the issue and makes the guest boot. Thanks Badari