Re: [PATCH v3 00/15] KVM: x86: Exit handling for Hyper-V hcalls, register intercept

From: Zack Rusin

Date: Mon Nov 30 2026 - 15:01:17 EST


On Mon, Nov 30, 2026 at 1:07 PM David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
>
> On Mon, 2026-11-30 at 12:19 -0500, Zack Rusin wrote:
> >
> > My unposted v4 drops the exception fields and any non-zero ret leaves
> > the instruction alone. I think with your numbering, that would give 1
> > and 2 a different meaning for VMware.
> >
> > Could VMware take just 0 (complete if the linear RIP still matches)
> > and 3 (resume as userspace left it)? KVM_RUN could fail with -EINVAL
> > for anything else, leaving 1 and 2 available for #GP(0) and #UD.
>
> Any reason *not* to allow #GP(0) and #UD? I'd have been OK with not
> supporting those at all, and only having COMPLETE/RESUME. But the MSR
> handling already has the #GP(0) option. Now I'm just trying to be a
> little more consistent.

No technical reason :) Our hypercalls can raise both #GP(0) and #UD,
and userspace can already queue either fault through vCPU events.

I suggested taking 0 and 3 and failing the rest with -EINVAL so the
VMware series stays independent of the 2nd patch. That leaves 1 and 2
free to add once patch 2 is in. If Sean is happy with the numbering, I
can take all four in v4 of my VMware series.

z

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature