Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Comment thread
benhillis marked this conversation as resolved.
Resolved
pub const OPENVMM_DEPS: &str = "0.3.0-155";
pub const PROTOC: &str = "27.1";

Expand Down
8 changes: 4 additions & 4 deletions nix/openhcl_kernel.nix
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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";
};
};
Expand Down
39 changes: 4 additions & 35 deletions openhcl/host_fdt_parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<MemoryRange, 2>,
/// Connection ID for the vmbus root device.
#[cfg_attr(feature = "inspect", inspect(hex))]
pub connection_id: u32,
}

/// Information about the GIC.
Expand Down Expand Up @@ -921,20 +918,7 @@ fn parse_vmbus<'a>(node: &fdt::parser::Node<'a>) -> Result<VmbusInfo, ErrorKind<
}
};

let connection_id = node
.find_property("microsoft,message-connection-id")
.map_err(ErrorKind::Prop)?
.ok_or(ErrorKind::PropMissing {
node_name: node.name,
prop_name: "microsoft,message-connection-id",
})?
.read_u32(0)
.map_err(ErrorKind::Prop)?;

Ok(VmbusInfo {
mmio,
connection_id,
})
Ok(VmbusInfo { mmio })
}

fn parse_simple_bus<'a>(
Expand Down Expand Up @@ -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>(
Expand Down Expand Up @@ -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()
}
Expand All @@ -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();
Expand Down Expand Up @@ -1491,7 +1469,6 @@ mod tests {
p_compatible,
p_ranges,
p_vtl,
p_vmbus_connection_id,
};

// VTL0 vmbus root device
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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(),
Expand Down
7 changes: 1 addition & 6 deletions openhcl/openhcl_boot/src/dt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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::<u64, 6>::new();
for entry in vmbus.mmio.iter() {
Expand Down Expand Up @@ -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")?;
Expand Down Expand Up @@ -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,
Expand Down
15 changes: 3 additions & 12 deletions openhcl/openhcl_boot/src/host_params/dt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
2 changes: 0 additions & 2 deletions openhcl/openhcl_boot/src/host_params/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
19 changes: 1 addition & 18 deletions openhcl/openhcl_boot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;

Expand Down Expand Up @@ -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,
Expand Down
Loading