x86: Test illegal movbe

Previously KVM ignored the mod field of MOVBE instruction, so MOVBE from
register to register succeeds, although it should fail (cause a #UD exception).
This test check that a #UD is indeed delivered upon such MOVBE.

The test would not work if MOVBE is unsupported.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
VMX: Test MSR load/store feature

This checks some usage cases of VMX MSR load/store feature:
1) VM-entry MSR-load area is correctly filled
2) VM-exit MSR-store area is correctly filled
3) VM-exit MSR-load area is correctly filled
4) Attempt to load MSR_FS_BASE on VM entry (must generate
VM-entry failure due to MSR loading)

Signed-off-by: Eugene Korenevsky <ekorenevsky@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: hypercall: add missing report_summary

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: pmu: report takes a fmt

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: vmx: better use of report

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: tsc_adjust: use report

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: svm: use report

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: asyncpf: use report

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: xsave: use report

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
report: add prefix support

Add some methods to report in order to manage output prefixes.
Also add strstr to string, as it was useful for implementing
report_prefix_pop. Prefixes can be useful, as test code
frequently has the following pattern

main()
{
  foreach(subtest)
    run(subtest)
}

But, if we want output lines to include 'subtest: ', then we
need

  report("%s: ...", cond, subtest, ...)

for each report line. With push/pop we can now just do

  subtest()
  {
     report_prefix_push(subtest);

     report(...);
     ...
     report(...);

     report_prefix_pop();
  }

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: use report prefixes

So far only applied in a couple obvious places, where
temporary prefixes were already used.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arm: use report prefixes

arm/selftest was already making use of prefixes, managing them
itself. Use the prefix support now built into report.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>