Received: by 10.223.185.116 with SMTP id b49csp830301wrg; Sat, 10 Feb 2018 21:26:27 -0800 (PST) X-Google-Smtp-Source: AH8x2253A0a9wEd1BwyIS/pHSCvEprQuZ6gW5U2SEkylzBhvWro6nx0AqrvKDbvnnPSnPS552cC/ X-Received: by 2002:a17:902:b216:: with SMTP id t22-v6mr7394698plr.414.1518326786905; Sat, 10 Feb 2018 21:26:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518326786; cv=none; d=google.com; s=arc-20160816; b=oqf2itxs8Rga8gI7vLouFosQctHULNfBHcyznjAPHGWICu87jG95DphtU8QASA7NVb /lu0VfiLcqrlCuBfApglP30cQp/prqK4T74NHjF16JEvYUSNUZaVtxxx6oJKLqdJVwQK 1dlzDGEF+TAXloikS/kY/hiS2cpCU1l1Bta98ScYtwZQlPgp6Fp+GzfmOE9nUO2x5sFi dkZrdH2iD2ig0/2s12uXKNUh0k2l0h6OXiLOo51n8Pu1Ta2ZQlQPw/VhywnIv7z9MrTp 76xVUOiJPY2buGiSKSAfnPlsr30Hl1REHwig4dS535p7jNtirMcGOvCCs9Fzaab/Un9K eaLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=MfAXqVHUTPX1tYagpMu9s0XOJfCUwOtDgBrfa27jHOQ=; b=UIM1wAihGuynk+/1VulDtHw4Q5mW3r213lSc04ww0PxJml5Lm62w87BXbjC8Z7InNw 1WW9AgEii+6TODt9HE49VwJ3ub95KIt6VCIIKE5KBwuGVzpKp3Dqk4gnyNfCzMqV0UUm UyaUW0GhIjV7QaAzsXIUpiOJ6WxIW/qMJvAejncXmmsyqopSvbYybhYwSfnzcPU8VpQH xWpkR2B4/tPj5QTUB8+pTl5+Sj7d+cVocy6qSk1KWQnSNkTfZnCsusd2b1owJ4oE1qim E8ti9IVvpvVE8x+s6//GBZg+mCh3RppVswz5giP7lY8BTbRHvSCtICL/iqeuCdqQjWt7 CH9w== 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 b8si1726870pgt.383.2018.02.10.21.26.13; Sat, 10 Feb 2018 21:26:26 -0800 (PST) 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 S1754158AbeBKFYI (ORCPT + 99 others); Sun, 11 Feb 2018 00:24:08 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:41326 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752480AbeBKEdk (ORCPT ); Sat, 10 Feb 2018 23:33:40 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ekjKc-0002hI-AW; Sun, 11 Feb 2018 04:33:38 +0000 Received: from ben by deadeye with local (Exim 4.90) (envelope-from ) id 1ekjKX-0004S4-5F; Sun, 11 Feb 2018 04:33:33 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Ladi Prosek" , "Paolo Bonzini" Date: Sun, 11 Feb 2018 04:20:06 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.2 08/79] KVM: nVMX: set IDTR and GDTR limits when loading L1 host state In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.2.99-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Ladi Prosek commit 21f2d551183847bc7fbe8d866151d00cdad18752 upstream. Intel SDM 27.5.2 Loading Host Segment and Descriptor-Table Registers: "The GDTR and IDTR limits are each set to FFFFH." Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- arch/x86/kvm/vmx.c | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -7076,6 +7076,8 @@ void load_vmcs12_host_state(struct kvm_v vmcs_writel(GUEST_SYSENTER_EIP, vmcs12->host_ia32_sysenter_eip); vmcs_writel(GUEST_IDTR_BASE, vmcs12->host_idtr_base); vmcs_writel(GUEST_GDTR_BASE, vmcs12->host_gdtr_base); + vmcs_write32(GUEST_IDTR_LIMIT, 0xFFFF); + vmcs_write32(GUEST_GDTR_LIMIT, 0xFFFF); vmcs_writel(GUEST_TR_BASE, vmcs12->host_tr_base); vmcs_writel(GUEST_GS_BASE, vmcs12->host_gs_base); vmcs_writel(GUEST_FS_BASE, vmcs12->host_fs_base);