mbox series

[v2,0/6] This series changes the "isa-bios" MemoryRegion to be an alias rather than a

Message ID 20240430150643.111976-1-shentey@gmail.com (mailing list archive)
Headers show
Series This series changes the "isa-bios" MemoryRegion to be an alias rather than a | expand

Message

Bernhard Beschow April 30, 2024, 3:06 p.m. UTC
region which matches real hardware and which some real-world legacy bioses I'm
running rely on. Furthermore, aliasing in the isa-bios area is already the
current behavior in the bios (a.k.a. ROM) case, so this series consolidates
behavior.

For migration compatibility the aliasing is only performed on new versions of
the q34 and pc machine types.

v2:
* Don't leak bios memory regions (Phil)
* Add compat machinery (Michael)

Testing done:
* `make check` with qemu-system-x86_64 (QEMU 8.2.2) installed. All tests
  including migration tests pass.
* `make check-avocado`

Best regards,
Bernhard

Bernhard Beschow (6):
  hw/i386/x86: Eliminate two if statements in x86_bios_rom_init()
  hw/i386: Have x86_bios_rom_init() take X86MachineState rather than
    MachineState
  hw/i386/x86: Don't leak "isa-bios" memory regions
  hw/i386/x86: Don't leak "pc.bios" memory region
  hw/i386/x86: Extract x86_isa_bios_init() from x86_bios_rom_init()
  hw/i386/pc_sysfw: Alias rather than copy isa-bios region

 include/hw/i386/pc.h  |  1 +
 include/hw/i386/x86.h |  7 ++++++-
 hw/i386/microvm.c     |  2 +-
 hw/i386/pc.c          |  1 +
 hw/i386/pc_piix.c     |  3 +++
 hw/i386/pc_q35.c      |  2 ++
 hw/i386/pc_sysfw.c    | 17 ++++++++++------
 hw/i386/x86.c         | 45 ++++++++++++++++++++++---------------------
 8 files changed, 48 insertions(+), 30 deletions(-)

Comments

Philippe Mathieu-Daudé May 8, 2024, 2:53 p.m. UTC | #1
On 30/4/24 17:06, Bernhard Beschow wrote:

> Bernhard Beschow (6):
>    hw/i386/x86: Eliminate two if statements in x86_bios_rom_init()
>    hw/i386: Have x86_bios_rom_init() take X86MachineState rather than
>      MachineState
>    hw/i386/x86: Don't leak "isa-bios" memory regions

Patches 1-3 queued.
Bernhard Beschow May 8, 2024, 6 p.m. UTC | #2
Am 8. Mai 2024 14:53:49 UTC schrieb "Philippe Mathieu-Daudé" <philmd@linaro.org>:
>On 30/4/24 17:06, Bernhard Beschow wrote:
>
>> Bernhard Beschow (6):
>>    hw/i386/x86: Eliminate two if statements in x86_bios_rom_init()
>>    hw/i386: Have x86_bios_rom_init() take X86MachineState rather than
>>      MachineState
>>    hw/i386/x86: Don't leak "isa-bios" memory regions
>
>Patches 1-3 queued.

Phil,

you requested comments on the bios attributes which clashes with patch 3. I've just sent a new iteration of my series with all your requests addressed, including the comments.

Best regards,
Bernhard