[PATCH 0/2] target/loongarch: PV TLB flush advertisement

Tao Cui posted 2 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260615085214.44526-1-cui.tao@linux.dev
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Song Gao <gaosong@loongson.cn>
linux-headers/asm-loongarch/kvm.h      |  1 +
linux-headers/asm-loongarch/kvm_para.h |  1 +
target/loongarch/cpu.h                 |  2 ++
target/loongarch/kvm/kvm.c             | 38 ++++++++++++++++++++++++++
target/loongarch/loongarch-qmp-cmds.c  |  4 +--
5 files changed, 44 insertions(+), 2 deletions(-)
[PATCH 0/2] target/loongarch: PV TLB flush advertisement
Posted by Tao Cui 1 month, 1 week ago
From: Tao Cui <cuitao@kylinos.cn>

Advertise the LoongArch paravirtual TLB flush feature (KVM_FEATURE_PV_TLB_FLUSH)
to the guest when the host KVM supports it.  This pairs with the corresponding
KVM/guest-kernel PV TLB flush series posted to the kernel.

Patch 1 syncs the UAPI definitions into linux-headers.
Patch 2 adds the probe, the CPUCFG feature advertisement, and a
kvm-pv-tlb-flush CPU property (on/off/auto, default auto).

The feature is only advertised when the host actually supports it, so a
guest never observes KVM_FEATURE_PV_TLB_FLUSH on a host that cannot
service PV TLB flush requests.

Tao Cui (2):
  linux-headers: Add LoongArch PV TLB flush definitions
  target/loongarch: Enable PV TLB flush advertisement to the guest

 linux-headers/asm-loongarch/kvm.h      |  1 +
 linux-headers/asm-loongarch/kvm_para.h |  1 +
 target/loongarch/cpu.h                 |  2 ++
 target/loongarch/kvm/kvm.c             | 38 ++++++++++++++++++++++++++
 target/loongarch/loongarch-qmp-cmds.c  |  4 +--
 5 files changed, 44 insertions(+), 2 deletions(-)

-- 
2.43.0
Re: [PATCH 0/2] target/loongarch: PV TLB flush advertisement
Posted by gaosong 1 month, 1 week ago
在 2026/6/15 下午4:52, Tao Cui 写道:
> From: Tao Cui <cuitao@kylinos.cn>
>
> Advertise the LoongArch paravirtual TLB flush feature (KVM_FEATURE_PV_TLB_FLUSH)
> to the guest when the host KVM supports it.  This pairs with the corresponding
> KVM/guest-kernel PV TLB flush series posted to the kernel.
>
> Patch 1 syncs the UAPI definitions into linux-headers.
Hi, you should use scripts/update-linux-headers.sh  to update the 
linux-headers.

Thanks.
Song Gao
> Patch 2 adds the probe, the CPUCFG feature advertisement, and a
> kvm-pv-tlb-flush CPU property (on/off/auto, default auto).
>
> The feature is only advertised when the host actually supports it, so a
> guest never observes KVM_FEATURE_PV_TLB_FLUSH on a host that cannot
> service PV TLB flush requests.
> Tao Cui (2):
>    linux-headers: Add LoongArch PV TLB flush definitions
>    target/loongarch: Enable PV TLB flush advertisement to the guest
>
>   linux-headers/asm-loongarch/kvm.h      |  1 +
>   linux-headers/asm-loongarch/kvm_para.h |  1 +
>   target/loongarch/cpu.h                 |  2 ++
>   target/loongarch/kvm/kvm.c             | 38 ++++++++++++++++++++++++++
>   target/loongarch/loongarch-qmp-cmds.c  |  4 +--
>   5 files changed, 44 insertions(+), 2 deletions(-)
>


Re: [PATCH 0/2] target/loongarch: PV TLB flush advertisement
Posted by Tao Cui 1 month, 1 week ago
Hi Song,

Thanks for the suggestion.

Bibo has also raised a few comments on the KVM side that require some
adjustments to the paired kernel series. I'll rework the series
accordingly and regenerate the linux-headers via
scripts/update-linux-headers.sh in the next version, along with those
changes.

Thanks,
--
Tao

> Hi, you should use scripts/update-linux-headers.sh to update the
> linux-headers.
>