kvm: extboot: Fix read drive parameters to solve Grub Error 18
commit5862e735d66cf42358811da568ede75147320758
authorAnthony Liguori <aliguori@us.ibm.com>
Tue, 4 Mar 2008 17:44:33 +0000 (4 11:44 -0600)
committerAvi Kivity <avi@qumranet.com>
Wed, 5 Mar 2008 07:05:16 +0000 (5 09:05 +0200)
tree2a8633b439422afe2bcc056018cb5fd134683481
parent5c7e2db5f005d9bf41ed259b52199531d5d7ddc2
kvm: extboot: Fix read drive parameters to solve Grub Error 18

In certain circumstances, the calculated CHS can result in a total number of
sectors that is less than the actual number of sectors.  I'm not entirely
sure why this upsets grub, but it seems to be the source of the Grub Error 18
that sometimes occurs when using extboot.

The solution is to implement the read drive parameters function and return the
actual numbers of sectors.  This requires changing the QEMU <=> extboot
interface as this was not previously passed to extboot.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
kvm/extboot/extboot.S