From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Sergio Lopez" <slp@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Michael Roth" <michael.roth@amd.com>
Subject: Re: [PATCH v3 6/6] hw/i386/pc_sysfw: Alias rather than copy isa-bios region
Date: Tue, 21 May 2024 07:10:29 +0000 [thread overview]
Message-ID: <4A8C51D4-D809-474F-8E6C-DCCEDCBD3857@gmail.com> (raw)
In-Reply-To: <20240508175507.22270-7-shentey@gmail.com>
Am 8. Mai 2024 17:55:07 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>In the -bios case the "isa-bios" memory region is an alias to the BIOS mapped
>to the top of the 4G memory boundary. Do the same in the -pflash case, but only
>for new machine versions for migration compatibility. This establishes common
>behavior and makes pflash commands work in the "isa-bios" region which some
>real-world legacy bioses rely on.
>
>Note that in the sev_enabled() case, the "isa-bios" memory region in the -pflash
>case will now also point to encrypted memory, just like it already does in the
>-bios case.
>
>When running `info mtree` before and after this commit with
>`qemu-system-x86_64 -S -drive \
>if=pflash,format=raw,readonly=on,file=/usr/share/qemu/bios-256k.bin` and running
>`diff -u before.mtree after.mtree` results in the following changes in the
>memory tree:
>
> --- before.mtree
> +++ after.mtree
> @@ -71,7 +71,7 @@
> 0000000000000000-ffffffffffffffff (prio -1, i/o): pci
> 00000000000a0000-00000000000bffff (prio 1, i/o): vga-lowmem
> 00000000000c0000-00000000000dffff (prio 1, rom): pc.rom
> - 00000000000e0000-00000000000fffff (prio 1, rom): isa-bios
> + 00000000000e0000-00000000000fffff (prio 1, romd): alias isa-bios @system.flash0 0000000000020000-000000000003ffff
> 00000000000a0000-00000000000bffff (prio 1, i/o): alias smram-region @pci 00000000000a0000-00000000000bffff
> 00000000000c0000-00000000000c3fff (prio 1, i/o): alias pam-pci @pci 00000000000c0000-00000000000c3fff
> 00000000000c4000-00000000000c7fff (prio 1, i/o): alias pam-pci @pci 00000000000c4000-00000000000c7fff
> @@ -108,7 +108,7 @@
> 0000000000000000-ffffffffffffffff (prio -1, i/o): pci
> 00000000000a0000-00000000000bffff (prio 1, i/o): vga-lowmem
> 00000000000c0000-00000000000dffff (prio 1, rom): pc.rom
> - 00000000000e0000-00000000000fffff (prio 1, rom): isa-bios
> + 00000000000e0000-00000000000fffff (prio 1, romd): alias isa-bios @system.flash0 0000000000020000-000000000003ffff
> 00000000000a0000-00000000000bffff (prio 1, i/o): alias smram-region @pci 00000000000a0000-00000000000bffff
> 00000000000c0000-00000000000c3fff (prio 1, i/o): alias pam-pci @pci 00000000000c0000-00000000000c3fff
> 00000000000c4000-00000000000c7fff (prio 1, i/o): alias pam-pci @pci 00000000000c4000-00000000000c7fff
> @@ -131,11 +131,14 @@
> memory-region: pc.ram
> 0000000000000000-0000000007ffffff (prio 0, ram): pc.ram
>
> +memory-region: system.flash0
> + 00000000fffc0000-00000000ffffffff (prio 0, romd): system.flash0
> +
> memory-region: pci
> 0000000000000000-ffffffffffffffff (prio -1, i/o): pci
> 00000000000a0000-00000000000bffff (prio 1, i/o): vga-lowmem
> 00000000000c0000-00000000000dffff (prio 1, rom): pc.rom
> - 00000000000e0000-00000000000fffff (prio 1, rom): isa-bios
> + 00000000000e0000-00000000000fffff (prio 1, romd): alias isa-bios @system.flash0 0000000000020000-000000000003ffff
>
> memory-region: smram
> 00000000000a0000-00000000000bffff (prio 0, ram): alias smram-low @pc.ram 00000000000a0000-00000000000bffff
>
>Note that in both cases the "system" memory region contains the entry
>
> 00000000fffc0000-00000000ffffffff (prio 0, romd): system.flash0
>
>but the "system.flash0" memory region only appears standalone when "isa-bios" is
>an alias.
>
>Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Ping
This is the only patch in this series which hasn't got an R-b tag yet (the others are already in master) and I'm not aware of any open issues.
Best regards,
Bernhard
next prev parent reply other threads:[~2024-05-21 7:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 17:55 [PATCH v3 0/6] X86: Alias isa-bios area and clean up Bernhard Beschow
2024-05-08 17:55 ` [PATCH v3 1/6] hw/i386/x86: Eliminate two if statements in x86_bios_rom_init() Bernhard Beschow
2024-05-08 17:55 ` [PATCH v3 2/6] hw/i386: Have x86_bios_rom_init() take X86MachineState rather than MachineState Bernhard Beschow
2024-05-08 17:55 ` [PATCH v3 3/6] hw/i386/x86: Don't leak "isa-bios" memory regions Bernhard Beschow
2024-05-08 17:55 ` [PATCH v3 4/6] hw/i386/x86: Don't leak "pc.bios" memory region Bernhard Beschow
2024-05-08 17:55 ` [PATCH v3 5/6] hw/i386/x86: Extract x86_isa_bios_init() from x86_bios_rom_init() Bernhard Beschow
2024-05-08 17:55 ` [PATCH v3 6/6] hw/i386/pc_sysfw: Alias rather than copy isa-bios region Bernhard Beschow
2024-05-21 7:10 ` Bernhard Beschow [this message]
2024-05-21 7:13 ` Paolo Bonzini
2024-05-21 7:42 ` Michael S. Tsirkin
2024-05-08 20:39 ` [PATCH v3 0/6] X86: Alias isa-bios area and clean up BALATON Zoltan
2024-05-14 8:31 ` Bernhard Beschow
2024-05-08 22:10 ` Philippe Mathieu-Daudé
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=4A8C51D4-D809-474F-8E6C-DCCEDCBD3857@gmail.com \
--to=shentey@gmail.com \
--cc=eduardo@habkost.net \
--cc=marcel.apfelbaum@gmail.com \
--cc=michael.roth@amd.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=slp@redhat.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).