Hi

This series adds KVM put/get support for msgint CSRs and introduces
msgint feature checks. It also adds kvm_dintc_realize() when
kvm_irqchip_in_kernel is enabled, which creates and initializes the DINTC
device in kernel mode. This series uses the  'RFC'tag in the title,
as some required linux headers have not yet been merged upstream.

Test;
1. add kernel patch:
https://patchew.org/linux/[email protected]/
https://patchew.org/linux/[email protected]/

2. run script with '-cpu max,msgint=on' and virt,dmsi=on.
'
./build/qemu-system-loongarch64 -accel kvm \
     -bios /usr/share/edk2/loongarch64/QEMU_EFI-silent-pflash.raw \
     -cpu max,msgint=on\
     -smp 4 \
     -machine virt,dmsi=on,kernel_irqchip=on\
     -m 16G \
     -netdev 
tap,id=net0,ifname=tap0,script=/root/net.sh,downscript=no,vhost=on,queues=4 \
    -device virtio-net-pci,netdev=net0,mq=on,vectors=128,mac=52:54:00:12:34:56 \
     -monitor telnet:localhost:4418,server,nowait \
    -device virtio-gpu-pci \
    -drive if=none,id=disk0,file=/home/kvm/lns23.qcow2,format=qcow2 \
    -device virtio-blk-pci,drive=disk0,id=virtio_disk0 \
    --nographic
'
3  the vm can work well with with net test, such as netperf or iperf test.

Thanks.
Song Gao

Song Gao (2):
  target/loongarch: Add kvm support dintc
  Add dintc kvm_irqchip_in_kernel support

 hw/intc/loongarch_dintc.c         | 13 ++++++
 hw/intc/loongarch_dintc_kvm.c     | 48 +++++++++++++++++++++
 hw/intc/meson.build               |  2 +
 include/hw/intc/loongarch_dintc.h | 10 +++++
 linux-headers/asm-loongarch/kvm.h |  4 ++
 linux-headers/linux/kvm.h         |  2 +
 target/loongarch/cpu.c            |  5 +--
 target/loongarch/cpu.h            |  1 +
 target/loongarch/kvm/kvm.c        | 69 +++++++++++++++++++++++++++++++
 9 files changed, 151 insertions(+), 3 deletions(-)
 create mode 100644 hw/intc/loongarch_dintc_kvm.c

-- 
2.41.0


Reply via email to