All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Jason Andryuk" <jason.andryuk@amd.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v4 2/4] x86/hvm: Disable cross-vendor handling in #UD handler
Date: Wed, 11 Mar 2026 19:01:25 +0100	[thread overview]
Message-ID: <DH05EHW9PD7C.132K81VFX47GG@amd.com> (raw)
In-Reply-To: <d76d6c2c-b81a-417b-9d4e-07f301e35dbc@suse.com>

On Wed Mar 11, 2026 at 3:59 PM CET, Jan Beulich wrote:
> On 11.03.2026 15:27, Alejandro Vallejo wrote:
>> Remove cross-vendor support now that VMs can no longer have a different
>> vendor than the host.
>> 
>> While at it, refactor the function to exit early and skip initialising
>> the emulation context when FEP is not enabled.
>> 
>> No functional change intended.
>> 
>> Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
>> ---
>> v4:
>>   * Reverted refactor of the `walk` variable assignment
>
> "Revert" as in "move it even farther away from the original".

Revert as in not split the assignment and restore the orignal syntax _of the
assignment_, which was the main focus of the prior discussion.

It's hardly my intention to add unrequested changes, but I can't address that
which isn't explicitly requested.

> As said, you want re-indentation,

This is an ambiguous piece of advice.

Of what? That can mean moving the prior logic back to its original location and
crate a minimal diff (1) or simply collapsing the indentation of the block (2).

(1) can't be done with hvm context initialiser moving after the early exit,
which I explicitly mentioned in the commit message I wanted to do.

(2) can't happen because declarations and statements cannot be mixed (though I
really wish we dropped that rule).

There's a third option of keeping a silly { ... } around just for indentation
purposes, but that's worse than either of the other 2 options.

Maybe there's a fourth code arrangement in your head that does all this in a
way you find less intrusive and I just don't see it. If so, feel free to send
a patch I can review. It'll be faster for the both of us. Or tell me precisely
what's at fault here.

If it's the diff, I'll go for option (1) above. I don't care enough about it to
argue.

> so please do just that, nothing else that isn't
> explicitly justified (like the moving of hvm_emulate_init_once() is).

I'm not sure if you're fine with that motion because it's in the commit message
or not because it's a refactor that shouldn't be in the patch. This statement
can be read either way.

> With
> this put back in its original shape (can do while committing, I suppose):
> Reviewed-by: Jan Beulich <jbeulich@suse.com>

I don't think it's very obvious what you mean to do on commit, so it wouldn't be
appropriate to agree to your adjustments, seeing how I just don't know what they
are. I'm happy to send a v4.5 on this particular patch with whatever else needs
modifying. Or a full v5 even. Or review whatever you wish to send as a v4.5 of
this patch.

Your pick.

>> + reinject:
>
> I'm inclined to suggest to indent this the same as the case labels.

I didn't notice the extra statement in CODING_STYLE for labels inside switches.
I tend to do that myself, but thought it wasn't in Xen's style. Sounds good
then.

Cheers,
Alejandro


  reply	other threads:[~2026-03-11 18:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 14:27 [PATCH v4 0/4] x86: Drop cross-vendor support Alejandro Vallejo
2026-03-11 14:27 ` [PATCH v4 1/4] x86: Reject CPU policies with vendors other than the host's Alejandro Vallejo
2026-03-11 14:52   ` Jan Beulich
2026-03-11 14:27 ` [PATCH v4 2/4] x86/hvm: Disable cross-vendor handling in #UD handler Alejandro Vallejo
2026-03-11 14:59   ` Jan Beulich
2026-03-11 18:01     ` Alejandro Vallejo [this message]
2026-03-12  6:57       ` Jan Beulich
2026-03-11 18:48   ` Andrew Cooper
2026-03-11 14:27 ` [PATCH v4 3/4] x86/hvm: Remove cross-vendor checks from MSR handlers Alejandro Vallejo
2026-03-11 14:27 ` [PATCH v4 4/4] x86/svm: Drop emulation of Intel's SYSENTER behaviour on AMD systems Alejandro Vallejo
2026-03-11 18:54   ` Andrew Cooper

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=DH05EHW9PD7C.132K81VFX47GG@amd.com \
    --to=alejandro.garciavallejo@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jason.andryuk@amd.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --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.