Patchwork [PULL,for-1.3,0/3] seabios: q35 update

login
register
mail settings
Submitter Gerd Hoffmann
Date Dec. 3, 2012, 10:11 a.m.
Message ID <1354529518-25534-1-git-send-email-kraxel@redhat.com>
Download mbox
Permalink /patch/203308/
State New
Headers show

Pull-request

git://git.kraxel.org/qemu seabios-3d11108

Comments

Gerd Hoffmann - Dec. 3, 2012, 10:11 a.m.
Hi,

Most q35 seabios patches just landed upstream.  So here we go with a
last-minute pull to plumb the missing q35 bits.  It obviously updates
seabios again.  It also adds autoloading for the acpi dsdt table.

With this pull "qemu -M q35" JustWorks[tm].

please pull,
  Gerd

The following changes since commit 01bbd8bf2caced5cb07939669f58d3a7bcc78092:

  Update version for 1.3.0-rc2 (2012-11-30 15:04:16 -0600)

are available in the git repository at:
  git://git.kraxel.org/qemu seabios-3d11108

Gerd Hoffmann (3):
      seabios: update to 3d11108f45818d75140530a184c05680f1be51ad
      configure: also symlink *.aml files
      acpi: autoload dsdt

 configure                 |    1 +
 hw/pc.c                   |   23 +++++++++++++++++++++++
 hw/pc.h                   |    1 +
 hw/pc_piix.c              |    1 +
 hw/pc_q35.c               |    1 +
 pc-bios/acpi-dsdt.aml     |  Bin 4540 -> 4450 bytes
 pc-bios/bios.bin          |  Bin 131072 -> 131072 bytes
 pc-bios/q35-acpi-dsdt.aml |  Bin 0 -> 8374 bytes
 roms/seabios              |    2 +-
 9 files changed, 28 insertions(+), 1 deletions(-)
 create mode 100644 pc-bios/q35-acpi-dsdt.aml
Jason Baron - Dec. 3, 2012, 6:47 p.m.
On Mon, Dec 03, 2012 at 11:11:55AM +0100, Gerd Hoffmann wrote:
>   Hi,
> 
> Most q35 seabios patches just landed upstream.  So here we go with a
> last-minute pull to plumb the missing q35 bits.  It obviously updates
> seabios again.  It also adds autoloading for the acpi dsdt table.
> 
> With this pull "qemu -M q35" JustWorks[tm].
> 
> please pull,
>   Gerd
> 

Hi,

Feel free to add my Acked-by: Jason Baron <jbaron@redhat.com>
to the series.

I've just been looking at WindowsXP support and there are a few issues
that need to be resolved to make it work with the current q35 code.

1) legacy ide mode

I can currently create a ide controller on the command-line using
'-device'. However, on the real h/w there is an IDE compatibility mode
which essentially advertises an ide controller at the same location that
the ahci lives at. In fact, it changes the PCI device id. To deal with
the fact that AHCI has 6 ports and thus 6 possible devices, it then adds
a second controller for the remaining 2 disks. This shouldn't be too
hard to emulate. But I'm wondering what we want the qemu interface
to look like? A -machine options such as:
'-machine q35,diskmode=ahci,ide,raid'? 

2) HPET ACPI error

This line: 'IRQNoFlags () {2, 8}' in the HPET acpi table is causing the
folloing ACPI message (removing it makes it go away):

"
A problem has been detected and windows has been shut down to prevent damage
to your computer.

If this is the first time you've seen this Stop error screen,
restart your computer. If this screen appears again, follow
these steps:

Check To be sure you have adequate disk space. If a driver is
identified in The stop message, disable the driver or check
with the manufacturer for driver updates. Try changing video
adapters.

Check with your hardware vendor for any BIOS updates. Disable
BIOS memory options such as caching or shadowing. If you need
to use safe mode to remove or disable components, restart your
computer, press F8 To select Advanced startup opTions, and then
select safe mode.

Technical information:


*** STOP: Ox0000007E (OxFFFFFFFFC0000005,OxFFFFFADF8FCEDA83,OxFFFFFADF90631540,O
xFFFFFADF90630F50)



***    acpi.sys - Address FFFFFADF8FCEDA83 base at FFFFFADF8FCDA000, DateStamp
42435eae
"

3) irq table

The irq table commit that makes windows 7 work, upsets Windows XP. If
I back out seabios commit: 2114f50148c42e374586359d23b522483ca10e8d
I do not get the following error:

