Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp726759ybm; Fri, 29 May 2020 10:39:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8LNbQ2HvVyVCpMbXDAFxB+C8U7oqkH6mlv1F7KuWgI6XjiPxihRVGsP4j/Ugly3i2pAIF X-Received: by 2002:a17:906:9149:: with SMTP id y9mr3428256ejw.153.1590773961588; Fri, 29 May 2020 10:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590773961; cv=none; d=google.com; s=arc-20160816; b=K1zWIM0O1aCIbDIQqNtTqB3/s8W+6p8iAS5UhcEsK9fBD1wMrr4u6oLJYZ1SFcwxUT O3miaqSUil1f2luL9q2Z5edV+2/Jj0fbUaYFEaXxfWszL0txFxjaWX7yI+xzCY4u9UVb CGJwxE6Ztn34WdFn428DP4p74SkKDOXb1AApDIxNCIxzhJTG/xupxfGMUEvXGmOy0zyr LPnYzIF0had7nxNumPf4NkRORYFF7MMUC6ZREdX0akKe3iWJq5tGXL117gdNPPA9OEQs +6slcKHjhZLTlv0G/oZmaan7PXRl92oX3uwzHou+rIFr/YdcyV8o/zPIAb/zOlS5FkMl XdPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=XfQc+tNEQ2STJ/QU4iFga8lmdf9rCshLtCjXw1kYtd8=; b=kuT3kpceOiY1xA6S0hHTIlRxCo02n7xaFviHEJvjfqQNSh/6roiyiUr09cGL3OUg/F hr3/0vVUm0nJC4e4rdUa7ioE8ob3tf3xLQAJwpsAcwGhXaZZTD/ICS58JQ29oN598pUa +4N794u4S5F4UpYoicYef83YOItwlTgjxOcuXu/RxMIEdsy0xS9nqj2raBqTtnh6dO7A nh7L/FwlQyHj0hgFw4JGhF4iISSB2HDDYCfWaoGVQSOc3xJeZ0FoDOTq8J0i+HHhu5y5 JmbBHIa7XPBW1ZI/FXoNF0igKLB4bctbCuzJst3Gn1+egIu+HBe4b7U8kDOgwA1CXP8D V9xQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o10si6243917ejr.656.2020.05.29.10.38.58; Fri, 29 May 2020 10:39:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727925AbgE2Re6 (ORCPT + 99 others); Fri, 29 May 2020 13:34:58 -0400 Received: from mga09.intel.com ([134.134.136.24]:13511 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbgE2Rez (ORCPT ); Fri, 29 May 2020 13:34:55 -0400 IronPort-SDR: 0oK4f+LtEWUP6m/LRl+af91AjsooN6Kc8AFiUK1QFde8bWialBlN0q067LvDEa+6gVk+iLZffX NqTTlpuPNHAA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2020 10:24:49 -0700 IronPort-SDR: pjit+dMEA0v2x6153vaNVYMCYKhJQLWoIcDIBmhsu+ASCXhOlJCgyc12otZuQNnEKZPHKk6okx kJ5GZswLDfUA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,449,1583222400"; d="scan'208";a="256568441" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by orsmga007.jf.intel.com with ESMTP; 29 May 2020 10:24:49 -0700 Date: Fri, 29 May 2020 10:24:49 -0700 From: Sean Christopherson To: Peter Zijlstra Cc: tglx@linutronix.de, luto@amacapital.net, linux-kernel@vger.kernel.org, x86@kernel.org, Lai Jiangshan , andrew.cooper3@citrix.com, daniel.thompson@linaro.org, Andy Lutomirski Subject: Re: [PATCH 4/6] x86/entry: Optimize local_db_save() for virt Message-ID: <20200529172448.GA1074@linux.intel.com> References: <20200528201937.038455891@infradead.org> <20200528202328.588432451@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200528202328.588432451@infradead.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 28, 2020 at 10:19:41PM +0200, Peter Zijlstra wrote: > static int arch_bp_generic_len(int x86_len) > --- a/arch/x86/kvm/vmx/nested.c > +++ b/arch/x86/kvm/vmx/nested.c > @@ -3027,6 +3027,8 @@ static int nested_vmx_check_vmentry_hw(s > > /* > * VMExit clears RFLAGS.IF and DR7, even on a consistency check. > + * XXX how is this not broken? access to cpu_dr7 ought to be with > + * IRQs disabled. Ah, it's simply broken. This code is conditional on a module param that's off by default, i.e. it's not run widely, and odds are intersection with debugging is rare. Moving local_irq_enable() below the DR7 restoration is not an issue. Maybe also add lockdep_assert_irqs_disabled() to hw_breakpoint_restore() or hw_breakpoint_active()? > */ > local_irq_enable(); > if (hw_breakpoint_active()) > >