> The errors for the virtio devices are:
> >  virtio_scsi virtio1: virtio: device uses modern interface but does not 
> > have VIRTIO_F_VERSION_1   
> >  virtio_scsi: probe of virtio1 failed with error -22
> >  virtio_net virtio2: virtio: device uses modern interface but does not have 
> > VIRTIO_F_VERSION_1
> >  virtio_net: probe of virtio2 failed with error -22

I guess something goes wrong with accessing the mmio pci bars.

Seems to be a linux kernel bug in 4.15, when installing the hwe
kernel (5.4) it works fine for me.

> In the kern.log, I didn't really see any interesting differences, except
> for the errors above. The addresses are different and there is now a
> 64-bit bridge window, but I guess that's expected.
> 
> > +  pci 0000:00:1e.0:   bridge window [mem 0x700000000000-0x700fffffffff 
> > 64bit pref]

Yes.

> Not sure if this is interesting either, but part of the diff between the
> lspci outputs (first with the call, second without the call):
> 
> > ***************
> > *** 75,88 ****
> >   00:05.0 SCSI storage controller: Red Hat, Inc Virtio SCSI
> >     Subsystem: Red Hat, Inc Virtio SCSI
> >     Physical Slot: 5
> > !   Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
> > Stepping- SERR- FastB2B- DisINTx+

INTx enabled.

> > !   Capabilities: [98] MSI-X: Enable+ Count=7 Masked-

MSI-X enabled.

That probably comes from the driver exiting early (and not configuring
interrupts).

The patch below fixes it for me.  Can you confirm this?

take care,
  Gerd

>From 05fdf93b17decc42dde2ba89e935616eceb705c4 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kra...@redhat.com>
Date: Mon, 22 May 2023 13:04:35 +0200
Subject: [PATCH 1/1] [testing] older linux kernels seem to have problems with
 phys-bits > 46

---
 OvmfPkg/Library/PlatformInitLib/MemDetect.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c 
b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
index acf90b4e93fd..0482d8906d5c 100644
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
@@ -646,16 +646,19 @@ PlatformAddressWidthFromCpuid (
     ));
 
   if (Valid) {
-    if (PhysBits > 47) {
+    if (PhysBits > 46) {
       /*
        * Avoid 5-level paging altogether for now, which limits
        * PhysBits to 48.  Also avoid using address bit 48, due to sign
        * extension we can't identity-map these addresses (and lots of
        * places in edk2 assume we have everything identity-mapped).
        * So the actual limit is 47.
+       *
+       * Also some older linux kernels apparently have problems handling
+       * phys-bits > 46 correctly, so use that as limit.
        */
-      DEBUG ((DEBUG_INFO, "%a: limit PhysBits to 47 (avoid 5-level paging)\n", 
__func__));
-      PhysBits = 47;
+      DEBUG ((DEBUG_INFO, "%a: limit PhysBits to 46 (avoid 5-level paging)\n", 
__func__));
+      PhysBits = 46;
     }
 
     if (!Page1GSupport && (PhysBits > 40)) {
-- 
2.40.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105112): https://edk2.groups.io/g/devel/message/105112
Mute This Topic: https://groups.io/mt/94113626/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to