History log of /kvm-unit-tests/lib/powerpc/asm/hcall.h (Results 1 – 10 of 10)
Revision Date Author Comments
# 0cc3a351 22-Feb-2025 Sean Christopherson <seanjc@google.com>

lib: Use __ASSEMBLER__ instead of __ASSEMBLY__

Convert all non-x86 #ifdefs from __ASSEMBLY__ to __ASSEMBLER__, and remove
all manual __ASSEMBLY__ #defines. __ASSEMBLY_ was inherited blindly from
th

lib: Use __ASSEMBLER__ instead of __ASSEMBLY__

Convert all non-x86 #ifdefs from __ASSEMBLY__ to __ASSEMBLER__, and remove
all manual __ASSEMBLY__ #defines. __ASSEMBLY_ was inherited blindly from
the Linux kernel, and must be manually defined, e.g. through build rules
or with the aforementioned explicit #defines in assembly code.

__ASSEMBLER__ on the other hand is automatically defined by the compiler
when preprocessing assembly, i.e. doesn't require manually #defines for
the code to function correctly.

Ignore x86, as x86 doesn't actually rely on __ASSEMBLY__ at the moment,
and is undergoing a parallel cleanup.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
Message-ID: <20250222014526.2302653-1-seanjc@google.com>
[thuth: Fix three more occurances in libfdt.h and sbi-tests.h]
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# d4c8e725 12-Jun-2024 Nicholas Piggin <npiggin@gmail.com>

powerpc: Add MMU support

Add support for radix MMU, 4kB and 64kB pages.

