History log of /kvm-unit-tests/lib/powerpc/handlers.c (Results 1 – 4 of 4)
Revision Date Author Comments
# ba33a96f 08-Jun-2023 Nicholas Piggin <npiggin@gmail.com>

powerpc: Abstract H_CEDE calls into a sleep functions

This consolidates several implementations, and it no longer leaves
MSR[EE] enabled after the decrementer interrupt is handled, but
rather disabl

powerpc: Abstract H_CEDE calls into a sleep functions

This consolidates several implementations, and it no longer leaves
MSR[EE] enabled after the decrementer interrupt is handled, but
rather disables it on return.

The handler no longer allows a continuous ticking, but rather dec
has to be re-armed and EE re-enabled (e.g., via H_CEDE hcall) each
time.

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

show more ...


# 6af53d29 06-Jun-2019 Paolo Bonzini <pbonzini@redhat.com>

Merge tag 'ppc-next-pull-request' of https://github.com/vivier/kvm-unit-tests into HEAD

Fix h_cede_tm timeout


# 3ff90d5f 15-May-2019 Suraj Jitindar Singh <sjitindarsingh@gmail.com>

powerpc: Allow for a custom decr value to be specified to load on decr excp

Currently the handler for a decrementer exception will simply reload the
maximum value (0x7FFFFFFF), which will take ~4 se

powerpc: Allow for a custom decr value to be specified to load on decr excp

Currently the handler for a decrementer exception will simply reload the
maximum value (0x7FFFFFFF), which will take ~4 seconds to expire again.
This means that if a vcpu cedes, it will be ~4 seconds between wakeups.

The h_cede_tm test is testing a known breakage when a guest cedes while
suspended. To be sure we cede 500 times to check for the bug. However
since it takes ~4 seconds to be woken up once we've ceded, we only get
through ~20 iterations before we reach the 90 seconds timeout and the
test appears to fail.

Add an option when registering the decrementer handler to specify the
value which should be reloaded by the handler, allowing the timeout to be
chosen.

Modify the spr test to use the max timeout to preserve existing
behaviour.
Modify the h_cede_tm test to use a 10ms timeout to ensure we can perform
500 iterations before hitting the 90 second time limit for a test.

This means the h_cede_tm test now succeeds rather than timing out.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
[lv: reset initial value to 0x3FFFFFFF]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>

show more ...


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

lib/powerpc: Add generic decrementer exception handler

Add the lib/powerpc/handlers.c file and associated header files as a place
to implement generic exception handler functions for inclusion in te

lib/powerpc: Add generic decrementer exception handler

Add the lib/powerpc/handlers.c file and associated header files as a place
to implement generic exception handler functions for inclusion in tests.

Add a generic exception handler for a decrementer (0x900) interrupt which
will reset the decrementer to its maximum value.

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

show more ...