On Wed, Nov 18, 2020 at 07:47:36AM +0100, Jürgen Groß wrote: > On 16.11.20 14:04, Peter Zijlstra wrote: > > On Mon, Nov 16, 2020 at 12:56:32PM +0100, Jürgen Groß wrote: > > > > > > > > > static inline notrace unsigned long > > > > > > > > > arch_local_save_flags(void) > > > > > > > > > { > > > > > > > > > PVOP_CALL_ARGS; > > > > > > > > > PVOP_TEST_NULL(irq.save_fl); > > > > > > > > > asm_inline > > > > > > > > > volatile(ALTERNATIVE(paravirt_alt(PARAVIRT_CALL), > > > > > > > > > "PUSHF; POP _ASM_AX", > > > > > > > > > X86_FEATURE_NATIVE) > > > > > > I am wondering whether we really want a new feature (basically "not > > > XENPV). We could use ~X86_FEATURE_XENPV and teach apply_alternatives() > > > to understand negated features (yes, this limits the number of features > > > to 32767, but I don't think this is a real problem for quite some time). > > > > > > Thoughts? > > > > I went with the simple thing for now... If we ever want/need another > > negative alternative I suppose we can do as you suggest... > > > > I was still poking at objtool to actually dtrt though.. > > I'd like to include this part in my series (with a different solution > for the restore_fl part, as suggested by Andy before). > > Peter, are you fine with me taking your patch and adding your SoB?
Sure, note that I only compile tested it, as it was my test-bed for playing with objtool (which I still haven't managed to get back to and finish :/). So if it actually _works_ feel free to take it, otherwise you can have whatever bits and pieces remain after you've butchered it to do as you want.