x86/mm: Don't perform flush after failing to update a guests L1e
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 20 Nov 2018 14:33:16 +0000 (15:33 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Nov 2018 14:33:16 +0000 (15:33 +0100)
commite738850aaf88f201997b5d05adf85dffb54c0c10
tree04d2a24f81949995b8f82f9f72691680c31ac062
parenteb6830a1c8347d0c5e33571f93cbd2d79330798d
x86/mm: Don't perform flush after failing to update a guests L1e

If the L1e update hasn't occured, the flush cannot do anything useful.  This
skips the potentially expensive vcpumask_to_pcpumask() conversion, and
broadcast TLB shootdown.

More importantly however, we might be in the error path due to a bad va
parameter from the guest, and this should not propagate into the TLB flushing
logic.  The INVPCID instruction for example raises #GP for a non-canonical
address.

This is XSA-279.

Reported-by: Matthew Daley <mattd@bugfuzz.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 6c8d50288722672ecc8e19b0741a31b521d01706
master date: 2018-11-20 14:58:41 +0100
xen/arch/x86/mm.c