History log of /kvm-unit-tests/lib/x86/ (Results 326 – 350 of 414)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
b006d7eb03-Mar-2016 Andrew Jones <drjones@redhat.com>

x86: fix printf format warnings

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1457008388-12749-5-git-send-email-drjones@redhat.com>
[Fix c

x86: fix printf format warnings

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1457008388-12749-5-git-send-email-drjones@redhat.com>
[Fix conflicts with "x86: clean up exit use, use abort". - Paolo
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Conflicts:

lib/x86/desc.c

show more ...

a2b7c49902-Mar-2016 Andrew Jones <drjones@redhat.com>

x86: clean up exit use, use abort

Change all exit()'s for the purpose of aborts to abort()'s. This changes
a handful of exit(-1)'s, which resulted in a 255 exit status (putting
the status in signal

x86: clean up exit use, use abort

Change all exit()'s for the purpose of aborts to abort()'s. This changes
a handful of exit(-1)'s, which resulted in a 255 exit status (putting
the status in signal territory) to a 127 exit status (just below signal
territory), as 127 is defined as the unittest abort. Yes, stdlib would
use SIGABRT resulting in 134, but, well, we do what we can...

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Message-Id: <1456939982-13178-2-git-send-email-drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

6ed97c5002-Mar-2016 Peter Feiner <pfeiner@google.com>

lib: generic bitops.h

Factored out common bitops stuff, just like Linux's
include/linux/bitops.h.

Signed-off-by: Peter Feiner <pfeiner@google.com>
Message-Id: <1456938657-20850-3-git-send-email-pfe

lib: generic bitops.h

Factored out common bitops stuff, just like Linux's
include/linux/bitops.h.

Signed-off-by: Peter Feiner <pfeiner@google.com>
Message-Id: <1456938657-20850-3-git-send-email-pfeiner@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

0c4e631e22-Feb-2016 Peter Feiner <pfeiner@google.com>

x86: vmx: fix definition of X86_CR4_VMXE

Was defined as 0x1 when it should have been 0x2000 (13th bit of CR4).
See Intel manual 23.7. 0x1 is the VME 'Virtual-8086 Mode Extensions'
bit, which the vmx

x86: vmx: fix definition of X86_CR4_VMXE

Was defined as 0x1 when it should have been 0x2000 (13th bit of CR4).
See Intel manual 23.7. 0x1 is the VME 'Virtual-8086 Mode Extensions'
bit, which the vmx tests don't exercise.

The correct bit was being set thanks to IA32_VMX_CR4_FIXED{0,1} MSRs
forcing it.

I hacked the test setup to forcibly un-set the bit and observed the
correct #UD VMXON behavior. Adding a test to verify the #UD behavior
is follow-up work.

Signed-off-by: Peter Feiner <pfeiner@google.com>
Message-Id: <1456184436-31168-1-git-send-email-pfeiner@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


/kvm-unit-tests/Makefile
/kvm-unit-tests/README
/kvm-unit-tests/arm/Makefile
/kvm-unit-tests/arm/Makefile.arm
/kvm-unit-tests/arm/Makefile.arm64
/kvm-unit-tests/arm/Makefile.common
/kvm-unit-tests/arm/run
/kvm-unit-tests/arm/selftest.c
/kvm-unit-tests/configure
/kvm-unit-tests/lib/arm/asm/setup.h
/kvm-unit-tests/lib/arm/asm/thread_info.h
/kvm-unit-tests/lib/arm/io.c
/kvm-unit-tests/lib/arm/setup.c
/kvm-unit-tests/lib/arm/smp.c
/kvm-unit-tests/lib/arm64/asm/processor.h
/kvm-unit-tests/lib/arm64/processor.c
/kvm-unit-tests/lib/asm-generic/io.h
/kvm-unit-tests/lib/devicetree.c
/kvm-unit-tests/lib/libcflat.h
/kvm-unit-tests/lib/pci.h
/kvm-unit-tests/lib/powerpc/.gitignore
/kvm-unit-tests/lib/powerpc/asm/hcall.h
/kvm-unit-tests/lib/powerpc/asm/rtas.h
/kvm-unit-tests/lib/powerpc/asm/setup.h
/kvm-unit-tests/lib/powerpc/hcall.c
/kvm-unit-tests/lib/powerpc/io.c
/kvm-unit-tests/lib/powerpc/rtas.c
/kvm-unit-tests/lib/powerpc/setup.c
/kvm-unit-tests/lib/ppc64/.gitignore
/kvm-unit-tests/lib/ppc64/asm-offsets.c
/kvm-unit-tests/lib/ppc64/asm/asm-offsets.h
/kvm-unit-tests/lib/ppc64/asm/hcall.h
/kvm-unit-tests/lib/ppc64/asm/io.h
/kvm-unit-tests/lib/ppc64/asm/page.h
/kvm-unit-tests/lib/ppc64/asm/rtas.h
/kvm-unit-tests/lib/ppc64/asm/setup.h
/kvm-unit-tests/lib/ppc64/asm/spinlock.h
/kvm-unit-tests/lib/ppc64/spinlock.c
/kvm-unit-tests/lib/printf.c
/kvm-unit-tests/lib/report.c
/kvm-unit-tests/lib/util.c
/kvm-unit-tests/lib/util.h
processor.h
/kvm-unit-tests/powerpc/.gitignore
/kvm-unit-tests/powerpc/Makefile
/kvm-unit-tests/powerpc/Makefile.common
/kvm-unit-tests/powerpc/Makefile.ppc64
/kvm-unit-tests/powerpc/boot_rom.S
/kvm-unit-tests/powerpc/cstart64.S
/kvm-unit-tests/powerpc/flat.lds
/kvm-unit-tests/powerpc/reloc64.c
/kvm-unit-tests/powerpc/run
/kvm-unit-tests/powerpc/selftest.c
/kvm-unit-tests/powerpc/unittests.cfg
/kvm-unit-tests/run_tests.sh
/kvm-unit-tests/scripts/asm-offsets.mak
/kvm-unit-tests/scripts/mkstandalone.sh
/kvm-unit-tests/scripts/runtime.bash
/kvm-unit-tests/x86/Makefile
/kvm-unit-tests/x86/Makefile.common
/kvm-unit-tests/x86/Makefile.i386
/kvm-unit-tests/x86/Makefile.x86_64
/kvm-unit-tests/x86/run
/kvm-unit-tests/x86/vmexit.c
/kvm-unit-tests/x86/vmx_tests.c
456c55bc18-Jan-2016 Andrew Jones <drjones@redhat.com>

x86: move x86/pci to the common lib

Also move pci_config_read into asm/pci.h

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Message-Id: <14531400

x86: move x86/pci to the common lib

Also move pci_config_read into asm/pci.h

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Message-Id: <1453140064-9040-7-git-send-email-drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

0c79603818-Jan-2016 Andrew Jones <drjones@redhat.com>

x86: pci.h: remove useless include

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Message-Id: <1453140064-9040-6-git-send-email-drjones@redhat.com

x86: pci.h: remove useless include

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Message-Id: <1453140064-9040-6-git-send-email-drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

f22a66a118-Jan-2016 Andrew Jones <drjones@redhat.com>

x86: use common portio accessors from io.h

x86 code reinvents io*/out* in a few places. To prepare for a common
pci driver use the common accessors from io.h in pci.c and vmexit.c.
Now we use the co

x86: use common portio accessors from io.h

x86 code reinvents io*/out* in a few places. To prepare for a common
pci driver use the common accessors from io.h in pci.c and vmexit.c.
Now we use the correct order (value, port) for out* too.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Message-Id: <1453140064-9040-5-git-send-email-drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

932ba2d212-Jan-2016 Paolo Bonzini <pbonzini@redhat.com>

x86: simplify test_for_exception trigger functions

test_for_exception makes the unit tests simpler, but it requires the
trigger function to be in on the joke: before, by calling
set_exception_return

x86: simplify test_for_exception trigger functions

test_for_exception makes the unit tests simpler, but it requires the
trigger function to be in on the joke: before, by calling
set_exception_return; now, by calling set_exception_jmpbuf and
handle_exception(NULL). The new setjmp-based implementation
lets us move all of this into test_for_exception itself, so
that the trigger_func can be very simple.

Suggested-by: David Matlack <dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

03f37ef215-Dec-2015 Paolo Bonzini <pbonzini@redhat.com>

x86: replace set_exception_return with longjmp-based implementation

set_exception_return forces exceptions handlers to return to a specific
address instead of returning to the instruction address pu

x86: replace set_exception_return with longjmp-based implementation

set_exception_return forces exceptions handlers to return to a specific
address instead of returning to the instruction address pushed by the
CPU at the time of the exception. The unit tests apic.c and vmx.c use
this functionality to recover from expected exceptions.

When using set_exception_return one would have to be careful not to modify
the stack (such as by doing a function call) as triggering the exception
will likely jump us past the instructions which undo the stack manipulation
(such as a ret). This is unnecessarily brittle, and C already has a
mechanism to do non-local returns---setjmp. Now that libcflat includes
an implementation of setjmp, replace set_exception_return with a wrapper
that takes care of restoring the processor flags as well.

Reported-by: David Matlack <dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

9dde424315-Dec-2015 Paolo Bonzini <pbonzini@redhat.com>

lib: add setjmp header and x86 implementation

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

98fb335708-Dec-2015 Andrey Smetanin <asmetanin@virtuozzo.com>

x86/hyperv: Move Hyper-V generic code into hyperv.h/hyperv.c

This code will be used as shared between hyperv_synic
and hyperv_stimer tests.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>

x86/hyperv: Move Hyper-V generic code into hyperv.h/hyperv.c

This code will be used as shared between hyperv_synic
and hyperv_stimer tests.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Marcelo Tosatti <mtosatti@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

1597d09d08-Dec-2015 Andrey Smetanin <asmetanin@virtuozzo.com>

lib/x86: Make free_page() available to call

This will be used to release allocated pages by Hyper-V
SynIC timers test.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Roman Ka

lib/x86: Make free_page() available to call

This will be used to release allocated pages by Hyper-V
SynIC timers test.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Marcelo Tosatti <mtosatti@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

eab6450102-Dec-2015 Paolo Bonzini <pbonzini@redhat.com>

x86: use asm volatile for flags and segment register read/writes

The effects of a move from or to these registers is not entirely described
by the asm's operands. Therefore, it may happen that the

x86: use asm volatile for flags and segment register read/writes

The effects of a move from or to these registers is not entirely described
by the asm's operands. Therefore, it may happen that the compiler
moves the asm around in ways that break tests.

In one case, the compiler marked read_ss() as pure and thus subjected
it to common subexpression elimination:

u16 ss = read_ss();

// check for null segment load
*mem = 0;
asm volatile("mov %0, %%ss" : : "m"(*mem));
report("mov null, %%ss", read_ss() == 0);

This caused a spurious failure of the test.

Reported-by: Lucas Meneguel Rodrigues <lmr@scylladb.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

3da7079916-Nov-2015 Huaitong Han <huaitong.han@intel.com>

x86: pkeys: add test for PKEYS

Signed-off-by: Huaitong Han <huaitong.han@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

17fdf23e26-Oct-2015 Andrey Smetanin <asmetanin@virtuozzo.com>

x86: hyperv_synic: Hyper-V SynIC test

Hyper-V SynIC is a Hyper-V synthetic interrupt controller.

The test runs on every vCPU and performs the following steps:
* read from all Hyper-V SynIC MSR's
*

x86: hyperv_synic: Hyper-V SynIC test

Hyper-V SynIC is a Hyper-V synthetic interrupt controller.

The test runs on every vCPU and performs the following steps:
* read from all Hyper-V SynIC MSR's
* setup Hyper-V SynIC evt/msg pages
* setup SINT's routing
* inject SINT's into destination vCPU by 'hyperv-synic-test-device'
* wait for SINT's isr's completion
* clear Hyper-V SynIC evt/msg pages and destroy SINT's routing

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
CC: virtualization@lists.linux-foundation.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

7488d29012-Nov-2015 Paolo Bonzini <pbonzini@redhat.com>

KVM: x86: a few more x86-specific functions

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

867f820d12-Nov-2015 Paolo Bonzini <pbonzini@redhat.com>

x86: tsc: add test for RDTSCP

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

7c5f3ee910-Sep-2015 Paolo Bonzini <pbonzini@redhat.com>

ioapic: test TMR behavior

Test that TMR works right even if the virtual-APIC page is modified
by another processor. Either x2apic or xapic accesses are tested,
depending on whether x2apic is availa

ioapic: test TMR behavior

Test that TMR works right even if the virtual-APIC page is modified
by another processor. Either x2apic or xapic accesses are tested,
depending on whether x2apic is available.

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

show more ...

74d51c5826-Aug-2015 Levente Kurusa <lkurusa@redhat.com>

x86: desc: fix typo

It should be 'exception' instead of 'excecption'.

Signed-off-by: Levente Kurusa <lkurusa@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

372e352821-Aug-2015 Paolo Bonzini <pbonzini@redhat.com>

x86: add small library to find ACPI tables

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

0f187a0813-May-2015 Steve Rutherford <srutherford@google.com>

x86: Split APIC tests into IOAPIC/APIC tests

Split apart the APIC tests into constituent parts (IOAPIC and APIC tests).

Signed-off-by: Steve Rutherford <srutherford@google.com>
Message-Id: <1431482

x86: Split APIC tests into IOAPIC/APIC tests

Split apart the APIC tests into constituent parts (IOAPIC and APIC tests).

Signed-off-by: Steve Rutherford <srutherford@google.com>
Message-Id: <1431482143-28018-1-git-send-email-srutherford@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

d95bd8f613-Mar-2015 Radim Krčmář <rkrcmar@redhat.com>

x86: fix build (macro R interpreted as raw string)

GCC 5.0.0 enables raw strings by default and they have higher priority
than macros, thus R"[...]" is interpreted incorrectly:

lib/x86/isr.c:112:

x86: fix build (macro R interpreted as raw string)

GCC 5.0.0 enables raw strings by default and they have higher priority
than macros, thus R"[...]" is interpreted incorrectly:

lib/x86/isr.c:112:30: error: invalid character ')' in raw string delimiter
lib/x86/isr.c:112:8: error: stray ‘R’ in program
lib/x86/isr.c:112:26: error: expected ‘:’ or ‘)’ before string constant
"orl $0x200, (%%"R"sp)\n\t"

Fix it by putting a space between macro R and a string literal.
(We already do that somewhere.)

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

show more ...

cc47ddc101-Feb-2015 Andrew Jones <drjones@redhat.com>

x86: expose spin_lock/unlock to lib code

Move the spin_lock/unlock declarations to lib/x86/asm/spinlock.h,
allowing lib code, e.g. lib/report.c, to use spinlocks.

Signed-off-by: Andrew Jones <drjon

x86: expose spin_lock/unlock to lib code

Move the spin_lock/unlock declarations to lib/x86/asm/spinlock.h,
allowing lib code, e.g. lib/report.c, to use spinlocks.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

show more ...

a0837ab620-Jan-2015 Radim Krčmář <rkrcmar@redhat.com>

lib/x86: fix apic_id() under x2APIC

We used MMIO (xAPIC) for x2APIC. This is the same as using xAPIC in
globally disabled mode, and APICv enforces this by returning 0 on APIC
MMIO reads under x2API

lib/x86: fix apic_id() under x2APIC

We used MMIO (xAPIC) for x2APIC. This is the same as using xAPIC in
globally disabled mode, and APICv enforces this by returning 0 on APIC
MMIO reads under x2APIC.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


/kvm-unit-tests/Makefile
/kvm-unit-tests/api/api-sample.cc
/kvm-unit-tests/api/dirty-log-perf.cc
/kvm-unit-tests/api/dirty-log.cc
/kvm-unit-tests/api/identity.cc
/kvm-unit-tests/api/identity.hh
/kvm-unit-tests/api/kvmxx.cc
/kvm-unit-tests/api/memmap.cc
/kvm-unit-tests/arm/cstart.S
/kvm-unit-tests/arm/cstart64.S
/kvm-unit-tests/arm/flat.lds
/kvm-unit-tests/arm/run
/kvm-unit-tests/arm/selftest.c
/kvm-unit-tests/arm/unittests.cfg
/kvm-unit-tests/config/config-arm-common.mak
/kvm-unit-tests/config/config-arm.mak
/kvm-unit-tests/config/config-arm64.mak
/kvm-unit-tests/config/config-i386.mak
/kvm-unit-tests/config/config-x86-common.mak
/kvm-unit-tests/config/config-x86_64.mak
/kvm-unit-tests/configure
/kvm-unit-tests/lib/alloc.c
/kvm-unit-tests/lib/arm/asm-offsets.c
/kvm-unit-tests/lib/arm/asm/asm-offsets.h
/kvm-unit-tests/lib/arm/asm/io.h
/kvm-unit-tests/lib/arm/asm/mmu-api.h
/kvm-unit-tests/lib/arm/asm/mmu.h
/kvm-unit-tests/lib/arm/asm/page.h
/kvm-unit-tests/lib/arm/asm/pgtable-hwdef.h
/kvm-unit-tests/lib/arm/asm/pgtable.h
/kvm-unit-tests/lib/arm/asm/processor.h
/kvm-unit-tests/lib/arm/asm/ptrace.h
/kvm-unit-tests/lib/arm/asm/setup.h
/kvm-unit-tests/lib/arm/eabi_compat.c
/kvm-unit-tests/lib/arm/io.c
/kvm-unit-tests/lib/arm/mmu.c
/kvm-unit-tests/lib/arm/processor.c
/kvm-unit-tests/lib/arm/setup.c
/kvm-unit-tests/lib/arm/spinlock.c
/kvm-unit-tests/lib/arm64/.gitignore
/kvm-unit-tests/lib/arm64/asm-offsets.c
/kvm-unit-tests/lib/arm64/asm/asm-offsets.h
/kvm-unit-tests/lib/arm64/asm/barrier.h
/kvm-unit-tests/lib/arm64/asm/esr.h
/kvm-unit-tests/lib/arm64/asm/io.h
/kvm-unit-tests/lib/arm64/asm/mmu-api.h
/kvm-unit-tests/lib/arm64/asm/mmu.h
/kvm-unit-tests/lib/arm64/asm/page.h
/kvm-unit-tests/lib/arm64/asm/pgtable-hwdef.h
/kvm-unit-tests/lib/arm64/asm/pgtable.h
/kvm-unit-tests/lib/arm64/asm/processor.h
/kvm-unit-tests/lib/arm64/asm/ptrace.h
/kvm-unit-tests/lib/arm64/asm/setup.h
/kvm-unit-tests/lib/arm64/asm/spinlock.h
/kvm-unit-tests/lib/arm64/processor.c
/kvm-unit-tests/lib/asm-generic/page.h
/kvm-unit-tests/lib/chr-testdev.c
/kvm-unit-tests/lib/const.h
/kvm-unit-tests/lib/kbuild.h
/kvm-unit-tests/lib/libcflat.h
/kvm-unit-tests/lib/report.c
/kvm-unit-tests/lib/string.c
/kvm-unit-tests/lib/string.h
/kvm-unit-tests/lib/virtio-mmio.c
/kvm-unit-tests/lib/virtio.c
/kvm-unit-tests/lib/virtio.h
apic.c
/kvm-unit-tests/x86/apic.c
/kvm-unit-tests/x86/asyncpf.c
/kvm-unit-tests/x86/emulator.c
/kvm-unit-tests/x86/hypercall.c
/kvm-unit-tests/x86/kvmclock_test.c
/kvm-unit-tests/x86/pmu.c
/kvm-unit-tests/x86/svm.c
/kvm-unit-tests/x86/taskswitch2.c
/kvm-unit-tests/x86/tsc_adjust.c
/kvm-unit-tests/x86/tscdeadline_latency.c
/kvm-unit-tests/x86/vmx.c
/kvm-unit-tests/x86/vmx_tests.c
/kvm-unit-tests/x86/xsave.c
4958346828-Aug-2014 Eduardo Habkost <ehabkost@redhat.com>

x86: Check level, xlevel before returning CPUID data

None of the existing code using cpuid checks level or xlevel before
running it. Instead of changing all callers, make the cpuid() function
check

x86: Check level, xlevel before returning CPUID data

None of the existing code using cpuid checks level or xlevel before
running it. Instead of changing all callers, make the cpuid() function
check if the requested leaf is available, before returning any data.

All existing callers of cpuid() and cpuid_indexed() are checks for the
presence of feature bits, so it is safe to return all zeroes when the
requested CPUID leaf is not available.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

1...<<11121314151617