[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 6/5] x86/hvm: Add a non-FEP path to the #UD handler


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
  • Date: Thu, 12 Mar 2026 17:04:48 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=gTafdTz+0ZZlyxfGtijQUxFXhgBLGfhYtTNqWiEj30w=; b=Vp8l3lap3/LvOjEIaym0E5SFbfvwFct/aLTuoJsqFaJGXHuiPBykH5Yll+4WZAbXoXuECcEjJzWfgQL3P0LqyeQx+3v08FTmW+s6AIoq4EBjwbIUDYj4bsCo1gWmDd5sXTd97QbJRVq1eml85WuQw4FP6WnAxzInRjaxjpRTp2q1xCsLgvI8HvAe4sZSeKChI5aAdNqGvJuHiYT7rAoPLJIHUkKTkUu0mZ1NbOHIdbhx5Jr8/guSnLtTZAT/ZgGfZiBfSIBarEetmnYhU6iBxAPCn1kU/uJOmEShk0zecmIE/LW3jiAVgANnWpkhFG0aP11UlQ4aIDzHS47LPTUDrQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l7WcySXcTTbN9DIT3WRgV1dLrSnat9fwtgaLHxGyVjypOnF/oB2QFOpceOVjjj7vRHSXytN699v/PYh+ES3WO+EDT0d5lpCo3dN9aTexC+O2nwAN9rosVHGFviLZtUmh2NNTKnblS+nIZvVQufJyoe7v8RokWNlUFRQkMidzPnRsw0Lf/B6F+1N+dfanmAzSIRa/35b566AgPzIq/8AB5kVEO7rkTJcKTIyfSQEnv9pxMEcdMT0R1ZIEazhmO5X140Jqyji3cVg9YMZbE7GLU/+ZhydLlP0i/qt6XvlOedkuF9I+NvZCxLhT7LtTQl7/njdZoHVNcfU+fslMUBPkUQ==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 12 Mar 2026 16:05:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu Mar 12, 2026 at 4:24 PM CET, Jan Beulich wrote:
> On 12.03.2026 14:45, Alejandro Vallejo wrote:
>> While the #UD handler is dead code when CONFIG_HVM_FEP is disabled it's
>> helpful to keep the function around. Reinject #UD in the non-FEP case so
>> DCE can remove the rest.
>
> For the code change - I don't think this should be a separate change. I also
> didn't understand Andrew's earlier request to split the original change to
> go this far.

I don't mind either way. Fold it with the prior patch if you think it's better
that way.

>
> As to the "dead code" aspect (using Misra terminology it's really
> "unreachable code" aiui), we may need to deal with that, as we've accepted
> that rule. Yes, Eclair is unlikely to be able to spot this, yet that doesn't
> make the issue go away.

That's also the case for handlers of other VMEXIT error codes under certain
configurations. The original patch I sent fully removed the #UD handler to
restrict the unreachable part to just a BUG_ON(). But even that was incomplete.

The solution is some creative filtering at the switch condition, but that's
something I haven't had time to experiment with yet.

Cheers,
Alejandro



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.