KVM

AmigaOne X5000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

KVM

Post by xeno74 »

Hi All,

The X5000 Linux kernels support KVM!

Information about KVM for the X5000:
KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux. Using KVM, one can run multiple virtual machines running unmodified Linux distributions. Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc. KVM is open source software. The kernel component of KVM is included in mainline Linux. The userspace component of KVM is included in mainline QEMU. KVM for e5500 uses hardware hypervisor features. PR-mode KVM is not supported. Nested KVM is not supported. P5020 uses an e5500 core which is book3e. You cannot use a book3s kernel with it. KVM on book3e does not allow making the CPU look like a different type of PPC. It just lets you create virtual instances of the same CPU. You need to tell QEMU to use the appropriate CPU type (e5500) and platform (ppce500).

Freescale BookE
---------------

- Software loaded TLB.
- e6500 adds HW loaded indirect TLB entries.
- Mix of 32 & 64 bit

+--------------+
| e200 |
+--------------+


+--------------------------------+
| e500 |
+--------------------------------+
|
|
v
+--------------------------------+
| e500v2 |
+--------------------------------+
|
|
v
+--------------------------------+
| e500mc (Book3e) |
+--------------------------------+
|
|
v
+--------------------------------+
| e5500 (64 bit) |
+--------------------------------+
|
|
v
+--------------------------------+
| e6500 (HW TLB) (Multithreaded) |
+--------------------------------+
Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: KVM

Post by xeno74 »

Screenshot of Fienix Soar PowerPC with the RC3 of kernel 5.7 on an A-EON AmigaOne X5000/40 as host and as virtual QEMU/KVM-HV guest (e5500 CPU):

Image
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: KVM

Post by xeno74 »

Screenshot of Fienix Soar PowerPC with the alpha3 of kernel 5.8 on an A-EON AmigaOne X5000/40 as host and as virtual QEMU/KVM-HV guest (e5500 CPU):

Image

BTW, an interesting link: Running Amiga like OSes on QEMU
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: KVM

Post by xeno74 »

Void PPC in a virtual e5500 QEMU KVM HV machine with 4 virtual CPU cores on the X5000/40:

Image

Image

The X5000 Linux kernel supports the KVM-HV type 1 hypervisor (virtualization support of the CPU) and paravirtualized VirtIO drivers so it can works in virtual e5500 QEMU machines near to the bare-metal performance level.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: KVM

Post by xeno74 »

Sharing host files with the QEMU/KVM HV guest with the virtio-9p-pci device and with the Plan9 file system 9P:

Image

QEMU command:

Code: Select all

qemu-system-ppc64 -M ppce500  -cpu e5500 -m 1024 -kernel /home/fienix/Downloads/linux-image-5.17-alpha4-X1000_X5000/X5000_and_QEMU_e5500/uImage-5.17 -drive format=raw,file=/media/fienix/861d1093-23fa-4994-b73f-838526e4c311/home/amigaone/Downloads/MintPPC32-X5000.img,index=0,if=virtio  -netdev user,id=mynet0 -device virtio-net,netdev=mynet0 -append "rw root=/dev/vda" -device virtio-vga -device virtio-mouse-pci -device virtio-keyboard-pci -device pci-ohci,id=newusb -device usb-audio,bus=newusb.0 -smp 3 -enable-kvm -fsdev local,security_model=passthrough,id=fsdev0,path=/home/fienix/Music -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: KVM

Post by xeno74 »

Void PPC Linux in a virtual e5500 QEMU/KVM HV machine with 9p shared folder and USB sound support:

Image

QEMU command:

Code: Select all

qemu-system-ppc64 -M ppce500 -cpu e5500 -m 1024 -kernel /home/amigaone/Downloads/linux-image-5.17-rc7-X1000_X5000/X5000_and_QEMU_e5500/uImage-5.17 -drive format=raw,file=/home/amigaone/Downloads/void-live-powerpc-20220129.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio-net,netdev=mynet0 -append "rw root=/dev/vda2" -device virtio-gpu -device virtio-mouse-pci -device virtio-keyboard-pci -device pci-ohci,id=newusb -audiodev id=sndbe,driver=pa,server=/run/user/1000/pulse/native -device usb-audio,bus=newusb.0 -enable-kvm -smp 3 -fsdev local,security_model=passthrough,id=fsdev0,path=/home/amigaone/Music -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: KVM

Post by xeno74 »

Lubuntu 14.04 in a virtual G3 Beige QEMU machine with KVM-PR:

Image

QEMU command:

Code: Select all

qemu-system-ppc -M g3beige -enable-kvm -m 2047 -bios /home/amigaone/Lubuntu_14.04_PowerPC_QEMU/openbios-ppc -boot c -hda /home/amigaone/Lubuntu_14.04_PowerPC_QEMU/Lubuntu_14.04_PowerPC_QEMU.img -g 1280x1024x32 -kernel /home/amigaone/Lubuntu_14.04_PowerPC_QEMU/vmlinux -initrd /home/amigaone/Lubuntu_14.04_PowerPC_QEMU/initrd -append "ro root=/dev/sda3" -device pci-ohci,id=newusb -device usb-tablet -nic user,model=e1000
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
caseycullen
Posts: 519
Joined: Sat Dec 17, 2016 7:12 am
Location: Madison, WI USA
Contact:

Re: KVM

Post by caseycullen »

xeno74 wrote: Sun Nov 06, 2022 6:58 am Lubuntu 14.04 in a virtual G3 Beige QEMU machine with KVM-PR:

Image

QEMU command:

Code: Select all

qemu-system-ppc -M g3beige -enable-kvm -m 2047 -bios /home/amigaone/Lubuntu_14.04_PowerPC_QEMU/openbios-ppc -boot c -hda /home/amigaone/Lubuntu_14.04_PowerPC_QEMU/Lubuntu_14.04_PowerPC_QEMU.img -g 1280x1024x32 -kernel /home/amigaone/Lubuntu_14.04_PowerPC_QEMU/vmlinux -initrd /home/amigaone/Lubuntu_14.04_PowerPC_QEMU/initrd -append "ro root=/dev/sda3" -device pci-ohci,id=newusb -device usb-tablet -nic user,model=e1000
Nice! How is KVM-PR performance? I’ve been meaning to try it.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: KVM

Post by xeno74 »

caseycullen wrote: Mon Nov 07, 2022 5:20 am Nice! How is KVM-PR performance? I’ve been meaning to try it.
It’s not as fast as KVM HV. I haven’t tested it on the X5000 yet. It’s OK on the X1000.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply