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
4 changes: 2 additions & 2 deletions configs/vms/nimbos-aarch64-qemu-smp1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ emu_devices = [
# Name Base-Ipa Base-Pa Length Alloc-Irq.
passthrough_devices = [
["/"],
#["/timer"],
#["/pl011@9000000"],
]

# Devices that are not desired to be passed through to the guest
excluded_devices = [
# ["/gic-v3"],
["/pcie@10000000"],
]
16 changes: 10 additions & 6 deletions src/vmm/images/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,19 @@ impl ImageLoader {
.expect("Failed to load VM images");
// Load DTB image
let vm_config = axvm::config::AxVMConfig::from(self.config.clone());
if let Some(dtb_arc) = get_vm_dtb_arc(&vm_config) {
if let Some(dtb_arc) = get_vm_dtb_arc(&vm_config)
&& let Some(dtb_load_gpa) = self.dtb_load_gpa
{
let dtb_slice: &[u8] = &dtb_arc;
debug!(
"DTB buffer addr: {:x}, size: {:#}",
self.dtb_load_gpa.unwrap(),
dtb_load_gpa,
Byte::from(dtb_slice.len())
);

#[cfg(target_arch = "aarch64")]
update_fdt(
self.dtb_load_gpa.unwrap(),
dtb_load_gpa,
NonNull::new(dtb_slice.as_ptr() as *mut u8).unwrap(),
dtb_slice.len(),
self.vm.clone(),
Expand Down Expand Up @@ -254,17 +256,19 @@ mod fs {
};
// Load DTB image if needed.
let vm_config = axvm::config::AxVMConfig::from(loader.config.clone());
if let Some(dtb_arc) = get_vm_dtb_arc(&vm_config) {
if let Some(dtb_arc) = get_vm_dtb_arc(&vm_config)
&& let Some(dtb_load_gpa) = loader.dtb_load_gpa
{
let dtb_slice: &[u8] = &dtb_arc;
debug!(
"DTB buffer addr: {:x}, size: {:#}",
loader.dtb_load_gpa.unwrap(),
dtb_load_gpa,
Byte::from(dtb_slice.len())
);

#[cfg(target_arch = "aarch64")]
update_fdt(
loader.dtb_load_gpa.unwrap(),
dtb_load_gpa,
NonNull::new(dtb_slice.as_ptr() as *mut u8).unwrap(),
dtb_slice.len(),
loader.vm.clone(),
Expand Down
Loading