x86/vvmx: Fix nested virt on VMCS-Shadow capable hardware
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 30 Jul 2019 14:19:04 +0000 (15:19 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 12 Aug 2019 14:50:10 +0000 (15:50 +0100)
commit6a4a62534853b4d20b44990e0d56c665b1ff55ae
tree1268602a2a675e42fa31e77248c7d58fc6732668
parent3214c0220f39d3615dd7e0d4d4336e778c0c0780
x86/vvmx: Fix nested virt on VMCS-Shadow capable hardware

c/s e9986b0dd "x86/vvmx: Simplify per-CPU memory allocations" had the wrong
indirection on its pointer check in nvmx_cpu_up_prepare(), causing the
VMCS-shadowing buffer never be allocated.  Fix it.

This in turn results in a massive quantity of logspam, as every virtual
vmentry/exit hits both gdprintk()s in the *_bulk() functions.

Switch these to using printk_once(), but still only in debug builds.  The size
of the buffer is chosen at compile time, so complaining about it repeatedly is
of no benefit.

Finally, drop the runtime NULL pointer checks.  It is not terribly appropriate
to be repeatedly checking infrastructure which is set up from start-of-day,
and in this case, actually hid the above bug.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/vmx/vvmx.c