Skip to content
Commit ff9c2831 authored by Radim Krčmář's avatar Radim Krčmář Committed by Paolo Bonzini
Browse files

x86/vmx: fix unexpected stage error in PML test



Recent patches triggered an unexpected stage error.  This happened
because report() now adds one extra entry to the PML.

The writes done during a page walk are logged into PML, which means that
we are guaranteed to get multiple entries.  The PML test adds 4 entries
in each loop while waiting for the PML full event and unluckily, the one
extra entry fills PML just before the vmcall (3 entries are added before
checking the stage and one after).  The vmcall then sees a wrong stage
and exits.

This solution makes sure that the PML exit will not happen between the
check for stage and the vmcall.  (It wastes the first vmcall, but the
loop happens ~125 times anyway, so it's not a huge waste.)

Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Message-Id: <20170703175853.1939-2-rkrcmar@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 8922f1fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment