diff --git a/src/runtime-rs/Makefile b/src/runtime-rs/Makefile index 09ba3bc388..9bfd6169e9 100644 --- a/src/runtime-rs/Makefile +++ b/src/runtime-rs/Makefile @@ -273,7 +273,11 @@ ifneq (,$(QEMUCMD)) # qemu-specific options DEFSANDBOXCGROUPONLY_QEMU := false +ifeq ($(ARCH), s390x) + VMROOTFSDRIVER_QEMU := virtio-blk-ccw +else VMROOTFSDRIVER_QEMU := virtio-pmem +endif DEFVCPUS_QEMU := 1 DEFMAXVCPUS_QEMU := 0 DEFSHAREDFS_QEMU_VIRTIOFS := virtio-fs diff --git a/src/runtime-rs/arch/s390x-options.mk b/src/runtime-rs/arch/s390x-options.mk index f6381eee22..8cda86cc7d 100644 --- a/src/runtime-rs/arch/s390x-options.mk +++ b/src/runtime-rs/arch/s390x-options.mk @@ -4,12 +4,9 @@ # SPDX-License-Identifier: Apache-2.0 # -MACHINETYPE := +MACHINETYPE := s390-ccw-virtio KERNELPARAMS := MACHINEACCELERATORS := -CPUFEATURES := pmu=off +CPUFEATURES := QEMUCMD := qemu-system-s390x - -# dragonball binary name -DBCMD := dragonball diff --git a/src/runtime-rs/crates/hypervisor/src/kernel_param.rs b/src/runtime-rs/crates/hypervisor/src/kernel_param.rs index 9521ebac7e..c6a93034ba 100644 --- a/src/runtime-rs/crates/hypervisor/src/kernel_param.rs +++ b/src/runtime-rs/crates/hypervisor/src/kernel_param.rs @@ -7,8 +7,9 @@ use anyhow::{anyhow, Result}; use crate::{ - VM_ROOTFS_DRIVER_BLK, VM_ROOTFS_DRIVER_MMIO, VM_ROOTFS_DRIVER_PMEM, VM_ROOTFS_FILESYSTEM_EROFS, - VM_ROOTFS_FILESYSTEM_EXT4, VM_ROOTFS_FILESYSTEM_XFS, VM_ROOTFS_ROOT_BLK, VM_ROOTFS_ROOT_PMEM, + VM_ROOTFS_DRIVER_BLK, VM_ROOTFS_DRIVER_BLK_CCW, VM_ROOTFS_DRIVER_MMIO, VM_ROOTFS_DRIVER_PMEM, + VM_ROOTFS_FILESYSTEM_EROFS, VM_ROOTFS_FILESYSTEM_EXT4, VM_ROOTFS_FILESYSTEM_XFS, + VM_ROOTFS_ROOT_BLK, VM_ROOTFS_ROOT_PMEM, }; use kata_types::config::LOG_VPORT_OPTION; @@ -89,7 +90,7 @@ impl KernelParams { } } } - VM_ROOTFS_DRIVER_BLK | VM_ROOTFS_DRIVER_MMIO => { + VM_ROOTFS_DRIVER_BLK | VM_ROOTFS_DRIVER_BLK_CCW | VM_ROOTFS_DRIVER_MMIO => { params.push(Param::new("root", VM_ROOTFS_ROOT_BLK)); match rootfs_type { VM_ROOTFS_FILESYSTEM_EXT4 | VM_ROOTFS_FILESYSTEM_XFS => { diff --git a/src/runtime-rs/crates/hypervisor/src/lib.rs b/src/runtime-rs/crates/hypervisor/src/lib.rs index aed86810b5..f7aec752d6 100644 --- a/src/runtime-rs/crates/hypervisor/src/lib.rs +++ b/src/runtime-rs/crates/hypervisor/src/lib.rs @@ -34,6 +34,7 @@ pub use kata_types::config::hypervisor::HYPERVISOR_NAME_CH; // Config which driver to use as vm root dev const VM_ROOTFS_DRIVER_BLK: &str = "virtio-blk-pci"; +const VM_ROOTFS_DRIVER_BLK_CCW: &str = "virtio-blk-ccw"; const VM_ROOTFS_DRIVER_PMEM: &str = "virtio-pmem"; const VM_ROOTFS_DRIVER_MMIO: &str = "virtio-blk-mmio";