Received: by 2002:ac2:48a3:0:0:0:0:0 with SMTP id u3csp564006lfg; Fri, 11 Mar 2022 13:25:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9PjmPlRVEwda6YKehnXObrY+wT0DFLmdP+MLcZE2YIrgT4tqPEBExB+cOnhOkI5jF2DZy X-Received: by 2002:a17:90a:7027:b0:1bf:6ae4:f19e with SMTP id f36-20020a17090a702700b001bf6ae4f19emr12709003pjk.39.1647033902006; Fri, 11 Mar 2022 13:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647033902; cv=none; d=google.com; s=arc-20160816; b=H062S9xC8jEpcLHQ3FQMsOIsEXrdH8MQhfzkRi1+U3nzcHXec9yVQccfAOdBPwS3m4 F9r8gDr7twbnpQthJaBksesHV4AMgwWXdVhAtjWbfNLt0TDIcQxmNY+s2hgo48Lcq/3t wiTeVsVzEtl+RHWyvDunwcXi93SKlneRejQYKyUlNBdBYPROshDPGKwlunn4co8e5S0e /MgdI9P0wO4j0DatKjYBPcJcj2V+zSEB0bGSY9fDuV2xVNxKXJIXCWetsZ/TWrqDSrhN c7J9RgwV/Brn873qKnVl8EkJoEg7Ryzxm1yOEZFgGVAOW3qs5XJqIgqnkb5/tBlBbptt Uirw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id; bh=NnI1nyk1Z1XkyS7Unnnt+XvSp7ZOgcfuU8KDZkXDA+A=; b=EHRq3bXXsF6v2vSrGrR5mbGV+CHGasNW9WCyOhTA+kgh8AX85OvpRiMDcOMgl3Ws7j 2ypTcB7LxjJpBvq9xi60MM+qx6jrEBcBE+aHDnALUd2HGvgJMDXotQ2GDtnogrjjr9mI CqnjimJsS07p957JV/1BY/+y6KR4Aj3mjGUHhyFd0GMaFV8kAP9XOMOp8hzZfOVkrWsC 3YwluzVHmbQE12L+QrZka4RwCsa/9+apBxYjcdCUEV87Rz9+UUSqyc5XY9jYoESAflTd GIzT/+WfFjdPmqahk8Sig8/9scDoR1TMJFsX2OxdEgKzX/xAzG8BXH5/0hPMGw9dAIYt tlwg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j29-20020a63fc1d000000b0038078ebb58asi8657262pgi.278.2022.03.11.13.24.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 13:25:01 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BC97F22A2B2; Fri, 11 Mar 2022 13:00:03 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243508AbiCKQbb (ORCPT + 99 others); Fri, 11 Mar 2022 11:31:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230029AbiCKQb2 (ORCPT ); Fri, 11 Mar 2022 11:31:28 -0500 Received: from vps-vb.mhejs.net (vps-vb.mhejs.net [37.28.154.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 383F51C65C5; Fri, 11 Mar 2022 08:30:24 -0800 (PST) Received: from MUA by vps-vb.mhejs.net with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1nSi9Z-0000nv-Cq; Fri, 11 Mar 2022 17:30:09 +0100 Message-ID: Date: Fri, 11 Mar 2022 17:30:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Content-Language: en-US To: Sean Christopherson Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Oliver Upton , Peter Shier , Paolo Bonzini References: <20220311032801.3467418-1-seanjc@google.com> From: "Maciej S. Szmigiero" Subject: Re: [PATCH 00/21] KVM: x86: Event/exception fixes and cleanups In-Reply-To: <20220311032801.3467418-1-seanjc@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sean, On 11.03.2022 04:27, Sean Christopherson wrote: > The main goal of this series is to fix KVM's longstanding bug of not > honoring L1's exception intercepts wants when handling an exception that > occurs during delivery of a different exception. E.g. if L0 and L1 are > using shadow paging, and L2 hits a #PF, and then hits another #PF while > vectoring the first #PF due to _L1_ not having a shadow page for the IDT, > KVM needs to check L1's intercepts before morphing the #PF => #PF => #DF > so that the #PF is routed to L1, not injected into L2 as a #DF. > > nVMX has hacked around the bug for years by overriding the #PF injector > for shadow paging to go straight to VM-Exit, and nSVM has started doing > the same. The hacks mostly work, but they're incomplete, confusing, and > lead to other hacky code, e.g. bailing from the emulator because #PF > injection forced a VM-Exit and suddenly KVM is back in L1. Looks like we were working on similar KVM area recently [1]. It look like parts of our patch sets touch the same code. Since your patch set is much bigger and comprehensive I will base mine on top of yours once there are no more incoming review comments for your patch set (in other words, once it is in its final form). Thanks, Maciej [1]: https://lore.kernel.org/kvm/cover.1646944472.git.maciej.szmigiero@oracle.com/