| Running with qemu |
| ----------------- |
| |
| Set up the FDT with something like: |
| |
| reserved-memory { |
| spci_reserved0: spci_mem@e0000000 { |
| compatible = "arm,spci-0.9-partition-memory-region"; |
| reg = <0x00000000 0xe0000000 0 0x04000000>; |
| ipa-range = <0x0 0x0 0 0x04000000>; |
| read-only; |
| }; |
| } |
| |
| spci { |
| compatible = "arm,spci-0.9-hypervisor"; |
| memory-region = <&spci_hyp_reserved>; |
| |
| spci_partition0: spci-partition { |
| compatible = "arm,spci-0.9-partition"; |
| uuid = "58758040-4f9c-42b7-b6ac-e30c62c9ee96"; |
| nr-exec-ctxs = <2>; |
| exec-state = "AArch64"; |
| entry-point = <0x0 0x80000>; |
| memory-region = <&spci_reserved0>; |
| }; |
| }; |
| |
| Build something to go in the partition. There a basic example in `vms/`. Have |
| qemu load that into memory at the address used in the FDT. |
| |
| (cd vms; make) |
| qemu <other args> -device loader,file=vms/brk.bin,addr=0xe0080000,force-raw=on |
| |
| On the target system |
| -------------------- |
| |
| gcc kvmtest-spci.c -o kvmtest-spci |
| ./kvmtest-spci.sh |