public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH pve-kernel v5 0/2] fix #8027: restore built-in Hyper-V VMBus
@ 2026-11-16 23:49 結友
  2026-11-16 23:49 ` [PATCH pve-kernel v5 1/2] d/scripts: correctly compare namespaced ABI exports 結友
  2026-11-16 23:49 ` [PATCH pve-kernel v5 2/2] fix #8027: config: enable CONFIG_HYPERV_VMBUS 結友
  0 siblings, 2 replies; 3+ messages in thread
From: 結友 @ 2026-11-16 23:49 UTC (permalink / raw)
  To: pve-devel

This series restores built-in VMBus support, which the Proxmox VE
installer needs to find its storage in Hyper-V Generation 2 guests.
Linux 6.18 split HYPERV_VMBUS out of HYPERV, so the existing HYPERV=y
override no longer makes hv_vmbus built in.

Patch 1 fixes the ABI check first, as it would otherwise report three
namespaced VMBus exports as missing once they move into vmlinux.
Patch 2 enables HYPERV_VMBUS=y.

Changes since v4 [0], thanks @Thomas for the review:
- 1/2: drop the Python tests, together with their README and
  .gitignore bits. They were not run by the build, so they would not
  have noticed the generated format changing.
- 1/2: no change to abi-check itself. It already aborts on entries
  matching neither layout and on duplicate symbols, for the actual
  generated file on every build; spell that out in the commit message
  and README.
- 1/2: mention in the commit message that the old parsing also missed
  EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL changes of namespaced exports.
- 2/2: unchanged.
- rebased on current master (7.0.14-29), no conflicts.

The amd64 package builds and the Hyper-V Gen1/Gen2 and QEMU/KVM
installation tests listed in the v4 cover letter were done with v4 on
7.0.14-26 and not repeated, as config-common.opts and abi-check are
identical to v4. For v5 I re-ran abi-check against
abi-prev-7.0.14-29-pve-amd64, see patch 1.

[0]: https://lore.proxmox.com/pve-devel/aa154653-9aa2-4554-be6a-d14253e34237@proxmox.com/

結友 (2):
  d/scripts: correctly compare namespaced ABI exports
  fix #8027: config: enable CONFIG_HYPERV_VMBUS

 README                            | 12 +++++++
 debian/rules.d/config-common.opts |  1 +
 debian/scripts/abi-check          | 56 ++++++++++++++++++++++++-------
 3 files changed, 56 insertions(+), 13 deletions(-)


base-commit: 6e8323667a9635eede4b84cb71d1c9d5de04946e
-- 
2.56.0.windows.4




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH pve-kernel v5 1/2] d/scripts: correctly compare namespaced ABI exports
  2026-11-16 23:49 [PATCH pve-kernel v5 0/2] fix #8027: restore built-in Hyper-V VMBus 結友
@ 2026-11-16 23:49 ` 結友
  2026-11-16 23:49 ` [PATCH pve-kernel v5 2/2] fix #8027: config: enable CONFIG_HYPERV_VMBUS 結友
  1 sibling, 0 replies; 3+ messages in thread
From: 結友 @ 2026-11-16 23:49 UTC (permalink / raw)
  To: pve-devel

abi-generate emits a different field order for namespaced exports, as
awk skips the empty namespace column of ordinary ones:

  TYPE MODULE HASH SYMBOL             (ordinary)
  NAMESPACE TYPE HASH SYMBOL MODULE   (namespaced)

abi-check parses both with a single pattern made for the first layout.
For the 2557 namespaced entries of the current amd64 ABI file it thus
takes the namespace as export type, the export type as location and
"SYMBOL<tab>MODULE" as symbol name. This has two consequences:

- Moving a namespaced export between a module and vmlinux is reported
  as one missing and one new symbol. Building hv_vmbus into vmlinux
  falsely fails the check with three missing symbols that way.
- A namespaced export changing from EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
  is not detected at all.

Parse both layouts explicitly and compare the actual export type and
namespace. Adding or changing a namespace is an error like a stricter
export type, as consumers need to change their imports for it, while
dropping one is not.

Abort on entries matching neither layout and on duplicate symbols, so
that a future change in the generated format fails the build instead
of silently weakening the check again. This also applies when the ABI
check is skipped or runs in no-fail mode after an ABI bump, as the
result cannot be trusted at all in that case.

