From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0AA39E7542A for ; Wed, 24 Dec 2025 09:06:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1192856.1511915 (Exim 4.92) (envelope-from ) id 1vYKod-0005a4-28; Wed, 24 Dec 2025 09:05:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1192856.1511915; Wed, 24 Dec 2025 09:05:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vYKoc-0005Zx-Vf; Wed, 24 Dec 2025 09:05:54 +0000 Received: by outflank-mailman (input) for mailman id 1192856; Wed, 24 Dec 2025 09:05:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vYKob-0005Zr-UV for xen-devel@lists.xenproject.org; Wed, 24 Dec 2025 09:05:54 +0000 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [2a00:1450:4864:20::633]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bee024db-e0a7-11f0-b15c-2bf370ae4941; Wed, 24 Dec 2025 10:05:52 +0100 (CET) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-b736d883ac4so1006136266b.2 for ; Wed, 24 Dec 2025 01:05:51 -0800 (PST) Received: from [192.168.1.6] (user-109-243-71-38.play-internet.pl. [109.243.71.38]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b80464e01d9sm1568956866b.42.2025.12.24.01.05.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Dec 2025 01:05:50 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bee024db-e0a7-11f0-b15c-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766567151; x=1767171951; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gesNZNDeS2jPSBits+A/Y3F+dFVM+6O+52QZzdLbCII=; b=ho8QS3iSTgqDfCXijJLA2zxD1vBWyDdCJ7W4sjWix+g5Xq6k2nqfjefYoF0nz7PN0y uts/3AitU8zAYol+mGBJ0cvi9U5/NHmIhUrnUh3kMLgT8U4WQ31/Cklii28FxY+MNdcX 2pEBAJfX/rRcH6sEMQbGmfD5t4xTmMuo1XJgF1OdoeFyjXV+I0N3PhtJLsboQIuAiQ0d BJR9/c7Iivu9H5xEHugPc2iuPFF/txwc+F46jgjNUOghCg1SVUWfjO/sC7KBKzYy9nRQ mGPKDT+kIICMtETnM436gzhpm4BwHTEwP3KgN4lEN286nKaNb0nPFnBjll4CvG8AL+KU VRMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766567151; x=1767171951; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gesNZNDeS2jPSBits+A/Y3F+dFVM+6O+52QZzdLbCII=; b=aF/G5YxJRGQXyAbCKblqsaahIEJ7Hw2BlG7PtVnUGtpt7Etw+RJOB+WSfD5KfVMG0C mS9vSa4WRseZd2CrL/R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pZ986OShD2ECoKzFscQfjMlUU/Aar97zmJ5rQ== X-Received: by 2002:a17:907:706:b0:b7c:e758:a79d with SMTP id a640c23a62f3a-b803717dbf0mr1784720366b.37.1766567150699; Wed, 24 Dec 2025 01:05:50 -0800 (PST) Message-ID: Date: Wed, 24 Dec 2025 10:05:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/3] xen/riscv: add RISC-V legacy SBI extension support for guests To: Jan Beulich Cc: Alistair Francis , Bob Eshleman , Connor Davis , Andrew Cooper , Anthony PERARD , Michal Orzel , Julien Grall , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini , xen-devel@lists.xenproject.org References: <74eec4dc-de48-4060-8f87-ba04023fda17@suse.com> Content-Language: en-US From: Oleksii Kurochko In-Reply-To: <74eec4dc-de48-4060-8f87-ba04023fda17@suse.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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