On Fri, Jul 19, 2019 at 09:12:16AM +1000, Nicholas Piggin wrote: > Greg Kurz's on July 18, 2019 8:13 pm: > > On Thu, 18 Jul 2019 13:42:11 +1000 > > Nicholas Piggin wrote: > > > >> Implement cpu_exec_enter/exit on ppc which calls into new methods of > >> the same name in PPCVirtualHypervisorClass. These are used by spapr > >> to implement the splpar VPA dispatch counter initially. > >> > >> Signed-off-by: Nicholas Piggin > >> --- > >> Changes since v5: > >> - Move 'prod' into next patch. > >> - Use uint32_t type for dispatch counter. > >> - Add guest error message for incorrect dispatch counter. > >> - Conditionally compile away if CONFIG_USER_ONLY > >> - Small cleanups > >> > >> Changes since v4: > >> - Store to VPA on the way out as well. > >> - Increment the dispatch counter directly in the VPA, which means it will > >> migrate with guest memory the same as KVM. > >> - Prod need not be migrated, add a comment. > >> > >> hw/ppc/spapr.c | 52 +++++++++++++++++++++++++++++++++ > >> hw/ppc/spapr_hcall.c | 5 ---- > >> include/hw/ppc/spapr.h | 7 +++++ > >> target/ppc/cpu.h | 4 +++ > >> target/ppc/translate_init.inc.c | 27 +++++++++++++++++ > >> 5 files changed, 90 insertions(+), 5 deletions(-) > >> > >> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > >> index 821f0d4a49..3e5678d467 100644 > >> --- a/hw/ppc/spapr.c > >> +++ b/hw/ppc/spapr.c > >> @@ -4302,6 +4302,54 @@ PowerPCCPU *spapr_find_cpu(int vcpu_id) > >> return NULL; > >> } > >> > >> +#ifndef CONFIG_USER_ONLY > > > > This file is for system emulation only, no need to guard here. > > > > This is minor and rest looks good. > > > > Reviewed-by: Greg Kurz > > Thanks for all the reviews Greg (and others), they made significant > improvements. David I'm not sure how you like to work with merging > patches, but if you can add the Reviewed-by tags and this issue, then > I won't have to resend. I've fixed it up in my tree. > > Or if you prefer I can fix it up and send to you privately to reduce > list spam. > > Thanks, > Nick > -- 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