From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753548AbcHQVft (ORCPT ); Wed, 17 Aug 2016 17:35:49 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:35632 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753386AbcHQVfr (ORCPT ); Wed, 17 Aug 2016 17:35:47 -0400 MIME-Version: 1.0 In-Reply-To: References: <8de26c33-5597-bf00-2ac5-d265ba01d0d4@redhat.com> From: Linus Torvalds Date: Wed, 17 Aug 2016 14:35:46 -0700 X-Google-Sender-Auth: derbmfRXsuND9rlyvg4WTuZdORI Message-ID: Subject: Re: RFC: Petition Intel/AMD to add POPF_IF insn To: Denys Vlasenko Cc: Andy Lutomirski , Sara Sharon , Dan Williams , =?UTF-8?Q?Christian_K=C3=B6nig?= , Vinod Koul , Alex Deucher , Johannes Berg , "Rafael J. Wysocki" , Andy Lutomirski , "the arch/x86 maintainers" , Ingo Molnar , LKML , Adrian Hunter Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 17, 2016 at 2:26 PM, Linus Torvalds wrote: > > Of course, if somebody uses native_restore_fl() to actually *disable* > interrupts (when they weren't already disabled), then this untested > patch will just not work. But why would you do somethign so stupid? > Famous last words... Looking around, the vsmp code actually uses "native_restore_fl()" to not just set the interrupt flag, but AC as well. And the PV spinlock case has that "push;popf" sequence encoded in an alternate. So that trivial patch may (or may not - still not tested) work for some quick testing, but needs more effort for any *real* use. Linus