[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 06/14] xen/riscv: introduce exception context
- To: Oleksii <oleksii.kurochko@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Mon, 23 Jan 2023 12:25:09 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=tc1YmgXbYpKbeyJj17ADgPXtFAEmUBock6Dh2MfcGqg=; b=AzFaSAcntHrGq0b71rie+eq+vXaXQ3wUz6OAGUWG2X6DS12SAuSQxHReystPzn14y6fhmNjxz+9i1k3CNuuUbKsodMxEdf+CGePRdqRmjxS06StAAf+WpNrQyYiPDmT3b4l2iIJK4iZPBazwyX33DInMz2OBbFGlZGLFnT/dM4b6jUQAhhzkfq4vP3XPschXAA4545bkSiIgV+nzNuh8EdbAMZ9qLoGm2CtMKQDSTkDMKrvZriE0Hz5dOWXynX+4QdDEESn4g16ifqnNNe9eQIyEd0NK6Dik/EitlopqPhxuk4dDUt6HvK2W9CDMQb+x3MEcb/I6c5kBB2CW7oZxPA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WSTyCrUK8CPHIAF4XFlOV9N+spO7Cfr9rk+fAnqxzMfDJrA1ytp3RNmaq3ljzJFUiEigdk4MWKk/cV0qbVZvpqmSXAmK3Aok0W0DBy9PV9mCcQnEPd2WhczFMGgqii51rRiA06w/eDihYJo2GMew6pfvsNcZhC4iTZxELeT2iynXfINqgwi/zP20pbHdz67Dil2QZMl3ZClCjMvG99Yhrp8i1F2U3uq+k9Buz/iIKf2FIU2rZVWJN0e/AYLTsQZSrzyIJdopHs0EGCcN1U05ohstMqvAvgry+VTs7FbslVGCoDJrSVM13iahFyRPrbg9NGclkApL8OBC+tZ3ZeIEbw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Bobby Eshleman <bobby.eshleman@xxxxxxxxx>
- Delivery-date: Mon, 23 Jan 2023 12:25:36 +0000
- Ironport-data: A9a23:wSk+qqvxP/Hvcbq6Krg0pNGwiOfnVOVfMUV32f8akzHdYApBsoF/q tZmKTqGMv+DZWvzeIt/admz8EhTsZDWx4QxTFY6rnszFSkR+JbJXdiXEBz9bniYRiHhoOCLz O1FM4Wdc5pkJpP4jk3wWlQ0hSAkjclkfpKlVKiffHg0HVU/IMsYoUoLs/YjhYJ1isSODQqIu Nfjy+XSI1bg0DNvWo4uw/vrRChH4bKj51v0gnRkPaoQ5AaEzCFMZH4iDfrZw0XQE9E88tGSH 44v/JnhlkvF8hEkDM+Sk7qTWiXmlZaLYGBiIlIPM0STqkAqSh4ai87XB9JFAatjsB2bnsgZ9 Tl4ncfYpTHFnEH7sL91vxFwS0mSNEDdkVPNCSDXXce7lyUqf5ZwqhnH4Y5f0YAwo45K7W9yG fMwBm01VVeIgbqK+vG0dbBUppgNB+uyI9ZK0p1g5Wmx4fcOZ7nmG/mPz/kImTA6i4ZJAOrUY NcfZXx3dhPcbhZTO1ARTpUjgOOvgXq5eDpdwL6XjfNvvy6Pk0oujP6xarI5efTTLSlRtm+eq njL4CLSBRYCOcbE4TGE7mitlqnEmiaTtIc6ReHirKQ00QL7Kmo7GhAtTFqjh/+FoG2UVtd0C mMvyy5/sv1nnKCsZpynN/Gim1aDuhMfQNtRVe4n8gaGyqnTywmcD2kACDVGbbQOpMIwADAny FKNt9foHiB09q2YT2qH8bWZpi/0PjIaRUcZfjMNRwYB59jloakwgwjJQ9IlF7S65vX6GDj2x y2BpQAkhqsUls8N3OOw+lWvqzirrJLYQxU14gjSV2SN4QZwZYrjbIutgXDS6fdbMI+YVB+Pp nECkMmFxP8CBteGkynlaO4KGreu5fqMLjzHqVFqFpglsT+q/haLd4da6iA4KVxpNssBcDnBb 0rauAcX75hWVEZGdodyaoO1Ts4sna7pEIy5UuiONoYUJJ9saAWA4SdiI1aK2Hzgm1Qtlqd5P oqHdcGrDjARDqEPICeKetrxGIQDnkgWrV4/j7iip/h7+dJyvEKodIo=
- Ironport-hdrordr: A9a23:Jzad5KwXU3PjvC8DeRE3KrPw671zdoMgy1knxilNoRw8SL3/qy nOppQmPHrP4wr5N0tApTntAtjkfZq+z+8N3WByB8bbYOCOggLBQ+9fBOPZskbd8kbFh4pgPM lbAs9DIey1IGJWyeDdy2CDf+rIxuPszImYwd3z9TNGayZES49d1C9FKiC9VndbeWB9dPkEPa vZ6cpDqyChangMB/7XOlAOQ/LfodnGj7LKCCR2ZSIa1A==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZLOAEizmhskK0b0Wez8lGfG74vK6ndUcAgAR2eoCAAAX1gA==
- Thread-topic: [PATCH v1 06/14] xen/riscv: introduce exception context
On 23/01/2023 12:03 pm, Oleksii wrote:
> On Fri, 2023-01-20 at 15:54 +0000, Andrew Cooper wrote:
>> On 20/01/2023 2:59 pm, Oleksii Kurochko wrote:
>>> +
>>> +#define RISCV_CPU_USER_REGS_OFFSET(x) ((RISCV_CPU_USER_REGS_##x)
>>> * __SIZEOF_POINTER__)
>>> +#define RISCV_CPU_USER_REGS_SIZE
>>> RISCV_CPU_USER_REGS_OFFSET(last)
>>> +
>>> +#ifndef __ASSEMBLY__
>>> +
>>> +/* On stack VCPU state */
>>> +struct cpu_user_regs
>>> +{
>>> + register_t zero;
>> unsigned long.
> Why is it better to define them as \unsigned long' instead of
> register_t?
Because there is a material cost to deliberately hiding the type, in
terms of code clarity and legibility.
Things like register_t and vaddr_t are nonsense in a POSIX-y build
environment where these things are spelled "unsigned long", not to
mention that the associated infrastructure is longer than the
non-obfuscated form.
~Andrew
|