Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp140845ybp; Wed, 16 Oct 2019 15:21:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsJzNXph/teRHQsAjtu4M6k+ZHURdyCaM/GlEhsMWpdVMJDtfzmC9w/2JS+J8u4LjMmiur X-Received: by 2002:aa7:d753:: with SMTP id a19mr569631eds.80.1571264506786; Wed, 16 Oct 2019 15:21:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571264506; cv=none; d=google.com; s=arc-20160816; b=zUSUdhrqa8UYPC5aCOhhjEQ1zkEVdH48gDENyKpctntyYu47ciBizt22XirzsHTw1T U4NVECIL4FpHPoinem/e+GwBeR2rFi/M5jqxecUuu7ryqX3hOH2mkS+hcDZ2NJCh6j8H SN7xqVwzTNqiHm7h8Z0m3J/Ya+vlc7//JKRtZRNOWl5JGrJ4NUx3Gtezu66bVuUqXVWz eiFFnrVWtC4A3Sc+OTtlnHvkLOAMVopPxpHjuFPu90Jf+j4zAGScMcxKGFtzmmjY1XTh bhwMmoEJNO5d94b1oC9dp0Tclvxb+VdajiolG7+3S319Zui4or4ww10UlbhVvskdWJKB SUpg== 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; bh=DmnfPCyAHZLdfMHH7FbLbDVDVgyw1tFTXslQRc8/SF0=; b=QfIB9EMNPKYcCbFPJEErSuxXRjzNtU8L3AAk4LWXLxty2rRlmiKVV8hFzcvgVQpBqz Vi/194JGM/JnHC1tgmEoVOZe7nBU1dDOYuTr+Rqa0PU8FsAlmEgD7ZpTu5E+jGIBIQ5+ 9byI6HFlnOU34eP4KOg2Se6Yb8YIvVqtzQcSRu6X0PTqDgDRwee7yuuRMeQu3V0MVcmu v0xL7/AUIHNF2lmFRTaIjXmHzzrbaGlHUGjdEO5w4GDTO95TLjXXqwOQ8ykc0H7O5mUY LpzYDh8OPmrmkG98jfk66xTauDg0om1eh+svMGhZ9WpSt/DYK/yCvb0O5DNGSR6OmKS5 aeyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id ck7si244303ejb.250.2019.10.16.15.21.20; Wed, 16 Oct 2019 15:21:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2405503AbfJPPlS (ORCPT + 99 others); Wed, 16 Oct 2019 11:41:18 -0400 Received: from mga14.intel.com ([192.55.52.115]:33013 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726985AbfJPPlR (ORCPT ); Wed, 16 Oct 2019 11:41:17 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 08:41:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,304,1566889200"; d="scan'208";a="370834587" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.41]) by orsmga005.jf.intel.com with ESMTP; 16 Oct 2019 08:41:16 -0700 Date: Wed, 16 Oct 2019 08:41:16 -0700 From: Sean Christopherson To: Paolo Bonzini Cc: Xiaoyao Li , Thomas Gleixner , Fenghua Yu , Ingo Molnar , Borislav Petkov , H Peter Anvin , Peter Zijlstra , Andrew Morton , Dave Hansen , Radim Krcmar , Ashok Raj , Tony Luck , Dan Williams , Sai Praneeth Prakhya , Ravi V Shankar , linux-kernel , x86 , kvm@vger.kernel.org Subject: Re: [PATCH v9 09/17] x86/split_lock: Handle #AC exception for split lock Message-ID: <20191016154116.GA5866@linux.intel.com> References: <20190626203637.GC245468@romley-ivt3.sc.intel.com> <20190925180931.GG31852@linux.intel.com> <3ec328dc-2763-9da5-28d6-e28970262c58@redhat.com> <57f40083-9063-5d41-f06d-fa1ae4c78ec6@redhat.com> <3a12810b-1196-b70a-aa2e-9fe17dc7341a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed, Oct 16, 2019 at 04:08:14PM +0200, Paolo Bonzini wrote: > SIGBUS (actually a new KVM_EXIT_INTERNAL_ERROR result from KVM_RUN is > better, but that's the idea) is for when you're debugging guests. > Global disable (or alternatively, disable SMT) is for production use. Alternatively, for guests without split-lock #AC enabled, what if KVM were to emulate the faulting instruction with split-lock detection temporarily disabled? The emulator can presumably handle all such lock instructions, and an unhandled instruction would naturally exit to userspace. The latency of VM-Enter+VM-Exit should be enough to guard against DoS from a malicious guest. KVM could also artificially rate-limit a guest that is generating copious amounts of split-lock #ACs.