Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1691132iob; Fri, 29 Apr 2022 10:33:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsJyKCTdanNYXXs0Aum9PQhFvU032gGus1BVpImq2XEtNZ60QRVx6tV4dGInMoQPhGE5Rz X-Received: by 2002:a2e:bc21:0:b0:24f:321a:b9ab with SMTP id b33-20020a2ebc21000000b0024f321ab9abmr165175ljf.301.1651253608698; Fri, 29 Apr 2022 10:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651253608; cv=none; d=google.com; s=arc-20160816; b=c+3fj2npUMycHjIuU4vjNvjlwgmHupsyEzJVlNjeLAib70QDiGJ2bX9zkiV6rtEVJi VeCre+XauMHtSklW04c/8rflWbia3MYztepExfcmnEHLIAMI1+EDP9HmkKk2eQw6CUSc /uKuvcQvBn6yABXrMr5rQLu08Pv3HBLOozFDboiTLSmolP7pW1ERTmh+QV5Tdggpm5HE 2lIKE+15y29Z9Xak6h7fO/1eoMqEAR4rE1wglxcLI9NjNeejIJdd615V8/v3aFzdicR4 6f7w8VyUuluNgdtmXgAGa0FezfvDHlKz67C6LKpLGRWUBcEZcIRao4xnYx1FXd7KjNUG 2T2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TlawIu8gUQdtMxZhaj9GVkTl4M/PnXrCnZW+L5pZKe0=; b=Ugy/QmFbJ5JgoIxu7xdN5UtPQDDaQpoT0p8w8nSkGW/FgLH3DJYcJF/cZll3AfOepe pQbMJlTSNnTiq020vqZcQ0fz6sBhxgRd4eRXs5mTF6xeJZFoT5fIEIj9wWwxStsIl8qV IloUyn9GXPXo24v0ZKfu39oD+Gt3BJsTel5aI/FTKEKPQ+YoGnmtzg/4DUYkFdY7JLS2 ftUZnGPLzLjZ8+Aw8JrC2ggxux2Iinnk83Ku45jb5lL+3iQJ7MppVAXffOOCYl3PAtlO vWZ+b0MVhhiLwDzlyanIJDb03E7H6A4QHjD/rAoQ7FpcCQM2+12dOGHGyA70dimR8959 SJ2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=tKZ1Q2kr; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a056512220200b00471f8184800si8072365lfu.115.2022.04.29.10.32.57; Fri, 29 Apr 2022 10:33:28 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=tKZ1Q2kr; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348046AbiD1O23 (ORCPT + 99 others); Thu, 28 Apr 2022 10:28:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348309AbiD1O22 (ORCPT ); Thu, 28 Apr 2022 10:28:28 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 139211FA7E for ; Thu, 28 Apr 2022 07:25:12 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id r83so4126366pgr.2 for ; Thu, 28 Apr 2022 07:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TlawIu8gUQdtMxZhaj9GVkTl4M/PnXrCnZW+L5pZKe0=; b=tKZ1Q2krSUMLYZ6CSInNA0TRI1pjrsEg7+OqZ8ze8ewZGs+I86Z0NhYlnUsFJ9/lEI TNURtOJoogb52Y7Kwpiyz6Jb+YTfNOc0mBQWEFsiBYDrd+P9/qiUvCybpaXHtnKxID8c Id315fHpOrKcHEh8Q1ZcImwdC0G396PPk8cRO1Pbi08i0ITda+o2d7EzUjpf6q59Kabu 0qeUkMSPq8p5kX33jjNK1DQvo56WWZ/22LDg/zUOAFlPE9oEYsdWwDy6soUlvHtuWQD5 EquFgQgQXuSC3M+C5DdmMvUHPH4IeyhMbRZaZmzBlauiBPL5OKEdhWwIKBpFWYRwOWrr H4HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TlawIu8gUQdtMxZhaj9GVkTl4M/PnXrCnZW+L5pZKe0=; b=uDAwJW5wxpNz/8/bayuo6Oo7CnOfJcyHdk40wQovUue6OptJnkkkiuGJFYa3O4eo8t I90DnvZGjKbjMWXQfxzD+REnMvnU+ElbCXLdc1VeKTD2mITKY2aP1R/J/oKslw57UOdg G4g9k7RBYyvgPrJcniQRpVa7KaRGEfJHu3mJZ6GkBhtl6ZoLZAYq8zipt0XoU7OYgtxD J61yqS3Em24vHa4R0PPjS7R00gSCcjZ8nUxlAyxDCyxOerEIwLC62wMNmuXGfCo3pO9b Njn8Mg5xZeo2uNLLsEbKpvJvSV6AIAdXP5VG4ZvHza10k7Zwp/BlVd4lFTgeb7yXAeRc JFGA== X-Gm-Message-State: AOAM532T5dWGnUVBSI1yfWbGjb3NZOOZuKURdwhC/pUZMpebB3S00HAr kgPNWRLYaYR0AvGuiHQpgAf7ew== X-Received: by 2002:a65:6946:0:b0:39d:a0c3:71f with SMTP id w6-20020a656946000000b0039da0c3071fmr28007435pgq.160.1651155912175; Thu, 28 Apr 2022 07:25:12 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id v21-20020a631515000000b003c14af50603sm3147541pgl.27.2022.04.28.07.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 07:25:11 -0700 (PDT) Date: Thu, 28 Apr 2022 14:25:08 +0000 From: Sean Christopherson To: "Maciej S. Szmigiero" Cc: Maxim Levitsky , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini Subject: Re: [PATCH v2 05/11] KVM: SVM: Re-inject INT3/INTO instead of retrying the instruction Message-ID: References: <20220423021411.784383-1-seanjc@google.com> <20220423021411.784383-6-seanjc@google.com> <051f508121bcf47d8cbc79ee2c0817aafbe5af48.camel@redhat.com> <9553b164-67a6-3634-34c5-f7319ce2dc60@maciej.szmigiero.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9553b164-67a6-3634-34c5-f7319ce2dc60@maciej.szmigiero.name> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Thu, Apr 28, 2022, Maciej S. Szmigiero wrote: > On 28.04.2022 11:37, Maxim Levitsky wrote: > > On Sat, 2022-04-23 at 02:14 +0000, Sean Christopherson wrote: > > > @@ -1618,7 +1644,7 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu, > > > nested_copy_vmcb_control_to_cache(svm, ctl); > > > svm_switch_vmcb(svm, &svm->nested.vmcb02); > > > - nested_vmcb02_prepare_control(svm, save->rip); > > > + nested_vmcb02_prepare_control(svm, svm->vmcb->save.rip); > > > > Is this change intentional? > > It looks to me the final code is correct since "svm->vmcb->save" > contains L2 register save, while "save" has L1 register save. > > It was the patch 1 from this series that was incorrect in > using "save->rip" here instead. Yeah, I botched the fixup.