qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: fdc: refactor device creation causes guest kernel panic
Date: Sat, 12 Mar 2011 15:02:02 +0200	[thread overview]
Message-ID: <AANLkTino9GeHe1WpT3-++=pqnk5w07Te+2mrHAAzO7wX@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=Onn7VXdVNB2fuGT24ZxchR_+7ZbuxsYu=MKEa@mail.gmail.com>

On Sat, Mar 12, 2011 at 2:58 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Sat, Mar 12, 2011 at 10:53 AM, Blue Swirl <blauwirbel@gmail.com> 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 <stefanha@linux.vnet.ibm.com>

Thank you for testing, applied.

      reply	other threads:[~2011-03-12 13:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-09 14:34 [Qemu-devel] fdc: refactor device creation causes guest kernel panic Stefan Hajnoczi
2011-03-12 10:53 ` [Qemu-devel] " Blue Swirl
2011-03-12 12:58   ` Stefan Hajnoczi
2011-03-12 13:02     ` Blue Swirl [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTino9GeHe1WpT3-++=pqnk5w07Te+2mrHAAzO7wX@mail.gmail.com' \
    --to=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).