mbox series

[v2,0/8] target/loongarch: Add paravirt feature support

Message ID 20250224032756.809994-1-maobibo@loongson.cn (mailing list archive)
Headers show
Series target/loongarch: Add paravirt feature support | expand

Message

Bibo Mao Feb. 24, 2025, 3:27 a.m. UTC
Paravirt features is enabled by default if it is supported by KVM host,
such as KVM_FEATURE_IPI and KVM_FEATURE_STEAL_TIME, however paravirt
feature KVM_FEATURE_VIRT_EXTIOI is controlled from qemu VMM rather KVM
host.

From qemu VMM side, all paravirt features should be controlled. Here
property of paravirt features are added, also feature detection and
enabling is added here.

---
  v1 ... v2:
    1. Add stub implementation with kvm_loongarch_cpu_post_init() so that
       it passes to compile with --without-system option.
    2. In order to detect supported paravirt features from qmp command,
       paravirt feature is added in array cpu_model_advertised_features
       such as  kvm-pv-ipi and kvm-steal-time.
---
Bibo Mao (8):
  target/loongarch: Add post init function for kvm mode
  target/loongarch: Mov kvm specified vcpu property to kvm directory
  target/loongarch: Add CPU property for paravirt ipi feature
  target/loongarch: Add paravirt ipi feature detection
  target/loongarch: Add paravirt ipi feature enabling
  target/loongarch: Add CPU property for kvm steal time feature
  target/loongarch: Add kvm steal time feature detection
  target/loongarch: Add virtual extioi feature enabling

 hw/loongarch/virt.c                   |   8 --
 include/hw/loongarch/virt.h           |   9 ++
 target/loongarch/cpu.c                |  42 +-----
 target/loongarch/cpu.h                |  13 ++
 target/loongarch/kvm/kvm.c            | 177 +++++++++++++++++++++++++-
 target/loongarch/loongarch-qmp-cmds.c |   2 +-
 6 files changed, 202 insertions(+), 49 deletions(-)


base-commit: db7aa99ef894e88fc5eedf02ca2579b8c344b2ec