Re: Re: [PATCH] net/ipv4: add tracepoint for icmp_send

2024-03-02 Thread He Peilin
> > include/trace/events/icmp.h | 57 > > + > > net/ipv4/icmp.c | 4 > > 2 files changed, 61 insertions(+) > > create mode 100644 include/trace/events/icmp.h > > > > diff --git a/include/trace/events/icmp.h

Re: Re: [PATCH] net/ipv4: add tracepoint for icmp_send

2024-03-02 Thread He Peilin
> > include/trace/events/icmp.h | 57 > > + > > net/ipv4/icmp.c | 4 > > 2 files changed, 61 insertions(+) > > create mode 100644 include/trace/events/icmp.h > > > > diff --git a/include/trace/events/icmp.h

Re: [PATCH v6 7/7] Documentation: KVM: Add hypercall for LoongArch

2024-03-02 Thread WANG Xuerui
On 3/2/24 16:47, Bibo Mao wrote: Add documentation topic for using pv_virt when running as a guest on KVM hypervisor. Signed-off-by: Bibo Mao --- Documentation/virt/kvm/index.rst | 1 + .../virt/kvm/loongarch/hypercalls.rst | 79 +++

[PATCH v6 7/7] Documentation: KVM: Add hypercall for LoongArch

2024-03-02 Thread Bibo Mao
Add documentation topic for using pv_virt when running as a guest on KVM hypervisor. Signed-off-by: Bibo Mao --- Documentation/virt/kvm/index.rst | 1 + .../virt/kvm/loongarch/hypercalls.rst | 79 +++ Documentation/virt/kvm/loongarch/index.rst| 10 +++

[PATCH v6 5/7] LoongArch: KVM: Add pv ipi support on kvm side

2024-03-02 Thread Bibo Mao
On LoongArch system, ipi hw uses iocsr registers, there is one iocsr register access on ipi sending, and two iocsr access on ipi receiving which is ipi interrupt handler. On VM mode all iocsr accessing will cause VM to trap into hypervisor. So with one ipi hw notification there will be three times

[PATCH v6 6/7] LoongArch: Add pv ipi support on guest kernel side

2024-03-02 Thread Bibo Mao
PARAVIRT option and pv ipi is added on guest kernel side, function pv_ipi_init() is to add ipi sending and ipi receiving hooks. This function firstly checks whether system runs on VM mode. If kernel runs on VM mode, it will call function kvm_para_available() to detect current hypervirsor type. Now

[PATCH v6 4/7] LoongArch: KVM: Add vcpu search support from physical cpuid

2024-03-02 Thread Bibo Mao
Physical cpuid is used for interrupt routing for irqchips such as ipi/msi/extioi interrupt controller. And physical cpuid is stored at CSR register LOONGARCH_CSR_CPUID, it can not be changed once vcpu is created and physical cpuid of two vcpus cannot be the same. Different irqchips have different

[PATCH v6 1/7] LoongArch/smp: Refine some ipi functions on LoongArch platform

2024-03-02 Thread Bibo Mao
It is code refine about ipi handling on LoongArch platform, there are three modifications. 1. Add generic function get_percpu_irq(), replacing some percpu irq functions such as get_ipi_irq()/get_pmc_irq()/get_timer_irq() with get_percpu_irq(). 2. Change definition about parameter action called by

[PATCH v6 3/7] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-03-02 Thread Bibo Mao
Instruction cpucfg can be used to get processor features. And there is trap exception when it is executed in VM mode, and also it is to provide cpu features to VM. On real hardware cpucfg area 0 - 20 is used. Here one specified area 0x4000 -- 0x40ff is used for KVM hypervisor to privide

[PATCH v6 0/7] LoongArch: Add pv ipi support on LoongArch VM

2024-03-02 Thread Bibo Mao
On physical machine, ipi HW uses IOCSR registers, however there is trap into hypervisor when vcpu accesses IOCSR registers if system is in VM mode. SWI is a interrupt mechanism like SGI on ARM, software can send interrupt to CPU, only that on LoongArch SWI can only be sent to local CPU now. So SWI

[PATCH v6 2/7] LoongArch: KVM: Add hypercall instruction emulation support

2024-03-02 Thread Bibo Mao
On LoongArch system, there is hypercall instruction special for virtualization. When system executes this instruction on host side, there is illegal instruction exception reported, however it will trap into host when it is executed in VM mode. When hypercall is emulated, A0 register is set with