xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/3] x86/svm: Enumeration for CET
Date: Wed, 28 Apr 2021 11:14:48 +0200	[thread overview]
Message-ID: <55c50b27-e8cc-873e-e768-7e9dec6f06a0@suse.com> (raw)
In-Reply-To: <f50d2a46-ef8b-d867-4773-aa291586e26c@citrix.com>

On 27.04.2021 19:47, Andrew Cooper wrote:
> On 27/04/2021 16:53, Jan Beulich wrote:
>> On 26.04.2021 19:54, Andrew Cooper wrote:
>>> @@ -497,7 +501,9 @@ struct vmcb_struct {
>>>      u64 rip;
>>>      u64 res14[11];
>>>      u64 rsp;
>>> -    u64 res15[3];
>>> +    u64 _msr_s_cet;             /* offset 0x400 + 0x1E0 - cleanbit 12 */
>>> +    u64 _ssp;                   /* offset 0x400 + 0x1E8   | */
>>> +    u64 _msr_isst;              /* offset 0x400 + 0x1F0   v */
>>>      u64 rax;
>>>      u64 star;
>>>      u64 lstar;
>> Any reason for the leading underscores, when none of the neighboring
>> fields have such?
> 
> Yes - they're covered by a cleanbit, and for better or worse, this is
> our style.

The underscore prefixes are, to my understanding, there only to
emphasize that the fields shouldn't be accessed directly, but ...

>> Did you perhaps mean to add VMCB_ACCESSORS()
>> instances for them?
> 
> TBH, I opencoded the cleanbit handling because I thoroughly hate that
> entire infrastructure.

... via this (or something with similar abstracting effect). So
for any fields you mean to access directly they imo shouldn't be
there. I particularly don't view them as indicators of being
covered by cleanbits (if the respective accessors aren't used).

Jan


  reply	other threads:[~2021-04-28  9:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 17:54 [PATCH 0/3] x86: Initial pieces for guest CET support Andrew Cooper
2021-04-26 17:54 ` [PATCH 1/3] x86/hvm: Introduce experimental " Andrew Cooper
2021-04-27 15:47   ` Jan Beulich
2021-04-27 17:39     ` Andrew Cooper
2021-04-28  9:11       ` Jan Beulich
2021-04-28 17:54         ` Andrew Cooper
2021-04-29  9:07           ` Jan Beulich
2021-04-30 15:08             ` Andrew Cooper
2021-04-26 17:54 ` [PATCH 2/3] x86/svm: Enumeration for CET Andrew Cooper
2021-04-27 15:53   ` Jan Beulich
2021-04-27 17:47     ` Andrew Cooper
2021-04-28  9:14       ` Jan Beulich [this message]
2021-04-28 14:17         ` Andrew Cooper
2021-04-26 17:54 ` [PATCH 3/3] x86/VT-x: " Andrew Cooper
2021-04-27 15:56   ` Jan Beulich
2021-04-27 16:27     ` Andrew Cooper
2021-04-28  9:18       ` Jan Beulich
2021-04-27  6:46 ` [PATCH 0/3] x86: Initial pieces for guest CET support Jan Beulich
2021-04-27 10:13   ` Andrew Cooper
2021-04-28 12:25     ` Andrew Cooper
2021-04-28 13:03       ` Jan Beulich

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=55c50b27-e8cc-873e-e768-7e9dec6f06a0@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).