[PATCH 0/3] hw/pci-host/q35: Fix blank screen for VGA when SMM is disabled

Peter Maydell posted 3 patches 2 weeks, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260708121011.1653365-1-peter.maydell@linaro.org
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>
hw/pci-host/q35.c | 110 +++++++++++++++++++++++++---------------------
1 file changed, 59 insertions(+), 51 deletions(-)
[PATCH 0/3] hw/pci-host/q35: Fix blank screen for VGA when SMM is disabled
Posted by Peter Maydell 2 weeks, 3 days ago
This patchset is another attempt at fixing a regression that's been
around since v9.0.0, where
 qemu-system-x86_64 -machine q35,accel=kvm,smm=off
stopped showing graphics output from the BIOS since commit b07bf7b7
("q35: Introduce smm_ranges property for q35-pci-host"). This is
most obvious and bad for accelerators which have no SMM support
(e.g. NVMM, HVF, WHPX) because there smm=off is the default and
so you always see the bug.

The rough outline of the fix has been known for ages (the
MCHPCIState::smram_region needs to be set up even if smm=off), and
various downstreams have carried versions of that patch.  However the
early-return is also somewhat bug-prone because mch_realize() in
particular is a very long function and it would be easy to add
non-SMM-specific code to the bottom of it without realizing that the
smm=off case never executed it.

This series starts with the simple fix, as most convenient for
backporting, and then on top of that has some refactoring patches
which avoid the "return from the middle of the function if
has_smm_ranges is set" pattern.

A different variant of the fix was sent by Mohamed Mediouni
a couple of months ago:
https://patchew.org/QEMU/20260413170407.57574-1-mohamed@unpredictable.fr/
I believe that the changes that patch makes to other places
than mch_realize() are unnecessary (see patch 1 commit message
for more details).

thanks
-- PMM

Peter Maydell (3):
  hw/pci-host/q35.c: Always initialize smram-region even if SMM disabled
  hw/pci-host/q35.c: Factor out creation of SMRAM MRs
  hw/pci-host/q35.c: Avoid early return in mch_write_config()

 hw/pci-host/q35.c | 110 +++++++++++++++++++++++++---------------------
 1 file changed, 59 insertions(+), 51 deletions(-)

-- 
2.43.0
Re: [PATCH 0/3] hw/pci-host/q35: Fix blank screen for VGA when SMM is disabled
Posted by Peter Maydell 5 days ago
On Wed, 8 Jul 2026 at 13:10, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> This patchset is another attempt at fixing a regression that's been
> around since v9.0.0, where
>  qemu-system-x86_64 -machine q35,accel=kvm,smm=off
> stopped showing graphics output from the BIOS since commit b07bf7b7
> ("q35: Introduce smm_ranges property for q35-pci-host"). This is
> most obvious and bad for accelerators which have no SMM support
> (e.g. NVMM, HVF, WHPX) because there smm=off is the default and
> so you always see the bug.

Is somebody going to pick this patchset up? MST ?

thanks
-- PMM
Re: [PATCH 0/3] hw/pci-host/q35: Fix blank screen for VGA when SMM is disabled
Posted by Michael S. Tsirkin 21 hours ago
On Tue, Jul 21, 2026 at 09:55:23AM +0100, Peter Maydell wrote:
> On Wed, 8 Jul 2026 at 13:10, Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > This patchset is another attempt at fixing a regression that's been
> > around since v9.0.0, where
> >  qemu-system-x86_64 -machine q35,accel=kvm,smm=off
> > stopped showing graphics output from the BIOS since commit b07bf7b7
> > ("q35: Introduce smm_ranges property for q35-pci-host"). This is
> > most obvious and bad for accelerators which have no SMM support
> > (e.g. NVMM, HVF, WHPX) because there smm=off is the default and
> > so you always see the bug.
> 
> Is somebody going to pick this patchset up? MST ?
> 
> thanks
> -- PMM

I took it, thanks!