[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 07/14] xen/riscv: introduce exception handlers implementation
- To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 23 Jan 2023 13:41:00 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JHmEEX19wYmeouYaOvjhxtXA/9ROfVN2luM/OduK9RU=; b=Dy24Vst+6B0h0zAtc0bJB4H9WWftoQdiW+W56JtRodBKsPKN4CpsXhKyn8nZsB3oDNLG8IXzdOx0vx8On/njrFPp5KahA2j9XCWOYX0Nhg0V6ILi5MVeRMCMw/Acy9p/qAf2y77WTwUR0q1aRiYbfkJWv0n2ZEDF1JVlXheq+A759KkG5qFeK9d3SIe1yQ31Vw2bBMuFVpwC9I0qpDHZfZrDO8IHVbPyJodQduc3B6hojTQs3FSjETVdQec0ItKqG9VlAiDjM8YxVRPicrg3t7MZabUWWEXmNeYvns10thF1uCRVSuHgsV41nk6elT8bkNxfBqA0RnwAzXKxt+TWDQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PgpWq0sW8MlH2JmE6pFw5VVY8Yk+NMwsrX4khg4F8JVy73DCMYFfbHrfFg0EsU7HV6zrOVgghqWpMx+OrFr7tWeHE+s3MEIxmZaUBvSmtJ1lTpNxV5nEQeR8UHxWmwT7tp7W12TMJ1n8COozxpStAks+/5Il2aWcpQSJJ2GIL3XHMPU17m0HNbDumb7IFalhGxXI8/k076QSc5LciReT/jTN4YSU4Y9Wk588B7IdCPaHd/GGy3Wzm9l+kUrE4Zx551UgnDMg3YRLQ2RHaMueSN3z5CGKa56wJLdt69uCLVFItcmzblah+3sS3a/lyVlRfFFh2rHZborjmloybWpB7g==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 23 Jan 2023 12:41:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 23.01.2023 12:50, Andrew Cooper wrote:
> On 20/01/2023 2:59 pm, Oleksii Kurochko wrote:
>> + csrr t0, CSR_SEPC
>> + REG_S t0, RISCV_CPU_USER_REGS_OFFSET(sepc)(sp)
>> + csrr t0, CSR_SSTATUS
>> + REG_S t0, RISCV_CPU_USER_REGS_OFFSET(sstatus)(sp)
>
> So something I've noticed about CSRs through this series.
>
> The C CSR macros are set up to use real CSR names, but the CSR_*
> constants used in C and ASM are raw numbers.
>
> If we're using raw numbers, then the C CSR accessors should be static
> inlines instead, but the advantage of using names is the toolchain can
> issue an error when we reference a CSR not supported by the current
> extensions.
That's a default-off diagnostic iirc, so we'd gain something here only
when explicitly turning that on as well.
Jan
|