mbox series

[v2,0/2] target/loongarch: Use auto method for LSX/LASX feature

Message ID 20241219125424.3220321-1-maobibo@loongson.cn (mailing list archive)
Headers show
Series target/loongarch: Use auto method for LSX/LASX feature | expand

Message

Bibo Mao Dec. 19, 2024, 12:54 p.m. UTC
Like LBT feature, add type OnOffAuto for LSX and LASX feature setting.
Also add feature detection with new VM ioctl command, fallback to old
method if it is not supported.

It is tested on the following conditions:
  lsx=on/off
  lasx=on/off
  lsx=on,lasx=on/off
  lsx=off,lasx=off
  lsx=off,lasx=on  (illegal combination)

---
  v1 ... v2:
  1. Fix option lsx=off in TCG mode, add all possible combination test.

---
Bibo Mao (2):
  target/loongarch: Use auto method with LSX feature
  target/loongarch: Use auto method with LASX feature

 target/loongarch/cpu.c     |  86 ++++++++++++++++++-----------
 target/loongarch/cpu.h     |   4 ++
 target/loongarch/kvm/kvm.c | 107 +++++++++++++++++++++++++++++++++++++
 3 files changed, 165 insertions(+), 32 deletions(-)


base-commit: 8032c78e556cd0baec111740a6c636863f9bd7c8