mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-21 12:57:49 +00:00
kvmtool: ARM: fix initrd functionality
lkvm -i is currently broken on ARM/ARM64. We should not try to convert smaller-than-4GB addresses into 64-bit big endian and then stuff them into u32 variables if we expect to read anything other than 0 out of it. Adjust the type to u64 to write the proper address in BE format into the /chosen node (and also match the address size we formely posted) and let Linux thus read the right values. This fixes initrd functionality for ARM and ARM64 guests. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
committed by
Will Deacon
parent
dc7a55d6bf
commit
bd33695d12
@@ -149,8 +149,8 @@ static int setup_fdt(struct kvm *kvm)
|
||||
|
||||
/* Initrd */
|
||||
if (kvm->arch.initrd_size != 0) {
|
||||
u32 ird_st_prop = cpu_to_fdt64(kvm->arch.initrd_guest_start);
|
||||
u32 ird_end_prop = cpu_to_fdt64(kvm->arch.initrd_guest_start +
|
||||
u64 ird_st_prop = cpu_to_fdt64(kvm->arch.initrd_guest_start);
|
||||
u64 ird_end_prop = cpu_to_fdt64(kvm->arch.initrd_guest_start +
|
||||
kvm->arch.initrd_size);
|
||||
|
||||
_FDT(fdt_property(fdt, "linux,initrd-start",
|
||||
|
||||
Reference in New Issue
Block a user