On Fri, Sep 24, 2021 at 10:57 PM Richard Henderson <richard.hender...@linaro.org> wrote: > > On 9/24/21 2:48 AM, Alistair Francis wrote: > >> But... more specific to this case. Prior to this, was the exception > >> handler allowed to > >> assume anything about the contents of stval? Should the value have been > >> zero? Would it > >> be wrong to write to stval unconditionally? How does the guest OS know > >> that it can rely > >> on stval being set? > > > > As we didn't support writing the illegal instruction stval should be > > zero before this patch. > > Ok, that didn't quite answer the question... > > If *wasn't* zero before this patch: we didn't write anything at all, and so > keep whatever > previous value the previous exception wrote. > > Is that a bug that needs fixing? Because you're still not writing anything > to stval if > !MTVAL_INST...
Yeah, that sounds like a bug then. > > >> I simply wonder whether it's worthwhile to add the feature and feature > >> test. > > > > Do you just mean have it enabled all the time? > > Yes, if without this feature the value of stval was undefined. Ok, I'll have another look at this. Thanks for pointing this out. Alistair > > > r~