From: Igor <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1715700] Re: Windows 7 guest won't boot on qemu 2.10 (works on 2.9)
Date: Tue, 19 Sep 2017 11:46:54 -0000 [thread overview]
Message-ID: <20170919134654.65ea69b5@nial.brq.redhat.com> (raw)
In-Reply-To: 150581879144.23300.16307542832099306368.malone@wampee.canonical.com
On Tue, 19 Sep 2017 10:59:51 -0000
"Laszlo Ersek \(Red Hat\)" <lersek@redhat.com> wrote:
> Thanks, Gerd, for the CC -- I agree, this commit (208fa0e43645) almost
> certainly breaks the VBE Shim. Displaying the patch with a bit larger
> context,
>
> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> > index 22e16031b03b..59435390ba62 100644
> > --- a/hw/i386/pc.c
> > +++ b/hw/i386/pc.c
> > @@ -1442,8 +1442,11 @@ void pc_memory_init(PCMachineState *pcms,
> >
> > option_rom_mr = g_malloc(sizeof(*option_rom_mr));
> > memory_region_init_ram(option_rom_mr, NULL, "pc.rom", PC_ROM_SIZE,
> > &error_fatal);
> > + if (pcmc->pci_enabled) {
> > + memory_region_set_readonly(option_rom_mr, true);
> > + }
> > memory_region_add_subregion_overlap(rom_memory,
> > PC_ROM_MIN_VGA,
> > option_rom_mr,
> > 1);
looking at it more, question is why do we have a separate
piece of ram mapped here that overlays system ram.
Can we remove this memory region and let guest use
underling initial memory?
>
> and PC_ROM_MIN_VGA is #defined as 0xc0000 in "include/hw/loader.h".
>
> OVMF places the VBE Shim into the C segment, and points the 0x10
> interrupt vector at it. See "OvmfPkg/QemuVideoDxe/VbeShim.c", function
> InstallVbeShim():
>
> > SegmentC = 0xC0000;
> >
> > [...]
> >
> > //
> > // Put the shim in place first.
> > //
> > Pam1Address = PCI_LIB_ADDRESS (0, 0, 0, 0x5A);
> > //
> > // low nibble covers 0xC0000 to 0xC3FFF
> > // high nibble covers 0xC4000 to 0xC7FFF
> > // bit1 in each nibble is Write Enable
> > // bit0 in each nibble is Read Enable
> > //
> > Pam1 = PciRead8 (Pam1Address);
> > PciWrite8 (Pam1Address, Pam1 | (BIT1 | BIT0));
> >
> > //
> > // We never added memory space during PEI or DXE for the C segment, so we
> > // don't need to (and can't) allocate from there. Also, guest operating
> > // systems will see a hole in the UEFI memory map there.
> > //
> > SegmentCPages = 4;
> >
> > ASSERT (sizeof mVbeShim <= EFI_PAGES_TO_SIZE (SegmentCPages));
> > CopyMem ((VOID *)(UINTN)SegmentC, mVbeShim, sizeof mVbeShim);
> >
> > [...]
> >
> > //
> > // Clear Write Enable (bit1), keep Read Enable (bit0) set
> > //
> > PciWrite8 (Pam1Address, (Pam1 & ~BIT1) | BIT0);
> >
> > //
> > // Second, point the Int10h vector at the shim.
> > //
> > Int0x10->Segment = (UINT16) ((UINT32)SegmentC >> 4);
> > Int0x10->Offset = (UINT16) ((UINTN) (VbeModeInfo + 1) - SegmentC);
>
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1715700
Title:
Windows 7 guest won't boot on qemu 2.10 (works on 2.9)
Status in QEMU:
New
Bug description:
Qemu version: 2.10 stable.
Guest: Windows 7 SP1 x64, virtio drivers are already installed in the guest.
Command line:
qemu-system-x86_64 \
-nodefaults \
-nodefconfig \
-machine type=q35,accel=kvm \
-enable-kvm \
-cpu host \
-m 2048 \
-vga virtio \
-boot menu=on \
-smbios file=/path/dmidecode_BIOS.bin \
-acpitable file=/path/acpi_slic.bin \
-bios /path/OVMF_CODE.fd \
-net none \
-drive if=virtio,media=disk,file=/media/win7.qcow2 \
-device pcie-root-port \
-device ich9-usb-ehci1 \
-device ich9-usb-uhci1 \
-device ich9-usb-uhci2 \
-device ich9-usb-uhci3
Windows hangs at boot with waving flag screen (flag doesn't freeze,
keeps waving indefinitely). Same command line boots fine with Qemu
2.9. I tried changing machine type to pc-q35-2.9 - same result.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1715700/+subscriptions
next prev parent reply other threads:[~2017-09-19 11:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-07 16:31 [Qemu-devel] [Bug 1715700] [NEW] Windows 7 guest won't boot on qemu 2.10 (works on 2.9) Aleksei Kovura
2017-09-07 16:48 ` [Qemu-devel] [Bug 1715700] " Dr. David Alan Gilbert
2017-09-07 19:34 ` Aleksei Kovura
2017-09-11 11:41 ` Igor Mammedov
2017-09-11 16:15 ` Aleksei Kovura
2017-09-11 16:36 ` Dr. David Alan Gilbert
2017-09-11 16:36 ` Daniel Berrange
2017-09-11 20:43 ` Aleksei Kovura
2017-09-18 19:12 ` Aleksei Kovura
2017-09-19 9:27 ` Dr. David Alan Gilbert
2017-09-19 10:01 ` Dr. David Alan Gilbert
2017-09-19 10:39 ` Gerd Hoffmann
2017-09-19 11:01 ` Igor
2017-09-19 11:10 ` Igor
2017-09-19 10:59 ` Laszlo Ersek (Red Hat)
2017-09-19 11:46 ` Igor [this message]
2017-09-19 11:00 ` Laszlo Ersek (Red Hat)
2017-09-19 11:10 ` Laszlo Ersek (Red Hat)
2017-09-19 11:44 ` Laszlo Ersek (Red Hat)
2017-09-19 11:49 ` Gerd Hoffmann
2017-09-19 12:33 ` Laszlo Ersek (Red Hat)
2017-09-19 11:58 ` Laszlo Ersek (Red Hat)
2017-09-19 12:38 ` Gerd Hoffmann
2017-09-19 13:05 ` Laszlo Ersek (Red Hat)
2017-09-19 12:35 ` Laszlo Ersek (Red Hat)
2017-09-19 12:38 ` Laszlo Ersek (Red Hat)
2017-09-19 19:20 ` Laszlo Ersek (Red Hat)
2017-09-20 18:29 ` Laszlo Ersek (Red Hat)
2017-10-23 18:57 ` Laszlo Ersek (Red Hat)
2018-04-26 10:08 ` Thomas Huth
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=20170919134654.65ea69b5@nial.brq.redhat.com \
--to=imammedo@redhat.com \
--cc=1715700@bugs.launchpad.net \
--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).