History log of /kvm-unit-tests/x86/xsave.c (Results 1 – 16 of 16)
Revision Date Author Comments
# cd5f2fb4 20-Sep-2023 Paolo Bonzini <pbonzini@redhat.com>

Merge tag 'kvm-x86-2023.09.01' of https://github.com/kvm-x86/kvm-unit-tests into HEAD

x86 fixes, cleanups, and new testcases, and a few generic changes

- Fix a bug in runtime.bash that caused it t

Merge tag 'kvm-x86-2023.09.01' of https://github.com/kvm-x86/kvm-unit-tests into HEAD

x86 fixes, cleanups, and new testcases, and a few generic changes

- Fix a bug in runtime.bash that caused it to mishandle "check" strings with
multiple entries, e.g. a test that depends on multiple module params
- Make the PMU tests depend on vPMU support being enabled in KVM
- Fix PMU's forced emulation test on CPUs with full-width writes
- Add a PMU testcase for measuring TSX transactional cycles
- Nested SVM testcase for virtual NMIs
- Move a pile of code to ASM_TRY() and "safe" helpers
- Set up the guest stack in the LBRV tests so that the tests don't fail if the
compiler decides to generate function calls in guest code
- Ignore the "mispredict" flag in nSVM's LBRV tests to fix false failures
- Clean up usage of helpers that disable interrupts, e.g. stop inserting
unnecessary nops
- Add helpers to dedup code for programming the APIC timer
- Fix a variety of bugs in nVMX testcases related to being a 64-bit host

show more ...


# fa68c037 06-Apr-2023 Sean Christopherson <seanjc@google.com>

x86: Move XSETBV and XGETBV "safe" helpers to processor.h

Move the "safe" helpers for XSETBV and XGETBV to processor.h, and convert
them to use asm_safe() and other common macros as appropriate.

Li

x86: Move XSETBV and XGETBV "safe" helpers to processor.h

Move the "safe" helpers for XSETBV and XGETBV to processor.h, and convert
them to use asm_safe() and other common macros as appropriate.

Link: https://lore.kernel.org/r/20230406025117.738014-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>

show more ...


# 14b54ed7 26-Jul-2022 Paolo Bonzini <pbonzini@redhat.com>

Merge tag 'for_paolo' of https://github.com/sean-jc/kvm-unit-tests into HEAD

x86 fixes, cleanups, and new sub-tests:

- Bug fix for the VMX-preemption timer expiration test
- Refactor SVM tests

Merge tag 'for_paolo' of https://github.com/sean-jc/kvm-unit-tests into HEAD

x86 fixes, cleanups, and new sub-tests:

- Bug fix for the VMX-preemption timer expiration test
- Refactor SVM tests to split out NPT tests
- Add tests for MCE banks to MSR test
- Add SMP Support for x86 UEFI tests
- x86: nVMX: Add VMXON #UD test (and exception cleanup)
- PMU cleanup and related nVMX bug fixes

show more ...


# 4143fbfd 08-Jun-2022 Sean Christopherson <seanjc@google.com>

x86: Use "safe" terminology instead of "checking"

Rename all helpers that eat (and return) exceptions to use "safe" instead
of "checking". This aligns KUT with the kernel and KVM selftests.

Signed

x86: Use "safe" terminology instead of "checking"

Rename all helpers that eat (and return) exceptions to use "safe" instead
of "checking". This aligns KUT with the kernel and KVM selftests.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220608235238.3881916-4-seanjc@google.com

show more ...


# e2f3fe1d 08-Jun-2022 Sean Christopherson <seanjc@google.com>

x86: Use BIT() to define architectural bits

Use BIT() to define bits in EFLAGS, CR0, and CR4. Intel's SDM and AMD's
APM reference flags/features by the bit number, not by their mask, making
it absu

x86: Use BIT() to define architectural bits

Use BIT() to define bits in EFLAGS, CR0, and CR4. Intel's SDM and AMD's
APM reference flags/features by the bit number, not by their mask, making
it absurdly difficult to audit and/or add definitions.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220608235238.3881916-2-seanjc@google.com

show more ...


# 31e68df7 08-Jun-2020 Paolo Bonzini <pbonzini@redhat.com>

x86: always set up SMP

Currently setup_vm cannot assume that it can invoke IPIs, and therefore
only initializes CR0/CR3/CR4 on the CPU it runs on. In order to keep the
initialization code clean, le

x86: always set up SMP

Currently setup_vm cannot assume that it can invoke IPIs, and therefore
only initializes CR0/CR3/CR4 on the CPU it runs on. In order to keep the
initialization code clean, let's just call smp_init (and therefore
setup_idt) unconditionally.

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

show more ...


# a299895b 06-Dec-2019 Thomas Huth <thuth@redhat.com>

Switch the order of the parameters in report() and report_xfail()

Commit c09c54c66b1df ("lib: use an argument which doesn't require
default argument promotion") fixed a warning that occurs with Clan

Switch the order of the parameters in report() and report_xfail()

Commit c09c54c66b1df ("lib: use an argument which doesn't require
default argument promotion") fixed a warning that occurs with Clang,
but introduced a regression: If the "pass" parameter is a value
which has only set the condition bits in the upper 32 bits of a
64 bit value, the condition is now false since the value is truncated
to "unsigned int" so that the upper bits are simply discarded.

We fixed it by reverting the commit, but that of course also means
trouble with Clang again. We can not use "bool" if it is the last
parameter before the variable argument list. The proper fix is to
swap the parameters around and make the format string the last
parameter.

This patch (except the changes in lib/libcflat.h and lib/report.c
and some rebase conflicts along the way) has basically been created
with following coccinelle script (with some additional manual tweaking
of long and disabled lines afterwards):

@@
expression fmt;
expression pass;
expression list args;
@@
report(
-fmt, pass
+pass, fmt
, args);

@@
expression fmt;
expression pass;
expression list args;
@@
report_xfail(
-fmt, xfail, pass
+xfail, pass, fmt
, args);

Tested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20191206113102.14914-1-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# badc98ca 30-Jul-2019 Krish Sadhukhan <krish.sadhukhan@oracle.com>

kvm-unit-test: x86: Replace cpuid/cpuid_indexed calls with this_cpu_has()

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com>
Signed-off-b

kvm-unit-test: x86: Replace cpuid/cpuid_indexed calls with this_cpu_has()

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 40f559bc 28-Jun-2019 Krish Sadhukhan <krish.sadhukhan@oracle.com>

x86: Remove duplicate definitions of write_cr4_checking() and put it in library

..so that it can be re-used.

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Karl Heubaum <

x86: Remove duplicate definitions of write_cr4_checking() and put it in library

..so that it can be re-used.

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com>
[Add 32-bit version of ASM_TRY. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# db4898e8 27-Jun-2018 Thomas Huth <thuth@redhat.com>

Mark many test functions as static

... so we can compile these files with -Wmissing-prototypes, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1530086528-21665-5-git-send-email-thu

Mark many test functions as static

... so we can compile these files with -Wmissing-prototypes, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1530086528-21665-5-git-send-email-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# fd6aada0 17-May-2017 Radim Krčmář <rkrcmar@redhat.com>

use %# instead of 0x% in all format strings

It's one character shorter, properly prefixed, and also provides error
detection: %#d triggers a warning.

Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to mo

use %# instead of 0x% in all format strings

It's one character shorter, properly prefixed, and also provides error
detection: %#d triggers a warning.

Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to motivate the use of %#,
existing padding was raised by 2 to account for the counted "0x" (output
should be the same).

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

show more ...


# b006d7eb 03-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 ...


# 8b1e9483 12-Dec-2014 Andrew Jones <drjones@redhat.com>

x86: xsave: use report

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


# 985ab97e 03-Apr-2014 Paolo Bonzini <pbonzini@redhat.com>

x86: xsave: use cpuid functions from processor.h

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


# e7c37968 22-Dec-2010 Gleb Natapov <gleb@redhat.com>

Rename idt.[ch] into desc.[ch]

All descriptor related code will go there.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>


# 7d36db35 03-Aug-2010 Avi Kivity <avi@redhat.com>

Initial commit from qemu-kvm.git kvm/test/

Signed-off-by: Avi Kivity <avi@redhat.com>