This also adds MMU interrupt test cases, and runs the interrupts
test entirely with MMU enabled if it is available (aside fro

powerpc: Add MMU support

Add support for radix MMU, 4kB and 64kB pages.

This also adds MMU interrupt test cases, and runs the interrupts
test entirely with MMU enabled if it is available (aside from
machine check tests).

Acked-by: Andrew Jones <andrew.jones@linux.dev> (configure changes)
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240612052322.218726-5-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# e7324a48 08-Jun-2023 Nicholas Piggin <npiggin@gmail.com>

powerpc/spapr_vpa: Add basic VPA tests

The VPA is an optional memory structure shared between the hypervisor
and operating system, defined by PAPR. This test defines the structure
and adds registrat

powerpc/spapr_vpa: Add basic VPA tests

The VPA is an optional memory structure shared between the hypervisor
and operating system, defined by PAPR. This test defines the structure
and adds registration, deregistration, and a few simple sanity tests.

[Thanks to Thomas Huth for suggesting many of the test cases.]

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230608075826.86217-8-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 141b4584 04-Oct-2019 David Gibson <david@gibson.dropbear.id.au>

powerpc: Fix up RTAS invocation for new qemu versions

In order to call RTAS functions on powerpc kvm-unit-tests relies on the
RTAS blob supplied by qemu. But new versions of qemu don't supply an RT

powerpc: Fix up RTAS invocation for new qemu versions

In order to call RTAS functions on powerpc kvm-unit-tests relies on the
RTAS blob supplied by qemu. But new versions of qemu don't supply an RTAS
blob: since the normal way for guests to get RTAS is to call the guest
firmware's instantiate-rtas function, we now rely on that guest firmware
to provide the RTAS code itself.

But qemu-kvm-tests bypasses the usual guest firmware to just run itself,
so we can't get the rtas blob from SLOF.

But.. in fact the RTAS blob under qemu is a bit of a sham anyway - it's
a tiny wrapper that forwards the RTAS call to a hypercall. So, we can
just invoke that hypercall directly.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20191004103844.32590-1-david@gibson.dropbear.id.au>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 1aee4297 07-Feb-2018 Andrew Jones <drjones@redhat.com>

powerpc: Introduce getchar

Move the unit test specific h_get_term_char() to powerpc common code.
Make it __getchar() because it is not blocking, and wrap it with a
real getchar(). Other architecture

powerpc: Introduce getchar

Move the unit test specific h_get_term_char() to powerpc common code.
Make it __getchar() because it is not blocking, and wrap it with a
real getchar(). Other architectures may want to implement __getchar()
too (ARM will in a coming patch), so put the prototype in libcflat.h

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

show more ...


# adb87bc4 19-Aug-2016 Suraj Jitindar Singh <sjitindarsingh@gmail.com>

powerpc/tm: Add a test for H_CEDE while tm suspended

On Power machines if a guest cedes while a tm transaction is in the
suspended state then the checkpointed state of the vcpu may be lost and we
lo

powerpc/tm: Add a test for H_CEDE while tm suspended

On Power machines if a guest cedes while a tm transaction is in the
suspended state then the checkpointed state of the vcpu may be lost and we
lose the cpu in the host.

Add a file for tm tests "powerpc/tm.c" and add a test to check if the fix
has been applied to the host kernel. If this fix hasn't been applied then
the test will never complete and the cpu will be lost. Otherwise the test
should succeed. Since this has the ability to mess things up in the host
mark this test as don't run by default.

This vulnerability has been assigned the ID CVE-2016-5412.

Based on initial work done by: Cyril Bur <cyril.bur@au1.ibm.com>

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# 6842bc34 21-Mar-2016 Laurent Vivier <lvivier@redhat.com>

powerpc: add exception handler

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <dgibson@redhat.com>
Message-Id: <1458560014-28862-2-git-send-email-lvivier@redhat.com>
Si

powerpc: add exception handler

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <dgibson@redhat.com>
Message-Id: <1458560014-28862-2-git-send-email-lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# c20e1e54 02-Mar-2016 Thomas Huth <thuth@redhat.com>

powerpc: Add tests for sPAPR h-calls

Introduce a test for sPAPR hypercalls, starting with the
three hypercalls H_SET_SPRG0, H_PAGE_INIT and H_RANDOM.

Signed-off-by: Thomas Huth <thuth@redhat.com>
M

powerpc: Add tests for sPAPR h-calls

Introduce a test for sPAPR hypercalls, starting with the
three hypercalls H_SET_SPRG0, H_PAGE_INIT and H_RANDOM.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1456908043-11184-1-git-send-email-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# f1df8658 29-Feb-2016 Paolo Bonzini <pbonzini@redhat.com>

Merge branch 'ppc64/initial-drop-v7' of https://github.com/rhdrjones/kvm-unit-tests into HEAD

This series brings basic setup; starts a test's C entry point, main(),
and printf, exit, and malloc work

Merge branch 'ppc64/initial-drop-v7' of https://github.com/rhdrjones/kvm-unit-tests into HEAD

This series brings basic setup; starts a test's C entry point, main(),
and printf, exit, and malloc work. Three more series should follow this
one which must bring; vector support, mmu support, and smp support, at
which point I believe the framework could just evolve with the creation
of unit tests.

Tested on TCG and a P8 kvm_pr machine, and Laurent has tested it on
both a PowerMac G5 (kvm_pr) and a kvm_hv machine. I'm looking forward
to hearing more testing feedback from others though.

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

show more ...


# e65bcc62 17-Jul-2015 Andrew Jones <drjones@redhat.com>

powerpc/ppc64: add hcall support and putchar

Add broken sc1 detection and patching and an hcall for putchar,
to use in puts. That, along with a couple more lines in start to
prepare for C code, and

powerpc/ppc64: add hcall support and putchar

Add broken sc1 detection and patching and an hcall for putchar,
to use in puts. That, along with a couple more lines in start to
prepare for C code, and a branch to main(), gets us "hello world".
Run with

qemu-system-ppc64 -M pseries \
-bios powerpc/boot_rom.bin \
-display none -serial stdio \
-kernel powerpc/selftest.elf

(We're still not relocating yet, that comes in a later patch. Thus,
testing hello-world at this point requires a hacked QEMU and linking
the unit test at QEMU's kernel load address.)

Signed-off-by: Andrew Jones <drjones@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

show more ...