qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bibo Mao <maobibo@loongson.cn>
To: Song Gao <gaosong@loongson.cn>
Cc: Huacai Chen <chenhuacai@kernel.org>, qemu-devel@nongnu.org
Subject: [PATCH v4 0/2] target/loongarch: Add loongson binary translation feature
Date: Wed,  4 Sep 2024 14:18:57 +0800	[thread overview]
Message-ID: <20240904061859.86615-1-maobibo@loongson.cn> (raw)

Loongson Binary Translation (LBT) is used to accelerate binary
translation. LBT feature is added in kvm mode, not supported in TCG
mode since it is not emulated.

Here lbt=on/off property is added to parse command line to
enable/disable lbt feature. Also fix registers relative lbt are saved
and restored during migration.

---
v3 ... v4:
  1. Verify and enable LBT feature in function kvm_arch_init_vcpu()
     rather than loongarch_cpu_post_init(), since LBT feature is only
     effective in kvm mode and function kvm_feature_supported() can be
     defined as static.
  2. Define structure elment ftop in structure LoongArchBT as uint32_t
     to keep consist with kernel and real HW.

v2 ... v3:
  1. Property lbt is added only if kvm is enabled
  2. Use feature variable lbt with OnOffAuto type, rather than feature
     bitmap flags default_features and forced_features

v1 ... v2:
  1. Add LBT register saving and restoring in vmstate
  2. Add two pseudo feature flags: default_features and forced_features
---
Bibo Mao (2):
  target/loongarch: Add loongson binary translation feature
  target/loongarch: Implement lbt registers save/restore function

 target/loongarch/cpu.c                |  24 ++++++
 target/loongarch/cpu.h                |  18 ++++
 target/loongarch/kvm/kvm.c            | 117 +++++++++++++++++++++++++-
 target/loongarch/loongarch-qmp-cmds.c |   2 +-
 target/loongarch/machine.c            |  24 ++++++
 5 files changed, 183 insertions(+), 2 deletions(-)


base-commit: e638d685ec2a0700fb9529cbd1b2823ac4120c53
-- 
2.39.3



             reply	other threads:[~2024-09-04  6:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04  6:18 Bibo Mao [this message]
2024-09-04  6:18 ` [PATCH v4 1/2] target/loongarch: Add loongson binary translation feature Bibo Mao
2024-09-09 11:45   ` gaosong
2024-09-04  6:18 ` [PATCH v4 2/2] target/loongarch: Implement lbt registers save/restore function Bibo Mao
2024-09-09 11:52   ` gaosong
2024-09-09 13:13     ` gaosong
2024-09-10  2:24       ` maobibo
2024-09-23 13:02         ` gaosong
2024-09-24  1:28           ` maobibo
2024-09-25  3:07             ` Tiezhu Yang
2024-09-29  4:07           ` maobibo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240904061859.86615-1-maobibo@loongson.cn \
    --to=maobibo@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=gaosong@loongson.cn \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).