Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp672180ybf; Sat, 29 Feb 2020 12:50:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxnxZOlct/55HODph7/JVdVKdArWnXmGDx+sX1oeu0hgc7Fel5/BdYiu5stT9Yb47Zg81PX X-Received: by 2002:a9d:7356:: with SMTP id l22mr7729831otk.335.1583009458738; Sat, 29 Feb 2020 12:50:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583009458; cv=none; d=google.com; s=arc-20160816; b=d14h7SoMt+MgjJkE9pIkmUxnZrC219m+kJapzx1MPn+uq12hqox25s9+LAHBT20AMa 18r+jDp5Gek1BQchJpQDVEq9L/0XEQsZQZnWp80z/jLDnSTB381uytL+mSK626VBx3Uf 64KRJjwB1YsTJEMcoT7Jm4ibfX9yU468vie2EAT3SYc94wPZ0JdUdjdjq6en8EPYO6v5 Cd/G4Oyjm5xJI+EjPebapf5QAp7htIXYMBkD4mDttBxbLJKz3H/ifPuSBwZeUBi3Ag3y PfpraZ8eyFSOCP9/97x8NfuS0MJZJKVADHM2staBMfDlNexfgE/+ZVqMQs+KvAtVjUOM C5qA== 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:from:references:cc:to:subject:dkim-signature; bh=w9cAr7LmPhwGLRr4s0x8s5Z4bBjVwaC0/iME9jkIhgw=; b=OQ+gvObN9u2AkFBn03Ohko1uiU0S0tVifrEwWrQ7ddbkbazLd1rHn2tBjwFH8MtiSv cMk/zskGIDjealNP+HpbRbW/244TRapOrz7RNZKxzGDbH1rscWnGO0SP8ucBh53pR28e 5VZ12qQriIfGjaI9Qu0WykXfD4CaMOOGBRZ40zyEQMWk2sbbW+hu3IMdcQ4bJ97eV6Tc 2DIjTwEXv9obOIfbSLUFX5v9a4RobT+OOkim2A/icolkpZ2/EBvag0X40KsuvaZdINbE hiPrsCvE+ZGZ8GTmkM4YkmvfuSkasjoUKk/k7OZvEXKcpaAvjRlofo1XILBdSShJThT1 JJ/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=A9fApO1Q; 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 l14si3568981oii.37.2020.02.29.12.50.04; Sat, 29 Feb 2020 12:50:58 -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; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=A9fApO1Q; 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 S1727509AbgB2UhD (ORCPT + 99 others); Sat, 29 Feb 2020 15:37:03 -0500 Received: from mout.web.de ([212.227.17.11]:47869 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727412AbgB2UhD (ORCPT ); Sat, 29 Feb 2020 15:37:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1583008618; bh=w9cAr7LmPhwGLRr4s0x8s5Z4bBjVwaC0/iME9jkIhgw=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=A9fApO1QkF8GVgWIQ2GHbgdHaHLgz+26IDFvyghJUKv9Kr0EbD5vr8jNPzwA5Hg57 bO3mpjBwUQt88sfJLcl9tc6emyrvw7cU6PQo337ATD2JMMJO2SnqajS8CsnIUM+BUx vhwuMJ7BhzQHRhCGgVT8CsNFq9rlqRJYvYbF+tFU= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.1.10] ([95.157.55.156]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LfiuU-1jitRT3LlS-00pLzh; Sat, 29 Feb 2020 21:36:57 +0100 Subject: Re: [FYI PATCH 1/3] KVM: nVMX: Don't emulate instructions in guest mode To: Jim Mattson Cc: Oliver Upton , Paolo Bonzini , Linux Kernel Mailing List , kvm list , stable@vger.kernel.org References: <1582570596-45387-1-git-send-email-pbonzini@redhat.com> <1582570596-45387-2-git-send-email-pbonzini@redhat.com> <41d80479-7dbc-d912-ff0e-acd48746de0f@web.de> From: Jan Kiszka Message-ID: <3b63f015-8a00-9aae-87a0-8713195001aa@web.de> Date: Sat, 29 Feb 2020 21:36:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Q/ugFKcVWk5O4DZmpOtPypb3xEqE7vN6F4jI5L2kwElt8Q2DPz1 aqR9mHRZwKVESdyulkhjYq2PPNhlIM/0vcLev4bEV5jnKJjypnxKcC3/ZYWCUPTWRntfcBq 0EETDI23Vopdf5xkU+UVIXmTrTL/4kxHAXh0j+BxdSg2B2moOl5r7QtFWvtjrek1KumBHxa AJDlMgTKkiDDpagPI6Ciw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:+/hErHdUzRA=:yEIdljjMPrGM4NTE9dVn6K QSzujLVelMxzlrbs/JLPNPAIwPp3GucYa4b6MUhaZcFGhPXlOQUrSmBjJO328HqYV7C/FAWX/ iLJxQq1rjfOS/MpEe94olRO4WddYNILtm0qhzhUfE8wxMqj2YWFzFNf/O2so7Is/UfsljpnOk s1gIgp6aOsbmEgjGn2cLlwJStWmE7VF36Nlua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ux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29.02.20 21:17, Jim Mattson wrote: > Since UMIP emulation is broken, I'm not sure why anyone would use it. > (Sorry, Paolo.) FWIW, adding "-umip" to the "-cpu host" in my qemu setup works around the bug. Jan > > On Sat, Feb 29, 2020 at 11:21 AM Jan Kiszka wrote: >> >> On 29.02.20 20:00, Jim Mattson wrote: >>> On Sat, Feb 29, 2020 at 10:33 AM Oliver Upton wrot= e: >>>> >>>> Hi Jan, >>>> >>>> On Sat, Feb 29, 2020 at 10:00 AM Jan Kiszka wrote= : >>>>> Is this expected to cause regressions on less common workloads? >>>>> Jailhouse as L1 now fails when Linux as L2 tries to boot a CPU: L2-L= inux >>>>> gets a triple fault on load_current_idt() in start_secondary(). Only >>>>> bisected so far, didn't debug further. >>>> >>>> I'm guessing that Jailhouse doesn't use 'descriptor table exiting', s= o >>>> when KVM gets the corresponding exit from L2 the emulation burden is >>>> on L0. We now refuse the emulation, which kicks a #UD back to L2. I >>>> can get a patch out quickly to address this case (like the PIO exitin= g >>>> one that came in this series) but the eventual solution is to map >>>> emulator intercept checks into VM-exits + call into the >>>> nested_vmx_exit_reflected() plumbing. >>> >>> If Jailhouse doesn't use descriptor table exiting, why is L0 >>> intercepting descriptor table instructions? Is this just so that L0 >>> can partially emulate UMIP on hardware that doesn't support it? >>> >> >> That seems to be the case: My host lacks umip, L1 has it. So, KVM is >> intercepting descriptor table load instructions to emulate umip. >> Jailhouse never activates that interception. >> >> Jan