Skip to content

Commit

Permalink
spapr: nested: Introduce H_GUEST_RUN_VCPU hcall.
Browse files Browse the repository at this point in the history
The H_GUEST_RUN_VCPU hcall is used to start execution of a Guest VCPU.
The Hypervisor will update the state of the Guest VCPU based on the
input buffer, restore the saved Guest VCPU state, and start its
execution.

The Guest VCPU can stop running for numerous reasons including HCALLs,
hypervisor exceptions, or an outstanding Host Partition Interrupt.
The reason that the Guest VCPU stopped running is communicated through
R4 and the output buffer will be filled in with any relevant state.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
  • Loading branch information
Harsh Prateek Bora authored and npiggin committed Mar 12, 2024
1 parent 98823ce commit 4977110
Show file tree
Hide file tree
Showing 3 changed files with 316 additions and 30 deletions.
10 changes: 10 additions & 0 deletions hw/ppc/ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,16 @@ void cpu_ppc_store_atbu (CPUPPCState *env, uint32_t value)
((uint64_t)value << 32) | tb);
}

void cpu_ppc_increase_tb_by_offset(CPUPPCState *env, int64_t offset)
{
env->tb_env->tb_offset += offset;
}

void cpu_ppc_decrease_tb_by_offset(CPUPPCState *env, int64_t offset)
{
env->tb_env->tb_offset -= offset;
}

uint64_t cpu_ppc_load_vtb(CPUPPCState *env)
{
ppc_tb_t *tb_env = env->tb_env;
Expand Down

0 comments on commit 4977110

Please sign in to comment.