[SeaBIOS] [PATCH] fix two issues with virtio-blk

Gleb Natapov gleb at redhat.com
Sun May 16 10:08:57 CEST 2010


On Sat, May 15, 2010 at 05:17:31PM +0200, Sebastian Herbszt wrote:
> Gleb Natapov wrote:
> >On Wed, May 12, 2010 at 07:25:55PM -0400, Kevin O'Connor wrote:
> >>The blksize needs to be 512, because the BIOS interface that virtio
> >>binds to requires 512 byte sectors.  Shouldn't this look something
> >>like:
> >>
> >>          if (cfg.blk_size != DISK_SECTOR_SIZE)
> >>              goto fail;
> >>          vdrive_g->drive.blksize = DISK_SECTOR_SIZE;
> >>
> >Hmm, I guess you are right. Boot indeed fails if I configure logical
> >block size bigger then 512 bytes. But shouldn't BIOS emulate 512 byte
> >access on top of bigger block size? Future disks will use much large
> >logical block sizes.
> 
> What the BIOS should do or not doesn't seem to be defined anywhere (yet).
> Current drives with physical sector size > 512 bytes report a logical sector
> size of 512 bytes and do the emulation on their own. The BIOS doesn't need
> to be modified so far to support those drives. If drives with logical sector
> size > 512 bytes appear this situation might change. Doing a read emulation
Isn't it chicken n' egg situation. If BIOSes will not add 4K block support
drives will never be able to use 4K logical blocks.

> in BIOS shouldn't be too bad, but a write emulation will need a "physical
> sector size" RMW buffer (no clue where the BIOS could steal those 4KB from).
> Maybe we are all using EFI without legacy BIOS interfaces when those drives
> appear anyway.
> 
> Sebastian

--
			Gleb.



More information about the SeaBIOS mailing list