Skip to content

Commit 8766448

Browse files
authored
Add temp workaround for PV domU PCI msix restore (#89)
* Add temp workaround for PV domU PCI msix restore * Application constraint
1 parent 7f6cf68 commit 8766448

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ patches:
5555
upper: '6.6.63'
5656
- series: '6.12'
5757
upper: '6.12.1'
58+
- patch: hack-around-pci-msix-restore-bugs-in-pv-domu.patch
59+
lower: '5.4'
60+
flavors:
61+
- zone-amdgpu
5862
images:
5963
- target: kernelsrc
6064
name: kernel-src
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From c634842013a1722f3e157876682aa39be14831f3 Mon Sep 17 00:00:00 2001
2+
From: Benjamin Leggett <benjamin@edera.io>
3+
Date: Wed, 4 Jun 2025 12:20:45 -0400
4+
Subject: [PATCH] edera: Hack around PCI MSIX restore bugs in PV domU
5+
6+
---
7+
arch/x86/pci/xen.c | 6 ++++++
8+
1 file changed, 6 insertions(+)
9+
10+
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
11+
index 0f2fe524f60d..7be968e90f67 100644
12+
--- a/arch/x86/pci/xen.c
13+
+++ b/arch/x86/pci/xen.c
14+
@@ -354,6 +354,12 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
15+
bool xen_initdom_restore_msi(struct pci_dev *dev)
16+
{
17+
int ret = 0;
18+
+ // TODO(bmleggett) this effectively
19+
+ // causes MSI writes to be *entirely* skipped on standard PCI
20+
+ // restore for PV domU. This works, but is (probably) not correct -
21+
+ // something like what `pci-hyperv.c` does is (likely) we actually need.
22+
+ if (xen_pv_domain())
23+
+ return false;
24+
25+
if (!xen_initial_domain())
26+
return true;
27+
--
28+
2.49.0
29+

0 commit comments

Comments
 (0)