[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v3 08/12] target/ppc: Add new H-CALL shells for in
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH v3 08/12] target/ppc: Add new H-CALL shells for in memory table translation |
Date: |
Fri, 3 Mar 2017 14:40:47 +1100 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Fri, Mar 03, 2017 at 01:16:05PM +1100, Alexey Kardashevskiy wrote:
> On 02/03/17 16:39, Sam Bobroff wrote:
> > From: Suraj Jitindar Singh <address@hidden>
> >
> > The use of the new in memory tables introduced in ISAv3.00 for translation,
> > also referred to as process tables, requires the introduction of 3 new
> > H-CALLs; H_REGISTER_PROCESS_TABLE, H_CLEAN_SLB, and H_INVALIDATE_PID.
> >
> > Add shells for each of these and register them as the hypercall handlers.
> > Currently they all log an unimplemented hypercall and return H_FUNCTION.
>
>
> How exactly is this more useful than just not having these hypercalls
> defined at all?
In terms of actual functionality, it's not. But I'm ok with putting
stubs in then expanding on them - makes the patches a little easier to
follow.
> > Signed-off-by: Suraj Jitindar Singh <address@hidden>
> > ---
> > Changes in v3:
> > * Brought in from Suraj's work.
> >
> > hw/ppc/spapr_hcall.c | 31 +++++++++++++++++++++++++++++++
> > include/hw/ppc/spapr.h | 3 +++
> > 2 files changed, 34 insertions(+)
> >
> > diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
> > index 0c1b0326ad..cd0d8b068c 100644
> > --- a/hw/ppc/spapr_hcall.c
> > +++ b/hw/ppc/spapr_hcall.c
> > @@ -878,6 +878,32 @@ static target_ulong h_set_mode(PowerPCCPU *cpu,
> > sPAPRMachineState *spapr,
> > return ret;
> > }
> >
> > +static target_ulong h_clean_slb(PowerPCCPU *cpu, sPAPRMachineState *spapr,
> > + target_ulong opcode, target_ulong *args)
> > +{
> > + qemu_log_mask(LOG_UNIMP, "Unimplemented SPAPR hcall 0x" TARGET_FMT_lx
> > "%s\n",
> > + opcode, " (H_CLEAN_SLB)");
> > + return H_FUNCTION;
> > +}
> > +
> > +static target_ulong h_invalidate_pid(PowerPCCPU *cpu, sPAPRMachineState
> > *spapr,
> > + target_ulong opcode, target_ulong
> > *args)
> > +{
> > + qemu_log_mask(LOG_UNIMP, "Unimplemented SPAPR hcall 0x" TARGET_FMT_lx
> > "%s\n",
> > + opcode, " (H_INVALIDATE_PID)");
> > + return H_FUNCTION;
> > +}
> > +
> > +static target_ulong h_register_process_table(PowerPCCPU *cpu,
> > + sPAPRMachineState *spapr,
> > + target_ulong opcode,
> > + target_ulong *args)
> > +{
> > + qemu_log_mask(LOG_UNIMP, "Unimplemented SPAPR hcall 0x" TARGET_FMT_lx
> > "%s\n",
> > + opcode, " (H_REGISTER_PROC_TBL)");
> > + return H_FUNCTION;
> > +}
> > +
> > #define H_SIGNAL_SYS_RESET_ALL -1
> > #define H_SIGNAL_SYS_RESET_ALLBUTSELF -2
> >
> > @@ -1094,6 +1120,11 @@ static void hypercall_register_types(void)
> > spapr_register_hypercall(H_PAGE_INIT, h_page_init);
> > spapr_register_hypercall(H_SET_MODE, h_set_mode);
> >
> > + /* In Memory Table MMU h-calls */
> > + spapr_register_hypercall(H_CLEAN_SLB, h_clean_slb);
> > + spapr_register_hypercall(H_INVALIDATE_PID, h_invalidate_pid);
> > + spapr_register_hypercall(H_REGISTER_PROC_TBL,
> > h_register_process_table);
> > +
> > /* "debugger" hcalls (also used by SLOF). Note: We do -not-
> > differenciate
> > * here between the "CI" and the "CACHE" variants, they will use
> > whatever
> > * mapping attributes qemu is using. When using KVM, the kernel will
> > diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
> > index 24da5dc27e..08cdb83953 100644
> > --- a/include/hw/ppc/spapr.h
> > +++ b/include/hw/ppc/spapr.h
> > @@ -347,6 +347,9 @@ struct sPAPRMachineState {
> > #define H_XIRR_X 0x2FC
> > #define H_RANDOM 0x300
> > #define H_SET_MODE 0x31C
> > +#define H_CLEAN_SLB 0x374
> > +#define H_INVALIDATE_PID 0x378
> > +#define H_REGISTER_PROC_TBL 0x37C
> > #define H_SIGNAL_SYS_RESET 0x380
> > #define MAX_HCALL_OPCODE H_SIGNAL_SYS_RESET
> >
> >
>
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-ppc] [PATCH v3 03/12] scripts/update-linux-headers.sh: add new files for ARM, (continued)
- [Qemu-ppc] [PATCH v3 03/12] scripts/update-linux-headers.sh: add new files for ARM, Sam Bobroff, 2017/03/02
- [Qemu-ppc] [PATCH v3 02/12] scripts/update-linux-headers.sh: refactor extra files, Sam Bobroff, 2017/03/02
- [Qemu-ppc] [PATCH v3 01/12] spapr: Small cleanup of PPC MMU enums, Sam Bobroff, 2017/03/02
- [Qemu-ppc] [PATCH v3 04/12] Update headers using update-linux-headers.sh, Sam Bobroff, 2017/03/02
- [Qemu-ppc] [PATCH v3 08/12] target/ppc: Add new H-CALL shells for in memory table translation, Sam Bobroff, 2017/03/02
- [Qemu-ppc] [PATCH v3 09/12] target/ppc: Implement H_REGISTER_PROCESS_TABLE H_CALL, Sam Bobroff, 2017/03/02
- [Qemu-ppc] [PATCH v3 05/12] spapr: Add ibm, processor-radix-AP-encodings to the device tree, Sam Bobroff, 2017/03/02
- [Qemu-ppc] [PATCH v3 12/12] spapr: Workaround for broken radix guests, Sam Bobroff, 2017/03/02