Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-03-01 Thread maobibo
On 2024/2/27 下午6:19, WANG Xuerui wrote: On 2/27/24 18:12, maobibo wrote: On 2024/2/27 下午5:10, WANG Xuerui wrote: On 2/27/24 11:14, maobibo wrote: On 2024/2/27 上午4:02, Jiaxun Yang wrote: 在2024年2月26日二月 上午8:04,maobibo写道: On 2024/2/26 下午2:12, Huacai Chen wrote: On Mon, Feb 26, 2024 at

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-27 Thread Huacai Chen
Hi, Paolo, I'm very sorry to bother you, now we have a controversy about how to query hypervisor features (PV IPI, PV timer and maybe PV spinlock) on LoongArch, and we have two choices: 1, Get from CPUCFG registers; 2, Get from a hypercall. CPUCFG are unprivileged registers which can be read

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-27 Thread WANG Xuerui
On 2/27/24 18:12, maobibo wrote: On 2024/2/27 下午5:10, WANG Xuerui wrote: On 2/27/24 11:14, maobibo wrote: On 2024/2/27 上午4:02, Jiaxun Yang wrote: 在2024年2月26日二月 上午8:04,maobibo写道: On 2024/2/26 下午2:12, Huacai Chen wrote: On Mon, Feb 26, 2024 at 10:04 AM maobibo wrote: On 2024/2/24

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-27 Thread maobibo
On 2024/2/27 下午5:10, WANG Xuerui wrote: On 2/27/24 11:14, maobibo wrote: On 2024/2/27 上午4:02, Jiaxun Yang wrote: 在2024年2月26日二月 上午8:04,maobibo写道: On 2024/2/26 下午2:12, Huacai Chen wrote: On Mon, Feb 26, 2024 at 10:04 AM maobibo wrote: On 2024/2/24 下午5:13, Huacai Chen wrote: Hi,

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-27 Thread maobibo
On 2024/2/27 下午5:05, Xi Ruoyao wrote: On Tue, 2024-02-27 at 15:09 +0800, maobibo wrote: It is difficult to find an area unused by HW for CSR method since the small CSR ID range. We may use IOCSR instead. In kernel/cpu-probe.c there are already some IOCSR reads. yes, IOCSR can be used

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-27 Thread WANG Xuerui
On 2/27/24 11:14, maobibo wrote: On 2024/2/27 上午4:02, Jiaxun Yang wrote: 在2024年2月26日二月 上午8:04,maobibo写道: On 2024/2/26 下午2:12, Huacai Chen wrote: On Mon, Feb 26, 2024 at 10:04 AM maobibo wrote: On 2024/2/24 下午5:13, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 22, 2024 at 11:28 AM Bibo

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-27 Thread Xi Ruoyao
On Tue, 2024-02-27 at 15:09 +0800, maobibo wrote: > It is difficult to find an area unused by HW for CSR method since the > small CSR ID range. We may use IOCSR instead. In kernel/cpu-probe.c there are already some IOCSR reads. > It is difficult to find an area unused by HW for CSR method

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-26 Thread maobibo
On 2024/2/27 下午1:23, Jiaxun Yang wrote: 在2024年2月27日二月 上午3:14,maobibo写道: On 2024/2/27 上午4:02, Jiaxun Yang wrote: 在2024年2月26日二月 上午8:04,maobibo写道: On 2024/2/26 下午2:12, Huacai Chen wrote: On Mon, Feb 26, 2024 at 10:04 AM maobibo wrote: On 2024/2/24 下午5:13, Huacai Chen wrote: Hi,

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-26 Thread Jiaxun Yang
在2024年2月27日二月 上午3:14,maobibo写道: > On 2024/2/27 上午4:02, Jiaxun Yang wrote: >> >> >> 在2024年2月26日二月 上午8:04,maobibo写道: >>> On 2024/2/26 下午2:12, Huacai Chen wrote: On Mon, Feb 26, 2024 at 10:04 AM maobibo wrote: > > > > On 2024/2/24 下午5:13, Huacai Chen wrote: >> Hi, Bibo,

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-26 Thread maobibo
On 2024/2/27 上午4:02, Jiaxun Yang wrote: 在2024年2月26日二月 上午8:04,maobibo写道: On 2024/2/26 下午2:12, Huacai Chen wrote: On Mon, Feb 26, 2024 at 10:04 AM maobibo wrote: On 2024/2/24 下午5:13, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 22, 2024 at 11:28 AM Bibo Mao wrote: Instruction cpucfg

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-26 Thread Jiaxun Yang
在2024年2月26日二月 上午8:04,maobibo写道: > On 2024/2/26 下午2:12, Huacai Chen wrote: >> On Mon, Feb 26, 2024 at 10:04 AM maobibo wrote: >>> >>> >>> >>> On 2024/2/24 下午5:13, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 22, 2024 at 11:28 AM Bibo Mao wrote: > > Instruction cpucfg can be

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-26 Thread WANG Xuerui
On 2/26/24 16:00, maobibo wrote: On 2024/2/26 下午1:25, WANG Xuerui wrote: Hi, On 2/26/24 10:04, maobibo wrote: On 2024/2/24 下午5:13, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 22, 2024 at 11:28 AM Bibo Mao wrote: Instruction cpucfg can be used to get processor features. And there is trap

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-26 Thread maobibo
On 2024/2/26 下午2:12, Huacai Chen wrote: On Mon, Feb 26, 2024 at 10:04 AM maobibo wrote: On 2024/2/24 下午5:13, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 22, 2024 at 11:28 AM Bibo Mao wrote: Instruction cpucfg can be used to get processor features. And there is trap exception when it is

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-26 Thread maobibo
On 2024/2/26 下午1:25, WANG Xuerui wrote: Hi, On 2/26/24 10:04, maobibo wrote: On 2024/2/24 下午5:13, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 22, 2024 at 11:28 AM Bibo Mao wrote: Instruction cpucfg can be used to get processor features. And there is trap exception when it is executed in

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-25 Thread Huacai Chen
On Mon, Feb 26, 2024 at 10:04 AM maobibo wrote: > > > > On 2024/2/24 下午5:13, Huacai Chen wrote: > > Hi, Bibo, > > > > On Thu, Feb 22, 2024 at 11:28 AM Bibo Mao wrote: > >> > >> Instruction cpucfg can be used to get processor features. And there > >> is trap exception when it is executed in VM

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-25 Thread WANG Xuerui
Hi, On 2/26/24 10:04, maobibo wrote: On 2024/2/24 下午5:13, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 22, 2024 at 11:28 AM Bibo Mao wrote: 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

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-25 Thread maobibo
On 2024/2/24 下午5:13, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 22, 2024 at 11:28 AM Bibo Mao wrote: 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

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-25 Thread maobibo
On 2024/2/24 下午5:13, Huacai Chen wrote: Hi, Bibo, On Thu, Feb 22, 2024 at 11:28 AM Bibo Mao wrote: 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

Re: [PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-24 Thread Huacai Chen
Hi, Bibo, On Thu, Feb 22, 2024 at 11:28 AM Bibo Mao wrote: > > 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

[PATCH v5 3/6] LoongArch: KVM: Add cpucfg area for kvm hypervisor

2024-02-21 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