Skip to content

Rebase edera/mainline onto master @ 126ad898a6e9 - #57

Closed
edera-rebase-app[bot] wants to merge 10000 commits into
edera/mainlinefrom
rebase/edera-mainline/20261026-017f96b23bf1-126ad898a6e9
Closed

edera-rebase-app[bot] wants to merge 10000 commits into
edera/mainlinefrom
rebase/edera-mainline/20261026-017f96b23bf1-126ad898a6e9

Conversation

@edera-rebase-app

Copy link
Copy Markdown

Nightly rebase of edera/mainline (017f96b23bf1) onto master (126ad898a6e9), driven by Claude. Not pushed automatically because the checker found drift. Run log.

Important

Do not use the merge button: this branch replaces edera/mainline rather than merging into it. Approve the pull request to land it; the land workflow force-pushes edera/mainline to the approved head, pinned to 017f96b23bf1, and keeps a backup.

Independent checks

Builds: success (x86_64 and arm64 vmlinux with the Edera features built in; per-build results in the run).

Old tip 017f96b23bf1
New tip 80deb724344e
Old upstream base 864c07de0c7d
New upstream base 126ad898a6e9
  • New branch is based on the upstream tip.
  • Downstream series is linear.
  • All 94 downstream commits replayed; 2 changed only in hunk context (listed below).
  • Downstream drift: the tree changed by more than the upstream delta.
Commits whose hunk context moved (own +/- lines identical)
  • ea62ac9f1b0f iommu/xen: Add Xen PV-IOMMU driver → f9eff6c0d58b
  • bd1c0dba57c3 sysctl: wire up PaX softmode setting → d41e71775b54
Drift (changed lines: upstream delta vs. actual change)
--- upstream-lines
+++ actual-lines
@@ -735732,6 +735732,18 @@
 +	return ret;
 +}
 +
++#ifdef CONFIG_OPENPAX_SOFTMODE
++static const struct ctl_table pax_table[] = {
++	{
++		.procname       = "softmode",
++		.data           = &pax_softmode,
++		.maxlen         = sizeof(int),
++		.mode           = 0600,
++		.proc_handler   = proc_dointvec,
++	},
++};
++#endif
++
 +static const struct ctl_table sysctl_subsys_table[] = {
 +	{
 +		.procname	= "sysctl_writes_strict",
@@ -735779,6 +735791,9 @@
 +int __init sysctl_init_bases(void)
 +{
 +	register_sysctl_init("kernel", sysctl_subsys_table);
++#ifdef CONFIG_OPENPAX_SOFTMODE
++	register_sysctl_init("kernel/pax", pax_table);
++#endif
 +
 +	return 0;
 +}
@@ -735812,6 +735827,18 @@
 -	mutex_unlock(&static_key_mutex);
 -	return ret;
 +	return -ENOSYS;
+-#ifdef CONFIG_OPENPAX_SOFTMODE
+-static const struct ctl_table pax_table[] = {
+-	{
+-		.procname       = "softmode",
+-		.data           = &pax_softmode,
+-		.maxlen         = sizeof(int),
+-		.mode           = 0600,
+-		.proc_handler   = proc_dointvec,
+-	},
+-};
+-#endif
+-
 -static const struct ctl_table sysctl_subsys_table[] = {
 -#ifdef CONFIG_SYSCTL
 -	{
@@ -735861,6 +735888,9 @@
 -int __init sysctl_init_bases(void)
 -{
 -	register_sysctl_init("kernel", sysctl_subsys_table);
+-#ifdef CONFIG_OPENPAX_SOFTMODE
+-	register_sysctl_init("kernel/pax", pax_table);
+-#endif
 -
 -	return 0;
 -}

Claude's report

Claude left no report (rebase step: success).

Waiting for the x86_64 build to finish.

Bjorn Helgaas added 30 commits October 21, 2026 13:20
- Factor common code from pci_pm_suspend_noirq() into a
  pci_pm_suspend_noirq_common() helper (Mario Limonciello)

- Align hibernate poweroff flow with suspend flow for bridges so they can
  be powered down at hibernate as they are for suspend (Mario Limonciello)

- Avoid D3 on PLX PEX 8532/8533/8548 downstream ports, where putting them
  in D3hot takes down the whole switch (Imre Kaloz)

- Restore BARs after powering up during enumeration to fix a regression on
  devices that don't preserve state in D3hot (Keng-Yu Lin)

* pci/pm:
  PCI/PM: Restore BARs after powering up during enumeration
  PCI: Avoid D3 on PLX PEX 8532/8533/8548 downstream ports
  PCI: Align hibernate poweroff flow with suspend flow for bridges
  PCI/PM: Split out code from pci_pm_suspend_noirq() into helper
- Assume control of portdrv-related features only when portdrv is enabled,
  since we can't use them without portdrv (Kuppuswamy Sathyanarayanan)

- Tidy _OSC control bit checking (Kuppuswamy Sathyanarayanan)

- Centralize feature ownership checking so code only needs to check
  'host->native_X' and doesn't need to also check 'pcie_ports_native'
  (Kuppuswamy Sathyanarayanan)

* pci/portdrv:
  PCI/ACPI: Centralize pcie_ports_native checking
  PCI/ACPI: Tidy _OSC control bit checking
  PCI: Assume control of portdrv-related features only when portdrv enabled
- Use regmap APIs for tc9563 I2C accesses instead of open-coding I2C
  transfers (Lorenzo Bianconi)

- Use devm-managed tc9563 I2C dummy device allocation (Lorenzo Bianconi)

- Allow tc9563 RESX reset assertion to sleep (Abel Vesa)

- Add GPIO driver for Toshiba TC9563 embedded GPIO controller (Alex Elder)

- Add DT documentation and pwrctrl driver support for TC9563 embedded GPIO
  controller (Lorenzo Bianconi)

- Switch the tc9563 per-port reset to use the GPIO descriptor API instead
  of direct regmap accesses (Lorenzo Bianconi)

- Fix leak of regulator consumers array (Alexey Charkov)

- Only destroy devices created by pwrctrl core, so that when removing a
  PCIe controller driver that uses pwrctrl, we don't remove devices
  populated by another mechanism (Shawn Lin)

- Power off child devices on power-on failure (Lorenzo Bianconi)

* pci/pwrctrl:
  PCI/pwrctrl: Power off child devices on power-on failure
  PCI/pwrctrl: Only destroy devices created by pwrctrl core
  PCI/pwrctrl: generic: Fix leaking array from of_regulator_bulk_get_all()
  PCI/pwrctrl: tc9563: Switch per-port reset to GPIO descriptor API
  PCI/pwrctrl: tc9563: Add GPIO auxiliary device support
  dt-bindings: PCI: toshiba,tc9563: Document embedded GPIO controller
  gpio: tc9563: Add support for the embedded GPIO controller
  PCI/pwrctrl: tc9563: Allow RESX reset assertion to sleep
  PCI/pwrctrl: tc9563: Use devm-managed I2C dummy device allocation
  PCI/pwrctrl: tc9563: Rely on regmap APIs
- Add device-specific reset for Qualcomm WCN6855/WCN7850 WLAN cards and
  SDX62/SDX65 modems, which don't support FLR and have broken SBR (Jose
  Ignacio Tornos Martinez)

- Avoid FLR and SBR on Intel DG1 0x4905 graphics adapters, where they
  sometimes fail and lead to system hangs (Janusz Krzysztofik)

* pci/reset:
  PCI: Avoid FLR and SBR on Intel DG1 0x4905 graphics adapters
  PCI: Add device-specific reset for Qualcomm WCN6855/WCN7850 WLAN
  PCI: Add device-specific reset for Qualcomm SDX62/SDX65 modems
- Return -ENODEV or -EIO sysfs 'label' or 'acpi_index' attributes when
  Device Name _DSM fails, not -1, which is interpreted as -EPERM (Krzysztof
  Wilczyński)

- Return valid sysfs 'acpi_index' attribute even if the Device Name _DSM
  returned an invalid 'label' (Krzysztof Wilczyński)

- Expose sysfs 'acpi_index' and 'label' based on whether the Device Name
  _DSM returns valid data, not merely whether the _DSM is implemented
  (Krzysztof Wilczyński)

- Avoid out-of-bounds reads of the label returned by the Device Name _DSM,
  which is in UTF-16 characters, not bytes (Krzysztof Wilczyński)

- Reject unaligned resource I/O port accesses, which can oops on arm64
  (Deepanshu Kartikey)

* pci/sysfs:
  PCI/sysfs: Reject unaligned resource I/O port accesses
  PCI/sysfs: Pass the device name length in UTF-16 code units
  PCI/sysfs: Handle a malformed _DSM result in acpi_attr_is_visible()
  PCI/sysfs: Decouple acpi_index from the optional device name element
  PCI/sysfs: Stop reporting _DSM failures as -EPERM
- Validate the Steering Tag buffer returned from the Query Cache Locality
  TPH Features _DSM (Wei Huang)

* pci/tph:
  PCI/TPH: Validate the firmware Steering Tag response
- Add ACS quirk for Pericom PI7C9X2G304 switches (Hans de Goede)

- Read SR-IOV VF Revision ID and Subsystem ID from VF instead of assuming
  they're the same as VF 0; they may differ (Logan Odell)

* pci/virtualization:
  PCI/IOV: Read VF config values that need not match PF
  PCI: Add ACS quirk for Pericom PI7C9X2G304 switches [12d8:b304]
- Pass the correct physical and virtual endpoint function numbers when
  setting translation of inbound memory windows (Koichiro Den)

- Make embedded doorbell IRQ non-shared, since currently only the first EPF
  can allocate doorbells (Koichiro Den)

- MSI doorbells currently target the first EPF attached to an EPC; let
  other EPFs try the embedded doorbell instead of failing when they can't
  use the MSI doorbell (Koichiro Den)

- Serialize scan of vNTB virtual PCI bus with other PCI topology changes
  (Koichiro Den)

- Manage vNTB lifetimes to avoid leaking virtual devices and buses and
  allow removal (Koichiro Den)

- Track vNTB link state from both sides so both see the same effective link
  state (Koichiro Den)

- Add local epf pointer to shorten repeated ntp->epf accesses (Koichiro
  Den)

- Configure vNTB MSI-X when supported to avoid IOMMU faults and failure to
  deliver doorbell interrupts on RC (Koichiro Den)

* pci/endpoint:
  PCI: endpoint: pci-epf-vntb: Honor MSI-X selection
  PCI: endpoint: pci-epf-vntb: Use a local epf pointer in interrupt setup
  PCI: endpoint: pci-epf-vntb: Track link state from both sides
  PCI: endpoint: pci-epf-vntb: Manage virtual NTB and PCI bus lifetime
  PCI: endpoint: pci-epf-vntb: Serialize virtual PCI bus scan
  PCI: endpoint: pci-ep-msi: Let non-first EPFs use embedded doorbells
  PCI: endpoint: pci-ep-msi: Make embedded doorbell IRQ exclusive
  PCI: endpoint: pci-epf-vntb: Pass PF/VF number when BAR programming
- Add missing headers transitively included by <linux/phy/phy.h> so these
  can be removed from linux/phy/phy.h itself (Vladimir Oltean)

* pci/controller/misc:
  PCI: Add missing headers transitively included by <linux/phy/phy.h>
- Disable PHY on probe failures (Myeonghun Pak)

* pci/controller/aardvark:
  PCI: aardvark: Disable PHY on probe failures
- Fix clk and PHY leaks in aspeed_pcie_port_init() error paths (Liu
  Zhenlong)

* pci/controller/aspeed:
  PCI: aspeed: Fix clk and PHY leak in aspeed_pcie_port_init() error paths
- Remove unnecessary 'const' specifier from struct pcie_cfg_data members
  (Jim Quinlan)

- Replace bool properties for each SoC configuration with a u32 bitvector
  and a BFLAG() helper (Jim Quinlan)

- Use a similar BQUIRK() helper to test various SoC quirks (Jim Quinlan)

* pci/controller/brcmstb:
  PCI: brcmstb: Declare and assign quirk PERST_PCIE_REV_CUTOFF
  PCI: brcmstb: Declare and assign quirk EARLY_PERST_ASSERT
  PCI: brcmstb: Declare and assign quirk NO_RGR1_TIMER
  PCI: brcmstb: Declare and assign quirk 32BIT_PCI_OPS
  PCI: brcmstb: Declare and assign flag IS_BMIPS
  PCI: brcmstb: Declare and assign quirk OB_WIN_MAXSZ_128MB
  PCI: brcmstb: Declare and assign quirk OB_WIN_32BIT_ADDR
  PCI: brcmstb: Add Broadcom quirks macro
  PCI: brcmstb: Use flags u32 instead of bools
  PCI: brcmstb: Remove redundant const specifier for struct fields
- Fix enum type mismatch warning in LTSSM debugfs (Hans Zhang)

- Remove device links to PHY, which are redundant because the PHY core
  itself adds them (Vladimir Oltean)

- Return error (not success) from cdns_plat_pcie_probe() if
  pm_runtime_get_sync() or cdns_pcie_ep_setup() failed (Vladimir Oltean)

- Correct the driver data pointer usage; previously .probe() stored
  'struct cdns_plat_pcie *', but .shutdown() used the pointer as
  'struct cdns_pcie *', resulting in accessing garbage  (Linmao Li)

* pci/controller/cadence:
  PCI: cadence: Store the core controller in platform drvdata
  PCI: cadence: Preserve all error codes in cdns_plat_pcie_probe()
  PCI: cadence: Remove device links to PHY
  PCI: cadence: Fix enum type mismatch warning in LTSSM debugfs
- Use for_each_available_child_of_node_scoped() to simplify probe loop over
  children (Krzysztof Kozlowski)

- Refcount child OF nodes during .probe() to make a concurrent OF overlay
  removal safe (Krzysztof Kozlowski)

* pci/controller/mvebu:
  PCI: mvebu: Keep child node refcnt for probe duration
  PCI: mvebu: Simplify with scoped for each OF child loop
- Limit host and endpoint controllers to 2.5 GT/s since 5.0 GT/s is unsafe
  per Rockchip (Geraldo Nascimento)

* pci/controller/rockchip:
  PCI: rockchip: Drive at 2.5 GT/s, error other speeds
  PCI: rockchip-host: Do not attempt 5.0 GT/s retraining
  PCI: rockchip-ep: Do not attempt 5.0 GT/s retraining
- Align register macros with Synopsys documentation (Hans Zhang)

- Remove unused PCIE_ATU_UNR_* register definitions; the driver now uses
  ATU_* macros instead (Hans Zhang)

- Set DMA_BYPASS bit in outbound IATU CTRL2 register to avoid data
  corruption if the iATU translates DMA engine transactions (Sumit Kumar)

- Correct Kconfig help text reference to PCIE_DW_PLAT_EP (Philippe
  Lecointre)

- Rename dw_pcie_allocate_domains() to dw_pcie_allocate_msi_domains() for
  clarity (Shawn Lin)

- Rename pp->irq_domain to pp->msi_irq_domain for clarity (Shawn Lin)

- Use FIELD_PREP() to remove need for *_SHIFT definitions (Hans Zhang)

* pci/controller/dwc:
  PCI: dwc: Describe DWC PCIe fields with full masks and FIELD_PREP()
  PCI: dwc: Rename pp->irq_domain to pp->msi_irq_domain
  PCI: dwc: Rename dw_pcie_allocate_domains() to dw_pcie_allocate_msi_domains()
  PCI: dwc: Correct PCIE_DW_PLAT_EP reference in Kconfig help
  PCI: dwc: Set DMA_BYPASS bit in outbound IATU CTRL2 register
  PCI: dwc: Remove unused PCIE_ATU_UNR_* register definitions
  PCI: dwc: Align register macros with Synopsys documentation
- Remove device links to PHY, which are redundant because the PHY core
  itself adds them (Vladimir Oltean)

- Fix optional clock leak when .probe() fails by using
  devm_clk_get_optional_enabled() (Felix Gu)

* pci/controller/dwc-dra7xx:
  PCI: dra7xx: Fix clock enable leak on probe failure
  PCI: dra7xx: Remove device links to PHY
- Publish the platform driver MODULE_DEVICE_TABLE so the driver can be
  autoloaded when built as a module (Pengpeng Hou)

* pci/controller/dwc-eswin:
  PCI: eswin: Publish the platform driver OF alias
- Fix pwrctrl device leak when .probe() PM runtime setup fails (Zhijian
  Han)

- Fix resource leaks in .probe() error paths (Zhijian Han)

- Improve i.MX95 Gen3 link stability by changing MPLLB_BANDWIDTH from
  default 120 to 140 (Richard Zhu)

- Use dev_err_probe() in host init error path to silence -EPROBE_DEFER
  messages (Alexander Stein)

- Avoid dereferencing NULL clock names when 'clocks' includes more phandles
  than 'clock-names' has names (Rudi Heitbaum)

- Add suspend_poweroff flag so platforms like i.MX that power off RC
  controllers during suspend can enter L2 so endpoints can get PME_Turn_Off
  notifications before power loss (Richard Zhu)

- Use regmap_assign_bits() to simplify conditional set/clear blocks (Peng
  Fan)

* pci/controller/dwc-imx6:
  PCI: dwc: imx6: Use regmap_assign_bits() for conditional set/clear
  PCI: dwc: Add suspend_poweroff flag for platforms with RC power loss
  PCI: imx6: Avoid dereferencing a NULL clock name
  PCI: imx6: Use dev_err_probe() in error path of pci_pwrctrl_power_on_devices()
  PCI: imx6: Update MPLLB bandwidth to improve i.MX95 Gen3 PCIe stability
  PCI: imx6: Fix resource leaks in probe error paths
  PCI: imx6: Fix pwrctrl device leak on PM runtime setup failure
- Remove device links to PHY, which are redundant because the PHY core
  itself adds them (Vladimir Oltean)

* pci/controller/dwc-keystone:
  PCI: keystone: Remove device links to PHY
- Enable PROBE_PREFER_ASYNCHRONOUS to reduce probe time of the four
  controllers on LX2160A (Vincent Jardin)

* pci/controller/dwc-layerscape:
  PCI: layerscape: Enable async probe by default
- Only collect reset GPIOs from PCI bridge DT nodes to avoid stealing
  resets used by downstream devices like USB controllers (Christopher
  Obbard)

- Block accesses to downstream devices on link down to reduce a storm of
  Completion Timeout AER interrupts (Qiang Yu)

- Skip system suspend/resume for firmware-managed PCIe, where firmware
  manages clocks, regulators, resets, etc (Mrinmay Sarkar)

- Honor IOMMU provider's #iommu-cells in qcom_pcie_config_sid_1_9_0()
  (Manivannan Sadhasivam)

- Deinitialize endpoint on remove (Guangshuo Li)

- Treat Root Port error recovery as successful even if link doesn't come up
  after reset because the device was hot-unplugged (Konrad Dybcio)

- Skip unnecessary iMSI-RX initialization if DT 'msi-map' is present,
  indicating an external MSI controller (Ayiluri Naga Rashmi)

* pci/controller/dwc-qcom:
  PCI: qcom: Skip DWC MSI host initialization when DT 'msi-map' is present
  PCI: qcom: Ignore -ENODEV after Root Port reset
  PCI: qcom-ep: Deinitialize endpoint on remove
  PCI: qcom: Honor IOMMU provider's #iommu-cells in qcom_pcie_config_sid_1_9_0()
  PCI: qcom: Skip system suspend/resume for firmware-managed PCIe
  PCI: qcom: Block accesses to downstream devices on link down
  PCI: qcom: Only check bridge nodes for PERST# GPIOs
- Limit Max_Read_Request_Size to 256 to avoid hardware erratum (Marek
  Vasut)

- Add a .post_deinit() callback to handle dw_pcie_ep_init() failures (Marek
  Vasut)

- Rework .additional_common_init() into .init() to simplify flow (Marek
  Vasut)

- Add .deinit() and .speed_control() callbacks, both to prepare for R-Car
  Gen5 SoC support (Marek Vasut)

- Support PERST# via reset subsystem as well as the existing GPIO support
  to prepare for R-Car Gen5 SoCs (Marek Vasut)

- Add DT and driver support for the R-Car Gen 5 X5H (R8A78000) PCIe Gen 4
  core (Marek Vasut)

- Drop documentation about obtaining R-Car platform firmware, which is
  obsolete now that it's available in the linux-firmware.git repository
  (Marek Vasut)

- Add Application/Local register reset DT description and driver support
  for both host and endpoint mode (Marek Vasut)

- Add PM ops so controller works after suspend/resume (Marek Vasut)

* pci/controller/dwc-rcar-gen4:
  PCI: rcar-gen4: Add missing PM ops
  PCI: rcar-gen4: Add Application/Local register reset control
  dt-bindings: PCI: rcar-gen4-pci-ep: Document Application/Local register reset
  dt-bindings: PCI: rcar-gen4-pci-host: Document Application/Local register reset
  PCI: rcar-gen4: Drop documentation about obtaining platform firmware
  PCI: rcar-gen4: Add support for R-Car X5H PCIe4
  PCI: rcar-gen4: Handle PERST# via reset subsystem
  PCI: rcar-gen4: Add .speed_control() callback
  PCI: rcar-gen4: Add .deinit() callback
  PCI: rcar-gen4: Rework .additional_common_init() into .init()
  dt-bindings: PCI: rcar-gen4-pci-host: Add R-Car X5H PCIe4 compatible
  PCI: rcar-gen4: Use .post_deinit() to handle dw_pcie_ep_init() failures
  PCI: dwc: Add dw_pcie_ep_ops->post_deinit() callback
  PCI: rcar-gen4: Limit Max_Read_Request_Size to 256 Bytes

# Conflicts:
#	drivers/pci/controller/dwc/pcie-rcar-gen4.c
- Allow DWC drivers to skip outbound iATU setup if they don't need
  translation between CPU and PCI addresses (Xincheng Zhang)

- Skip MEM outbound iATU setup on DP1000 (Xincheng Zhang)

* pci/controller/dwc-ultrarisc:
  PCI: ultrarisc: Skip MEM outbound iATU setup on DP1000
  PCI: dwc: Allow drivers to skip MEM outbound iATU setup
- Expose devm_pci_alloc_host_bridge_release() so drivers can share a devm
  release function even if they don't need the device tree parsing done by
  devm_pci_alloc_host_bridge() (Bjorn Helgaas)

- Request only the memory window from BCMA Enumeration ROM and warn if it
  doesn't match the one in DT (Semih Baskan)

* pci/controller/iproc-bcma:
  PCI: iproc: Use the EROM outbound window on BCMA
  PCI: Expose devm_pci_alloc_host_bridge_release()
- Find INTx DT property by 'interrupt-controller' name instead of assuming
  it's the first child node (Zhengping Zhang)

* pci/controller/mediatek:
  PCI: mediatek: Find INTx controller by property
- Fix a 64-bit type truncation in mtk_pcie_set_trans_table() to avoid
  issues with windows above or larger than 4GB (Sreeraj S Kurup)

* pci/controller/mediatek-gen3:
  PCI: mediatek-gen3: Fix 64-bit type truncation in mtk_pcie_set_trans_table()
- Disable refclk on probe failure (Lad Prabhakar)

- Propagate platform_get_irq_byname() errors so probe deferral works
  correctly (Lad Prabhakar)

- Tear down INTx handlers if subsequent initialization fails (Lad
  Prabhakar)

- Add RZ/G3L (R9A08G046) DT and driver support (Biju Das)

* pci/controller/rzg3s-host:
  PCI: rzg3s-host: Add support for RZ/G3L SoC
  dt-bindings: PCI: renesas,r9a08g045s33-pcie: Document RZ/G3L SoC
  PCI: rzg3s: Fix IRQ domain initialization error handling
  PCI: rzg3s: Propagate platform_get_irq_byname() errors
  PCI: rzg3s: Disable refclk on probe failure
- Convert Tegra20 to json-schema (Thierry Reding)

* pci/controller/tegra:
  dt-bindings: PCI: tegra: Convert to json-schema
- Fix the Link Capabilities offset so we read the correct register (Bjorn
  Helgaas)

* pci/controller/tegra264:
  PCI: tegra264: Fix Link Capabilities register offset
Alexander M. Merritt and others added 26 commits October 26, 2026 03:56
A PV domain's page tables hold machine frames, so moving a page between
the guest and Xen means rewriting its direct map PTE through Xen. The
per-page helpers in drivers/xen/mem-reservation.c make one
HYPERVISOR_update_va_mapping call per page.

Add exported helpers that do the same for a contiguous run in batches,
through HYPERVISOR_mmu_update as xen_remap_pfn() does:

  - xen_zap_contig_pfns() unmaps a run and invalidates its p2m entries,
    for pages about to be handed to Xen.

  - xen_remap_contig_pfns() maps a run onto frames Xen has just
    populated. It writes the p2m with __set_phys_to_machine(), which
    never allocates, so the caller runs xen_prealloc_p2m_range() over
    the run first, before the populate hypercall, while a failure can
    still be backed out of.

Both return the first failure, whether a PTE they could not find or Xen
refused to update, or a p2m entry that could not be written, and leave
what to do about it to the caller. mmu_update reports a failure back to its caller, where a
multicall batch would only log it.

Neither flushes the TLB: the intended caller only maps over PTEs that
were already cleared, and flushes after unmapping itself.

PVH domains never reach these: their page tables hold guest frames,
which do not change when Xen moves the machine frames behind them.

No callers yet.

Backends: PV only
Direction: inflate and deflate
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
A PV domain's page tables hold machine frames, so moving a page between
the guest and Xen means updating its direct map PTE and p2m entry. The
existing helpers for that take parallel arrays of pages and frames, one
entry per page. That fits order-0 extents, where Xen reports a frame per
page, but not an ordered extent, where it reports only the base frame.

Add variants that take a base page, and for mapping a base frame, and
derive the rest of a contiguous run from them, on top of the batched arch
helpers:

  - xenmem_reservation_va_mapping_reset_contig() unmaps a run before its
    frames are handed to Xen.

  - xenmem_reservation_p2m_prealloc() and
    xenmem_reservation_va_mapping_update_contig() map a run in once Xen
    has populated it. The mapping step cannot allocate, so the
    preallocation is a separate call, made before asking Xen to
    populate: it is the only step expected to fail, and failing after
    the populate would strand the frames Xen handed over.

The two directions treat a failed update differently:

  - A failed map is fatal, as in the per-page helper. Callers treat the
    run as mapped once the call returns, and a page with no mapping
    would fault wherever it was next used, far from the cause.

  - A failed unmap only warns, unlike the per-page helper. The frame
    stays mapped, and Xen will not hand it to another domain while it
    is, so the frame leaks but nothing is corrupted.

All three are no-ops outside a PV domain, like the helpers they sit
beside.

No functional change: the new helpers have no callers yet.

Backends: PV only
Direction: inflate and deflate
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
The balloon inflates a page at a time: it takes whatever pages the guest
buddy allocator hands out and returns their frames to Xen one order-0
extent each. Those frames need not form an aligned run, so Xen's
free_heap_pages() cannot merge them back into a 2 MiB buddy.

Add a second unit of trade, a block of 1 << 9 Xen pages: 2 MiB, the
largest extent Xen grants a domain asking on its own behalf. Inflate now
takes a whole free block with one alloc_pages() and parks it on a block
list, so its frames go back to Xen as an aligned run. On PV the block is
unmapped with the batched contiguous-run helper; on PVH there is nothing
to unmap.

The extents submitted stay order-0. XENMEM_decrease_reservation
releases each frame individually whatever the extent order, so an
ordered extent would change nothing there while asking Xen to trust that
the block is machine-contiguous, a claim it cannot check for a PV
domain, where the frame number it is handed is already the machine
frame.

A block is only an option, never a requirement, in either direction:

  - balloon_inflate() takes a block only when the guest has a whole free
    2 MiB run, without reclaiming or compacting to make one, and
    otherwise inflates a page at a time. A guest with plenty of free
    memory can still have no such run, and that must not stop it
    shrinking.

  - Deflate still populates a page at a time and walks only the page
    list, which cannot see blocks. When that list is empty it now breaks
    a parked block onto it, so the guest can always grow back into
    memory it gave up as a block.

The OOM notifier sized its deflate from the page list counters alone,
so a balloon holding only blocks would look empty to it and the OOM
killer would run while the balloon still held memory. It now counts
block pages too, and its deflate reaches them through the block-breaking
path above.

Set xen.balloon_superpages=0 to inflate a page at a time as before.

Backends: PV, PVH
Direction: inflate (frames move from the guest to Xen); deflate only
 changes to consume blocks
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
Deflate still breaks a parked block into pages and asks Xen to populate
each with its own order-0 extent, which lets Xen back the block with any
512 frames it has.

Populate a parked block as a single order-9 extent instead, so that Xen
allocates one machine-contiguous 2 MiB run for it:

  - On PVH Xen maps that run with a single 2 MiB EPT entry rather than
    512 4 KiB ones.

  - On PV there is no EPT, and the guest cannot use 2 MiB mappings. The
    guest maps the run in itself, with the batched contiguous-run
    helper, from the base machine frame Xen reports.

The p2m leaves of each block are preallocated while walking the block
list, before the populate hypercall: mapping the block afterwards cannot
allocate, and once Xen has populated an extent there is no way to hand
it back. Failing there only shortens the batch.

A block is only an option here too. balloon_deflate() falls back to the
page at a time path when a block makes no progress: Xen refuses an
order-9 extent when the host has no free 2 MiB run, or when the domain
is less than 2 MiB below its max_pages ceiling, and neither should stop
the guest growing by what it can still get. Credits smaller than a block
take the page at a time path as well.

Blocks are populated at most BALLOON_BLOCK_BATCH at a time, which bounds
the work done under balloon_mutex; the OOM notifier can only trylock it.

Backends: PV, PVH
Direction: deflate (frames move from Xen to the guest)
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
The OOM notifier deflates through increase_reservation(), which works a
page at a time and reaches parked blocks only by breaking them up.

Deflate through balloon_deflate() instead, so that an OOM deflate
populates a whole block as a single order-9 extent where Xen can supply
one, and still falls back to single pages where it cannot, including the
last 2 MiB below the domain's max_pages ceiling.

Backends: PV, PVH
Direction: deflate (frames move from Xen to the guest)
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
xen_init_time_common() points x86_platform.calibrate_tsc at
xen_tsc_khz() but leaves calibrate_cpu native, so tsc_early_init() ->
determine_cpu_tsc_frequencies() still calls
native_calibrate_cpu_early() for cpu_khz. That tries CPUID 0x16, then
MSR_PLATFORM_INFO, and then falls through to quick_pit_calibrate() --
which on a PVH guest waits out its full 50ms timeout on a PIT that is
not there, prints "Fast TSC calibration failed", and arrives at a
value the hypervisor had already been asked for a moment later.

It is 48ms of every boot, and it is the largest single item in one: a
512 MiB PVH guest reached "Run /init as init process" at 0.330s, and
0.118s once this and the xenbus boot wait were out of the way.

There is nothing for the calibration to find out here. Xen reports the
TSC frequency, tsc_khz already comes from it, and cpu_khz differing
from tsc_khz under a hypervisor is not information --
determine_cpu_tsc_frequencies() would overwrite cpu_khz with tsc_khz
anyway once they disagree by more than 10%. Note that tsc_early_khz=
does not help: it only short-circuits calibrate_tsc, and the 50ms is
spent in calibrate_cpu.

Set in xen_init_time_common() so PV and PVH/HVM guests both get it,
which is where calibrate_tsc is already set for the same reason.

Signed-off-by: Alex Zenla <alex@edera.dev>
boot_wait_for_devices() sleeps HZ/10 between checks, so on a
CONFIG_HZ=100 kernel it waits a tenth of a second to notice something
that has already happened. What it is waiting for is not slow: a
toolstack has every backend sitting in XenbusStateInitWait before it
unpauses the guest, so the wait covers the frontend half of the
handshake, which finishes a few milliseconds after the late_initcall
starts looking. Measured on a PVH guest, the last frontend connected
at 0.232s and init started at 0.311s -- 79ms of sleeping past the
event.

Frontends move to XenbusStateConnected (and blkfront sets is_ready)
from their otherend_changed callback, which runs from the frontend
bus's backend_changed() watch. Bump a sequence count and wake a wait
queue there, and have wait_for_devices() sleep on it instead of for a
fixed interval. The sequence is sampled before each check, so a change
that lands between the check and the sleep still wakes the waiter.

The HZ/10 interruptible sleep stays as the timeout, so state changes
that do not come through the watch are noticed no later than before,
and the 30/270-second budgets and their reporting are unchanged.

Signed-off-by: Alex Zenla <alex@edera.dev>
Port the nightly upstream rebase from the Xen tree to the kernel. Every
night at 03:23 UTC, Claude rebases edera/mainline onto torvalds master,
following .automation/skills/upstream-rebase/SKILL.md: it replays the
series, resolves conflicts, fixes what the replay broke, builds, audits
upstream fixes that meet the series, and writes a report.

The model's own account of its result decides nothing. It runs with a
read-only token; its branch leaves the job as a git bundle and is judged
by scripts taken from the commit the run started from:

- verify-upstream-rebase.sh (unchanged from Xen) proves the series sits
  on the upstream tip, is linear, kept every commit, and moved the tree
  by exactly the upstream delta;
- kernel-build.sh builds x86_64 and arm64 vmlinux with the Hyper-V, Xen
  dom0/backend, PV-IOMMU, NUMA affinity and OpenPaX options built in,
  and fails if olddefconfig drops any of them.

If both pass and the report asks for no decision, edera/mainline is
force-pushed with a lease pinned to the tip the rebase started from, and
the old tip is kept as a backup branch. Otherwise the result goes up as
a pull request carrying the report, and approving it lands it
(rebase-land.yml). A night with no result opens an issue.

Every job clones blobless: the jobs need the kernel's commit graph but
only the contents of the files the series and upstream touch.
The rebase runs from a scheduled or dispatched event and needs its own
federation rule rather than the organization-wide one, so read it from
vars.REBASE_FEDERATION_RULE_ID.
edera/6.18-lts carries its own rebase automation, but scheduled
workflows run only from the default branch. Add a workflow here whose
only job is to dispatch edera/6.18-lts's kernel-nightly.yml each night.
OPENPAX currently defaults to y, which means OpenPaX gets enabled
for any configuration that picks up the new symbol, including ones
that never asked for it. Default it to n so it has to be selected
explicitly.

While at it, make OPENPAX_SOFTMODE depend on OPENPAX. Soft mode does
nothing without OpenPaX enabled, so there is no reason for it to be
selectable (and default y) on its own.

Signed-off-by: Alex Zenla <alex@edera.dev>
(cherry picked from commit 514cd60)
edera/6.18-lts proposes a backport of each pull request merged into
edera/mainline, driven by its own workflows. Add a workflow here whose
only job is to dispatch that, skipping pull requests labelled
no-backport and the nightly's rebase pull requests.
xen-pciback seizes a hidden device in an fs_initcall, but the Xen IOMMU
registered from a device_initcall. Registering probes every PCI device
that already exists, so a hidden device was found with a driver bound and
the IOMMU core warned about a late probe at driver bind.

Register from subsys_initcall_sync instead, so the IOMMU is in place
before pciback binds anything.

Signed-off-by: Alex Zenla <alex@edera.dev>
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
All of the extra memory Linux reserves at boot goes to the mapping
pool, so dom0's balloon starts empty. Growing dom0 at runtime then
means memory hotplug, which places the new range at the first free
physical address: on PVH that is the host's own map, where nothing
guarantees the range is not a device's MMIO window.

Keep the part of the extra memory dom0 may grow into on the balloon
instead. Xen's ceiling for dom0 (dom0_mem=...,max:) sizes that part,
so a host booted without a max: keeps today's behaviour. Every
region gives up the same fraction, which spreads the growth over the
NUMA nodes on PVH and leaves each node's mapping pool its share, and
the last memory section stays with the pool so that early grant
mappings never fall back to holes in the physical map.

Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
A request that does not fit in its ring sleeps in
io_wait_event_killable() until the backend frees space, but the event
handler wakes the ring with wake_up_interruptible(), which only wakes
TASK_INTERRUPTIBLE sleepers. A TASK_KILLABLE waiter therefore sleeps
until it is killed, which hangs a guest that has enough large requests
in flight to fill a ring.

Wake the ring with wake_up() so killable waiters see the freed space.

Fixes: 9523fea ("net/9p: Switch to wait_event_killable()")
Signed-off-by: Alex Zenla <alex@edera.dev>
The frontend's resume handler only warned that suspend and resume are
unsupported. After a restore its rings, grant references and event
channels are gone, yet the mounted client kept writing requests into
them, so every request on the mount hung. The next InitWait from the
backend then allocated a second frontend instance for the same device,
which no client used.

On resume, collect any replies the backend left in the rings, free the
rings, fail the requests that are still unanswered with -EIO, and
publish Initialising so that a backend which still serves the old rings
starts over. When the backend reaches InitWait, allocate and publish new
rings for the existing frontend, keeping its clients. Requests that
arrive while the frontend is not connected wait until it is, and a
rw_semaphore keeps them off the rings while a resume replaces them.

Signed-off-by: Alex Zenla <alex@edera.dev>
A forked, restored or imported domain resumes against a new backend
whose fid table is empty, while the guest's 9P clients still hold the
fids of the session they were suspended with. With the transport
reconnected every request on those fids still fails, so even an idle
mount comes back unusable.

When the backend advertises feature-session-transfer, wait at suspend
for the requests in flight to be answered, then ask the backend for its
fid table with Tsession_save and keep the pages in guest memory, where
they survive into whatever domain the guest resumes in. Once a restored
frontend's new backend connects, replay the pages with Tsession_restore
before any request can use the rings. The pages are opaque to the
frontend; the backend validates every entry as it would a walk or open.

Signed-off-by: Alex Zenla <alex@edera.dev>
The toolstack has to know whether a guest can carry its 9P session into a
new backend before it exports the domain, because a guest that cannot
comes back with every open file on its mounts unusable. Until now only the
backend advertised the feature, and the frontend's support was invisible
from dom0.

Publish feature-session-transfer = 1 in the frontend's own xenstore
directory, next to version and num-rings.

Signed-off-by: Alex Zenla <alex@edera.dev>
arch/x86/xen/enlighten.c includes xen/interface/memory.h for
XENMEM_maximum_reservation, but memory.h uses xen_ulong_t, domid_t and
GUEST_HANDLE without including where they are defined,
xen/interface/xen.h. Other configurations reach those through an earlier
include. The zone-tiny configuration does not, and fails to build with
CONFIG_WERROR=y:

  include/xen/interface/physdev.h:41:5: error: unknown type name 'xen_ulong_t'

Include xen/interface/xen.h first, as arch/arm/xen/enlighten.c does.

Signed-off-by: Alex Zenla <alex@edera.dev>
A node whose pool is short called fill_list() even when other nodes
still held free pages. fill_list() takes new address space from
iomem_resource, which on a PVH dom0 can overlap MMIO that Xen has
identity mapped. A later grant map onto such a gfn makes Xen refuse the
p2m change and crash dom0.

Carve a new region only when every node's pool is short, and otherwise
take pages from the preferred node first, then the others. Return pages
to the pool of their own node when the PV p2m allocation fails.
…ode variant

Borrowing across nodes made xen_alloc_unpopulated_pages_node() best
effort, so a caller that asked for a node could get pages of another.

The node variant now takes pages only from the requested node's pool and
fails with -ENOMEM when it is short. It no longer carves a region.
xen_alloc_unpopulated_pages() has no node requirement: it prefers the
local pool, borrows from other nodes, and carves a region only when
every pool is short. xenbus falls back to it when the node's pool is
short, and gnttab_alloc_pages_node() uses it for NUMA_NO_NODE.
GitHub starts no workflow for a review of a pull request it cannot
compute a merge ref for, and a rebase often conflicts with the tree it
replaces: approving #48 started nothing, and it had to be landed by
hand.

The land workflow can now also be run with a pull request number. It
then reads the head, branch and base from the pull request, requires
the same rebase/edera-mainline/... branch into edera/mainline, and
lands on the most recent approval of the current head from a reviewer
whose latest review is still an approval. Everything after that, the
write-access check, the tip check, the backup and the leased push, is
unchanged.
When a backport pull request merges into edera/6.18-lts, delete its
branch and retry the mainline pull requests waiting for it.

A backport/edera-6.18-lts/pr-<N> branch is the automation's own and is
of no use once its pull request has merged, but delete_branch_on_merge
stays off so feature branches survive, and the merged ones pile up. It
is deleted only if it still points at the commit that merged.

The retry was meant to happen already, from lts-backport-merged.yml on
edera/6.18-lts, but that has never run: pull_request_target always takes
the workflow from the default branch. This copy of that path lives on
edera/mainline and runs edera/6.18-lts's retry-backports.sh.
edera/6.18-lts audits itself for Edera commits from edera/mainline that
it lacks (kernel-nightly.yml with audit=true), but scheduled workflows
run only from the default branch. Add a workflow here whose only job is
to dispatch that audit every Monday.
@edera-rebase-app

ghost commented Oct 28, 2026

Copy link
Copy Markdown
Author

Superseded by #64.

@edera-rebase-app edera-rebase-app Bot closed this Oct 28, 2026
@edera-rebase-app
edera-rebase-app Bot deleted the rebase/edera-mainline/20261026-017f96b23bf1-126ad898a6e9 branch October 28, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.