"
A problem has been detected and windows has been shut down To prevent damage
to your computer.

If this is The first time you've seen this stop error screen,
restart your computer. If this screen appears again, follow
these steps:

The BIOS in this sysTem is not fully ACPI compliant. Please contact your
system vendor for an updated BIOS.  If you are unable to obtain an
updated BIOS or the latest BIOS supplied by your vendor is not ACPI
compliant, you can turn off ACPI mode during textmode setup.  To do this,
press The F7 key when you are prompted To install storage drivers. The
system will not notify you that the F7 key was pressed - it will silently
disable ACPI and allow you to continue your installation.

Technical informaTion:

*** STOP: 0x000000A5 (Ox0000000000010006,OxFFFFFADF9C461108,0x0000000000000000,0
x0000000000000000)
"


Thanks,

-Jason
Gerd Hoffmann - Dec. 4, 2012, 7:40 a.m.
Hi,

> 1) legacy ide mode
> 
> I can currently create a ide controller on the command-line using
> '-device'. However, on the real h/w there is an IDE compatibility mode
> which essentially advertises an ide controller at the same location that
> the ahci lives at. In fact, it changes the PCI device id. To deal with
> the fact that AHCI has 6 ports and thus 6 possible devices, it then adds
> a second controller for the remaining 2 disks. This shouldn't be too
> hard to emulate. But I'm wondering what we want the qemu interface
> to look like? A -machine options such as:
> '-machine q35,diskmode=ahci,ide,raid'? 

I'm wondering whenever we want to deal with that at all?

"If your guest is too old to handle ahci natively, just stick to piix."
is a sensible policy IMHO.

> 2) HPET ACPI error
> 
> This line: 'IRQNoFlags () {2, 8}' in the HPET acpi table is causing the
> folloing ACPI message (removing it makes it go away):

Hmm.  That was added to make macos x happy and is also present on real
hardware, so I'm wondering what is going on here.

> 3) irq table
> 
> The irq table commit that makes windows 7 work, upsets Windows XP. If
> I back out seabios commit: 2114f50148c42e374586359d23b522483ca10e8d
> I do not get the following error:
> 
> "
> A problem has been detected and windows has been shut down To prevent damage
> to your computer.
> 
> If this is The first time you've seen this stop error screen,
> restart your computer. If this screen appears again, follow
> these steps:
> 
> The BIOS in this sysTem is not fully ACPI compliant. Please contact your
> system vendor for an updated BIOS.  If you are unable to obtain an
> updated BIOS or the latest BIOS supplied by your vendor is not ACPI
> compliant, you can turn off ACPI mode during textmode setup.  To do this,
> press The F7 key when you are prompted To install storage drivers. The
> system will not notify you that the F7 key was pressed - it will silently
> disable ACPI and allow you to continue your installation.
> 
> Technical informaTion:
> 
> *** STOP: 0x000000A5 (Ox0000000000010006,OxFFFFFADF9C461108,0x0000000000000000,0
> x0000000000000000)
> "

Jan, this is your commit, any idea?

cheers,
  Gerd
Jan Kiszka - Dec. 4, 2012, 7:46 a.m.
On 2012-12-04 08:40, Gerd Hoffmann wrote:
>   Hi,
> 
>> 1) legacy ide mode
>>
>> I can currently create a ide controller on the command-line using
>> '-device'. However, on the real h/w there is an IDE compatibility mode
>> which essentially advertises an ide controller at the same location that
>> the ahci lives at. In fact, it changes the PCI device id. To deal with
>> the fact that AHCI has 6 ports and thus 6 possible devices, it then adds
>> a second controller for the remaining 2 disks. This shouldn't be too
>> hard to emulate. But I'm wondering what we want the qemu interface
>> to look like? A -machine options such as:
>> '-machine q35,diskmode=ahci,ide,raid'? 
> 
> I'm wondering whenever we want to deal with that at all?
> 
> "If your guest is too old to handle ahci natively, just stick to piix."
> is a sensible policy IMHO.
> 
>> 2) HPET ACPI error
>>
>> This line: 'IRQNoFlags () {2, 8}' in the HPET acpi table is causing the
>> folloing ACPI message (removing it makes it go away):
> 
> Hmm.  That was added to make macos x happy and is also present on real
> hardware, so I'm wondering what is going on here.
> 
>> 3) irq table
>>
>> The irq table commit that makes windows 7 work, upsets Windows XP. If
>> I back out seabios commit: 2114f50148c42e374586359d23b522483ca10e8d
>> I do not get the following error:
>>
>> "
>> A problem has been detected and windows has been shut down To prevent damage
>> to your computer.
>>
>> If this is The first time you've seen this stop error screen,
>> restart your computer. If this screen appears again, follow
>> these steps:
>>
>> The BIOS in this sysTem is not fully ACPI compliant. Please contact your
>> system vendor for an updated BIOS.  If you are unable to obtain an
>> updated BIOS or the latest BIOS supplied by your vendor is not ACPI
>> compliant, you can turn off ACPI mode during textmode setup.  To do this,
>> press The F7 key when you are prompted To install storage drivers. The
>> system will not notify you that the F7 key was pressed - it will silently
>> disable ACPI and allow you to continue your installation.
>>
>> Technical informaTion:
>>
>> *** STOP: 0x000000A5 (Ox0000000000010006,OxFFFFFADF9C461108,0x0000000000000000,0
>> x0000000000000000)
>> "
> 
> Jan, this is your commit, any idea?

