Skip to content

Commit 0704ae4

Browse files
committed
uefi: Add PCI memory device for testing
1 parent a4b852f commit 0704ae4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

xtask/src/qemu.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,13 @@ pub fn run_qemu(arch: UefiArch, opt: &QemuOpt) -> Result<()> {
481481
cmd.arg("-device");
482482
cmd.arg("ide-hd,drive=satadisk0,bus=ide.2,serial=AtaPassThru,model=AtaPassThru");
483483

484+
// Sixth shared memory device used for testing Pci Root Bridge I/O's Copy function.
485+
// This is to provide a PCI device with large enough memory.
486+
cmd.arg("-device");
487+
cmd.arg("ivshmem-plain,memdev=hostmem,id=hostmem");
488+
cmd.arg("-object");
489+
cmd.arg("memory-backend-file,size=1M,share,mem-path=/dev/shm/ivshmem,id=hostmem");
490+
484491
let qemu_monitor_pipe = Pipe::new(tmp_dir, "qemu-monitor")?;
485492
let serial_pipe = Pipe::new(tmp_dir, "serial")?;
486493

0 commit comments

Comments
 (0)