Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2000854ybd; Thu, 27 Jun 2019 05:13:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAq6sNNz7LTsxZnUkCcCstTO69PASV/Ygqr+6OaBTD+V5uTHfuSUPwSINewajSted0kFyl X-Received: by 2002:a17:902:8d92:: with SMTP id v18mr4376447plo.211.1561637619162; Thu, 27 Jun 2019 05:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561637619; cv=none; d=google.com; s=arc-20160816; b=rJP5Otvb+cUjncW3IK8Jz10OlNm5Rrzv/FVnkAoNKhHErt0AHdxnuKQn13mHNW3FtI Zzrmpqa8lf1CPiZKa3HIHBQbxjY8TIgw1nh3W3aSL4PooiNTxnBUEGha/FnDoyDH16P8 Fg0tfFeg14JHk5Xh6rYxIBICwLAt9auYXBM/eEIGD3xQbEWuYxxj9AG20r9cRk4HxXoQ 47ibwGBcQ+qgCzDRAPJsrAAgLfw6nwkHJlImgEsRt/4iDHDZUV+UsUgjkuDUJK6XMPTL uU7LA8SdsHnj8I5buE5oYB5xemYiZRj4KUJGw0ApinC+J8lke/mto+wXn8SVnybMmWvk K4sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=hQeafUARx4bmzcT8azKU+QmeVQANPbodqBoY8gFG+mA=; b=nN6eODWE42xp4kTvr55gEVJK5LyFY4L9ErT1OtZY+rDr0+Qk/5+VpKDoxzMyOrc6uh PmuUM4fub+VkP25APw6EbiSYD/wagN4w1nd/9ue/06XJMaJzb9JkHMmHeirf4oyOhCfF TxbvxtaaP0qvDCAeBooI/tlD8swaXbvaZRpQDEuQIC+1crVyZPM0LU0yv8TWtrF2zTKG Sz4JOCXF7L9snbqxgHYFDQ/MqvmJq+ipWgIyiweDUoKhLb8vHIcM9hbfEa/9bDBEKcD6 ord36qGuvTJuE0Kz/Ka4tRslpKoRc6a8ZVhkN3HlLNHhSceOrHmKlS+A80RFvI2VI2Yw vuWA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si2045473pgo.463.2019.06.27.05.13.15; Thu, 27 Jun 2019 05:13:39 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726937AbfF0MMG (ORCPT + 99 others); Thu, 27 Jun 2019 08:12:06 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:53483 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726465AbfF0MMF (ORCPT ); Thu, 27 Jun 2019 08:12:05 -0400 Received: from p5b06daab.dip0.t-ipconnect.de ([91.6.218.171] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hgTFg-0001sk-Kg; Thu, 27 Jun 2019 14:11:44 +0200 Date: Thu, 27 Jun 2019 14:11:43 +0200 (CEST) From: Thomas Gleixner To: Xiaoyao Li cc: Fenghua Yu , Ingo Molnar , Borislav Petkov , H Peter Anvin , Peter Zijlstra , Andrew Morton , Dave Hansen , Paolo Bonzini , Radim Krcmar , Christopherson Sean J , Ashok Raj , Tony Luck , Dan Williams , Xiaoyao Li , Sai Praneeth Prakhya , Ravi V Shankar , linux-kernel , x86 , kvm@vger.kernel.org Subject: Re: [PATCH v9 11/17] kvm/vmx: Emulate MSR TEST_CTL In-Reply-To: Message-ID: References: <1560897679-228028-1-git-send-email-fenghua.yu@intel.com> <1560897679-228028-12-git-send-email-fenghua.yu@intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Jun 2019, Xiaoyao Li wrote: > On 6/27/2019 3:12 PM, Thomas Gleixner wrote: > > The real interesting question is whether the #AC on split lock prevents the > > actual bus lock or not. If it does then the above is fine. > > > > If not, then it would be trivial for a malicious guest to set the > > SPLIT_LOCK_ENABLE bit and "handle" the exception pro forma, return to the > > offending instruction and trigger another one. It lowers the rate, but that > > doesn't make it any better. > > > > The SDM is as usual too vague to be useful. Please clarify. > > > This feature is to ensure no bus lock (due to split lock) in hardware, that to > say, when bit 29 of TEST_CTL is set, there is no bus lock due to split lock > can be acquired. So enabling this prevents the bus lock, i.e. the exception is raised before that happens. Please add that information to the changelog as well because that's important to know and makes me much more comfortable handing the #AC back into the guest when it has it enabled. Thanks, tglx