From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48E47FA3728 for ; Wed, 16 Oct 2019 16:38:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D12E21928 for ; Wed, 16 Oct 2019 16:38:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406351AbfJPQiu (ORCPT ); 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-Google-Smtp-Source: APXvYqyTRKkY7xojuOdJ8XLJRUq8YBcEngwDEOfnwMsHIoBx2ccVCj7UoQkvx5J80rejnnTYAPIXcw== 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