summary refs log tree commit diff
diff options
context:
space:
mode:
authorZheng Junjie <zhengjunjie@iscas.ac.cn>2024-03-19 23:18:40 +0800
committerLudovic Courtès <ludo@gnu.org>2024-03-31 22:28:01 +0200
commite6241de15a2aa04efc99769d768849240eaffea5 (patch)
tree4cf0dfa6e7c65097d23e528594462718632cf180
parent88a300852f4ccf624ff0b95d029802b24d4f0d16 (diff)
downloadguix-e6241de15a2aa04efc99769d768849240eaffea5.tar.gz
vm: add arguments to use virt machine type for qemu-riscv64.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): When target
riscv64, add arguments to set qemu virt machine type.

Change-Id: I974c82fdd2d5bfc01caff9e6411db38e472b5cd4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/system/vm.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index d4044a4a39..64cc321ebf 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -295,6 +295,10 @@ useful when FULL-BOOT?  is true."
                         "-initrd" #$(file-append os "/initrd")
                         (format #f "-append ~s"
                                 (string-join #$kernel-arguments " "))))
+              ;; Default qemu-riscv64 have not PCI, virt have it, so we set it.
+              #$@(if (target-riscv64? (or target system))
+                     #~("-M" "virt")
+                     #~())
               #$@(common-qemu-options (if volatile? base-image rw-image)
                                       (map file-system-mapping-source
                                            (cons %store-mapping mappings))