CoVE KVM RISCV64 on QEMU - rivosinc/cove GitHub Wiki
Overview
This page contains the instructions on running a confidential guest running in CoVE with guest side without any device filtering for the guest.
Setup
Firmware
M-mode code.
OpenSBI currently boots salus from the memory (0x80200000) where qemu loader loaded it and passes the device tree to Salus.
The below instructions use OpenSBI inbuilt in Qemu. If OpenSBI needs to be
built from scratch, fw_dynamic should be used for -bios
argument in the qemu
commandline.
Currently, we can boot RISC-V 64bit SMP Trusted VM using KVM as a host on Salus. We use QEMU as our development platform for RISC-V Confidential computing development.
To achieve this, we need following components:
- QEMU with RISC-V
- Common Host & Guest Kernel
- KVMTOOL
- Host RootFS with KVM RISC-V module, KVMTOOL and Guest Kernel
- Salus
1. Build QEMU
git clone -b cove-integration-03072023 --recurse-submodules -j8 https://github.com/rivosinc/qemu.git
cd ./qemu
mkdir build && cd ./build
../configure --target-list="riscv64-softmmu"
make -j$(nproc)
cd ..
The above commands will create ./qemu/build/riscv64-softmmu/qemu-system-riscv64
which will be our QEMU system emulator.
2. Build Common Host & Guest Linux Kernel Image
We can use same RISC-V 64bit Linux kernel as TVM and Host kernel so no need to compile them separately.
git clone -b cove-integration [email protected]:rivosinc/linux.git
cd linux
export ARCH=riscv
export CROSS_COMPILE=riscv64-linux-gnu-
mkdir build
make O=./build defconfig
scripts/config --file build/.config --enable CONFIG_RISCV_COVE_HOST
scripts/config --file build/.config --enable CONFIG_RISCV_COVE_GUEST
scripts/config --file build/.config --enable CONFIG_RISCV_SBI_V01
scripts/config --file build/.config --enable CONFIG_KVM
scripts/config --file build/.config --enable CONFIG_HVC_RISCV_SBI
make O=./build -j$(nproc)
cd ..
The above commands will create build-riscv64/arch/riscv/boot/Image
which will be our Guest and Host kernel
3. Add libfdt library to CROSS_COMPILE SYSROOT directory
We need libfdt library in the cross-compile toolchain for compiling KVMTOOL RISC-V (described in next step). The libfdt library is generally not available in the cross-compile toolchain so we need to explicitly compile libfdt from DTC project and add it to CROSS_COMPILE SYSROOT directory.
git clone git://git.kernel.org/pub/scm/utils/dtc/dtc.git
cd dtc
export ARCH=riscv
export CROSS_COMPILE=riscv64-linux-gnu-
export CC="${CROSS_COMPILE}gcc -mabi=lp64d -march=rv64gc"
export TRIPLET=$($CC -dumpmachine)
export SYSROOT=$($CC -print-sysroot)
sudo -E make NO_PYTHON=1 NO_YAML=1 DESTDIR=$SYSROOT PREFIX=/usr LIBDIR=/usr/lib/$TRIPLET install-lib install-includes
cd ..
The above commands will install cross-compiled libfdt library at $SYSROOT/usr/lib64/lp64d directory of cross-compile toolchain.
4. Build KVMTOOL
git clone -b cove-integration-03072023 [email protected]:rivosinc/kvmtool.git
cd kvmtool
export ARCH=riscv
export CROSS_COMPILE=riscv64-linux-gnu-
make lkvm-static -j$(nproc)
${CROSS_COMPILE}strip lkvm-static
cd ..
The above commands will create kvmtool/lkvm-static
which will be our user-space tool for KVM RISC-V.
5. Build Host RootFS containing KVM RISC-V module, KVMTOOL and Guest Linux
git clone -b cove-integration-03072023 [email protected]:rivosinc/buildroot.git
cd buildroot
make qemu_riscv64_virt_min_defconfig
make -j$(nproc)
cd ..
# Copy guest image and lkvm-tool to rootfs.
mkdir -p buildroot/output/images/mount
sudo mount buildroot/output/images/rootfs.ext2 buildroot/output/images/mount
sudo cp linux/build/arch/riscv/boot/Image \
kvmtool/lkvm-static \
buildroot/output/images/mount/root/
sudo umount buildroot/output/images/mount
The above commands will create output/images/rootfs.ext2
which will be our host rootfs containing kvmtool and Guest Kernel.
6. Build Salus and run KVM on QEMU
# Set up environment variables required by salus.
export QEMU=$PWD/qemu/
export LINUX=$PWD/linux/build/
export BUILDROOT=$PWD/buildroot/
git clone https://github.com/rivosinc/salus.git
cd salus
make run_buildroot
Run Guest Linux using KVMTOOL. You will need to ssh into host with root:root at localhost:7722. HVC console doesn't support input for now.
ssh -p 7722 root@localhost
root@localhost's password: root
./lkvm-static run -c2 --console virtio --cove-vm -p "earlycon=sbi console=hvc1" -k ./Image --virtio-transport=pci
7. Reference Host Bootlog
rkanwal@rkanwal-XPS-15-9520:~/workspace/repos/salus/salus$ make run_buildroot
# Check if the submodule needs to be initialized
if [ "$(git submodule status | grep -c '^-')" -gt 0 ]; then \
git submodule update --init; \
fi
RUSTFLAGS='-Clink-arg=-Tlds/umode.lds' cargo build --release --package umode
Compiling typenum v1.15.0
Compiling subtle v2.4.1
Compiling flagset v0.4.3
Compiling const-oid v0.9.0
Compiling cfg-if v1.0.0
Compiling byteorder v1.4.3
Compiling opaque-debug v0.3.0
Compiling rand_core v0.5.1
Compiling signature v1.5.0
Compiling arrayvec v0.7.2
Compiling static_assertions v1.1.0
Compiling hex v0.4.3
Compiling data_model v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/data-model)
Compiling sbi_rs v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/sbi-rs)
Compiling generic-array v0.14.6
Compiling der v0.6.0
Compiling block-buffer v0.10.2
Compiling crypto-common v0.1.6
Compiling digest v0.9.0
Compiling block-buffer v0.9.0
Compiling curve25519-dalek v3.2.0
Compiling sha2 v0.9.9
Compiling digest v0.10.3
Compiling hmac v0.12.1
Compiling sha2 v0.10.2
Compiling hkdf v0.12.3
Compiling spki v0.6.0
Compiling pkcs8 v0.9.0
Compiling ed25519 v1.5.2
Compiling ed25519-dalek v1.0.1
Compiling rice v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/rice)
Compiling attestation v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/attestation)
Compiling u_mode_api v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/u-mode-api)
Compiling libuser v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/libuser)
Compiling umode v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/u-mode)
Finished release [optimized] target(s) in 5.42s
cargo build --release --bin salus
Compiling typenum v1.15.0
Compiling flagset v0.4.3
Compiling arrayvec v0.7.2
Compiling subtle v2.4.1
Compiling const-oid v0.9.0
Compiling static_assertions v1.1.0
Compiling cfg-if v1.0.0
Compiling signature v1.5.0
Compiling opaque-debug v0.3.0
Compiling rand_core v0.5.1
Compiling byteorder v1.4.3
Compiling hex v0.4.3
Compiling data_model v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/data-model)
Compiling fdt-rs v0.4.3 (https://github.com/rivosinc/fdt-rs?branch=rivos/main#4aa8151b)
Compiling sbi_rs v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/sbi-rs)
Compiling page_tracking v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/page-tracking)
Compiling riscv_elf v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/riscv-elf)
Compiling device_tree v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/device-tree)
Compiling s_mode_utils v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/s-mode-utils)
Compiling riscv_page_tables v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/riscv-page-tables)
Compiling generic-array v0.14.6
Compiling riscv_regs v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/riscv-regs)
Compiling der v0.6.0
Compiling block-buffer v0.10.2
Compiling crypto-common v0.1.6
Compiling digest v0.9.0
Compiling block-buffer v0.9.0
Compiling curve25519-dalek v3.2.0
Compiling digest v0.10.3
Compiling sha2 v0.9.9
Compiling hmac v0.12.1
Compiling sha2 v0.10.2
Compiling drivers v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/drivers)
Compiling spki v0.6.0
Compiling hkdf v0.12.3
Compiling pkcs8 v0.9.0
Compiling ed25519 v1.5.2
Compiling ed25519-dalek v1.0.1
Compiling rice v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/rice)
Compiling attestation v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/attestation)
Compiling u_mode_api v0.1.0 (/home/rkanwal/workspace/repos/salus/salus/u-mode-api)
Compiling salus v0.1.0 (/home/rkanwal/workspace/repos/salus/salus)
Finished release [optimized] target(s) in 7.73s
/home/rkanwal/workspace/repos/salus/qemu//build/riscv64-softmmu/qemu-system-riscv64 \
-M virt,aia=aplic-imsic,aia-guests=4 -cpu rv64,x-smaia=true,x-ssaia=true,sscofpmf=true -smp 2 -m 2048 -nographic \
-kernel target/riscv64gc-unknown-none-elf/release/salus \
-device guest-loader,kernel=/home/rkanwal/workspace/repos/salus/linux/build_common//arch/riscv/boot/Image,addr=0xc0200000 \
-append "console=hvc0 earlycon=sbi root=/dev/nvme0n1" \
-drive file="/home/rkanwal/workspace/repos/salus/buildroot//output/images/rootfs.ext2,format=raw,id=hd" \
-device nvme,serial=deadbeef,drive=hd \
-device x-riscv-iommu-pci \
-netdev user,id=usernet,hostfwd=tcp:127.0.0.1:7722-0.0.0.0:22 -device e1000e,netdev=usernet \
OpenSBI v1.1
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : riscv-virtio,qemu
Platform Features : medeleg
Platform HART Count : 2
Platform IPI Device : aia-imsic
Platform Timer Device : aclint-mtimer @ 10000000Hz
Platform Console Device : uart8250
Platform HSM Device : ---
Platform Reboot Device : sifive_test
Platform Shutdown Device : sifive_test
Firmware Base : 0x80000000
Firmware Size : 296 KB
Runtime SBI Version : 1.0
Domain0 Name : root
Domain0 Boot HART : 1
Domain0 HARTs : 0*,1*
Domain0 Region00 : 0x0000000024000000-0x0000000024001fff (I)
Domain0 Region01 : 0x000000000c000000-0x000000000c007fff (I)
Domain0 Region02 : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region03 : 0x0000000080000000-0x000000008007ffff ()
Domain0 Region04 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address : 0x0000000080200000
Domain0 Next Arg1 : 0x00000000bfe00000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes
Boot HART ID : 1
Boot HART Domain : root
Boot HART Priv Version : v1.12
Boot HART Base ISA : rv64imafdch
Boot HART ISA Extensions : sscofpmf,time,aia,sstc
Boot HART PMP Count : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 54
Boot HART MHPM Count : 16
Boot HART MIDELEG : 0x0000000000003666
Boot HART MEDELEG : 0x0000000000f0b509
Salus: Boot test VM
Sscofpmf support present
No vector support
2 CPU(s) present. Booting on CPU1 (hart 1)
IMSIC at 0x28000000; 4 guest interrupt files supported
Found func Address: 0-0-0-0 Vendor: 1B36 Device: 8 Class: 6 SubClass: 0; type: Endpoint, MSI: false, MSI-X: false, PCIe: false
Found func Address: 0-0-1-0 Vendor: 1B36 Device: 10 Class: 1 SubClass: 8; type: Endpoint, MSI: false, MSI-X: true, PCIe: true
BAR0: type Mem64, size 0x4000
Found func Address: 0-0-2-0 Vendor: 1EFD Device: EDF1 Class: 8 SubClass: 6; type: Endpoint, MSI: false, MSI-X: true, PCIe: true
BAR0: type Mem64, size 0x1000
Found func Address: 0-0-3-0 Vendor: 8086 Device: 10D3 Class: 2 SubClass: 0; type: Endpoint, MSI: true, MSI-X: true, PCIe: true
BAR0: type Mem32, size 0x20000
BAR1: type Mem32, size 0x20000
BAR2: type IoPort, size 0x20
BAR3: type Mem32, size 0x4000
HW memory map:
[00] region: 0x0000000000100000 -> 0x0000000000100fff, mmio (RESET)
[01] region: 0x0000000003000000 -> 0x000000000300ffff, mmio (PCI BAR)
[02] region: 0x0000000010000000 -> 0x0000000010000fff, mmio (UART)
[03] region: 0x0000000028000000 -> 0x000000002800ffff, mmio (IMSIC)
[04] region: 0x0000000030000000 -> 0x000000003fffffff, mmio (PCI ECAM)
[05] region: 0x0000000040000000 -> 0x000000007fffffff, mmio (PCI BAR)
[06] region: 0x0000000080000000 -> 0x0000000080343fff, reserved (hypervisor image)
[07] region: 0x0000000080344000 -> 0x0000000081343fff, reserved (hypervisor heap)
[08] region: 0x0000000081344000 -> 0x0000000081357fff, reserved (hypervisor pcpu)
[09] region: 0x0000000081358000 -> 0x0000000085cdbfff, reserved (page map)
[10] region: 0x0000000085cdc000 -> 0x00000000bfdfffff, available
[11] region: 0x00000000bfe00000 -> 0x00000000bfe03fff, reserved (hypervisor image)
[12] region: 0x00000000bfe04000 -> 0x00000000c01fffff, available
[13] region: 0x00000000c0200000 -> 0x00000000c16f3fff, reserved (host kernel)
[14] region: 0x00000000c16f4000 -> 0x00000000ffffffff, available
[15] region: 0x0000000100000000 -> 0x000000017fffffff, mmio (PCI BAR)
umode memory map:
[00] region: 0xffffffff00000000 -> 0xffffffff00023b22, RX
[01] region: 0xffffffff00024000 -> 0xffffffff000299d0, RO
[02] region: 0xffffffff0002a000 -> 0xffffffff0002a340, RW
[03] region: 0xffffffff0102b000 -> 0xffffffff01057000, RW
Found RISC-V IOMMU version 0x2
umode/#1: U-mode Shared Region: ffffffff09000000 - 4096 bytes
Host DT: \ {
#address-cells = 0x00000002;
#size-cells = 0x00000002;
compatible = "riscv-virtio";
model = "riscv-virtio,qemu";
chosen {
bootargs = "console=hvc0 earlycon=sbi root=/dev/nvme0n1";
}
memory@80000000 {
device_type = "memory";
reg = 0x00000000 0x80000000 0x00000000 0x78114000;
}
cpus {
#address-cells = 0x00000001;
#size-cells = 0x00000000;
timebase-frequency = 0x00989680;
cpu@0 {
device_type = "cpu";
compatible = "riscv";
reg = 0x00000000;
mmu-type = "riscv,sv48";
riscv,isa = "rv64imafdch_zicsr_zifencei_zihintpause_zba_zbb_zbc_zbs_smaia_ssaia_sscofpmf_sstc";
status = "okay";
interrupt-controller {
#interrupt-cells = 0x00000001;
interrupt-controller;
phandle = 0x00000004;
compatible = "riscv,cpu-intc";
}
}
cpu@1 {
device_type = "cpu";
compatible = "riscv";
reg = 0x00000001;
mmu-type = "riscv,sv48";
riscv,isa = "rv64imafdch_zicsr_zifencei_zihintpause_zba_zbb_zbc_zbs_smaia_ssaia_sscofpmf_sstc";
status = "okay";
interrupt-controller {
#interrupt-cells = 0x00000001;
interrupt-controller;
phandle = 0x00000002;
compatible = "riscv,cpu-intc";
}
}
}
soc {
compatible = "simple-bus";
#address-cells = 0x00000002;
#size-cells = 0x00000002;
ranges;
imsics@28000000 {
compatible = "riscv,imsics";
phandle = 0x00000006;
msi-controller;
interrupt-controller;
#interrupt-cells = 0x00000000;
riscv,guest-index-bits = 0x00000003;
riscv,hart-index-bits = 0x00000001;
riscv,ipi-id = 0x00000001;
riscv,num-ids = 0x000000ff;
reg = 0x00000000 0x28000000 0x00000000 0x00010000;
interrupts-extended = 0x00000004 0x00000009 0x00000002 0x00000009;
}
pci@30000000 {
compatible = "pci-host-ecam-generic";
reg = 0x00000000 0x30000000 0x00000000 0x10000000;
ranges = 0x01000000 0x00000000 0x00000000 0x00000000 0x03000000 0x00000000 0x00010000 0x02000000 0x00000000 0x40000000 0x00000000 0x40000000 0x00000000 0x40000000 0x03000000 0x00000001 0x00000000 0x00000001 0x00000000 0x00000000 0x7ffff000;
device_type = "pci";
dma-coherent;
linux,pci-domain = 0x00000000;
bus-range = 0x00000000 0x000000ff;
msi-parent = 0x00000006;
#size-cells = 0x00000002;
#address-cells = 0x00000003;
}
}
}
Brought online 2 CPU(s)
umode/#0: U-mode Shared Region: ffffffff09000000 - 4096 bytes
[ 0.000000] Linux version 6.2.0-rc1-00152-g7b41d0e3a9e4 (rkanwal@rkanwal-XPS-15-9520) (riscv64-linux-gnu-gcc (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #3 SMP Wed Feb 15 12:24:49 GMT 2023
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Machine model: riscv-virtio,qemu
[ 0.000000] SBI specification v1.0 detected
[ 0.000000] SBI implementation ID=0x7 Version=0x0
[ 0.000000] SBI SRST extension detected
[ 0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[ 0.000000] printk: bootconsole [sbi0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000f8113fff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x00000000f8113fff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000f8113fff]
[ 0.000000] On node 0, zone DMA32: 512 pages in unavailable ranges
[ 0.000000] On node 0, zone DMA32: 32492 pages in unavailable ranges
[ 0.000000] SBI HSM extension detected
[ 0.000000] riscv: base ISA extensions acdfhim
[ 0.000000] riscv: ELF capabilities acdfim
[ 0.000000] percpu: Embedded 18 pages/cpu s36536 r8192 d29000 u73728
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 483607
[ 0.000000] Kernel command line: console=hvc0 earlycon=sbi root=/dev/nvme0n1
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] software IO TLB: area num 2.
[ 0.000000] software IO TLB: mapped [mem 0x00000000f0d00000-0x00000000f4d00000] (64MB)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] fixmap : 0xff1bfffffee00000 - 0xff1bffffff000000 (2048 kB)
[ 0.000000] pci io : 0xff1bffffff000000 - 0xff1c000000000000 ( 16 MB)
[ 0.000000] vmemmap : 0xff1c000000000000 - 0xff20000000000000 (1024 TB)
[ 0.000000] vmalloc : 0xff20000000000000 - 0xff60000000000000 (16384 TB)
[ 0.000000] modules : 0xffffffff01569000 - 0xffffffff80000000 (2026 MB)
[ 0.000000] lowmem : 0xff60000000000000 - 0xff60000077f14000 (1919 MB)
[ 0.000000] kernel : 0xffffffff80000000 - 0xffffffffffffffff (2047 MB)
[ 0.000000] Memory: 1823804K/1965136K available (8184K kernel code, 4918K rwdata, 4096K rodata, 2187K init, 476K bss, 141332K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=2.
[ 0.000000] rcu: RCU debug extended QS entry/exit.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] riscv-intc: 64 local interrupts mapped using AIA
[ 0.000000] riscv-imsic: imsics@28000000: hart-index-bits: 1, guest-index-bits: 3
[ 0.000000] riscv-imsic: imsics@28000000: group-index-bits: 0, group-index-shift: 24
[ 0.000000] riscv-imsic: imsics@28000000: mapped 255 interrupts for 2 CPUs at 0x0000000028000000
[ 0.000000] riscv-imsic: imsics@28000000: enable/disable sync using interrupt 2
[ 0.000000] riscv-imsic: imsics@28000000: providing IPIs using interrupt 1
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] riscv-timer: riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[ 0.000086] sched_clock: 64 bits at 10MHz, resolution 100ns, wraps every 4398046511100ns
[ 0.001351] riscv-timer: Timer interrupt in S-mode is available via sstc extension
[ 0.007382] Console: colour dummy device 80x25
[ 0.008908] Calibrating delay loop (skipped), value calculated using timer frequency.. 20.00 BogoMIPS (lpj=40000)
[ 0.009257] pid_max: default: 32768 minimum: 301
[ 0.010571] LSM: initializing lsm=capability,integrity
[ 0.012702] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.012938] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.041580] cblist_init_generic: Setting adjustable number of callback queues.
[ 0.041930] cblist_init_generic: Setting shift to 1 and lim to 1.
[ 0.042576] riscv: ELF compat mode supported
[ 0.042890] ASID allocator using 16 bits (65536 entries)
[ 0.044184] rcu: Hierarchical SRCU implementation.
[ 0.044355] rcu: Max phase no-delay instances is 1000.
[ 0.046708] EFI services will not be available.
[ 0.049939] smp: Bringing up secondary CPUs ...
[ 0.060597] smp: Brought up 1 node, 2 CPUs
[ 0.073967] devtmpfs: initialized
[ 0.080390] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.080804] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 0.083976] pinctrl core: initialized pinctrl subsystem
[ 0.087379] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.090148] audit: initializing netlink subsys (disabled)
[ 0.092417] audit: type=2000 audit(0.084:1): state=initialized audit_enabled=0 res=1
[ 0.094322] cpuidle: using governor menu
[ 0.096263] da-firmware: Using firmware name NA
[ 0.096401] da-firmware: Cannot load firmware
[ 0.105601] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.105882] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[ 0.112157] iommu: Default domain type: Translated
[ 0.112437] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.114790] SCSI subsystem initialized
[ 0.117086] usbcore: registered new interface driver usbfs
[ 0.117611] usbcore: registered new interface driver hub
[ 0.117974] usbcore: registered new device driver usb
[ 0.129070] vgaarb: loaded
[ 0.130779] clocksource: Switched to clocksource riscv_clocksource
[ 0.151222] NET: Registered PF_INET protocol family
[ 0.152570] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.159989] tcp_listen_portaddr_hash hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.160472] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.160780] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.161293] TCP bind hash table entries: 16384 (order: 8, 1048576 bytes, linear)
[ 0.162709] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.164115] UDP hash table entries: 1024 (order: 4, 98304 bytes, linear)
[ 0.164671] UDP-Lite hash table entries: 1024 (order: 4, 98304 bytes, linear)
[ 0.166099] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.169562] RPC: Registered named UNIX socket transport module.
[ 0.169783] RPC: Registered udp transport module.
[ 0.169927] RPC: Registered tcp transport module.
[ 0.170072] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.170374] PCI: CLS 0 bytes, default 64
[ 0.174701] kvm [1]: using SBI nested acceleration
[ 0.175254] kvm [1]: The platform has confidential computing feature enabled
[ 0.175460] kvm [1]: TSM version 0 is loaded and ready to run
[ 0.177612] kvm [1]: hypervisor extension available
[ 0.177827] kvm [1]: using Sv39x4 G-stage page table format
[ 0.177994] kvm [1]: VMID 5 bits available
[ 0.178141] kvm [1]: AIA irqchip with 3 guest external interrupts
[ 0.183163] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[ 0.187201] NFS: Registering the id_resolver key type
[ 0.188270] Key type id_resolver registered
[ 0.188461] Key type id_legacy registered
[ 0.188946] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.189189] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.190342] 9p: Installing v9fs 9p2000 file system support
[ 0.192249] NET: Registered PF_ALG protocol family
[ 0.192785] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 0.193065] io scheduler mq-deadline registered
[ 0.193283] io scheduler kyber registered
[ 0.197341] pci-host-generic 30000000.pci: host bridge /soc/pci@30000000 ranges:
[ 0.198198] pci-host-generic 30000000.pci: IO 0x0003000000..0x000300ffff -> 0x0000000000
[ 0.198884] pci-host-generic 30000000.pci: MEM 0x0040000000..0x007fffffff -> 0x0040000000
[ 0.199154] pci-host-generic 30000000.pci: MEM 0x0100000000..0x017fffefff -> 0x0100000000
[ 0.200136] pci-host-generic 30000000.pci: ECAM at [mem 0x30000000-0x3fffffff] for [bus 00-ff]
[ 0.201497] pci-host-generic 30000000.pci: PCI host bridge to bus 0000:00
[ 0.201884] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.202124] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 0.202329] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff]
[ 0.202505] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffefff]
[ 0.205404] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000
[ 0.211996] pci 0000:00:01.0: [1b36:0010] type 00 class 0x010802
[ 0.213016] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x00003fff 64bit]
[ 0.219056] pci 0000:00:03.0: [8086:10d3] type 00 class 0x020000
[ 0.219721] pci 0000:00:03.0: reg 0x10: [mem 0x00000000-0x0001ffff]
[ 0.220148] pci 0000:00:03.0: reg 0x14: [mem 0x00000000-0x0001ffff]
[ 0.220602] pci 0000:00:03.0: reg 0x18: [io 0x0000-0x001f]
[ 0.221012] pci 0000:00:03.0: reg 0x1c: [mem 0x00000000-0x00003fff]
[ 0.227702] pci 0000:00:03.0: BAR 0: assigned [mem 0x40000000-0x4001ffff]
[ 0.228205] pci 0000:00:03.0: BAR 1: assigned [mem 0x40020000-0x4003ffff]
[ 0.228606] pci 0000:00:01.0: BAR 0: assigned [mem 0x100000000-0x100003fff 64bit]
[ 0.229209] pci 0000:00:03.0: BAR 3: assigned [mem 0x40040000-0x40043fff]
[ 0.229525] pci 0000:00:03.0: BAR 2: assigned [io 0x0020-0x003f]
[ 0.305723] printk: console [hvc0] enabled
[ 0.305723] printk: console [hvc0] enabled
[ 0.306508] printk: bootconsole [sbi0] disabled
[ 0.306508] printk: bootconsole [sbi0] disabled
[ 0.308341] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 0.311466] SuperH (H)SCI(F) driver initialized
[ 0.326014] loop: module loaded
[ 0.332208] e1000e: Intel(R) PRO/1000 Network Driver
[ 0.332604] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.333921] e1000e 0000:00:03.0: enabling device (0000 -> 0002)
[ 0.337780] e1000e 0000:00:03.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 0.347459] nvme nvme0: pci function 0000:00:01.0
[ 0.348032] nvme 0000:00:01.0: enabling device (0000 -> 0002)
[ 0.366934] nvme nvme0: 2/0/0 default/read/poll queues
[ 0.370107] nvme nvme0: Ignoring bogus Namespace Identifiers
[ 0.463962] e1000e 0000:00:03.0 eth0: (PCI Express:2.5GT/s:Width x1) 52:54:00:12:34:56
[ 0.466264] e1000e 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
[ 0.468212] e1000e 0000:00:03.0 eth0: MAC: 3, PHY: 8, PBA No: 000000-000
[ 0.472761] usbcore: registered new interface driver uas
[ 0.473562] usbcore: registered new interface driver usb-storage
[ 0.475280] mousedev: PS/2 mouse device common for all mice
[ 0.477835] sdhci: Secure Digital Host Controller Interface driver
[ 0.478263] sdhci: Copyright(c) Pierre Ossman
[ 0.478951] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.480028] usbcore: registered new interface driver usbhid
[ 0.480382] usbhid: USB HID core driver
[ 0.481109] riscv-pmu-sbi: SBI PMU extension is available
[ 0.482068] riscv-pmu-sbi: 0 firmware and 18 hardware counters
[ 0.485993] NET: Registered PF_INET6 protocol family
[ 0.492655] Segment Routing with IPv6
[ 0.493321] In-situ OAM (IOAM) with IPv6
[ 0.493987] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 0.497052] NET: Registered PF_PACKET protocol family
[ 0.498228] 9pnet: Installing 9P2000 support
[ 0.499113] Key type dns_resolver registered
[ 0.524720] debug_vm_pgtable: [debug_vm_pgtable ]: Validating architecture page table helpers
[ 0.545635] EXT4-fs (nvme0n1): mounting ext2 file system using the ext4 subsystem
[ 0.557108] EXT4-fs (nvme0n1): mounted filesystem 5f3b914f-00af-4436-8c9b-c4f068ebe484 without journal. Quota mode: disabled.
[ 0.558509] VFS: Mounted root (ext2 filesystem) readonly on device 259:0.
[ 0.562375] devtmpfs: mounted
[ 0.587326] Freeing unused kernel image (initmem) memory: 2184K
[ 0.588816] Run /sbin/init as init process
[ 0.899856] EXT4-fs (nvme0n1): warning: mounting unchecked fs, running e2fsck is recommended
[ 0.924559] EXT4-fs (nvme0n1): re-mounted 5f3b914f-00af-4436-8c9b-c4f068ebe484. Quota mode: disabled.
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: [ 5.143204] random: crng init done
OK
Starting network: udhcpc: started, v1.35.0
udhcpc: broadcasting discover
[ 8.945996] e1000e 0000:00:03.0 eth0: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[ 8.956204] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: no lease, forking to background
OK
Starting dropbear sshd: OK
Welcome to Buildroot
buildroot login:
8. Reference TVM Bootlog
rkanwal@rkanwal-XPS-15-9520:~$ ssh -p 7722 root@localhost
root@localhost's password:
# ./lkvm-static run -c2 --console virtio --cove-vm -p "earlycon=sbi console=hvc1" -k ./Image --virtio-transport=pci
# lkvm run -k ./Image -m 320 -c 2 --name guest-134
[ 0.000000] Linux version 6.3.0-rc4-g1312cfc7a25a ([email protected]) (riscv64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #3 SMP Mon Sep 11 16:47:46 PDT 2023
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Machine model: linux,dummy-virt
[ 0.000000] SBI specification v1.0 detected
[ 0.000000] SBI implementation ID=0x7 Version=0x0
[ 0.000000] SBI SRST extension detected
[ 0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[ 0.000000] printk: bootconsole [sbi0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x0000000093ffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x0000000093ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x0000000093ffffff]
[ 0.000000] On node 0, zone DMA32: 512 pages in unavailable ranges
[ 0.000000] On node 0, zone DMA32: 16384 pages in unavailable ranges
[ 0.000000] SBI HSM extension detected
[ 0.000000] riscv: base ISA extensions acdfim
[ 0.000000] riscv: ELF capabilities acdfim
[ 0.000000] percpu: Embedded 19 pages/cpu s40632 r8192 d29000 u77824
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 80136
[ 0.000000] Kernel command line: console=hvc0 rw rootflags=trans=virtio,version=9p2000.L,cache=loose rootfstype=9p init=/virt/init ip=dhcp earlycon=sbi console=hvc1
[ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] software IO TLB: area num 2.
[ 0.000000] software IO TLB: mapped [mem 0x000000008e800000-0x0000000092800000] (64MB)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] fixmap : 0xff1bfffffee00000 - 0xff1bffffff000000 (2048 kB)
[ 0.000000] pci io : 0xff1bffffff000000 - 0xff1c000000000000 ( 16 MB)
[ 0.000000] vmemmap : 0xff1c000000000000 - 0xff20000000000000 (1024 TB)
[ 0.000000] vmalloc : 0xff20000000000000 - 0xff60000000000000 (16384 TB)
[ 0.000000] modules : 0xffffffff0157d000 - 0xffffffff80000000 (2026 MB)
[ 0.000000] lowmem : 0xff60000000000000 - 0xff60000013e00000 ( 318 MB)
[ 0.000000] kernel : 0xffffffff80000000 - 0xffffffffffffffff (2047 MB)
[ 0.000000] Memory: 213280K/325632K available (8759K kernel code, 4979K rwdata, 4096K rodata, 2199K init, 484K bss, 112352K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=2.
[ 0.000000] rcu: RCU debug extended QS entry/exit.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] riscv-intc: 64 local interrupts mapped using AIA
[ 0.000000] riscv-imsic: imsics@08000000: hart-index-bits: 1, guest-index-bits: 0
[ 0.000000] riscv-imsic: imsics@08000000: group-index-bits: 0, group-index-shift: 24
[ 0.000000] riscv-imsic: imsics@08000000: mapped 255 interrupts for 2 CPUs at 0x0000000008000000
[ 0.000000] riscv-imsic: imsics@08000000: enable/disable sync using interrupt 2
[ 0.000000] riscv-imsic: imsics@08000000: providing IPIs using interrupt 1
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[ 0.000105] sched_clock: 64 bits at 10MHz, resolution 100ns, wraps every 4398046511100ns
[ 0.023404] riscv-timer: Timer interrupt in S-mode is available via sstc extension
[ 0.060424] Console: colour dummy device 80x25
[ 7.806736] Calibrating delay loop (skipped), value calculated using timer frequency.. 20.00 BogoMIPS (lpj=40000)
[ 7.824358] pid_max: default: 32768 minimum: 301
[ 7.835790] LSM: initializing lsm=capability,integrity
[ 7.850019] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 7.864639] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 8.032131] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 8.095148] cblist_init_generic: Setting adjustable number of callback queues.
[ 8.107587] cblist_init_generic: Setting shift to 1 and lim to 1.
[ 8.123829] riscv: ELF compat mode supported
[ 8.130446] ASID allocator using 16 bits (65536 entries)
[ 8.162457] rcu: Hierarchical SRCU implementation.
[ 8.170562] rcu: Max phase no-delay instances is 1000.
[ 8.194752] EFI services will not be available.
[ 8.227259] smp: Bringing up secondary CPUs ...
[ 8.278102] cacheinfo: Unable to detect cache hierarchy for CPU 1
[ 8.295723] smp: Brought up 1 node, 2 CPUs
[ 8.369375] devtmpfs: initialized
[ 8.421134] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 8.447515] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 8.480149] pinctrl core: initialized pinctrl subsystem
[ 8.537743] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 8.579262] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[ 8.610761] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 8.632263] audit: initializing netlink subsys (disabled)
[ 8.674214] audit: type=2000 audit(0.552:1): state=initialized audit_enabled=0 res=1
[ 8.689876] thermal_sys: Registered thermal governor 'step_wise'
[ 8.757569] cpuidle: using governor menu
[ 8.866231] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[ 8.884486] HugeTLB: 28 KiB vmemmap can be freed for a 2.00 MiB page
[ 8.967173] ACPI: Interpreter disabled.
[ 8.985890] iommu: Default domain type: Translated
[ 8.998970] iommu: DMA domain TLB invalidation policy: strict mode
[ 9.031492] SCSI subsystem initialized
[ 9.068311] usbcore: registered new interface driver usbfs
[ 9.085239] usbcore: registered new interface driver hub
[ 9.099768] usbcore: registered new device driver usb
[ 9.165558] vgaarb: loaded
[ 9.189610] clocksource: Switched to clocksource riscv_clocksource
[ 9.274289] pnp: PnP ACPI: disabled
[ 11.849620] NET: Registered PF_INET protocol family
[ 11.885619] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 11.937854] tcp_listen_portaddr_hash hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 11.963156] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 11.983419] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 12.021936] TCP bind hash table entries: 4096 (order: 6, 262144 bytes, linear)
[ 12.135218] TCP: Hash tables configured (established 4096 bind 4096)
[ 12.175606] UDP hash table entries: 256 (order: 2, 24576 bytes, linear)
[ 12.203358] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes, linear)
[ 12.233559] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 12.301769] RPC: Registered named UNIX socket transport module.
[ 12.317604] RPC: Registered udp transport module.
[ 12.330135] RPC: Registered tcp transport module.
[ 12.342657] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 12.359769] PCI: CLS 0 bytes, default 64
[ 12.371109] kvm [1]: hypervisor extension not available
[ 12.415404] workingset: timestamp_bits=46 max_order=16 bucket_order=0
[ 12.545914] NFS: Registering the id_resolver key type
[ 12.561509] Key type id_resolver registered
[ 12.572544] Key type id_legacy registered
[ 12.584141] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 12.602466] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 12.625968] 9p: Installing v9fs 9p2000 file system support
[ 12.650831] NET: Registered PF_ALG protocol family
[ 12.666306] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 12.686275] io scheduler mq-deadline registered
[ 12.698505] io scheduler kyber registered
[ 12.709490] io scheduler bfq registered
[ 12.822765] pci-host-generic 30000000.pci: host bridge /smb/pci ranges:
[ 12.842145] pci-host-generic 30000000.pci: IO 0x0000000000..0x000000ffff -> 0x0000000000
[ 12.865871] pci-host-generic 30000000.pci: MEM 0x0040000000..0x007fffffff -> 0x0040000000
[ 12.892334] pci-host-generic 30000000.pci: ECAM at [mem 0x30000000-0x3fffffff] for [bus 00-01]
[ 12.919173] pci-host-generic 30000000.pci: PCI host bridge to bus 0000:00
[ 12.937749] pci_bus 0000:00: root bus resource [bus 00-01]
[ 12.952319] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 12.969391] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff]
[ 12.995314] pci 0000:00:00.0: [1af4:1049] type 00 class 0xff0000
[ 13.019577] pci 0000:00:00.0: reg 0x10: [io 0x6200-0x62ff]
[ 13.037244] pci 0000:00:00.0: reg 0x14: [mem 0x40000000-0x400000ff]
[ 13.056268] pci 0000:00:00.0: reg 0x18: [mem 0x40000400-0x400007ff]
[ 13.106988] pci 0000:00:01.0: [1af4:1049] type 00 class 0xff0000
[ 13.127786] pci 0000:00:01.0: reg 0x10: [io 0x6300-0x63ff]
[ 13.145864] pci 0000:00:01.0: reg 0x14: [mem 0x40000800-0x400008ff]
[ 13.165889] pci 0000:00:01.0: reg 0x18: [mem 0x40000c00-0x40000fff]
[ 13.213715] pci 0000:00:02.0: [1af4:1041] type 00 class 0x020000
[ 13.234480] pci 0000:00:02.0: reg 0x10: [io 0x6400-0x64ff]
[ 13.252135] pci 0000:00:02.0: reg 0x14: [mem 0x40001000-0x400010ff]
[ 13.271648] pci 0000:00:02.0: reg 0x18: [mem 0x40001400-0x400017ff]
[ 13.319631] pci 0000:00:03.0: [1af4:1043] type 00 class 0x078000
[ 13.340288] pci 0000:00:03.0: reg 0x10: [io 0x6500-0x65ff]
[ 13.358599] pci 0000:00:03.0: reg 0x14: [mem 0x40001800-0x400018ff]
[ 13.378301] pci 0000:00:03.0: reg 0x18: [mem 0x40001c00-0x40001fff]
[ 13.430828] pci 0000:00:00.0: BAR 2: assigned [mem 0x40000000-0x400003ff]
[ 13.451355] pci 0000:00:01.0: BAR 2: assigned [mem 0x40000400-0x400007ff]
[ 13.471144] pci 0000:00:02.0: BAR 2: assigned [mem 0x40000800-0x40000bff]
[ 13.490954] pci 0000:00:03.0: BAR 2: assigned [mem 0x40000c00-0x40000fff]
[ 13.510539] pci 0000:00:00.0: BAR 0: assigned [io 0x0100-0x01ff]
[ 13.528136] pci 0000:00:00.0: BAR 1: assigned [mem 0x40001000-0x400010ff]
[ 13.547903] pci 0000:00:01.0: BAR 0: assigned [io 0x0200-0x02ff]
[ 13.565983] pci 0000:00:01.0: BAR 1: assigned [mem 0x40001100-0x400011ff]
[ 13.586075] pci 0000:00:02.0: BAR 0: assigned [io 0x0300-0x03ff]
[ 13.603662] pci 0000:00:02.0: BAR 1: assigned [mem 0x40001200-0x400012ff]
[ 13.623438] pci 0000:00:03.0: BAR 0: assigned [io 0x0400-0x04ff]
[ 13.641467] pci 0000:00:03.0: BAR 1: assigned [mem 0x40001300-0x400013ff]
[ 13.670642] virtio-pci 0000:00:00.0: of_irq_parse_pci: no interrupt-map found, INTx interrupts not available
[ 13.697821] PCI: OF: of_irq_parse_pci: possibly some PCI slots don't have level triggered interrupts capability
[ 13.751181] virtio-pci 0000:00:01.0: of_irq_parse_pci: no interrupt-map found, INTx interrupts not available
[ 13.800107] virtio-pci 0000:00:02.0: of_irq_parse_pci: no interrupt-map found, INTx interrupts not available
[ 13.850388] virtio-pci 0000:00:03.0: of_irq_parse_pci: no interrupt-map found, INTx interrupts not available
[ 14.863906] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 14.917667] SuperH (H)SCI(F) driver initialized
[ 15.011292] software IO TLB: Memory encryption is active and system is using DMA bounce buffers
[ 15.491527] printk: console [hvc0] enabled
[ 15.510378] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 15.510378] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 15.969704] loop: module loaded
[ 15.969704] loop: module loaded
[ 17.022117] e1000e: Intel(R) PRO/1000 Network Driver
[ 17.022117] e1000e: Intel(R) PRO/1000 Network Driver
[ 17.043658] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 17.043658] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 17.320672] usbcore: registered new interface driver uas
[ 17.320672] usbcore: registered new interface driver uas
[ 17.354873] usbcore: registered new interface driver usb-storage
[ 17.354873] usbcore: registered new interface driver usb-storage
[ 17.395493] mousedev: PS/2 mouse device common for all mice
[ 17.395493] mousedev: PS/2 mouse device common for all mice
[ 17.440471] sdhci: Secure Digital Host Controller Interface driver
[ 17.440471] sdhci: Secure Digital Host Controller Interface driver
[ 17.477356] sdhci: Copyright(c) Pierre Ossman
[ 17.477356] sdhci: Copyright(c) Pierre Ossman
[ 17.503098] sdhci-pltfm: SDHCI platform and OF driver helper
[ 17.503098] sdhci-pltfm: SDHCI platform and OF driver helper
[ 17.542606] usbcore: registered new interface driver usbhid
[ 17.542606] usbcore: registered new interface driver usbhid
[ 17.571565] usbhid: USB HID core driver
[ 17.571565] usbhid: USB HID core driver
[ 17.596242] riscv-pmu-sbi: SBI PMU extension is available
[ 17.596242] riscv-pmu-sbi: SBI PMU extension is available
[ 17.626887] riscv-pmu-sbi: 0 firmware and 18 hardware counters
[ 17.626887] riscv-pmu-sbi: 0 firmware and 18 hardware counters
[ 17.659427] riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available
[ 17.659427] riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available
[ 17.739716] NET: Registered PF_INET6 protocol family
[ 17.739716] NET: Registered PF_INET6 protocol family
[ 18.214615] Segment Routing with IPv6
[ 18.214615] Segment Routing with IPv6
[ 18.243064] In-situ OAM (IOAM) with IPv6
[ 18.243064] In-situ OAM (IOAM) with IPv6
[ 18.261451] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 18.261451] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 18.309399] NET: Registered PF_PACKET protocol family
[ 18.309399] NET: Registered PF_PACKET protocol family
[ 18.337686] 9pnet: Installing 9P2000 support
[ 18.337686] 9pnet: Installing 9P2000 support
[ 18.436350] Key type dns_resolver registered
[ 18.436350] Key type dns_resolver registered
[ 18.750264] debug_vm_pgtable: [debug_vm_pgtable ]: Validating architecture page table helpers
[ 18.750264] debug_vm_pgtable: [debug_vm_pgtable ]: Validating architecture page table helpers
[ 19.069612] Sending DHCP requests ., OK
[ 19.069612] Sending DHCP requests ., OK
[ 19.102282] IP-Config: Got DHCP answer from 192.168.33.1, my address is 192.168.33.15
[ 19.102282] IP-Config: Got DHCP answer from 192.168.33.1, my address is 192.168.33.15
[ 19.139031] IP-Config: Complete:
[ 19.139031] IP-Config: Complete:
[ 19.153715] device=eth0, hwaddr=02:15:15:15:15:15, ipaddr=192.168.33.15, mask=255.255.255.0, gw=192.168.33.1
[ 19.153715] device=eth0, hwaddr=02:15:15:15:15:15, ipaddr=192.168.33.15, mask=255.255.255.0, gw=192.168.33.1
[ 19.196493] host=192.168.33.15, domain=, nis-domain=(none)
[ 19.196493] host=192.168.33.15, domain=, nis-domain=(none)
[ 19.222366] bootserver=192.168.33.1, rootserver=0.0.0.0, rootpath=
[ 19.222366] bootserver=192.168.33.1, rootserver=0.0.0.0, rootpath=
[ 19.222491] nameserver0=10.0.2.3
[ 19.222491] nameserver0=10.0.2.3
[ 19.798453] VFS: Mounted root (9p filesystem) on device 0:17.
[ 19.798453] VFS: Mounted root (9p filesystem) on device 0:17.
[ 19.838965] devtmpfs: mounted
[ 19.838965] devtmpfs: mounted
[ 19.892480] Freeing unused kernel image (initmem) memory: 2196K
[ 19.892480] Freeing unused kernel image (initmem) memory: 2196K
[ 19.930341] Run /virt/init as init process
[ 19.930341] Run /virt/init as init process
Mounting...
/ # ifconfig
eth0 Link encap:Ethernet HWaddr 02:15:15:15:15:15
inet addr:192.168.33.15 Bcast:192.168.33.255 Mask:255.255.255.0
inet6 addr: fe80::15:15ff:fe15:1515/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1180 (1.1 KiB) TX bytes:1836 (1.7 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
/ # cat /proc/interrupts
CPU0 CPU1
10: 2358 2097 RISC-V INTC 5 Edge riscv-timer
11: 0 0 RISC-V IMSIC-PCI 49152 Edge virtio3-config
12: 25 0 RISC-V IMSIC-PCI 49153 Edge virtio3-input
13: 0 0 RISC-V IMSIC-PCI 49154 Edge virtio3-output
14: 0 0 RISC-V IMSIC-PCI 32768 Edge virtio2-config
15: 2 0 RISC-V IMSIC-PCI 32769 Edge virtio2-input.0
16: 10 0 RISC-V IMSIC-PCI 32770 Edge virtio2-output.0
17: 0 0 RISC-V IMSIC-PCI 0 Edge virtio0-config
18: 409 0 RISC-V IMSIC-PCI 1 Edge virtio0-requests
19: 0 0 RISC-V IMSIC-PCI 16384 Edge virtio1-config
20: 111 0 RISC-V IMSIC-PCI 16385 Edge virtio1-requests
IPI0: 12 13 Rescheduling interrupts
IPI1: 559 785 Function call interrupts
IPI2: 0 0 CPU stop interrupts
IPI3: 0 0 CPU stop (for crash dump) interrupts
IPI4: 0 0 IRQ work interrupts
IPI5: 0 0 Timer broadcast interrupts
/ #