Not really. This is looong ago. I hacked it in to make Win7 happy, but I
may not have tested WinXP by that time.

Jan
Jason Baron - Dec. 4, 2012, 2:37 p.m.
On Tue, Dec 04, 2012 at 08:40:27AM +0100, Gerd Hoffmann wrote:
>   Hi,
> 
> > 1) legacy ide mode
> > 
> > I can currently create a ide controller on the command-line using
> > '-device'. However, on the real h/w there is an IDE compatibility mode
> > which essentially advertises an ide controller at the same location that
> > the ahci lives at. In fact, it changes the PCI device id. To deal with
> > the fact that AHCI has 6 ports and thus 6 possible devices, it then adds
> > a second controller for the remaining 2 disks. This shouldn't be too
> > hard to emulate. But I'm wondering what we want the qemu interface
> > to look like? A -machine options such as:
> > '-machine q35,diskmode=ahci,ide,raid'? 
> 
> I'm wondering whenever we want to deal with that at all?
> 
> "If your guest is too old to handle ahci natively, just stick to piix."
> is a sensible policy IMHO.
> 

There was some discussion of trying to make q35 the default for 1.4, in
which case it may be important to support older OS's such as WinXP.

Anthony, do you have any opinion on this?


> > 2) HPET ACPI error
> > 
> > This line: 'IRQNoFlags () {2, 8}' in the HPET acpi table is causing the
> > folloing ACPI message (removing it makes it go away):
> 
> Hmm.  That was added to make macos x happy and is also present on real
> hardware, so I'm wondering what is going on here.
> 

I also noticed that on Windows 7, the 'IRQNoFlags' line above makes the RTC
clock complain that it does not have resources available. While removing the
above line, removes that error.

thanks,

-Jason
Gabriel L. Somlo - Dec. 4, 2012, 2:42 p.m.
On Tue, 04 Dec 2012 08:40:27 +0100 Gerd Hoffmann wrote:
>On Mon, 3 Dec 2012 13:47:04 -0500, Jason Baron wrote:
>> 2) HPET ACPI error
>> 
>> This line: 'IRQNoFlags () {2, 8}' in the HPET acpi table is causing the
>> folloing ACPI message (removing it makes it go away):
>
> Hmm.  That was added to make macos x happy and is also present on real
> hardware, so I'm wondering what is going on here.

Without that line, OS X only works as a single-core, non-SMP guest.
This is the "legacy replacement irq mapping" option for HPET (section
2.4.2, page 24 of the IA-PC HPET Specification).

The options are 'IRQNoFlags () {2, 8}' for "APIC mapping" or
'IRQNoFlags () {0, 8}' for "8259 mapping". Either one works for SMP + OS X.

I don't have an XP install image anymore, but does replacing 2,8 with
0,8 help ?

On a few of my machines, this is actually coded as

                        IRQNoFlags ()
                            {0}			/* or 2 */
                        IRQNoFlags ()
                            {8}

Based on my reading of the ACPI manual, this should be syntactically
equivalent to the the comma-separated single-line format we're currently
using, but could it be that WinXP is picky about the specifics ?

Also, as far as I can tell, this change never made it into the
"q35-acpi-dsdt.dsl" file, just the "classic" acpi-dsdt.dsl (or, lately,
acpi-dsdt-hpet.dsl). I was about to submit another patch for that, but
now I guess I won't press it until we sort this out :)

