tscdeadline-latency: add command line arguments

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: api: fix bitrot

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: api: avoid conversion from void* to uint64_t

This will sign extend pointers that have bit 31 set.  Go
through uintptr_t instead, so that the next conversion to
uint64_t will zero-extend.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: api: do not pass size==0 to KVM_SET_USER_MEMORY_REGION except to delete a region

Do not pass size==0 unless the slot has been created before.  This returns
EINVAL.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: api: use try_main throughout

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: api: allocate TSS region dynamically

Holes across the 3GB mark can occur on 64-bit machines.  Use posix_memalign
to reserve some space in the process's address space for the TSS, and
carve a second hole for it.  The memory itself is not used---it's only
that we want the process to not use that area while in guest context,
and the easiest way to do it is to allocate memory.

Allocations still are not allowed to go up to 4GB, because of the APIC
access page and EPT identity pagetable lie.  Detect the situation and
print a nice error message.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arm: fix run script testdev probing

Using -kernel doesn't force qemu to exit immediately,
and thus we "hang" when trying to run arm/run. Using
-initrd works though.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
x86: test_conforming_switch misses es initialization

test_conforming_switch in the taskswitch2 tests, miss es initialization.
Fix it.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>