Re: [PATCH 1/1] goldfish_rtc: keep time offset when resetting

2025-03-22 Thread Anup Patel
> > Move the synchronization of the RTC with the system clock to the instance > realization. > > Reported-by: Frederik Du Toit Lotter > Signed-off-by: Heinrich Schuchardt LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > hw/rtc/goldfish_rtc.c | 14 +++--- > 1 fil

Re: [PATCH v2 0/4] RISC-V KVM PMU fix and selftest improvement

2025-03-11 Thread Anup Patel
On Tue, Mar 4, 2025 at 4:23 AM Atish Patra wrote: > > This series adds a fix for KVM PMU code and improves the pmu selftest > by allowing generating precise number of interrupts. It also provided > another additional option to the overflow test that allows user to > generate custom number of LCOFI

Re: [PATCH] riscv: Add initial Xen guest support for RISC-V

2025-01-14 Thread Anup Patel
On Tue, Jan 14, 2025 at 9:41 PM Milan Djokic wrote: > > From: Slavisa Petrovic > > This patch introduces initial support for running RISC-V as a Xen guest. > It provides the necessary infrastructure and stubs for Xen-specific > operations. Key changes include: > > - Modifications to the RISC-V ke

Re: [PATCH 0/5] riscv: add support for Zaamo and Zalrsc extensions

2024-12-18 Thread Anup Patel
Hi Palmer, On Wed, Jun 19, 2024 at 9:11 PM Clément Léger wrote: > > Since commit e87412e621f1 ("integrate Zaamo and Zalrsc text (#1304)"), > the A extension has been described as a set of instructions provided by > Zaamo and Zalrsc. Add these two extensions. > > This series is based on the Zc one

Re: [PATCH 5/5] KVM: riscv: selftests: Add Zaamo/Zalrsc extensions to get-reg-list test

2024-12-18 Thread Anup Patel
On Wed, Jun 19, 2024 at 9:11 PM Clément Léger wrote: > > The KVM RISC-V allows Zaamo/Zalrsc extensions for Guest/VM so add these > extensions to get-reg-list test. > > Signed-off-by: Clément Léger LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > tools/testing/selfte

Re: [PATCH 4/5] RISC-V: KVM: Allow Zaamo/Zalrsc extensions for Guest/VM

2024-12-18 Thread Anup Patel
On Wed, Jun 19, 2024 at 9:11 PM Clément Léger wrote: > > Extend the KVM ISA extension ONE_REG interface to allow KVM user space > to detect and enable Zaamo/Zalrsc extensions for Guest/VM. > > Signed-off-by: Clément Léger LGTM. Reviewed-by: Anup Patel Regards, Anup >

Re: [PATCH v5 09/10] RISC-V: KVM: Allow Smnpm and Ssnpm extensions for guests

2024-10-20 Thread Anup Patel
ing the senvcfg CSR within the guest, so that extension > cannot be hidden from the guest without intercepting writes to the CSR. > > Signed-off-by: Samuel Holland LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > > Changes in v5: > - Do not allow Smnpm to be disabled, as

Re: [PATCH 1/1] hw/intc/riscv_aplic: Fix APLIC in clrip and clripnum write emulation

2024-10-04 Thread Anup Patel
On Thu, Aug 8, 2024 at 1:51 PM Yong-Xuan Wang wrote: > > In the section "4.7 Precise effects on interrupt-pending bits" > of the RISC-V AIA specification defines that: > > If the source mode is Level1 or Level0 and the interrupt domain > is configured in MSI delivery mode (domaincfg.DM = 1): > The

Re: [PATCH v12 58/84] KVM: RISC-V: Use kvm_faultin_pfn() when mapping pfns into the guest

2024-08-06 Thread Anup Patel
n For KVM RISC-V: Acked-by: Anup Patel Regards, Anup > --- > arch/riscv/kvm/mmu.c | 11 --- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/arch/riscv/kvm/mmu.c b/arch/riscv/kvm/mmu.c > index 806f68e70642..f73d6a79a78c 100644 > --- a/arch/riscv

Re: [PATCH v12 57/84] KVM: RISC-V: Mark "struct page" pfns accessed before dropping mmu_lock

2024-08-06 Thread Anup Patel
ed > outside of mmu_lock is ok (not great, but safe), but marking pages _dirty_ > outside of mmu_lock can make filesystems unhappy. > > Signed-off-by: Sean Christopherson For KVM RISC-V: Acked-by: Anup Patel Regards, Anup > --- > arch/riscv/kvm/mmu.c | 4 ++-- > 1 file chan

Re: [PATCH v12 56/84] KVM: RISC-V: Mark "struct page" pfns dirty iff a stage-2 PTE is installed

2024-08-06 Thread Anup Patel
fix, this paves the way for converting > RISC-V to use kvm_release_faultin_page(). > > Signed-off-by: Sean Christopherson For KVM RISC-V: Acked-by: Anup Patel Regards, Anup > --- > arch/riscv/kvm/mmu.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > dif

Re: [PATCH v8 4/5] KVM: riscv: selftests: Fix compile error

2024-07-28 Thread Anup Patel
On Fri, Jul 26, 2024 at 2:19 PM Yong-Xuan Wang wrote: > > Fix compile error introduced by commit d27c34a73514 ("KVM: riscv: > selftests: Add some Zc* extensions to get-reg-list test"). These > 4 lines should be end with ";". > > Fixes: d27c34a73514 ("KVM: riscv: selftests: Add some Zc* extensions

Re: [PATCH v5 05/16] KVM: riscv: selftests: Add Zimop extension to get-reg-list test

2024-05-17 Thread Anup Patel
On Fri, May 17, 2024 at 8:23 PM Clément Léger wrote: > > The KVM RISC-V allows Zimop extension for Guest/VM so add this > extension to get-reg-list test. > > Signed-off-by: Clément Léger LGTM. Reviewed-by: Anup Patel Acked-by: Anup Patel Regards, Anup > --- > tools/

Re: [PATCH v5 04/16] RISC-V: KVM: Allow Zimop extension for Guest/VM

2024-05-17 Thread Anup Patel
On Fri, May 17, 2024 at 8:23 PM Clément Léger wrote: > > Extend the KVM ISA extension ONE_REG interface to allow KVM user space > to detect and enable Zimop extension for Guest/VM. > > Signed-off-by: Clément Léger LGTM. Reviewed-by: Anup Patel Acked-by: Anup Patel

Re: [PATCH v8 00/24] RISC-V SBI v2.0 PMU improvements and Perf sampling in KVM guest

2024-04-29 Thread Anup Patel
Hi Palmer, On Mon, Apr 22, 2024 at 3:29 PM Anup Patel wrote: > > On Sat, Apr 20, 2024 at 5:17 AM Atish Patra wrote: > > > > This series implements SBI PMU improvements done in SBI v2.0[1] i.e. PMU > > snapshot > > and fw_read_hi() functions. > > > >

Re: [PATCH v8 00/24] RISC-V SBI v2.0 PMU improvements and Perf sampling in KVM guest

2024-04-22 Thread Anup Patel
On Sat, Apr 20, 2024 at 5:17 AM Atish Patra wrote: > > This series implements SBI PMU improvements done in SBI v2.0[1] i.e. PMU > snapshot > and fw_read_hi() functions. > > SBI v2.0 introduced PMU snapshot feature which allows the SBI implementation > to provide counter information (i.e. values/o

Re: [PATCH v8 24/24] KVM: riscv: selftests: Add commandline option for SBI PMU test

2024-04-21 Thread Anup Patel
ents or all ISA extensions. > > The commandline option allows user to disable any set of tests if > they want to. > > Suggested-by: Andrew Jones > Signed-off-by: Atish Patra LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > .../selftests/kvm/riscv/sbi_pmu_test.c

Re: [PATCH v8 18/24] KVM: riscv: selftests: Add helper functions for extension checks

2024-04-21 Thread Anup Patel
e to worry about the conversions. > > Replace the current usages as well with new helpers. > > Reviewed-by: Andrew Jones > Signed-off-by: Atish Patra LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > tools/testing/selftests/kvm/include/riscv/processor.h | 10 ++

Re: [PATCH v8 17/24] KVM: riscv: selftests: Move sbi definitions to its own header file

2024-04-21 Thread Anup Patel
On Sat, Apr 20, 2024 at 5:18 AM Atish Patra wrote: > > The SBI definitions will continue to grow. Move the sbi related > definitions to its own header file from processor.h > > Suggested-by: Andrew Jones > Reviewed-by: Andrew Jones > Signed-off-by: Atish Patra LGTM. Re

Re: [PATCH v8 16/24] RISC-V: KVM: Improve firmware counter read function

2024-04-21 Thread Anup Patel
On Sat, Apr 20, 2024 at 5:18 AM Atish Patra wrote: > > Rename the function to indicate that it is meant for firmware > counter read. While at it, add a range sanity check for it as > well. > > Reviewed-by: Andrew Jones > Signed-off-by: Atish Patra LGTM. Reviewed-by: Anup

Re: [PATCH v8 10/24] RISC-V: KVM: Fix the initial sample period value

2024-04-21 Thread Anup Patel
d-off-by: Atish Patra LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > arch/riscv/kvm/vcpu_pmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/kvm/vcpu_pmu.c b/arch/riscv/kvm/vcpu_pmu.c > index 86391a5061dd..cee1b9ca4ec4 100644 &g

Re: [PATCH v2 00/12] Add support for a few Zc* extensions as well as Zcmop

2024-04-18 Thread Anup Patel
Hi Palmer, On Thu, Apr 18, 2024 at 6:13 PM Clément Léger wrote: > > Add support for (yet again) more RVA23U64 missing extensions. Add > support for Zcmop, Zca, Zcf, Zcd and Zcb extensions isa string parsing, > hwprobe and kvm support. Zce, Zcmt and Zcmp extensions have been left > out since they

Re: [PATCH v2 12/12] KVM: riscv: selftests: Add Zcmop extension to get-reg-list test

2024-04-18 Thread Anup Patel
On Thu, Apr 18, 2024 at 6:14 PM Clément Léger wrote: > > The KVM RISC-V allows Zcmop extension for Guest/VM so add this > extension to get-reg-list test. > > Signed-off-by: Clément Léger LGTM. Reviewed-by: Anup Patel Acked-by: Anup Patel Thanks, Anup > --- > tools/

Re: [PATCH v2 11/12] RISC-V: KVM: Allow Zcmop extension for Guest/VM

2024-04-18 Thread Anup Patel
On Thu, Apr 18, 2024 at 6:14 PM Clément Léger wrote: > > Extend the KVM ISA extension ONE_REG interface to allow KVM user space > to detect and enable Zcmop extension for Guest/VM. > > Signed-off-by: Clément Léger LGTM. Reviewed-by: Anup Patel Acked-by: Anup Patel

Re: [PATCH v2 07/12] KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test

2024-04-18 Thread Anup Patel
On Thu, Apr 18, 2024 at 6:14 PM Clément Léger wrote: > > The KVM RISC-V allows Zca, Zcf, Zcd and Zcb extensions for Guest/VM so > add these extensions to get-reg-list test. > > Signed-off-by: Clément Léger LGTM. Reviewed-by: Anup Patel Acked-by: Anup Patel Thanks, Anup

Re: [PATCH v2 06/12] RISC-V: KVM: Allow Zca, Zcf, Zcd and Zcb extensions for Guest/VM

2024-04-18 Thread Anup Patel
On Thu, Apr 18, 2024 at 6:14 PM Clément Léger wrote: > > Extend the KVM ISA extension ONE_REG interface to allow KVM user space > to detect and enable Zca, Zcf, Zcd and Zcb extensions for Guest/VM. > > Signed-off-by: Clément Léger LGTM. Reviewed-by: Anup Patel Acked-by: Anup

Re: [PATCH 1/4] KVM: delete .change_pte MMU notifier callback

2024-04-06 Thread Anup Patel
e generic KVM code that dispatches to kvm_set_spte_gfn(), as > well as all the architecture specific implementations. > > Signed-off-by: Paolo Bonzini For KVM RISC-V: Acked-by: Anup Patel Regards, Anup > --- > arch/arm64/kvm/mmu.c | 34 -

Re: [PATCH 1/4] KVM: delete .change_pte MMU notifier callback

2024-04-06 Thread Anup Patel
e generic KVM code that dispatches to kvm_set_spte_gfn(), as > well as all the architecture specific implementations. > > Signed-off-by: Paolo Bonzini For KVM RISC-V: Acked-by: Anup Patel Regards, Anup > --- > arch/arm64/kvm/mmu.c | 34 -

Re: [PATCH] KVM: riscv: selftests: Add SBI base extension test

2024-04-06 Thread Anup Patel
On Sun, Apr 7, 2024 at 8:11 AM Haibo Xu wrote: > > On Tue, Apr 2, 2024 at 10:12 PM Andrew Jones wrote: > > > > On Mon, Apr 01, 2024 at 04:20:18PM +0800, Haibo Xu wrote: > > > This is the first patch to enable the base extension selftest > > > for the SBI implementation in KVM. Test for other exte

Re: [PATCH][next] KVM: selftests: Fix spelling mistake "trigged" -> "triggered"

2024-03-25 Thread Anup Patel
On Thu, Mar 7, 2024 at 1:49 PM Colin Ian King wrote: > > There are spelling mistakes in __GUEST_ASSERT messages. Fix them. > > Signed-off-by: Colin Ian King Queued this patch for Linux-6.9 fixes. Thanks, Anup > --- > tools/testing/selftests/kvm/aarch64/arch_timer.c | 2 +- > tools/testing/sel

Re: [PATCH][next] KVM: selftests: Fix spelling mistake "trigged" -> "triggered"

2024-03-07 Thread Anup Patel
On Fri, Mar 8, 2024 at 3:47 AM Oliver Upton wrote: > > Thanks for the fix Colin. Paolo/Anup, up to you how you want to play it, > I see the 6.9 PR is already out for riscv. > > Acked-by: Oliver Upton I can take this as a Linux-6.9-rcX fix if everyone is okay with it. Regards, Anup > > On Thu,

[PATCH 0/2] RISC-V APLIC fixes

2024-03-06 Thread Anup Patel
Few fixes for RISC-V APLIC discovered during Linux AIA patch reviews. These patches can also be found in the apatel_aplic_fixes_v1 branch at: https://github.com/avpatel/qemu.git Anup Patel (2): hw/intc/riscv_aplic: Fix setipnum_le write emulation for APLIC MSI-mode hw/intc/riscv_aplic

[PATCH 2/2] hw/intc/riscv_aplic: Fix in_clrip[x] read emulation

2024-03-06 Thread Anup Patel
lue = (incoming wire value) XOR (source is inverted)" Update the riscv_aplic_read_input_word() implementation to match the above. Fixes: e8f79343cfc8 ("hw/intc: Add RISC-V AIA APLIC device emulation") Signed-off-by: Anup Patel --- hw/intc/riscv_aplic.c | 17 +++-- 1 fil

[PATCH 1/2] hw/intc/riscv_aplic: Fix setipnum_le write emulation for APLIC MSI-mode

2024-03-06 Thread Anup Patel
d RISC-V AIA APLIC device emulation") Signed-off-by: Anup Patel --- hw/intc/riscv_aplic.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/hw/intc/riscv_aplic.c b/hw/intc/riscv_aplic.c index e98e258deb..775bb96164 100644 --- a/hw/intc/riscv_aplic.c +++ b/hw

Re: [PATCH v3 2/2] riscv: Fix text patching when IPI are used

2024-03-04 Thread Anup Patel
On Tue, Mar 5, 2024 at 1:54 AM Björn Töpel wrote: > > Conor Dooley writes: > > > On Thu, Feb 29, 2024 at 01:10:56PM +0100, Alexandre Ghiti wrote: > >> For now, we use stop_machine() to patch the text and when we use IPIs for > >> remote icache flushes (which is emitted in patch_text_nosync()), th

Re: [PATCH 0/5] KVM RISC-V report few more ISA extensions through ONE_REG

2024-03-01 Thread Anup Patel
On Wed, Feb 14, 2024 at 6:08 PM Anup Patel wrote: > > This series extends the KVM RISC-V ONE_REG interface to report few more > ISA extensions namely: Ztso and Zacas. These extensions are already > supported by the HWPROBE interface in Linux-6.8 kernel. > > To test these patches

Re: [PATCH v4 15/15] KVM: riscv: selftests: Add a test for counter overflow

2024-02-29 Thread Anup Patel
ISA extensions to detect if a platform supports that. Thus, > this test will fail on platform with virtualization but doesn't > support overflow on these two events. > > Signed-off-by: Atish Patra LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > tools/testi

Re: [PATCH v4 14/15] KVM: riscv: selftests: Add a test for PMU snapshot functionality

2024-02-29 Thread Anup Patel
On Thu, Feb 29, 2024 at 6:32 AM Atish Patra wrote: > > Verify PMU snapshot functionality by setting up the shared memory > correctly and reading the counter values from the shared memory > instead of the CSR. > > Signed-off-by: Atish Patra LGTM. Reviewed-by: Anup Pat

Re: [PATCH v4 13/15] KVM: riscv: selftests: Add SBI PMU selftest

2024-02-29 Thread Anup Patel
at the time of merging. Reviewed-by: Anup Patel Regards, Anup > --- > tools/testing/selftests/kvm/Makefile| 1 + > tools/testing/selftests/kvm/riscv/sbi_pmu.c | 340 > 2 files changed, 341 insertions(+) > create mode 100644 tools/testing/selftest

Re: [PATCH v4 12/15] KVM: riscv: selftests: Add SBI PMU extension definitions

2024-02-29 Thread Anup Patel
On Thu, Feb 29, 2024 at 6:32 AM Atish Patra wrote: > > The SBI PMU extension definition is required for upcoming SBI PMU > selftests. > > Signed-off-by: Atish Patra LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > .../selftests/kvm/include/ris

Re: [PATCH v4 11/15] KVM: riscv: selftests: Add Sscofpmf to get-reg-list test

2024-02-29 Thread Anup Patel
On Thu, Feb 29, 2024 at 6:32 AM Atish Patra wrote: > > The KVM RISC-V allows Sscofpmf extension for Guest/VM so let us > add this extension to get-reg-list test. > > Signed-off-by: Atish Patra LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > tools/testing/selfte

Re: [PATCH v3 0/2] Export debug triggers as an extension

2024-02-29 Thread Anup Patel
On Thu, Feb 29, 2024 at 8:42 PM Andrew Jones wrote: > > On Thu, Feb 29, 2024 at 07:07:43PM +0530, Himanshu Chauhan wrote: > > All the CPUs may or may not implement the debug triggers (sdtrig) > > extension. The presence of it should be dynamically detectable. > > This patch exports the debug trigg

Re: [PATCH v5 11/12] KVM: riscv: selftests: Change vcpu_has_ext to a common function

2024-02-25 Thread Anup Patel
On Wed, Feb 21, 2024 at 2:07 PM Atish Patra wrote: > > On 2/20/24 18:13, Haibo Xu wrote: > > On Wed, Feb 21, 2024 at 7:03 AM Atish Patra wrote: > >> > >> On Mon, Jan 22, 2024 at 1:48 AM Haibo Xu wrote: > >>> > >>> Move vcpu_has_ext to the processor.c and rename it to __vcpu_has_ext > >>> so that

Re: [PATCH] tty: hvc: Don't enable the RISC-V SBI console by default

2024-02-14 Thread Anup Patel
gt; Signed-off-by: Palmer Dabbelt LTGM. Reviewed-by: Anup Patel Regards, Anup > --- > drivers/tty/hvc/Kconfig | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/tty/hvc/Kconfig b/drivers/tty/hvc/Kconfig > index 6e05c5c7bca1..c2a4e88b328

[PATCH 5/5] KVM: riscv: selftests: Add Zacas extension to get-reg-list test

2024-02-14 Thread Anup Patel
The KVM RISC-V allows Zacas extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Anup Patel --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools

[PATCH 4/5] RISC-V: KVM: Allow Zacas extension for Guest/VM

2024-02-14 Thread Anup Patel
We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zacas extension for Guest/VM. Signed-off-by: Anup Patel --- arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_onereg.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/riscv

[PATCH 3/5] KVM: riscv: selftests: Add Ztso extension to get-reg-list test

2024-02-14 Thread Anup Patel
The KVM RISC-V allows Ztso extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Anup Patel --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools

[PATCH 2/5] RISC-V: KVM: Allow Ztso extension for Guest/VM

2024-02-14 Thread Anup Patel
We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Ztso extension for Guest/VM. Signed-off-by: Anup Patel --- arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_onereg.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/riscv

[PATCH 1/5] RISC-V: KVM: Forward SEED CSR access to user space

2024-02-14 Thread Anup Patel
rypto extensions for Guest/VM") Signed-off-by: Anup Patel --- arch/riscv/kvm/vcpu_insn.c | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/riscv/kvm/vcpu_insn.c b/arch/riscv/kvm/vcpu_insn.c index 7a6abed41bc1..ee7215f4071f 100644 --- a/arch/riscv/kvm/vcpu_insn.c +++ b/arch

[PATCH 0/5] KVM RISC-V report few more ISA extensions through ONE_REG

2024-02-14 Thread Anup Patel
/avpatel/kvmtool.git These patches can also be found in the riscv_kvm_more_exts_round2_v1 branch at: https://github.com/avpatel/linux.git Anup Patel (5): RISC-V: KVM: Forward SEED CSR access to user space RISC-V: KVM: Allow Ztso extension for Guest/VM KVM: riscv: selftests: Add Ztso extension

Re: [PATCH v5 00/12] RISCV: Add kvm Sstc timer selftests

2024-02-12 Thread Anup Patel
On Mon, Jan 22, 2024 at 3:15 PM Haibo Xu wrote: > > The RISC-V arch_timer selftests is used to validate Sstc timer > functionality in a guest, which sets up periodic timer interrupts > and check the basic interrupt status upon its receipt. > > This KVM selftests was ported from aarch64 arch_timer

Re: Re: [PATCH 0/2] Export debug triggers as an extension

2024-02-04 Thread Anup Patel
On Mon, Feb 5, 2024 at 9:36 AM Alistair Francis wrote: > > On Mon, Jan 22, 2024 at 7:16 PM Andrew Jones wrote: > > > > On Mon, Jan 22, 2024 at 03:42:10PM +1000, Alistair Francis wrote: > > > > > From memory the "debug" property is for the original debug spec: > > > > > https://github.com/riscv/ri

Re: [PATCH v5 0/5] RISC-V SBI debug console extension support

2024-01-19 Thread Anup Patel
On Sat, Jan 20, 2024 at 3:29 AM Palmer Dabbelt wrote: > > On Fri, 19 Jan 2024 02:09:18 PST (-0800), apa...@ventanamicro.com wrote: > > On Sat, Jan 13, 2024 at 12:00 AM Palmer Dabbelt wrote: > >> > >> On Thu, 11 Jan 2024 06:50:37 PST (-0800), > >> patchwork-bot+linux-ri...@kernel.org wrote: > >>

Re: [PATCH v2] tty: hvc: Fix the RISC-V SBI driver for a refactoring

2024-01-19 Thread Anup Patel
> +static ssize_t hvc_sbi_dbcn_tty_put(uint32_t vtermno, const u8 *buf, size_t > count) > { > return sbi_debug_console_write(buf, count); > } > > -static int hvc_sbi_dbcn_tty_get(uint32_t vtermno, char *buf, int count) > +static ssize_t hvc_sbi_dbcn_tty_get(uint32_t vtermno, u8 *buf, size_t count) > { > return sbi_debug_console_read(buf, count); > } > -- > 2.43.0 > > Reviewed-by: Anup Patel Thanks, Anup

[PATCH v6 5/5] RISC-V: Enable SBI based earlycon support

2024-01-19 Thread Anup Patel
Let us enable SBI based earlycon support in defconfig for both RV32 and RV64 so that "earlycon=sbi" can be used again. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/defcon

[PATCH v6 4/5] tty: Add SBI debug console support to HVC SBI driver

2024-01-19 Thread Anup Patel
From: Atish Patra RISC-V SBI specification supports advanced debug console support via SBI DBCN extension. Extend the HVC SBI driver to support it. Signed-off-by: Atish Patra Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Acked-by: Greg Kroah-Hartman --- drivers/tty/hvc/Kconfig

[PATCH v6 3/5] tty/serial: Add RISC-V SBI debug console based earlycon

2024-01-19 Thread Anup Patel
We extend the existing RISC-V SBI earlycon support to use the new RISC-V SBI debug console extension. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Acked-by: Greg Kroah-Hartman --- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/earlycon-riscv-sbi.c | 27

[PATCH v6 2/5] RISC-V: Add SBI debug console helper routines

2024-01-19 Thread Anup Patel
Let us provide SBI debug console helper routines which can be shared by serial/earlycon-riscv-sbi.c and hvc/hvc_riscv_sbi.c. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- arch/riscv/include/asm/sbi.h | 5 +++ arch/riscv/kernel/sbi.c | 66 2

[PATCH v6 1/5] RISC-V: Add stubs for sbi_console_putchar/getchar()

2024-01-19 Thread Anup Patel
The functions sbi_console_putchar() and sbi_console_getchar() are not defined when CONFIG_RISCV_SBI_V01 is disabled so let us add stub of these functions to avoid "#ifdef" on user side. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- arch/riscv/include/asm/sbi.h | 5 +++

[PATCH v6 0/5] RISC-V SBI debug console extension support

2024-01-19 Thread Anup Patel
space have to explicitly opt-in for emulating SBI DBCN. - Introduced new PATCH5 in this series which adds inline version of sbi_console_getchar() and sbi_console_putchar() for the case where CONFIG_RISCV_SBI_V01 is disabled. Anup Patel (4): RISC-V: Add stubs for sbi_console_putchar/getcha

Re: [PATCH v5 0/5] RISC-V SBI debug console extension support

2024-01-19 Thread Anup Patel
On Sat, Jan 13, 2024 at 12:00 AM Palmer Dabbelt wrote: > > On Thu, 11 Jan 2024 06:50:37 PST (-0800), > patchwork-bot+linux-ri...@kernel.org wrote: > > Hello: > > > > This series was applied to riscv/linux.git (for-next) > > by Palmer Dabbelt : > > > > On Fri, 24 Nov 2023 12:39:00 +0530 you wrote:

Re: [PATCH v2 1/2] target/riscv: Convert sdtrig functionality from property to an extension

2024-01-18 Thread Anup Patel
On Wed, Jan 17, 2024 at 7:54 PM Himanshu Chauhan wrote: > > The debug trigger (sdtrig) capability is controlled using the debug property. > The sdtrig is an ISA extension and should be treated so. The sdtrig extension > may or may not be implemented in a system. Therefore, it must raise an illegal

Re: [PATCH -fixes v2] RISC-V: KVM: Require HAVE_KVM

2024-01-18 Thread Anup Patel
On Thu, Jan 18, 2024 at 11:10 PM Sean Christopherson wrote: > > On Thu, Jan 18, 2024, Anup Patel wrote: > > On Thu, Jan 4, 2024 at 6:07 PM Andrew Jones wrote: > > > > > > KVM requires EVENTFD, which is selected by HAVE_KVM. Other KVM > > > supporting archi

Re: [PATCH -fixes v2] RISC-V: KVM: Require HAVE_KVM

2024-01-18 Thread Anup Patel
On Thu, Jan 4, 2024 at 6:07 PM Andrew Jones wrote: > > KVM requires EVENTFD, which is selected by HAVE_KVM. Other KVM > supporting architectures select HAVE_KVM and then their KVM > Kconfigs ensure its there with a depends on HAVE_KVM. Make RISCV > consistent with that approach which fixes configs

Re: [PATCH 00/15] KVM RISC-V report more ISA extensions through ONE_REG

2024-01-18 Thread Anup Patel
On Tue, Nov 28, 2023 at 8:24 PM Anup Patel wrote: > > This extends the KVM RISC-V ONE_REG interface to report more ISA extensions > namely: Zbz, scalar crypto, vector crypto, Zfh[min], Zihintntl, Zvfh[min], > and Zfa. > > This series depends upon the "riscv: report more

Re: Re: [PATCH] RISC-V: KVM: Require HAVE_KVM

2024-01-04 Thread Anup Patel
On Thu, Jan 4, 2024 at 4:51 PM Andrew Jones wrote: > > On Thu, Jan 04, 2024 at 12:07:51PM +0100, Alexandre Ghiti wrote: > > On 04/01/2024 11:52, Andrew Jones wrote: > > > This applies to linux-next, but I forgot to append -next to the PATCH > > > prefix. > > > > > > Shoudn't this go to -fixes inst

Re: [PATCH v4 00/13] RISC-V: Add steal-time support

2023-12-28 Thread Anup Patel
On Wed, Dec 20, 2023 at 9:30 PM Andrew Jones wrote: > > One frequently touted benefit of virtualization is the ability to > consolidate machines, increasing resource utilization. It may even be > desirable to overcommit, at the risk of one or more VCPUs having to wait. > Hypervisors which have in

Re: [PATCH v4 00/13] RISC-V: Add steal-time support

2023-12-20 Thread Anup Patel
Hi Palmer, On Wed, Dec 20, 2023 at 9:30 PM Andrew Jones wrote: > > One frequently touted benefit of virtualization is the ability to > consolidate machines, increasing resource utilization. It may even be > desirable to overcommit, at the risk of one or more VCPUs having to wait. > Hypervisors w

Re: [PATCH v3 03/13] RISC-V: paravirt: Implement steal-time support

2023-12-19 Thread Anup Patel
Signed-off-by: Andrew Jones LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > arch/riscv/Kconfig | 19 +++ > arch/riscv/kernel/paravirt.c | 63 ++-- > 2 files changed, 79 insertions(+), 3 deletions(-) > > diff --git a/

Re: [PATCH v3 07/13] RISC-V: KVM: Add support for SBI extension registers

2023-12-19 Thread Anup Patel
extension registers. Each SBI extension that uses this type > > will have its own subtype. There are currently no subtypes defined. > > The next patch introduces the first one. > > > > Reviewed-by: Anup Patel > > Signed-off-by: Andrew Jones > > --- > > arch/r

Re: [PATCH v2 13/13] RISC-V: KVM: selftests: Add get-reg-list test for STA registers

2023-12-15 Thread Anup Patel
On Thu, Dec 14, 2023 at 3:46 PM Andrew Jones wrote: > > Add SBI STA and its two registers to the get-reg-list test. > > Signed-off-by: Andrew Jones LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > .../selftests/kvm/riscv/get-reg-list.c| 43 +++

Re: [PATCH v2 12/13] RISC-V: KVM: selftests: Add steal_time test support

2023-12-15 Thread Anup Patel
On Thu, Dec 14, 2023 at 3:46 PM Andrew Jones wrote: > > With the introduction of steal-time accounting support for > RISC-V KVM we can add RISC-V support to the steal_time test. > > Signed-off-by: Andrew Jones LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > tools/

Re: [PATCH v2 11/13] RISC-V: KVM: selftests: Add guest_sbi_probe_extension

2023-12-15 Thread Anup Patel
ll current extension IDs or base > extension function IDs though, even though we need one of each, > because we'd prefer to bring those in as necessary. > > Signed-off-by: Andrew Jones LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > .../sel

Re: [PATCH v2 10/13] RISC-V: KVM: selftests: Move sbi_ecall to processor.c

2023-12-15 Thread Anup Patel
On Thu, Dec 14, 2023 at 3:46 PM Andrew Jones wrote: > > sbi_ecall() isn't ucall specific and its prototype is already in > processor.h. Move its implementation to processor.c. > > Signed-off-by: Andrew Jones LGTM. Reviewed-by: Anup Patel --- > .../selftests/kv

Re: [PATCH v2 09/13] RISC-V: KVM: Implement SBI STA extension

2023-12-15 Thread Anup Patel
> Signed-off-by: Andrew Jones LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > arch/riscv/kvm/Kconfig| 1 + > arch/riscv/kvm/vcpu_sbi_sta.c | 96 ++- > 2 files changed, 95 insertions(+), 2 deletions(-) > > diff --git a/arc

Re: [PATCH v2 08/13] RISC-V: KVM: Add support for SBI STA registers

2023-12-15 Thread Anup Patel
userspace must not set the hi register to anything other > than zero and is allowed to completely neglect saving/restoring it. > > Signed-off-by: Andrew Jones LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > arch/riscv/include/asm/kvm_vcpu_sbi.h | 5 +++ > arch/risc

Re: [PATCH v2 07/13] RISC-V: KVM: Add support for SBI extension registers

2023-12-15 Thread Anup Patel
type. There are currently no subtypes defined. > The next patch introduces the first one. > > Signed-off-by: Andrew Jones LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > arch/riscv/include/asm/kvm_vcpu_sbi.h | 4 ++ > arch/riscv/include/uapi/asm/kvm.h | 3 +

Re: [PATCH v2 06/13] RISC-V: KVM: Add SBI STA info to vcpu_arch

2023-12-15 Thread Anup Patel
(struct kvm_vcpu *vcpu) > { > + gpa_t shmem = vcpu->arch.sta.shmem; > + > + if (shmem == INVALID_GPA) > + return; > } > > static int kvm_sbi_sta_steal_time_set_shmem(struct kvm_vcpu *vcpu) > -- > 2.43.0 > Apart from the above, it looks good to me. Reviewed-by: Anup Patel Regards, Anup

Re: [PATCH v2 05/13] RISC-V: KVM: Add steal-update vcpu request

2023-12-14 Thread Anup Patel
o by making the request from vcpu-load. The record > function is just a stub for now and will be filled in with the rest > of the steal-time support functions in following patches. > > Signed-off-by: Andrew Jones LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > arch

Re: [PATCH v2 04/13] RISC-V: KVM: Add SBI STA extension skeleton

2023-12-14 Thread Anup Patel
On Thu, Dec 14, 2023 at 3:46 PM Andrew Jones wrote: > > Add the files and functions needed to support the SBI STA > (steal-time accounting) extension. In the next patches we'll > complete the functions to fully enable SBI STA support. > > Signed-off-by: Andrew Jones L

Re: [PATCH v2 03/13] RISC-V: paravirt: Implement steal-time support

2023-12-14 Thread Anup Patel
On Thu, Dec 14, 2023 at 3:45 PM Andrew Jones wrote: > > When the SBI STA extension exists we can use it to implement > paravirt steal-time support. Fill in the empty pv-time functions > with an SBI STA implementation and add the Kconfig knobs allowing > it to be enabled. > > Signed-off-by: Andrew

Re: [PATCH v2 02/13] RISC-V: Add SBI STA extension definitions

2023-12-14 Thread Anup Patel
On Thu, Dec 14, 2023 at 3:45 PM Andrew Jones wrote: > > The SBI STA extension enables steal-time accounting. Add the > definitions it specifies. > > Signed-off-by: Andrew Jones > Reviewed-by: Conor Dooley LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > arch

Re: [PATCH v2 01/13] RISC-V: paravirt: Add skeleton for pv-time support

2023-12-14 Thread Anup Patel
ions to fully enable steal-time > support. > > Signed-off-by: Andrew Jones LGTM. Reviewed-by: Anup Patel Regards, Anup > --- > .../admin-guide/kernel-parameters.txt | 6 +- > arch/riscv/include/asm/paravirt.h | 28 +++ > arch/riscv/include/asm/pa

Re: [PATCH v4 11/11] KVM: selftests: Enable tunning of err_margin_us in arch timer test

2023-12-13 Thread Anup Patel
Hi Marc, Hi Oliver, On Tue, Dec 12, 2023 at 2:52 PM Haibo Xu wrote: > > There are intermittent failures occured when stressing the > arch-timer test in a Qemu VM: > > Guest assert failed, vcpu 0; stage; 4; iter: 3 > Test Assertion Failure >aarch64/arch_timer.c:196: config_iter +

Re: [PATCH v4 02/11] KVM: arm64: selftests: Split arch_timer test code

2023-12-13 Thread Anup Patel
Hi Marc, Hi Oliver, On Tue, Dec 12, 2023 at 2:49 PM Haibo Xu wrote: > > Split the arch-neutral test code out of aarch64/arch_timer.c > and put them into a common arch_timer.c. This is a preparation > to share timer test codes in riscv. > > Suggested-by: Andrew Jones > Signed-off-by: Haibo Xu >

Re: [PATCH 26/26] KVM: Hide KVM internal data structures and values from kernel at-large

2023-12-13 Thread Anup Patel
few PPC includes and an s390 declaration as needed, and > opportunistically include kvm_host.h in trace/events.kvm.h instead of > relying on the parent to provide the right includes. > > Cc: Anish Ghulati > Cc: Venkatesh Srinivas > Cc: Andrew Thornton > Signed-off-by: Sean

Re: [PATCH 22/26] entry/kvm: KVM: Move KVM details related to signal/-EINTR into KVM proper

2023-12-13 Thread Anup Patel
not obviously better than having KVM > react to -EINTR (though it's not obviously worse either). > > Signed-off-by: Sean Christopherson For KVM RISC-V: Anup Patel Regards, Anup > --- > arch/arm64/kvm/arm.c | 3 +-- > arch/riscv/kvm/vcpu.c | 2 +- > arch/x86

Re: [PATCH 19/26] KVM: Standardize include paths across all architectures

2023-12-13 Thread Anup Patel
ate, as both s390 > and PPC switched to the overwrite behavior without so much as a passing > mention when EXTRA_CFLAGS was replaced with ccflags-y (commit c73028a02887 > ("s390: change to new flag variable") and commit 4108d9ba9091 > ("powerpc/Makefiles: Change to new f

Re: [PATCH 15/26] KVM: Move include/kvm/iodev.h to include/linux as kvm_iodev.h

2023-12-13 Thread Anup Patel
On Sat, Sep 16, 2023 at 6:01 AM Sean Christopherson wrote: > > Move iodev.h, the last remaining holdout in include/kvm, to the standard > include/linux directory as kvm_iodev.h and delete include/kvm. > > Signed-off-by: Sean Christopherson For KVM RISC-V: Acked-by: Anup Patel

Re: [PATCH 01/15] KVM: riscv: selftests: Generate ISA extension reg_list using macros

2023-12-13 Thread Anup Patel
On Wed, Dec 13, 2023 at 9:22 PM Andrew Jones wrote: > > On Tue, Nov 28, 2023 at 08:23:43PM +0530, Anup Patel wrote: > > Various ISA extension reg_list have common pattern so let us generate > > these using macros. > > > > We define two macro

[PATCH 13/15] KVM: riscv: selftests: Add Zvfh[min] extensions to get-reg-list test

2023-11-28 Thread Anup Patel
The KVM RISC-V allows Zvfh[min] extensions for Guest/VM so let us add these extensions to get-reg-list test. Signed-off-by: Anup Patel --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg

[PATCH 12/15] RISC-V: KVM: Allow Zvfh[min] extensions for Guest/VM

2023-11-28 Thread Anup Patel
We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zvfh[min] extensions for Guest/VM. Signed-off-by: Anup Patel --- arch/riscv/include/uapi/asm/kvm.h | 2 ++ arch/riscv/kvm/vcpu_onereg.c | 4 2 files changed, 6 insertions(+) diff --git a

[PATCH 11/15] KVM: riscv: selftests: Add Zihintntl extension to get-reg-list test

2023-11-28 Thread Anup Patel
The KVM RISC-V allows Zihintntl extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Anup Patel --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b

[PATCH 10/15] RISC-V: KVM: Allow Zihintntl extension for Guest/VM

2023-11-28 Thread Anup Patel
We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zihintntl extension for Guest/VM. Signed-off-by: Anup Patel --- arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_onereg.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch

[PATCH 08/15] RISC-V: KVM: Allow Zfh[min] extensions for Guest/VM

2023-11-28 Thread Anup Patel
We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zfh[min] extensions for Guest/VM. Signed-off-by: Anup Patel --- arch/riscv/include/uapi/asm/kvm.h | 2 ++ arch/riscv/kvm/vcpu_onereg.c | 4 2 files changed, 6 insertions(+) diff --git a

[PATCH 09/15] KVM: riscv: selftests: Add Zfh[min] extensions to get-reg-list test

2023-11-28 Thread Anup Patel
The KVM RISC-V allows Zfh[min] extensions for Guest/VM so let us add these extensions to get-reg-list test. Signed-off-by: Anup Patel --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c

[PATCH 07/15] KVM: riscv: selftests: Add vector crypto extensions to get-reg-list test

2023-11-28 Thread Anup Patel
The KVM RISC-V allows vector crypto extensions for Guest/VM so let us add these extensions to get-reg-list test. This includes extensions Zvbb, Zvbc, Zvkb, Zvkg, Zvkned, Zvknha, Zvknhb, Zvksed, Zvksh, and Zvkt. Signed-off-by: Anup Patel --- .../selftests/kvm/riscv/get-reg-list.c| 40

[PATCH 06/15] RISC-V: KVM: Allow vector crypto extensions for Guest/VM

2023-11-28 Thread Anup Patel
We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable vector crypto extensions for Guest/VM. This includes extensions Zvbb, Zvbc, Zvkb, Zvkg, Zvkned, Zvknha, Zvknhb, Zvksed, Zvksh, and Zvkt. Signed-off-by: Anup Patel --- arch/riscv/include/uapi/asm/kvm.h

[PATCH 04/15] RISC-V: KVM: Allow scalar crypto extensions for Guest/VM

2023-11-28 Thread Anup Patel
We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable scalar crypto extensions for Guest/VM. This includes extensions Zbkb, Zbkc, Zbkx, Zknd, Zkne, Zknh, Zkr, Zksed, Zksh, and Zkt. Signed-off-by: Anup Patel --- arch/riscv/include/uapi/asm/kvm.h | 10

[PATCH 03/15] KVM: riscv: selftests: Add Zbc extension to get-reg-list test

2023-11-28 Thread Anup Patel
The KVM RISC-V allows Zbc extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Anup Patel --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools

  1   2   3   4   5   6   7   8   9   10   >