qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 08/11] target/loongarch: Reject la64-only instructions in


From: gaosong
Subject: Re: [PATCH v5 08/11] target/loongarch: Reject la64-only instructions in la32 mode
Date: Thu, 10 Aug 2023 10:38:45 +0800
User-agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

在 2023/8/9 下午11:03, Richard Henderson 写道:
On 8/9/23 01:26, Jiajie Chen wrote:
LoongArch64-only instructions are marked with regard to the instruction
manual Table 2. LSX instructions are not marked for now for lack of
public manual.

I would expect LSX not to be affected by CPUCFG.1.ARCH, but only by CPUCFG.2.LSX.

Note that there appears to be a bug with respect to LSX, in that CPUCFG.2.LSX is not checked.  The manual is not clear, but I would expect CPUCFG.2.LSX == 0 to trigger an illegal instruction exception before the check for EUEN.SXE == 0 to trigger an instruction disabl > exception.  Also, are bit in EUEN allowed to be set to non-zero values
when the corresponding expansion is not present?

No, the kernel always checks for corresponding extensions when setting EUEN.

See enable_fpu/lsx/lasx at

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/asm/fpu.h?h=v6.5-rc5

And, I will send a patch to Check CPUCFG.2.LSX, Thanks for you suggestion.

Thanks.
Song Gao.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]