Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3359668ioa; Tue, 26 Apr 2022 01:56:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhwsXPWCTYNBjQv+CuG+rpyRVCLRCfXEpUxs6VxP+t1wcsPORzWJq2LY+OOgZ0hhv7Qy0A X-Received: by 2002:a05:6402:1a42:b0:424:20bb:3e37 with SMTP id bf2-20020a0564021a4200b0042420bb3e37mr23486497edb.29.1650963363576; Tue, 26 Apr 2022 01:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650963363; cv=none; d=google.com; s=arc-20160816; b=MyUUYqWTMePtaf45OLXPyRTmmU5hwoNcUVOvAHu2ZxCVzzFtwz4hsZmldbv5XO6+Ad pfw6PRcN3hwnhNt8tnFV796cnqY7apabrHZzqzObxMYFZNFG3UIdNicP1gfjNBkbcc2f tavj7fWA3DlaFXStnF4OW7h1eoH1fXCc9XlweS045cnZpIIFCEXt5q9aptlcY6eqN1ZU oS8we0FD0oOagTk+UzdBcNkD1bDtFKp2pnkJbLeoV06HCFT7Bz4BQSygRi7o27helLSL fnkulUoLxuOQCO14APuX86eTO9YtlIYVZrCEOSZuyojqokyPEv7eEuSCDPsBhPyHFpL8 MBLw== 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=Mcn7OTweThrUTpra5tmQrC1E0Io6p2w1iMVIRrYbjdQ=; b=NVY2B7taAF90L53iAoTsHU79/hotH+M0YgYR20yD/AkDoZjHQYCxRMROVV8atFRPId IvLcEyYld94Up4/MPw5fxuNWuxC31BJv3ZPuYbMp7q6qTT0NB0/mgjus1iwtVXUB4VgA smzy9pqNGvggBmhoCRFO2MWkd0yHhv4XikATgihFggkoVb1FpDkri1/Ynk9trrr08MAW e7zQVR4kg67gSC2UDykNAVYxSGE7QaLwJiMjJbLFGG6ArII3v7/DK22GUQ9yOhio4YmN CDd/CgxVtwQCGuLM6ki4GWvkXNlajvFOpNKyIhFBGVkm4DsVhWiu75rtdisf/zTsE+GC VI7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a1709063b0600b006f398daeb92si4008964ejf.5.2022.04.26.01.55.40; Tue, 26 Apr 2022 01:56:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236654AbiDYXDw (ORCPT + 99 others); Mon, 25 Apr 2022 19:03:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236170AbiDYXDv (ORCPT ); Mon, 25 Apr 2022 19:03:51 -0400 Received: from vps-vb.mhejs.net (vps-vb.mhejs.net [37.28.154.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64F193DDFA; Mon, 25 Apr 2022 16:00:44 -0700 (PDT) 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 1nj7h8-0002Ck-4y; Tue, 26 Apr 2022 01:00:38 +0200 Message-ID: <5f6fd312-afba-8d9f-bfca-3a64c99d99c9@maciej.szmigiero.name> Date: Tue, 26 Apr 2022 01:00:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 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, Maxim Levitsky , Paolo Bonzini References: <20220423021411.784383-1-seanjc@google.com> <20220423021411.784383-11-seanjc@google.com> From: "Maciej S. Szmigiero" Subject: Re: [PATCH v2 10/11] KVM: selftests: nSVM: Add svm_nested_soft_inject_test In-Reply-To: <20220423021411.784383-11-seanjc@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On 23.04.2022 04:14, Sean Christopherson wrote: > From: Maciej S. Szmigiero > > Add a KVM self-test that checks whether a nSVM L1 is able to successfully > inject a software interrupt and a soft exception into its L2 guest. > > In practice, this tests both the next_rip field consistency and > L1-injected event with intervening L0 VMEXIT during its delivery: > the first nested VMRUN (that's also trying to inject a software interrupt) > will immediately trigger a L0 NPF. > This L0 NPF will have zero in its CPU-returned next_rip field, which if > incorrectly reused by KVM will trigger a #PF when trying to return to > such address 0 from the interrupt handler. > > Reviewed-by: Maxim Levitsky > Signed-off-by: Maciej S. Szmigiero > [sean: check exact L2 RIP on first soft interrupt] > Signed-off-by: Sean Christopherson Looks like this version doesn't integrate the changes that Maxim has suggested [1]. Will provide an updated version after I test the patch set. Thanks, Maciej [1]: https://lore.kernel.org/kvm/2401bf729beab6d9348fda18f55e90ed9c1f7583.camel@redhat.com/