"no IOMMU for Dev_Id 0" first goes to Xen Bug

my new laptop with a ryzen 7 8845hs is supposed to feature amd-v but IOMMU keeps troubling xen

The Panic on CPU 0 points to:

  • I tried bootoptions x2apic=false, iommu=no-intremap so far booting the device but of course not making HVM usable so not network and no usb…

  • when installing bare metal Fedora 40 i am shown plenty of iommu groups for my pci hardware. so i hope its not locked by the bios somewhat?

  • is this a mapping issue for said dev_id 0? and i could maybe get lucky by tinkering with some boot options?

i tried xen 4.18.2 from alpine linux same thing no success

i might would even try going all qubes builder and 4.19 vom mareks draft if there is a chance of success, but right now i dont feel i am making any improvement :confused:

i am out of things to search for thankful for any advice pointing to any direction. :slight_smile:

You can try asking Xen devs about this on matrix/mailing list:

1 Like

ok thanks for pointing me there, i tried.

meanwhile any other clue is welcome, maybe i am missing a good read of a manual which i am just not able to look for :slight_smile:

if anybody with a ryzen zen 4 (7xxx & 8xxx) could boot and edit thier xen.gz with iommu=debug and post thier dom0 xl dmesg output here would love to compare some thing.

marek pointed out that my device table for iommu might be misaligned and 0x0003 - 0xfffe is available, xen expects 0x0000-0xfffe - so 3 missing devices on which one is or shoudl be host and another one iommu itself (is what marek said, i have no clue here :smiley: )

i tried to find something about it in AMD I/O Virtualization Technology (IOMMU) Specification but am not capable to understand it enough or its just not there.

i will try to get a more detailed answer from my vendor (skikk) which so far only replied that AMD-v is enabled in their bios version (not mentioning iommu specificly)

the search goes on… :')

You can check if IOMMU works in general Linux OS in KVM.
Maybe it just doesn’t work:

@ymy The Marek’s Xen 4.19 mr you linked has been merged about 2 weeks ago. Did you ever try building the ISO from main?

You can try to install Qubes OS 4.2 on USB disk on some other computer then upgrade it to Qubes OS 4.3 to have xen 4.19 using upgrade script:

Then try to boot from this USB disk on your laptop with ryzen 7 8845hs.
But disable qubes autostart so wrong PCI devices won’t be attached to sys-net/sys-usb:

Link to the pre-built r4.3 nightly builds with Xen 4.19 & Fedora 41 is available in the thread linked by @apparatus

2 Likes

Just tried it with the nightly iso. The 4.3 build from Aug 20 running Xen 4.19 has the same issue.

I can try doing the install on an older laptop and swap the nvme in to the new one once installed but I’ll have to leave that for a later day.

1 Like

I don’t think the result will be different since it’ll have the same Xen version as in the ISO.

1 Like

since the other user with a ryzen 8845hs from same manufacture but different vendor asked their support to and also got the answer that iommu is enabled (and according to fedora on bare matel it is):

i conclude that xen isn able to boot on this processor, maybe as marek pointed out it doesnt read the tables correctly or does get incorrect devices ranges back which it cant handle.

so far i was focused on the processor that i own, but maybe the ryzen ZEN4 plattform isnt yet supported by xen?

i am just widly guessing and cant even figure out in the xen source code if it is generic or somehow identifies the processor/platform. just above my comprehension :slight_smile:

and even if it is a bug, i dont know how to report it and aquire propper logs, all i got is photos from my computer display :smiley:

zen4 has had support for a while now, but mainboard makers don’t always pay attention to detail, esp. in laptop. Rather than contacting Xen devs, I’d email the laptop builder and explain the problem, ask if they can produce a new bios.

1 Like

Would it be worth exploring coreboot? Is that even something I can reasonably install as an end user or does it have to come from the oem?

coreboot doesnt know your board. you need to know that its supported.

else its like installing a bios for a ATX motherboard on a laptop.

I know coreboot supports some laptops but it’s kind of back to square one where Qubes supports some laptops.

Tuxedo offers their own distro of linux and they only technically support that but will look into other issues on a best-effort basis. I don’t even know if they would maintain the bios or source that from a vendor. Does anyone have suggestions for how to have the conversation about what needs to change with the bios? Their position is iommu is already enabled and doesn’t get turned off and that’s why there’s no switch. I doubt that talking about a misaligned iommu device table will get past the first tier of support given I don’t even know what that really means.

this is me asking at the xen project matrix channel for the issue with debugging analysis from marek, yet neither to i completly grasp what this is about and how to ask things.

1 Like

and

fixed the issue after extensive debbuging from the xen project community and marek providing test binaries.

thanks for everybodies patience :slight_smile:

2 Likes

Can you explain to a layman on how to apply this patch so I can do the same for my 8840U? I can’t get past the panic.

1 Like

somebody asked how to apply the patch here.

i outlined which steps are necessary i’d recommend to continue there if more explaination is needed.