qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu seabios issue with vhost-scsi


From: Paolo Bonzini
Subject: Re: [Qemu-devel] qemu seabios issue with vhost-scsi
Date: Thu, 23 May 2013 16:58:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

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 <address@hidden>
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 <address@hidden>
    Acked-by: Paolo Bonzini <address@hidden>



Still, Gleb is right that SeaBIOS should not be able to crash QEMU;
exit(1) is fine, SIGSEGV is not.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]