From: Kevin O'Connor <kevin@koconnor.net>
To: Avi Kivity <avi@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, KVM list <kvm@vger.kernel.org>
Subject: [Qemu-devel] Re: SeaBIOS cdrom regression with Vista
Date: Fri, 20 Nov 2009 13:03:51 -0500 [thread overview]
Message-ID: <20091120180351.GA21458@morn.localdomain> (raw)
In-Reply-To: <20091118051920.GA9691@morn.localdomain>
On Wed, Nov 18, 2009 at 12:19:20AM -0500, Kevin O'Connor wrote:
> On Tue, Nov 17, 2009 at 03:21:31PM +0200, Avi Kivity wrote:
> > qemu-kvm's switch to seabios uncovered a regression with cdrom handling.
> > Vista x64 no longer recognizes the cdrom, while pc-bios still works.
> > Installing works, but that uses int 13, not the native driver. Haven't
> > investigated further yet.
> The only things I can think of that could impact the OS recognizing a
> cdrom would be: the cdrom left in an odd state (seems unlikely as the
> OS usually does a full reset), ACPI differences, or int1348 errors.
I've looked into this, and it looks like the cdrom is left in an odd
state. At this point, I think SeaBIOS is tickling a bug outside of
seabios (eg, in Vista or qemu). I would appreciate it someone with
cdrom knowledge of qemu could help.
Here is what I'm seeing.
As reported, the following fails:
qemu -hda winvista -cdrom util.iso
The following also fails:
qemu -hdc winvista -drive file=util.iso,media=cdrom,index=0
However, this works!?
qemu -hdc winvista -drive file=util.iso,media=cdrom,index=1
And this works (both cdroms are seen):
qemu -hdc winvista -drive file=util.iso,media=cdrom,index=0 -drive file=util2.iso,media=cdrom,index=1
The following also works:
qemu -hda winvista -hdc someotherdrive
And this works too:
qemu -hdd winvista -cdrom util.iso
So, basically, something is causing vista to not like the cdrom, but
only when the cdrom is a master and there is no slave.
Tracking this further, if I apply the patch to seabios below, I find
that it still fails, but if I uncomment the first check then
everything works. This leads me to believe that sending an "identify
packet device" request to a non-existent slave when a cdrom is master
is causing that cdrom master to not be liked by vista.
SeaBIOS has a different ata drive detection mechanism than bochs - it
needs it in order to work on real hardware. So, this explains why
bochs bios doesn't show this issue. (Seabios tries to send an
"identify packet device" and then an "identify device" command to
detect a drive; bochs bios looks for a signature in the ata registers
after an ata reset.)
Any thoughts?
-Kevin
--- a/src/ata.c
+++ b/src/ata.c
@@ -713,9 +713,14 @@ ata_detect(void *data)
last_reset_ataid = ataid;
}
+// if (slave)
+// continue;
+
// check for ATAPI
u16 buffer[256];
struct drive_s *drive_g = init_drive_atapi(&dummy, buffer);
+ if (slave)
+ continue;
if (!drive_g) {
// Didn't find an ATAPI drive - look for ATA drive.
u8 st = inb(iobase1+ATA_CB_STAT);
next prev parent reply other threads:[~2009-11-20 18:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 13:21 [Qemu-devel] SeaBIOS cdrom regression with Vista Avi Kivity
2009-11-17 17:07 ` Stefan Weil
2009-11-18 5:19 ` [Qemu-devel] " Kevin O'Connor
2009-11-19 3:24 ` Kevin O'Connor
2009-11-19 10:25 ` Avi Kivity
2009-11-20 18:03 ` Kevin O'Connor [this message]
2009-11-20 19:08 ` Kevin O'Connor
2009-11-20 22:36 ` Kevin O'Connor
2009-11-22 8:56 ` Avi Kivity
2009-11-26 15:31 ` Avi Kivity
2009-11-19 15:34 ` Avi Kivity
2009-11-19 15:40 ` Alexander Graf
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=20091120180351.GA21458@morn.localdomain \
--to=kevin@koconnor.net \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/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).