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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 BA2ADC282E3 for ; Mon, 27 May 2019 00:12:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FD1820657 for ; Mon, 27 May 2019 00:12:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726046AbfE0AMx (ORCPT ); Sun, 26 May 2019 20:12:53 -0400 Received: from mga05.intel.com ([192.55.52.43]:51181 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726015AbfE0AMx (ORCPT ); Sun, 26 May 2019 20:12:53 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 May 2019 17:12:53 -0700 X-ExtLoop1: 1 Received: from khuang2-desk.gar.corp.intel.com ([10.254.22.77]) by orsmga006.jf.intel.com with ESMTP; 26 May 2019 17:12:50 -0700 Message-ID: <1558915969.17622.8.camel@linux.intel.com> Subject: Re: [PATCH 0/2] Fix reserved bits calculation errors caused by MKTME From: Kai Huang To: "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "rkrcmar@redhat.com" Cc: "Christopherson, Sean J" , "junaids@google.com" , "thomas.lendacky@amd.com" , "brijesh.singh@amd.com" , "guangrong.xiao@gmail.com" , "tglx@linutronix.de" , "bp@alien8.de" , "hpa@zytor.com" Date: Mon, 27 May 2019 12:12:49 +1200 In-Reply-To: <105F7BF4D0229846AF094488D65A098935788A80@PGSMSX112.gar.corp.intel.com> References: <105F7BF4D0229846AF094488D65A098935788A80@PGSMSX112.gar.corp.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.6 (3.24.6-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi Paolo, Kindly ping. Thanks, -Kai On Mon, 2019-05-13 at 03:31 +0000, Huang, Kai wrote: > Hi Paolo/Radim, > > Would you take a look? > > Thanks, > -Kai > > > > -----Original Message----- > > From: Kai Huang [mailto:kai.huang@linux.intel.com] > > Sent: Friday, May 3, 2019 10:09 PM > > To: kvm@vger.kernel.org; pbonzini@redhat.com; rkrcmar@redhat.com > > Cc: Christopherson, Sean J ; > > junaids@google.com; thomas.lendacky@amd.com; brijesh.singh@amd.com; > > guangrong.xiao@gmail.com; tglx@linutronix.de; bp@alien8.de; > > hpa@zytor.com; Huang, Kai > > Subject: [PATCH 0/2] Fix reserved bits calculation errors caused by MKTME > > > > This series fix reserved bits related calculation errors caused by MKTME. > > MKTME repurposes high bits of physical address bits as 'keyID' thus they are > > not reserved bits, and to honor such HW behavior those reduced bits are > > taken away from boot_cpu_data.x86_phys_bits when MKTME is detected > > (exactly how many bits are taken away is configured by BIOS). Currently KVM > > asssumes bits from boot_cpu_data.x86_phys_bits to 51 are reserved bits, > > which is not true anymore with MKTME, and needs fix. > > > > This series was splitted from the old patch I sent out around 2 weeks ago: > > > > kvm: x86: Fix several SPTE mask calculation errors caused by MKTME > > > > Changes to old patch: > > > > - splitted one patch into two patches. First patch is to move > > kvm_set_mmio_spte_mask() as prerequisite. It doesn't impact > > functionality. > > Patch 2 does the real fix. > > > > - renamed shadow_first_rsvd_bits to shadow_phys_bits suggested by Sean. > > > > - refined comments and commit msg to be more concise. > > > > Btw sorry that I will be out next week and won't be able to reply email. > > > > Kai Huang (2): > > kvm: x86: Move kvm_set_mmio_spte_mask() from x86.c to mmu.c > > kvm: x86: Fix reserved bits related calculation errors caused by MKTME > > > > arch/x86/kvm/mmu.c | 61 > > ++++++++++++++++++++++++++++++++++++++++++++++++++---- > > arch/x86/kvm/x86.c | 31 --------------------------- > > 2 files changed, 57 insertions(+), 35 deletions(-) > > > > -- > > 2.13.6 > >