mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-18 10:35:23 +00:00
vmm: Update for new acpi_tables version
In particular the Std::write() API requires that the value implements AsBytes and copies the slice representation into the table data. This avoids unaligned writes which can cause a panic with the updated toolchain. Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
parent
71d1296d09
commit
d17d70fae1
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -5,7 +5,7 @@ version = 3
|
||||
[[package]]
|
||||
name = "acpi_tables"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/rust-vmm/acpi_tables?branch=main#0b892e2c2053c4ecfac8d9e5a52babae75114702"
|
||||
source = "git+https://github.com/rust-vmm/acpi_tables?branch=main#98dcb0309d362dd83f6ffcac4f66914a2fbd5a73"
|
||||
dependencies = [
|
||||
"zerocopy",
|
||||
]
|
||||
|
2
fuzz/Cargo.lock
generated
2
fuzz/Cargo.lock
generated
@ -5,7 +5,7 @@ version = 3
|
||||
[[package]]
|
||||
name = "acpi_tables"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/rust-vmm/acpi_tables?branch=main#0b892e2c2053c4ecfac8d9e5a52babae75114702"
|
||||
source = "git+https://github.com/rust-vmm/acpi_tables?branch=main#98dcb0309d362dd83f6ffcac4f66914a2fbd5a73"
|
||||
dependencies = [
|
||||
"zerocopy",
|
||||
]
|
||||
|
@ -239,7 +239,7 @@ fn create_facp_table(dsdt_offset: GuestAddress, device_manager: &Arc<Mutex<Devic
|
||||
// X_DSDT
|
||||
facp.write(140, dsdt_offset.0);
|
||||
// Hypervisor Vendor Identity
|
||||
facp.write(268, b"CLOUDHYP");
|
||||
facp.write_bytes(268, b"CLOUDHYP");
|
||||
|
||||
facp.update_checksum();
|
||||
|
||||
|
@ -1274,7 +1274,7 @@ impl CpuManager {
|
||||
let mut madt = Sdt::new(*b"APIC", 44, 5, *b"CLOUDH", *b"CHMADT ", 1);
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
{
|
||||
madt.write(36, arch::layout::APIC_START);
|
||||
madt.write(36, arch::layout::APIC_START.0);
|
||||
|
||||
for cpu in 0..self.config.max_vcpus {
|
||||
let lapic = LocalApic {
|
||||
|
Loading…
x
Reference in New Issue
Block a user