--Gabriel
Jason Baron - Dec. 4, 2012, 3:11 p.m.
On Tue, Dec 04, 2012 at 09:42:44AM -0500, Gabriel L. Somlo wrote:
> On Tue, 04 Dec 2012 08:40:27 +0100 Gerd Hoffmann wrote:
> >On Mon, 3 Dec 2012 13:47:04 -0500, Jason Baron wrote:
> >> 2) HPET ACPI error
> >> 
> >> This line: 'IRQNoFlags () {2, 8}' in the HPET acpi table is causing the
> >> folloing ACPI message (removing it makes it go away):
> >
> > Hmm.  That was added to make macos x happy and is also present on real
> > hardware, so I'm wondering what is going on here.
> 
> Without that line, OS X only works as a single-core, non-SMP guest.
> This is the "legacy replacement irq mapping" option for HPET (section
> 2.4.2, page 24 of the IA-PC HPET Specification).
> 
> The options are 'IRQNoFlags () {2, 8}' for "APIC mapping" or
> 'IRQNoFlags () {0, 8}' for "8259 mapping". Either one works for SMP + OS X.
> 
> I don't have an XP install image anymore, but does replacing 2,8 with
> 0,8 help ?
> 

no.

> On a few of my machines, this is actually coded as
> 
>                         IRQNoFlags ()
>                             {0}			/* or 2 */
>                         IRQNoFlags ()
>                             {8}
> 
> Based on my reading of the ACPI manual, this should be syntactically
> equivalent to the the comma-separated single-line format we're currently
> using, but could it be that WinXP is picky about the specifics ?
> 

Didn't seem to help either. I also tried having just a single irq from
0,2,8, and that didn't work either. The only thing that seems to make XP
happy is completely removing that line. So I'm not sure what is wrong.

> Also, as far as I can tell, this change never made it into the
> "q35-acpi-dsdt.dsl" file, just the "classic" acpi-dsdt.dsl (or, lately,
> acpi-dsdt-hpet.dsl). I was about to submit another patch for that, but
> now I guess I won't press it until we sort this out :)
> 

q35-acpi-dsdt.dsl is the current sebios tree does:

#include "acpi-dsdt-hpet.dsl"

Thanks,

-Jason
Gerd Hoffmann - Dec. 4, 2012, 3:37 p.m.
Hi,

>>> '-machine q35,diskmode=ahci,ide,raid'? 
>>
>> I'm wondering whenever we want to deal with that at all?
>>
>> "If your guest is too old to handle ahci natively, just stick to piix."
>> is a sensible policy IMHO.
>>
> 
> There was some discussion of trying to make q35 the default for 1.4, in
> which case it may be important to support older OS's such as WinXP.
> 
> Anthony, do you have any opinion on this?

The fundamental issue is that you have either good compatibility (makes
old guests happy) or good performance (makes modern guests happy) by
default.  Picking a default which makes everybody happy is impossible.

That problem doesn't change no matter whenever the choice is piix vs.
q35 or q35+ide vs. q35+ahci.

management apps (using libosinfo) can tackle this in a sensible manner
by picking virtual hardware depending on the guest capabilities.  So I
wouldn't worry too much on qemu level.

>>> 2) HPET ACPI error
>>>
>>> This line: 'IRQNoFlags () {2, 8}' in the HPET acpi table is causing the
>>> folloing ACPI message (removing it makes it go away):
>>
>> Hmm.  That was added to make macos x happy and is also present on real
>> hardware, so I'm wondering what is going on here.
>>
> 
> I also noticed that on Windows 7, the 'IRQNoFlags' line above makes the RTC
> clock complain that it does not have resources available. While removing the
> above line, removes that error.

Hmm.  The IRQNoFlags for the RTC isn't new though, but I can see that
with win7 on piix too.

cheers,
  Gerd
Gerd Hoffmann - Dec. 4, 2012, 3:57 p.m.
On 12/04/12 16:37, Gerd Hoffmann wrote:
>> > I also noticed that on Windows 7, the 'IRQNoFlags' line above makes the RTC
>> > clock complain that it does not have resources available. While removing the
>> > above line, removes that error.
> Hmm.  The IRQNoFlags for the RTC isn't new though, but I can see that
> with win7 on piix too.

Works fine with 1.7.1 though.  /me goes bisecting.

cheers,
  Gerd