On 15 June 2015 at 16:36, Alex Züpke <alexander.zue...@hs-rm.de> wrote: > So this is the way to go: > > --- a/target-arm/translate.c > +++ b/target-arm/translate.c > @@ -4084,6 +4084,7 @@ static void gen_nop_hint(DisasContext *s, int val) > gen_set_pc_im(s, s->pc); > s->is_jmp = DISAS_WFI; > break; > + case 1: /* yield */ > case 2: /* wfe */ > gen_set_pc_im(s, s->pc); > s->is_jmp = DISAS_WFE;
Actually I want to split out the yield code path from the wfe one, because some day we may actually implement WFE as WFE, at which point WFE has some trap-to-EL2 logic that YIELD doesn't. I was about to write a patch to do that... (If you plan to run your custom OS under a hypervisor you might prefer SEV/WFE over YIELD, because then if your custom OS is under heavy load the hypervisor has a chance to swap this vcpu out and run some other one.) thanks -- PMM