-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atheros 928x PCI passthrough not working #3609
Comments
Currently attempting to get Qubes 4.0's xen-hvm-stubdom-linux running on Xen 4.8.3 to see if it's a stubdom issue. |
With atheros I had my issues as well. atheros was not usable even after reboots if the computer was in standby mode. Only a shutdown and even WITH power supply attached at boot brought it back to work. |
It's not all Atheros devices; I have a 9565 that works with Qubes 4.0 (although I never tested suspend). But you are probably right and the list of not working ones is longer than just 928x. I know Intel has issues with sleep mode too. |
This is weird. The difference with plain Fedora setup may be usage of stubdomain at all. Running linux-based stubdomain require some libxl patching, but mini-os based one should work out of the box on non-qubes system. /cc @HW42 |
Tried Not sure if it's relevant, but the working version appears to be using MSI-X but it's MSI or legacy under Qubes. Basing this observation on the IRQ numbers only, not entirely positive how to decrypt the To summarize:
|
@awokd: Could you please post |
FWIW: The ath9k card I have laying around (AR9287 according to lspci) works for me. |
@awokd: You wrote "Xen 4.8.3 HVM" works. Could you try to pass |
Attached the files- I'm able to boot qubes domu with the ath9k module blacklisted. My AR9280 is on a corebooted AMD and the other user that told me about the AR9287 not working was as well. Tried |
I should clarify what I mean by "works" for the Xen HVM- the ath9k driver loads without crashing and I can poke at the card with |
AFAIK @h01ger also has problems with an ath9k card on a coreboot machine. That has a Intel CPU. So this sounds like a coreboot problem. Can you try this on an non-coreboot machine (or even better stock BIOS on the same machine)? |
On Wed, Feb 21, 2018 at 04:15:53PM -0800, HW42 wrote:
AFAIK @h01ger also has problems with an ath9k card on a coreboot machine. That has a Intel CPU. So this sounds like a coreboot problem. Can you try this on an non-coreboot machine (or even better stock BIOS on the same machine)?
the^wone problem with thinkpads is, that they only allow intel wlan cards with
the stock bios. IOW, you need coreboot to use those ath9k cards, and
with pure debian they work well. I gave one ath9k card to marmarek, but
I think he wasnt able to test it just yet.
my ath9k card is also not inside a laptop right now, but I hope to
change this soon.
…--
cheers,
Holger
|
Ugh. Let's see what @awokd reports. |
Yes, it's a Lenovo too with a whitelist firmware, so I couldn't run this card on it if I flash it back. But should the domU's lspci output differ between Qubes and Xen? |
This could be an edge case too, in which case I apologize for wasting everyone's time. But I've seen similar reports of MSI interrupts being flaky on some devices under Qubes over the past few months I've been working on this (not solidly, but still...). Maybe it's a duplicate issue? PS I've edited the test results table above with additional results I forgot to include. one example
and #3235
|
That's expected since vanilla Xen doesn't use a stubdom by default (and we have a custom Linux based stubdom).
Are you sure you didn't swap Also I don't see MSI-X in neither (in Qubes that's expected). Why do you think it's using MSI-X? |
Yes, I'm sure I didn't swap them. Note the lack of Because it's on IRQ 36. My understanding is Legacy interrupt values go up to 16, MSI up to 32, and MSI-X up to 2048 (but maybe that is folklore). |
Anyway, I think it's rather not interrupt related but:
Note the |
I've tried and the card isn't even visible on lspci in dom0. But it may be something with my laptop... |
That |
On Thu, Feb 22, 2018 at 10:18:02AM +0000, Marek Marczykowski-Górecki wrote:
> I gave one ath9k card to marmarek, but I think he wasnt able to test it just yet.
I've tried and the card isn't even visible on lspci in dom0. But it may be something with my laptop...
what model is that? iirc it was an x230 with coreboot, right? that would
be quite strange indeed...
…--
cheers,
Holger
|
Yes. I'll try another card in that slot (the slot that is working with the intel wifi is too small for this one). |
@HW42 : Noticed something else in that |
Ok, I've tried the card in another slot and it is visible. And crashes sys-net very similar way:
|
I pointed @nbd168 at this and this is what he said: I dont believe that the drivers writes into wrong memory areas |
https://lists.gt.net/xen/devel/439033?page=last
Looks like that thread might be from the same Stackoverflow poster. Seems like his MSI-X interrupts might have been disabled as well. Can I force them somewhere in Qubes? Maybe it's an upstream bug that only shows up with legacy interrupts, but I still don't get why my device and others' are falling back to using legacy ints under Qubes HVM but not Xen. |
MSI/MSI-X is broken in PV mode (#3217). But on Qubes HVM, MSI should work... |
Looking at the PCI bridge in front of the empty slot, it says the same thing under Xen and Qubes:
Crash is at:
A different PCI bridge reports I'll keep digging, thank you for the suggestions! |
Ended up working around the issue by switching to a slightly newer model of Atheros. Suspect this older one has a draft implementation of PCIe which confuses Xen et. al. |
Can I ask which one you got? I'm having literally the exact same issue. |
AR5BHB116/AR9382 |
Qubes OS version:
R4.0
Affected TemplateVMs:
Steps to reproduce the behavior:
Try to attach AR9280 to sys-net or other HVM. AR9287 also reported to have same behavior.
Expected behavior:
ath9k driver loads without crashing
Actual behavior:
ath9k driver crashes HVM with
General notes:
Filing this here because passing through the same device on the same hardware to an HVM on Xen 4.8.2 and 4.8.3 on Fedora 26 works, as does using it in dom0 in that configuration and under stock Debian Stretch. Not sure if it affects a "broad range" of users as much as Intel wireless, though if there's a bug in handling this type of PCI device it could also affect other similar devices under Qubes. The fix could well be to buy a new device, but it might be helpful to understand why it doesn't work.
https://stackoverflow.com/questions/38387504/xen-guest-atheros-wifi-driver-load-causes-memory-paging-failure has a good description of the problem. He was encountering it under Xen 4.6 instead of Qubes, but I had the same issue (kernel crash instead of domU) when trying to pass it through to a PV under Qubes:
According to the datasheet, this device uses a PCI Express 1.0a Configuration space of 0x00-0x62, DMA accessed registers from 0x0000-0x0FFC, and other registers from 0x1000-0x98FC. For example, the offset 0x40 PCI Express Configuration space register is used for Power Management Capability, while offset 0x0040 DMA device register is used for MIB Control. It has a single 64K BAR and no defined I/O port.
It's that first page of DMA registers that is causing problems. From Xen's perspective, the VM is trying to do an IO write to a page flagged as memory mapped (if I understand the error right), so it crashes. I verified this by commenting out the first couple register writes that were to offsets <0x1000 in the ath9k driver and recompiling it. The crash then occurred later in the driver initialization, but at a different <0x1000 location. Multiple writes to >0x1000 locations during driver initialization were processed successfully.
Related issues:
The text was updated successfully, but these errors were encountered: