public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: fangyu.yu@linux.alibaba.com
To: anup@brainfault.org
Cc: alex@ghiti.fr, andrew.jones@oss.qualcomm.com,
	aou@eecs.berkeley.edu, atish.patra@linux.dev, corbet@lwn.net,
	fangyu.yu@linux.alibaba.com, guoren@kernel.org,
	kvm-riscv@lists.infradead.org, kvm@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org, palmer@dabbelt.com,
	pbonzini@redhat.com, pjw@kernel.org,
	radim.krcmar@oss.qualcomm.com
Subject: Re: Re: [PATCH v5 1/3] RISC-V: KVM: Support runtime configuration for per-VM's HGATP mode
Date: Fri, 27 Mar 2026 09:55:06 +0800	[thread overview]
Message-ID: <20260327015506.79079-1-fangyu.yu@linux.alibaba.com> (raw)
In-Reply-To: <CAAhSdy059XmTckHrX8xjk44pR=1BkaUuPQ-Cf+4BRTBoigBZ+g@mail.gmail.com>

>> diff --git a/arch/riscv/kvm/vmid.c b/arch/riscv/kvm/vmid.c
>> index cf34d448289d..c15bdb1dd8be 100644
>> --- a/arch/riscv/kvm/vmid.c
>> +++ b/arch/riscv/kvm/vmid.c
>> @@ -26,7 +26,8 @@ static DEFINE_SPINLOCK(vmid_lock);
>>  void __init kvm_riscv_gstage_vmid_detect(void)
>>  {
>>         /* Figure-out number of VMID bits in HW */
>> -       csr_write(CSR_HGATP, (kvm_riscv_gstage_mode << HGATP_MODE_SHIFT) | HGATP_VMID);
>> +       csr_write(CSR_HGATP, (kvm_riscv_gstage_mode(kvm_riscv_gstage_max_pgd_levels) <<
>> +                             HGATP_MODE_SHIFT) | HGATP_VMID);
>>         vmid_bits = csr_read(CSR_HGATP);
>>         vmid_bits = (vmid_bits & HGATP_VMID) >> HGATP_VMID_SHIFT;
>>         vmid_bits = fls_long(vmid_bits);
>> --
>> 2.50.1
>>
>>
>
>Regards,
>Anup

Hi Anup:

Thanks for the review.

I'll incorporate all of the above changes and post an updated version (v6) shortly.

Thanks,
Fangyu

  reply	other threads:[~2026-03-27  1:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 13:45 [PATCH v5 0/3] Support runtime configuration for per-VM's HGATP mode fangyu.yu
2026-02-04 13:45 ` [PATCH v5 1/3] RISC-V: KVM: " fangyu.yu
2026-03-26 12:20   ` Anup Patel
2026-03-27  1:55     ` fangyu.yu [this message]
2026-02-04 13:45 ` [PATCH v5 2/3] RISC-V: KVM: Detect and expose supported HGATP G-stage modes fangyu.yu
2026-03-26 12:32   ` Anup Patel
2026-03-27  1:55     ` fangyu.yu
2026-03-27  9:00       ` Anup Patel
2026-03-27 11:11         ` fangyu.yu
2026-02-04 13:45 ` [PATCH v5 3/3] RISC-V: KVM: add KVM_CAP_RISCV_SET_HGATP_MODE fangyu.yu
2026-02-04 15:32   ` Andrew Jones
2026-02-05  1:28     ` fangyu.yu
2026-02-05 14:55       ` Andrew Jones
2026-02-05 14:56 ` [PATCH v5 0/3] Support runtime configuration for per-VM's HGATP mode Andrew Jones

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=20260327015506.79079-1-fangyu.yu@linux.alibaba.com \
    --to=fangyu.yu@linux.alibaba.com \
    --cc=alex@ghiti.fr \
    --cc=andrew.jones@oss.qualcomm.com \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=atish.patra@linux.dev \
    --cc=corbet@lwn.net \
    --cc=guoren@kernel.org \
    --cc=kvm-riscv@lists.infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=pjw@kernel.org \
    --cc=radim.krcmar@oss.qualcomm.com \
    /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