All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Alistair Francis" <alistair.francis@wdc.com>,
	"Bob Eshleman" <bobbyeshleman@gmail.com>,
	"Connor Davis" <connojdavis@gmail.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Julien Grall" <julien@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3 2/3] xen/riscv: add RISC-V legacy SBI extension support for guests
Date: Wed, 24 Dec 2025 10:05:49 +0100	[thread overview]
Message-ID: <ace5aa8d-d192-4f6e-a0b7-0005f759d151@gmail.com> (raw)
In-Reply-To: <74eec4dc-de48-4060-8f87-ba04023fda17@suse.com>


On 12/23/25 5:11 PM, Jan Beulich wrote:
> On 22.12.2025 17:37, Oleksii Kurochko wrote:
>> +static int vsbi_legacy_ecall_handler(unsigned long eid, unsigned long fid,
>> +                                     struct cpu_user_regs *regs)
>> +{
>> +    int ret = 0;
>> +
>> +    switch ( eid )
>> +    {
>> +    case SBI_EXT_0_1_CONSOLE_PUTCHAR:
>> +        vsbi_print_char(regs->a0);
>> +        break;
>> +
>> +    case SBI_EXT_0_1_CONSOLE_GETCHAR:
>> +        ret = SBI_ERR_NOT_SUPPORTED;
>> +        break;
>> +
>> +    default:
>> +        /*
>> +         * TODO: domain_crash() is acceptable here while things are still under
>> +         * development.
>> +         * It shouldn't stay like this in the end though: guests should not
>> +         * be punished like this for something Xen hasn't implemented.
>> +         */
>> +        domain_crash(current->domain,
>> +                     "%s: Unsupported ecall: FID: #%lx, EID: #%lx\n",
> Hmm, wait - patch 1 says you would consistently use #%lu for FIDs. I can adjust
> while committing, unless you tell me not to.

I think that we should drop printing FID at all for Legacy extension as according to
the spec.:
   The SBI function ID field in a6 register is ignored because these are encoded as multiple SBI
   extension IDs.
And according to "Function Listing" FID will be 0:
   https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/src/ext-legacy.adoc#function-listing

I would be happy if you could drop printing of FID during commit. Let me know if you want me to
drop printing of FID in the next patch series version.

Thanks.

~ Oleksii



  reply	other threads:[~2025-12-24  9:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-22 16:37 [PATCH v3 0/3] RISC-V: Introduce vSBI framework Oleksii Kurochko
2025-12-22 16:37 ` [PATCH v3 1/3] xen/riscv: introduce vSBI extension framework Oleksii Kurochko
2025-12-23 16:02   ` Jan Beulich
2025-12-22 16:37 ` [PATCH v3 2/3] xen/riscv: add RISC-V legacy SBI extension support for guests Oleksii Kurochko
2025-12-23 16:07   ` Jan Beulich
2025-12-23 16:11   ` Jan Beulich
2025-12-24  9:05     ` Oleksii Kurochko [this message]
2025-12-24  9:43       ` Oleksii Kurochko
2025-12-22 16:37 ` [PATCH v3 3/3] xen/riscv: add RISC-V virtual SBI base " Oleksii Kurochko
2025-12-23 16:13   ` Jan Beulich
2025-12-24  9:18     ` Oleksii Kurochko

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=ace5aa8d-d192-4f6e-a0b7-0005f759d151@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=alistair.francis@wdc.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=bobbyeshleman@gmail.com \
    --cc=connojdavis@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.