[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: fdc: refactor device creation causes guest kernel panic
From: |
Blue Swirl |
Subject: |
[Qemu-devel] Re: fdc: refactor device creation causes guest kernel panic |
Date: |
Sat, 12 Mar 2011 15:02:02 +0200 |
On Sat, Mar 12, 2011 at 2:58 PM, Stefan Hajnoczi <address@hidden> wrote:
> On Sat, Mar 12, 2011 at 10:53 AM, Blue Swirl <address@hidden> wrote:
>> The logic for calculating the drive state in pc.c does not match fdc.c
>> logic. Please try this patch.
>>
>> diff --git a/hw/pc.c b/hw/pc.c
>> index 5966bf1..4d67d9f 100644
>> --- a/hw/pc.c
>> +++ b/hw/pc.c
>> @@ -382,7 +382,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t
>> above_4g_mem_size,
>> /* floppy type */
>> for (i = 0; i < 2; i++) {
>> fd[i] = drive_get(IF_FLOPPY, 0, i);
>> - if (fd[i]) {
>> + if (fd[i] && bdrv_is_inserted(fd[i]->bdrv)) {
>> bdrv_get_floppy_geometry_hint(fd[i]->bdrv, &nb_heads, &max_track,
>> &last_sect, FDRIVE_DRV_NONE,
>> &fd_type[i]);
>>
>
> This patch fixes the problem, thanks!
>
> Tested-by: Stefan Hajnoczi <address@hidden>
Thank you for testing, applied.