Re: [PATCH v4 5/7] xen/riscv: introduce and initialize SBI RFENCE extension

2024-08-16 Thread Jan Beulich
On 16.08.2024 14:06, oleksii.kuroc...@gmail.com wrote: > On Tue, 2024-08-13 at 11:34 +0200, Jan Beulich wrote: >>>   >>> +static unsigned long sbi_spec_version = SBI_SPEC_VERSION_DEFAULT; >>> +static unsigned long sbi_fw_id, sbi_fw_version; >> >> __ro_after_init for perhaps all three of them? >> >

Re: [PATCH v4 5/7] xen/riscv: introduce and initialize SBI RFENCE extension

2024-08-16 Thread oleksii . kurochko
On Tue, 2024-08-13 at 11:34 +0200, Jan Beulich wrote: > >   > > +static unsigned long sbi_spec_version = SBI_SPEC_VERSION_DEFAULT; > > +static unsigned long sbi_fw_id, sbi_fw_version; > > __ro_after_init for perhaps all three of them? > > Considering SBI_SPEC_VERSION_{MAJOR,MINOR}_MASK, at least

Re: [PATCH v4 5/7] xen/riscv: introduce and initialize SBI RFENCE extension

2024-08-15 Thread Jan Beulich
On 15.08.2024 12:00, oleksii.kuroc...@gmail.com wrote: > On Wed, 2024-08-14 at 17:53 +0200, Jan Beulich wrote: >> On 14.08.2024 17:41, oleksii.kuroc...@gmail.com wrote: >>> On Tue, 2024-08-13 at 11:34 +0200, Jan Beulich wrote: On 09.08.2024 18:19, Oleksii Kurochko wrote: > +static unsigned

Re: [PATCH v4 5/7] xen/riscv: introduce and initialize SBI RFENCE extension

2024-08-15 Thread oleksii . kurochko
On Wed, 2024-08-14 at 17:53 +0200, Jan Beulich wrote: > On 14.08.2024 17:41, oleksii.kuroc...@gmail.com wrote: > > On Tue, 2024-08-13 at 11:34 +0200, Jan Beulich wrote: > > > On 09.08.2024 18:19, Oleksii Kurochko wrote: > > > > +static unsigned long sbi_major_version(void) > > > > +{ > > > > +    r

Re: [PATCH v4 5/7] xen/riscv: introduce and initialize SBI RFENCE extension

2024-08-14 Thread Jan Beulich
On 14.08.2024 17:41, oleksii.kuroc...@gmail.com wrote: > On Tue, 2024-08-13 at 11:34 +0200, Jan Beulich wrote: >> On 09.08.2024 18:19, Oleksii Kurochko wrote: >>> +static unsigned long sbi_major_version(void) >>> +{ >>> +    return (sbi_spec_version >> SBI_SPEC_VERSION_MAJOR_SHIFT) & >>> +    S

Re: [PATCH v4 5/7] xen/riscv: introduce and initialize SBI RFENCE extension

2024-08-14 Thread oleksii . kurochko
On Tue, 2024-08-13 at 11:34 +0200, Jan Beulich wrote: > On 09.08.2024 18:19, Oleksii Kurochko wrote: > > > --- a/xen/arch/riscv/sbi.c > > +++ b/xen/arch/riscv/sbi.c > > @@ -7,11 +7,23 @@ > >   * Modified by Bobby Eshleman (bobby.eshle...@gmail.com). > >   * > >   * Copyright (c) 2019 Western Digit

Re: [PATCH v4 5/7] xen/riscv: introduce and initialize SBI RFENCE extension

2024-08-13 Thread Jan Beulich
On 09.08.2024 18:19, Oleksii Kurochko wrote: > @@ -31,4 +65,34 @@ struct sbiret sbi_ecall(unsigned long ext, unsigned long > fid, > */ > void sbi_console_putchar(int ch); > > +/* > + * Check underlying SBI implementation has RFENCE > + * > + * @return 1 for supported AND 0 for not-supported >

[PATCH v4 5/7] xen/riscv: introduce and initialize SBI RFENCE extension

2024-08-09 Thread Oleksii Kurochko
Introduce functions to work with the SBI RFENCE extension for issuing various fence operations to remote CPUs. Add the sbi_init() function along with auxiliary functions and macro definitions for proper initialization and checking the availability of SBI extensions. Currently, this is implemented