[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-devel
Subject:    Re: [Qemu-devel] XP install cores with SCSI LSI 53C895A disks
From:       Paolo Bonzini <pbonzini () redhat ! com>
Date:       2012-03-09 8:08:06
Message-ID: 4F59BA66.40502 () redhat ! com
[Download RAW message or body]

Il 09/03/2012 08:46, Gerhard Wiesinger ha scritto:
> On Fri, 9 Mar 2012, Gerd Hoffmann wrote:
> 
>>  Hi,
>>
>>>>> #2 isn't an issue actually, at least for Debian users --
>>>>
>>>> Well, it is, to some degree.  Because vanilla upstream doesn't support
>>>> booting from lsi it has alot less users and alot less regression
>>>> testing
>>>> (like autotest runs of lsi-scsi installs), which sums up to more bugs
>>>> staying unnoticed like the one which triggered this thread.
>>>
>>> What's the holdup to integrate it into QEMU?
>>
>> Extboot is considered obsolete and thus several attempts to merge it
>> into upstream qemu failed.  It started its life as hack to allow
>> qemu-kvm boot from virtio-blk devices, which happened to work for lsi
>> too.  virtio-blk is supported by seabios natively these days.
>>
>> Adding lsi support to seabios shouldn't be that hard.  Paolo paved the
>> way by restructing the existing scsi disk/cdrom bits in seabios so they
>> work for both usb-storage and virtio-scsi.  Adding support for yet
>> another scsi hba should be easy, all the support bits for handling disks
>> and booting from cdrom are there already.
>>
>> It just needs someone to sit down for a week or two and hack it up.
> 
> @Paolo: Would that be easily possible?

Sure.

You could expect the SeaBIOS driver to be 700-100 lines of code:

$ wc lsi53c895a.c virtio-scsi.c usb-msd.c # in QEMU
 2150  6959 62694 lsi53c895a.c
  617  1537 18463 virtio-scsi.c
  677  1847 18465 usb-msd.c

$ wc virtio-scsi.c usb-msc.c # in SeaBIOS
 177  517 4711 virtio-scsi.c
 174  499 4935 usb-msc.c

As Gerd said, the SCSI layer is entirely abstracted (the only piece
missing to abstract is discovery, which is why virtio-scsi will only
boot from LUN0).  The driver only needs to provide a way to execute CDBs.

> BTW: What do you think anout that:
> Handling INT13h always directly through virtio-scsi regardless of
> selected SCSI adapter, or when OS driver is loaded through SCSI adapter,
> so just have 2 ways to the disks:
> 1.) Through INT13h to virtio-scsi and then to the disks
> 2.) Through SCSI adapter and then to the disks (OS driver loaded)

Interesting idea. :)  That would work, I guess.

By the way, you said the lsi53c is buslogic in VMWare and hence libvirt?

Paolo

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic