Re: [PATCH 2/2] KVM: SVM: Disable posted interrupts for odd IRQs

From: Alexander Graf
Date: Wed Sep 04 2019 - 09:06:17 EST




On 04.09.19 01:20, Liran Alon wrote:


On 3 Sep 2019, at 17:29, Alexander Graf <graf@xxxxxxxxxx> wrote:

We can easily route hardware interrupts directly into VM context when
they target the "Fixed" or "LowPriority" delivery modes.

However, on modes such as "SMI" or "Init", we need to go via KVM code
to actually put the vCPU into a different mode of operation, so we can
not post the interrupt

Add code in the SVM PI logic to explicitly refuse to establish posted
mappings for advanced IRQ deliver modes.

This fixes a bug I have with code which configures real hardware to
inject virtual SMIs into my guest.

Signed-off-by: Alexander Graf <graf@xxxxxxxxxx>

Nit: I prefer to squash both commits into one that change both VMX & SVM.
As itâs exactly the same change.

It's the same change (hence the same patch set), but they touch different files and so for bisectability it's still convenient to have them as different commits. I'd really prefer to have them stay separate.

Thanks a lot for the review! :)


Alex



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Ralf Herbrich
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879