While at it, fix the argument separator in the printf of the export
type diagnostic.

Checked against abi-prev-7.0.14-29-pve-amd64: all 32727 entries are
parsed, comparing the file with itself reports no changes, and moving
the hv_vmbus exports to vmlinux in a copy reports 47 changed locations
and nothing else.

Signed-off-by: 結友 <miagetegorann@gmail.com>
---
 README                   |  7 +++++
 debian/scripts/abi-check | 56 ++++++++++++++++++++++++++++++----------
 2 files changed, 50 insertions(+), 13 deletions(-)

diff --git a/README b/README
index 9dd855a..d2e1af2 100644
--- a/README
+++ b/README
@@ -167,6 +167,13 @@ variable in the Makefile, rebuilding the packages and running 'make abiupdate'
 (the 'abiupdate' target in 'Makefile' contains the steps for consistently
 updating the repository).
 
+The ABI check reads both ordinary and namespaced exports. Moving an export
+between a module and vmlinux is reported without failing the check. Missing
+symbols, hash changes and stricter export or namespace requirements fail it
+unless an applicable blacklist or the ABI skip mode permits them. Entries
+matching neither layout and duplicate symbols always abort the check, so that
+a change in the generated format cannot go unnoticed.
+
 The source package-name is proxmox-kernel-MAJ.MIN, the version of the package
 defaults to MAJ.MIN.PATCH-KREL - but this can be adapted to contain a suffix
 for test-packages (e.g. ~test01). The version in the Makefile needs to be equal
diff --git a/debian/scripts/abi-check b/debian/scripts/abi-check
index 9987d04..ff000c3 100755
--- a/debian/scripts/abi-check
+++ b/debian/scripts/abi-check
@@ -89,17 +89,35 @@ sub is_ignored($$) {
     return 0;
 }
 
+# abi-generate emits four fields for ordinary exports, and five fields for
+# namespaced exports (namespace, type, hash, symbol, module). In the latter
+# format the trailing module must not become part of the symbol name.
+sub parse_symbol {
+    my ($line, $file, $number) = @_;
+    chomp $line;
+    $line =~ s/\r$//;
+
+    if ($line =~ /^(EXPORT_SYMBOL(?:_[A-Z0-9_]+)?)\s+(\S+)\s+(0x[0-9a-f]+)\s+(\S+)$/) {
+	return ($4, $1, $2, $3, '');
+    }
+    if ($line =~ /^(\S+)\s+(EXPORT_SYMBOL(?:_[A-Z0-9_]+)?)\s+(0x[0-9a-f]+)\s+(\S+)\s+(\S+)$/) {
+	return ($4, $2, $5, $3, $1);
+    }
+    die "EE: $file:$number: malformed ABI entry: '$line'\n";
+}
+
 # Read new syms first
 print "    Reading new symbols ($abistr)...";
 $count = 0;
 open(my $NEW_FH, '<', $abinew) or die "Could not open $abinew - $!";
 while (<$NEW_FH>) {
-    chomp;
-    m/^(\S+)\s(.+)\s(0x[0-9a-f]+)\s(.+)$/;
-    $symbols{$4}{'type'} = $1;
-    $symbols{$4}{'loc'} = $2;
-    $symbols{$4}{'hash'} = $3;
-    $module_syms{$2} = 0;
+    my ($sym, $type, $loc, $hash, $namespace) = parse_symbol($_, $abinew, $.);
+    die "EE: $abinew:$.: duplicate symbol '$sym'\n" if defined($symbols{$sym}{'type'});
+    $symbols{$sym}{'type'} = $type;
+    $symbols{$sym}{'loc'} = $loc;
+    $symbols{$sym}{'hash'} = $hash;
+    $symbols{$sym}{'namespace'} = $namespace;
+    $module_syms{$loc} = 0;
     $count++;
 }
 close($NEW_FH);
@@ -110,11 +128,12 @@ print "    Reading old symbols...";
 $count = 0;
 open(my $OLD_FH, '<', $abiold) or die "Could not open $abiold - $!";
 while (<$OLD_FH>) {
-    chomp;
-    m/^(\S+)\s(.+)\s(0x[0-9a-f]+)\s(.+)$/;
-    $symbols{$4}{'old_type'} = $1;
-    $symbols{$4}{'old_loc'} = $2;
-    $symbols{$4}{'old_hash'} = $3;
+    my ($sym, $type, $loc, $hash, $namespace) = parse_symbol($_, $abiold, $.);
+    die "EE: $abiold:$.: duplicate symbol '$sym'\n" if defined($symbols{$sym}{'old_type'});
+    $symbols{$sym}{'old_type'} = $type;
+    $symbols{$sym}{'old_loc'} = $loc;
+    $symbols{$sym}{'old_hash'} = $hash;
+    $symbols{$sym}{'old_namespace'} = $namespace;
     $count++;
 }
 close($OLD_FH);
@@ -158,6 +177,7 @@ $count = 0;
 my $moved = 0;
 my $changed_type = 0;
 my $changed_hash = 0;
+my $changed_namespace = 0;
 for my $sym (keys(%symbols)) {
     if (!defined($symbols{$sym}{'old_type'}) or !defined($symbols{$sym}{'type'})) {
 	next;
@@ -172,12 +192,21 @@ for my $sym (keys(%symbols)) {
     # Changes to export type are only bad if new type isn't
     # EXPORT_SYMBOL. Changing things to GPL are bad.
     if ($symbols{$sym}{'type'} ne $symbols{$sym}{'old_type'}) {
-	printf("    TYPE : %-40s : %s => %s%s\n", $sym, $symbols{$sym}{'old_type'}.
+	printf("    TYPE : %-40s : %s => %s%s\n", $sym, $symbols{$sym}{'old_type'},
 	    $symbols{$sym}{'type'}, is_ignored($symbols{$sym}{'loc'}, $sym)
 	    ? " (ignored)" : "");
 	$changed_type++ if $symbols{$sym}{'type'} ne "EXPORT_SYMBOL" and !is_ignored($symbols{$sym}{'loc'}, $sym);
     }
 
+    # Adding or changing a namespace requires consumers to change their imports.
+    # Removing a namespace relaxes that requirement and is compatible.
+    if ($symbols{$sym}{'namespace'} ne $symbols{$sym}{'old_namespace'}) {
+	printf("    NS   : %-40s : %s => %s%s\n", $sym,
+	    $symbols{$sym}{'old_namespace'} || '(none)', $symbols{$sym}{'namespace'} || '(none)',
+	    is_ignored($symbols{$sym}{'loc'}, $sym) ? " (ignored)" : "");
+	$changed_namespace++ if $symbols{$sym}{'namespace'} ne '' && !is_ignored($symbols{$sym}{'loc'}, $sym);
+    }
+
     # Changes to the hash are always bad
     if ($symbols{$sym}{'hash'} ne $symbols{$sym}{'old_hash'}) {
 	printf("    HASH : %-40s : %s => %s%s\n", $sym, $symbols{$sym}{'old_hash'},
@@ -191,8 +220,9 @@ for my $sym (keys(%symbols)) {
 print "WW: $moved symbols changed location\n" if $moved;
 print "$EE $changed_type symbols changed export type and weren't ignored\n" if $changed_type;
 print "$EE $changed_hash symbols changed hash and weren't ignored\n" if $changed_hash;
+print "$EE $changed_namespace symbols changed namespace and weren't ignored\n" if $changed_namespace;
 
-$errors++ if $changed_hash or $changed_type;
+$errors++ if $changed_hash or $changed_type or $changed_namespace;
 if ($changed_hash) {
     print "II: Module hash change summary...\n";
     for my $mod (sort { $module_syms{$b} <=> $module_syms{$a} } keys %module_syms) {
-- 
2.56.0.windows.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH pve-kernel v5 2/2] fix #8027: config: enable CONFIG_HYPERV_VMBUS
  2026-11-16 23:49 [PATCH pve-kernel v5 0/2] fix #8027: restore built-in Hyper-V VMBus 結友
  2026-11-16 23:49 ` [PATCH pve-kernel v5 1/2] d/scripts: correctly compare namespaced ABI exports 結友
@ 2026-11-16 23:49 ` 結友
  1 sibling, 0 replies; 3+ messages in thread
From: 結友 @ 2026-11-16 23:49 UTC (permalink / raw)
  To: pve-devel

Linux 6.18 split the Hyper-V guest support options: CONFIG_HYPERV became a
plain bool covering only the core hypervisor support, and the VMBus bus
driver moved to the new tristate CONFIG_HYPERV_VMBUS:

  -obj-$(CONFIG_HYPERV)       += hv_vmbus.o
  +obj-$(CONFIG_HYPERV_VMBUS) += hv_vmbus.o

(upstream 94b04355e639 ("Drivers: hv: Add CONFIG_HYPERV_VMBUS option") and
e3ec97c3abaf ("Drivers: hv: Make CONFIG_HYPERV bool"))

So the `-e CONFIG_HYPERV` added in ef257cb ("config: enable CONFIG_HYPERV")
does not build the VMBus driver into the kernel anymore. CONFIG_HYPERV_VMBUS
does default to HYPERV, but the Ubuntu config sets it to 'm' explicitly and
olddefconfig keeps that. proxmox-kernel-6.17.13-21-pve accordingly still
lists kernel/drivers/hv/hv_vmbus.ko in modules.builtin, while 7.0.2-6-pve
and 7.0.14-25-pve ship it as a module.

That breaks installing Proxmox VE in a Hyper-V Generation 2 VM, where the
storage controller is a VMBus device: VMBus devices only appear in sysfs
once hv_vmbus has been probed. The installer initrd collects the list of
/sys/devices/**/modalias once, before loading the modules discovered
through those aliases. It loads hv_vmbus through the ACPI VMBus node,
but never sees the vmbus: aliases of its children. hv_storvsc therefore
stays unloaded, no /dev/sr0 shows up and the installation aborts with
"no device with valid ISO found". Accordingly the 9.2 ISO fails, while
the 9.1 one with its 6.17 kernel works.

With hv_vmbus built in again, the VMBus children are already enumerated by
the time the initrd runs, so that single modalias scan picks up hv_storvsc
on its own.

Record in the README why it has to be built in rather than modular.

Signed-off-by: 結友 <miagetegorann@gmail.com>
---
 README                            | 5 +++++
 debian/rules.d/config-common.opts | 1 +
 2 files changed, 6 insertions(+)

diff --git a/README b/README
index d2e1af2..1bba3db 100644
--- a/README
+++ b/README
@@ -209,6 +209,11 @@ NOTE: For the exact and current list see debian/rules (PVE_CONFIG_OPTS)
 
 - enable INTEL_MEI_WDT=m (to allow disabling via patch)
 
+- enable CONFIG_HYPERV and CONFIG_HYPERV_VMBUS=y
+  hv_vmbus has to be built in, otherwise VMBus devices are not enumerated in
+  time for the installer initrd's single modalias scan and installing in a
+  Hyper-V Generation 2 VM fails to find its storage controller (#8027)
+
 - disable CONFIG_SND_PCM_OSS (enabled by default in Ubuntu, not needed)
 
 - switch CONFIG_TRANSPARENT_HUGEPAGE to MADVISE from ALWAYS
diff --git a/debian/rules.d/config-common.opts b/debian/rules.d/config-common.opts
index 64505b4..56907e5 100644
--- a/debian/rules.d/config-common.opts
+++ b/debian/rules.d/config-common.opts
@@ -35,6 +35,7 @@
 -e CONFIG_MEMCG_SWAP_ENABLED
 -e CONFIG_MEMCG_V1
 -e CONFIG_HYPERV
+-e CONFIG_HYPERV_VMBUS
 -m CONFIG_VFIO_IOMMU_TYPE1
 -e CONFIG_VFIO_VIRQFD
 -m CONFIG_VFIO
-- 
2.56.0.windows.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-16 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 23:49 [PATCH pve-kernel v5 0/2] fix #8027: restore built-in Hyper-V VMBus 結友
2026-11-16 23:49 ` [PATCH pve-kernel v5 1/2] d/scripts: correctly compare namespaced ABI exports 結友
2026-11-16 23:49 ` [PATCH pve-kernel v5 2/2] fix #8027: config: enable CONFIG_HYPERV_VMBUS 結友

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal