diff --git a/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs b/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs index 142de1cb69c..ad76567d1c0 100644 --- a/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs +++ b/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs @@ -30,7 +30,7 @@ pub const NEXTEST: &str = "0.9.133"; pub const NODEJS: &str = "24.x"; // None disables hcl-dev builds and tests; Some(version) enables them. pub const OPENHCL_KERNEL_DEV_VERSION: Option<&str> = None; -pub const OPENHCL_KERNEL_STABLE_VERSION: &str = "6.18.37.5"; +pub const OPENHCL_KERNEL_STABLE_VERSION: &str = "6.18.37.6"; pub const OPENVMM_DEPS: &str = "0.3.0-155"; pub const PROTOC: &str = "27.1"; diff --git a/nix/openhcl_kernel.nix b/nix/openhcl_kernel.nix index a0830469682..7b1676aeeb7 100644 --- a/nix/openhcl_kernel.nix +++ b/nix/openhcl_kernel.nix @@ -1,7 +1,7 @@ { system, stdenv, fetchzip, targetArch ? null, is_dev ? false, is_cvm ? false }: let - version = if is_dev then "deprecated" else "6.18.37.5"; + version = if is_dev then "deprecated" else "6.18.37.6"; # Allow explicit override of architecture, otherwise derive from host system # Note: targetArch uses "x86_64"/"aarch64", but URLs use "x64"/"arm64" arch = if targetArch == "x86_64" then "x64" @@ -18,11 +18,11 @@ let hashes = { hcl-main = { std = { - x64 = "sha256-4kzxC2Y5Mgu5IUOpSd5P0oRCJ3mAWyBeSPMy+oDpX3A="; - arm64 = "sha256-Ye31oycicbZQe4VsHnfrIqdDYLIencmfLSKCB71O3lQ="; + x64 = "sha256-Ue+BrZTbi6unaqHsgeuT+RJ+AI8pKvvKs1o8wqyRPxs="; + arm64 = "sha256-ac+rU/P1jNYXU4EMj/b158IhsPEzSySM460VMnqHIMI="; }; cvm = { - x64 = "sha256-X/0m+DofK1twISaAqLCS/Rp9QMjld5MIVIHEBdJmdmo="; + x64 = "sha256-aRn6v9OP/nDi8LGVvm4fHi02O50ZxH2NYADPdnU+OTA="; arm64 = throw "openhcl-kernel: cvm arm64 variant not available"; }; }; diff --git a/openhcl/host_fdt_parser/src/lib.rs b/openhcl/host_fdt_parser/src/lib.rs index 028f054c5b8..99d63e9ef3d 100644 --- a/openhcl/host_fdt_parser/src/lib.rs +++ b/openhcl/host_fdt_parser/src/lib.rs @@ -29,9 +29,6 @@ pub struct VmbusInfo { /// Parsed sorted mmio ranges from the device tree. #[cfg_attr(feature = "inspect", inspect(with = "inspect_helpers::mmio_internal"))] pub mmio: ArrayVec, - /// Connection ID for the vmbus root device. - #[cfg_attr(feature = "inspect", inspect(hex))] - pub connection_id: u32, } /// Information about the GIC. @@ -921,20 +918,7 @@ fn parse_vmbus<'a>(node: &fdt::parser::Node<'a>) -> Result( @@ -1279,7 +1263,6 @@ mod tests { p_compatible: fdt::builder::StringId, p_ranges: fdt::builder::StringId, p_vtl: fdt::builder::StringId, - p_vmbus_connection_id: fdt::builder::StringId, } fn add_vmbus<'a>( @@ -1314,8 +1297,6 @@ mod tests { .unwrap() .add_u32(ids.p_vtl, vtl as u32) .unwrap() - .add_u32(ids.p_vmbus_connection_id, vmbus_info.connection_id) - .unwrap() .end_node() .unwrap() } @@ -1341,9 +1322,6 @@ mod tests { .unwrap(); let p_numa_node_id = builder.add_string("numa-node-id").unwrap(); let p_compatible = builder.add_string("compatible").unwrap(); - let p_vmbus_connection_id = builder - .add_string("microsoft,message-connection-id") - .unwrap(); let p_vtl = builder .add_string(igvm_defs::dt::IGVM_DT_VTL_PROPERTY) .unwrap(); @@ -1491,7 +1469,6 @@ mod tests { p_compatible, p_ranges, p_vtl, - p_vmbus_connection_id, }; // VTL0 vmbus root device @@ -1665,7 +1642,7 @@ mod tests { #[test] fn test_basic_dt() { let orig = create_parsed( - 2672, + 2640, &[ MemoryEntry { range: MemoryRange::try_new(0..(1024 * HV_PAGE_SIZE)).unwrap(), @@ -1697,14 +1674,12 @@ mod tests { MemoryRange::try_new((4024 * HV_PAGE_SIZE)..(4096 * HV_PAGE_SIZE)).unwrap(), MemoryRange::try_new((102400 * HV_PAGE_SIZE)..(102800 * HV_PAGE_SIZE)).unwrap(), ]), - connection_id: 1, }), Some(VmbusInfo { mmio: new_vmbus_mmio(&[MemoryRange::try_new( (102800 * HV_PAGE_SIZE)..(102900 * HV_PAGE_SIZE), ) .unwrap()]), - connection_id: 4, }), "THIS_IS_A_BOOT_ARG=1", ComInfo::None, @@ -1901,14 +1876,12 @@ mod tests { (4024 * HV_PAGE_SIZE)..(4096 * HV_PAGE_SIZE), ) .unwrap()]), - connection_id: 1, }), Some(VmbusInfo { mmio: new_vmbus_mmio(&[MemoryRange::try_new( (102800 * HV_PAGE_SIZE)..(102900 * HV_PAGE_SIZE), ) .unwrap()]), - connection_id: 4, }), "THIS_IS_A_BOOT_ARG=1", ComInfo::None, @@ -1945,14 +1918,12 @@ mod tests { MemoryRange::try_new((4000 * HV_PAGE_SIZE)..(4096 * HV_PAGE_SIZE)).unwrap(), MemoryRange::EMPTY, ]), - connection_id: 1, }), Some(VmbusInfo { mmio: new_vmbus_mmio(&[ MemoryRange::try_new((4020 * HV_PAGE_SIZE)..(102900 * HV_PAGE_SIZE)).unwrap(), MemoryRange::EMPTY, ]), - connection_id: 4, }), "THIS_IS_A_BOOT_ARG=1", ComInfo::None, @@ -2056,8 +2027,8 @@ mod tests { let orig = create_parsed( match com3_serial { ComInfo::None => unreachable!(), - ComInfo::Ns16550 { .. } => 2560, - ComInfo::Pl011 { .. } => 2512, + ComInfo::Ns16550 { .. } => 2528, + ComInfo::Pl011 { .. } => 2480, }, &[ MemoryEntry { @@ -2090,14 +2061,12 @@ mod tests { MemoryRange::try_new((4024 * HV_PAGE_SIZE)..(4096 * HV_PAGE_SIZE)).unwrap(), MemoryRange::try_new((102400 * HV_PAGE_SIZE)..(102800 * HV_PAGE_SIZE)).unwrap(), ]), - connection_id: 1, }), Some(VmbusInfo { mmio: new_vmbus_mmio(&[MemoryRange::try_new( (102800 * HV_PAGE_SIZE)..(102900 * HV_PAGE_SIZE), ) .unwrap()]), - connection_id: 4, }), "THIS_IS_A_BOOT_ARG=1", com3_serial.clone(), diff --git a/openhcl/openhcl_boot/src/dt.rs b/openhcl/openhcl_boot/src/dt.rs index 9f4f1073edf..0bc4cbe9edd 100644 --- a/openhcl/openhcl_boot/src/dt.rs +++ b/openhcl/openhcl_boot/src/dt.rs @@ -95,7 +95,6 @@ pub struct VmbusDeviceTreeInfo { p_compatible: StringId, p_ranges: StringId, p_vtl: StringId, - p_vmbus_connection_id: StringId, p_dma_coherent: StringId, p_interrupt_parent: StringId, p_interrupts: StringId, @@ -116,7 +115,6 @@ fn write_vmbus<'a, T>( p_compatible, p_ranges, p_vtl, - p_vmbus_connection_id, p_dma_coherent, p_interrupt_parent, p_interrupts, @@ -129,8 +127,7 @@ fn write_vmbus<'a, T>( .add_u32(p_size_cells, 2)? .add_null(p_dma_coherent)? .add_str(p_compatible, "microsoft,vmbus")? - .add_u32(p_vtl, u8::from(vtl).into())? - .add_u32(p_vmbus_connection_id, vmbus.connection_id)?; + .add_u32(p_vtl, u8::from(vtl).into())?; let mut mmio_ranges = ArrayVec::::new(); for entry in vmbus.mmio.iter() { @@ -210,7 +207,6 @@ pub fn write_dt( let p_reftime_sidecar_start = builder.add_string("reftime_sidecar_start")?; let p_reftime_sidecar_end = builder.add_string("reftime_sidecar_end")?; let p_vtl = builder.add_string(igvm_defs::dt::IGVM_DT_VTL_PROPERTY)?; - let p_vmbus_connection_id = builder.add_string("microsoft,message-connection-id")?; let p_dma_coherent = builder.add_string("dma-coherent")?; let p_igvm_type = builder.add_string(IGVM_DT_IGVM_TYPE_PROPERTY)?; let p_openhcl_memory = builder.add_string("openhcl,memory-type")?; @@ -480,7 +476,6 @@ pub fn write_dt( p_compatible, p_ranges, p_vtl, - p_vmbus_connection_id, p_dma_coherent, p_interrupt_parent, p_interrupts, diff --git a/openhcl/openhcl_boot/src/host_params/dt/mod.rs b/openhcl/openhcl_boot/src/host_params/dt/mod.rs index 5a5d9694da9..8a1c03fd35a 100644 --- a/openhcl/openhcl_boot/src/host_params/dt/mod.rs +++ b/openhcl/openhcl_boot/src/host_params/dt/mod.rs @@ -1135,22 +1135,13 @@ impl PartitionInfo { partition_ram.extend(parsed.memory.iter().copied()); *memory_allocation_mode = topology.memory_allocation_mode; - // Set vmbus fields. The connection ID comes from the host, but mmio - // comes from topology. + // The host must describe both vmbus nodes, but mmio comes from topology. + parsed.vmbus_vtl0.as_ref().ok_or(DtError::Vtl0Vmbus)?; + parsed.vmbus_vtl2.as_ref().ok_or(DtError::Vtl2Vmbus)?; *vmbus_vtl0 = VmbusInfo { - connection_id: parsed - .vmbus_vtl0 - .as_ref() - .ok_or(DtError::Vtl0Vmbus)? - .connection_id, mmio: topology.vtl0_mmio, }; *vmbus_vtl2 = VmbusInfo { - connection_id: parsed - .vmbus_vtl2 - .as_ref() - .ok_or(DtError::Vtl2Vmbus)? - .connection_id, mmio: topology.vtl2_mmio, }; diff --git a/openhcl/openhcl_boot/src/host_params/mod.rs b/openhcl/openhcl_boot/src/host_params/mod.rs index 936560d733e..ecde5baf915 100644 --- a/openhcl/openhcl_boot/src/host_params/mod.rs +++ b/openhcl/openhcl_boot/src/host_params/mod.rs @@ -99,11 +99,9 @@ impl PartitionInfo { }, vmbus_vtl2: VmbusInfo { mmio: ArrayVec::new_const(), - connection_id: 0, }, vmbus_vtl0: VmbusInfo { mmio: ArrayVec::new_const(), - connection_id: 0, }, cmdline: ArrayString::new_const(), com3_serial: ComInfo::None, diff --git a/openhcl/openhcl_boot/src/main.rs b/openhcl/openhcl_boot/src/main.rs index 67e9d8159b2..586f16186a5 100644 --- a/openhcl/openhcl_boot/src/main.rs +++ b/openhcl/openhcl_boot/src/main.rs @@ -312,19 +312,6 @@ fn build_kernel_command_line( write!(cmdline, "{} ", sidecar.kernel_command_line())?; } - if !cmdline.contains("hv_vmbus.message_connection_id") { - // HACK: Set the vmbus connection id via kernel commandline if we haven't - // gotten one from elsewhere. - // - // This code will be removed when the kernel supports setting connection id - // via device tree. - write!( - cmdline, - "hv_vmbus.message_connection_id=0x{:x} ", - partition_info.vmbus_vtl2.connection_id - )?; - } - // Prepend the computed parameters to the original command line. cmdline.write_str(&partition_info.cmdline)?; @@ -1027,13 +1014,9 @@ mod test { sidecar_starts_cpu: [true; sidecar_defs::NUM_CPUS_SUPPORTED_FOR_PER_CPU_STATE], }, cmdline: ArrayString::new(), - vmbus_vtl2: VmbusInfo { - mmio, - connection_id: 0, - }, + vmbus_vtl2: VmbusInfo { mmio }, vmbus_vtl0: VmbusInfo { mmio: ArrayVec::new(), - connection_id: 0, }, com3_serial: ComInfo::None, gic: None,