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

From: maobibo
Date: Tue Feb 27 2024 - 04:52:25 EST




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 and one IOCSR area will be reserved for software. In general CSR/CPUCFG is to describe CPU features and IOCSR is to describe board/device features.

CSR area is limited to 16K, it is difficult for HW guys to reserve special area for software usage. IOCSR/CPUCFG is possible however.

Regards
Bibo Mao

It is difficult to find an area unused by HW for CSR method since the
small CSR ID range. However it is easy for cpucfg. Here I doubt whether
you really know about LoongArch LVZ.

It's unfair to accuse the others for not knowing about LVZ considering
the lack of public documentation.