Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp913500ybp; Thu, 17 Oct 2019 05:31:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0zQ4S44KoPuRrNAW9d7Qh5bpG+GbLMlWNSYN7Anx9agc5JcbZHJl1e3jSbQiLR0EZhMcA X-Received: by 2002:a17:906:af8e:: with SMTP id mj14mr3303539ejb.45.1571315462199; Thu, 17 Oct 2019 05:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571315462; cv=none; d=google.com; s=arc-20160816; b=DLVg85HH8g1r9RXK/Z5kuBtq767Vcp8v2k2d+pUNDddsTDFKG3y0JvJlNPxCnYgjzN /w5u4iQP6UvD95hsq75YOuzPvyAHjQxezIpl+RF53rWJHD6JT7Ug26lZw0kU+c8RgUQV HnLRi+VYdqtuDO/LZ5zJW0bGX9KA8gxQf/3Qd3z4s4pthD2P8XfC4UNZ7LWoRcAexyMH j20DETqaxxt6dCBGgVtndFAECXDgEGMzOh3BR715DxyxyntJ2hZ/tzdvmp7txa1ZpBxL lR7bNF+XMSSsLdfQKG7DO8bFxZNJBBx1ZoBNXUkcLYz7aJHvCqe/9erL1lH917kqEYwK x+BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject; bh=vjbKDvVFPL0th2krdx8wMvub7uxuN9FX2tXsWBpSZGA=; b=u+DJQlI+Y8Tphlgt4ml0uI2FdV79VdX17cDSNY/cwQwxa/syEugz12uk1HGfmEmGtr bakMlGcZeaKvzrWEC9D+Kl4qXds5omx6bfQrba76rHE5l1V6/iKiB7YGhJhkAyoAuQAW +T7qdwOQ0l0TZIObu7gvAhK5G32TLmbeacyXnZcISsF+jtOVdPPZ0yZ4PwqTKpLO5isJ 9h8c20hwqLNMbxNaxA/s2w8kNjV27+lgmK8JNrhTFQqcq3EZuX1t2gLB9sbJB0CT9VjQ hpIxJ06pApcbdZ62+O0DCheo914oDqbZIfgHWRWK3bW7SCqcxIotmSxaSIzvqoU/xIDr mXVA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x30si1460975edi.351.2019.10.17.05.30.39; Thu, 17 Oct 2019 05:31:02 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406338AbfJPQiu (ORCPT + 99 others); Wed, 16 Oct 2019 12:38:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47716 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731480AbfJPQit (ORCPT ); Wed, 16 Oct 2019 12:38:49 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 07E69C0546D5 for ; Wed, 16 Oct 2019 16:38:49 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id i10so11969140wrb.20 for ; Wed, 16 Oct 2019 09:38:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vjbKDvVFPL0th2krdx8wMvub7uxuN9FX2tXsWBpSZGA=; b=WZKn6sCBQ24KO019zMjKMvll4v7PAVBBtxOG3Sq5o2E8+81FXvQJL/Nrzun4UVxZPa /gSzjuTpA1GZC3aSHXZ4jhc4lNfGgZvg8EZ9HlWaAA73L7eH4p1gh9aCTfQALr3/uBWp UshYEgWtvrx0dVdiM3jf2yJcFiiI7+4c4BQd/Ai9Jh5t1CU6Ix0em018g24AE2TkTdII gCj6mPo/2s3QJY8a3ED6R/4r4dGpSXEckdPsGzLWL97rtS7Z1zzEH7FXVngZ8FKewJcQ +hsWia8dcMlXR2nM/Vc848Q0p/uw/1VBTHoolLGeYzTACKP6+7o39V/OO9HfB2j6Hbt8 CNWQ== X-Gm-Message-State: APjAAAU/rpLYhT39d6HUpO5Kh6AcuK3+i8rJatAChrNyddDaMcincsBn NlUUa1XAvKlPfqLMIs5cjakbJVyAl+hD5a1kI0G61Bql8k11/tQQw9jbpv5HLT+h3bSou/HzqKn Am8mQsaR6IphUANzUDdG1luE8 X-Received: by 2002:a1c:1bc5:: with SMTP id b188mr4397254wmb.88.1571243927616; Wed, 16 Oct 2019 09:38:47 -0700 (PDT) X-Received: by 2002:a1c:1bc5:: with SMTP id b188mr4397221wmb.88.1571243927350; Wed, 16 Oct 2019 09:38:47 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:d001:591b:c73b:6c41? ([2001:b07:6468:f312:d001:591b:c73b:6c41]) by smtp.gmail.com with ESMTPSA id b62sm4008159wmc.13.2019.10.16.09.38.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Oct 2019 09:38:46 -0700 (PDT) Subject: Re: [PATCH v9 09/17] x86/split_lock: Handle #AC exception for split lock To: Xiaoyao Li , Thomas Gleixner Cc: Sean Christopherson , 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 References: <1560897679-228028-1-git-send-email-fenghua.yu@intel.com> <1560897679-228028-10-git-send-email-fenghua.yu@intel.com> <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> <8808c9ac-0906-5eec-a31f-27cbec778f9c@intel.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: Date: Wed, 16 Oct 2019 18:38:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/10/19 18:25, Xiaoyao Li wrote: >> >>    3 | Y         |     Y       |  N  |   Y     |   x   | Switch >> MSR_TEST_CTRL on >>      |           |             |     |         |       | enter/exit, >> plus: >>      |           |             |     |         |       | A) #AC >> forwarded to guest. >>      |           |             |     |         |       | B) SIGBUS or >> KVM exit code >> > > I just want to get confirmed that in (3), we should split into 2 case: > > a) if host has it enabled, still apply the constraint that guest is > forcibly enabled? so we don't switch MSR_TEST_CTL. > > b) if host has it disabled, we can switch MSR_TEST_CTL on enter/exit. That's doable, yes. Paolo