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 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