Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1795316pxy; Fri, 23 Apr 2021 17:54:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGoq2oI5DmnFOLWuRo9w8oekC+54CKR+CRV7yuECd+TpG9uagfy0a8SXbT2kol0TAqNirJ X-Received: by 2002:a17:906:5450:: with SMTP id d16mr6913460ejp.274.1619225690700; Fri, 23 Apr 2021 17:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619225690; cv=none; d=google.com; s=arc-20160816; b=H7RE3X/rCiBe+1ytzafsDnYOuOl8vV4Grty8hh4MHBm2PrXfgvyyBtOuT5EZPOUi1F 0fhPc9R26G/ggczCRFrqP5X03FWBWXx2aY/MAU4pMBaC26dN/Zrmi+vyTFJwetyfWsP4 fF7YUgQAnCoZpabr0rDdSwdcSbwfO+BKU6Iq6Y6I7QPw0X3EPMifnrNUSZ5Rd2/4XUoo wkp4m66AailOxiZ24p0hu8JdlPIwf975iYUb6QkVWHfjNeHlIG5XuL8te8JyaoJUVwWw XeIcNEAKASsYAXeNBZisOL25e9P19DATYm+yPfOWwZWjUECGQ3/oBUgnybxeFPEp4S2U Nm/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:reply-to:dkim-signature; bh=wI67RiHgb1mAzdZjTnzSpZxYjSY4YrR/tb9tPeu38Cg=; b=E+s/I5xL+CSJRAcIhpk4Sa4CTG5Qmp5G4+mYC7ZaGDMU8uwg87sNK3WFRf7WLWgMxt oy3oRzcbQWf0lANzLbuSc8+ZDo/rDXv9b3CnzLeZtKp14NU3wHQq8YcAXq3F4BWEyKke jvZPK529mnBz7xOqM0zJZljmLLCiJ0wG+iFUgFZhkapnPWrIJECA5i/beA9gq95W7zb0 7CBW1UA+cgPMhI+0MypW7F4bkNQfmV54aXjXhAwtZvKGNNe7/EkMNaSODKIyC3lWdLbP a5Mr5uvlzoLjQBGiK7XdWSDnibfYZN7eYujUULUSI7Z0zvFY2FESKtAS/aPc6ZUYPmra goDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=aW61n+hq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si7445690edr.409.2021.04.23.17.54.27; Fri, 23 Apr 2021 17:54:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=aW61n+hq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S244599AbhDXAvs (ORCPT + 99 others); Fri, 23 Apr 2021 20:51:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244500AbhDXAty (ORCPT ); Fri, 23 Apr 2021 20:49:54 -0400 Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B89DDC061368 for ; Fri, 23 Apr 2021 17:47:44 -0700 (PDT) Received: by mail-qv1-xf49.google.com with SMTP id 99-20020a0c80ec0000b029017de514d56fso19458826qvb.17 for ; Fri, 23 Apr 2021 17:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=wI67RiHgb1mAzdZjTnzSpZxYjSY4YrR/tb9tPeu38Cg=; b=aW61n+hq0gn3dqvDogkL4uQbFlHfCDJDthWQqBqzWoBOtoRVNDw2awJ4DrFmHcobPg xVOR6PMq21FfC02u9wL06gdIyWam2QqRaFCZTdDD0GZ8/Ps/mmazUacpzuGS3BobxDPx 619t5xRMcydgdJ8pxkdgEbdBkozvMhvvG7tBWjOD4DelWGBGMK3jfkHxrI9S/mCK3ZN0 uQvwGf1dAkmTV08H+SiJeOAFiYMyerfXSgExT33fzj8HNq53K61i/MYZqlYzru+Jn008 5yvyizifbyzwVeQ/2c2uarNQWheDY2XU9KTn8cKSluDfm6+HZ1HJoKKfDDYZZm4ZARK3 gcnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=wI67RiHgb1mAzdZjTnzSpZxYjSY4YrR/tb9tPeu38Cg=; b=rC5Qq0uTyqQFkUPGc59jSmU+J8vEaK/5OUw5bDpE4NtbtR7W5E2wSyaTueOe7Let7j pWh1QKrgPjeHNyan07mFrfMhN3oU7I+9FB0aRE7mVMNtHC/ndOZ6MYGsZUGb7auQY76v uY5d+Tnmqd6PF8ESQLamGEf1LvyB8sIYvid7fm5ETeHmLouGaRt8wehoHitqIZh0EBxc cG0aWDat9gux0fBMAbyVYWNGyJANNUAFNQ9LtYpYt00vWoPHw/qcvkwjHeaLByqMfZZo mCLYBBCCghP5aDMmH3ryy9F0O8k4xSfqIw+OnC0n2U2v0vJf8miXEZZeWxZDwjCfvPX1 qOIw== X-Gm-Message-State: AOAM531YFRr03mlH8+PNKHNG8Y4VCDNWnjx4GUtTdpYiUdqdiqUK99LY biupgy+NhQnRAgnOM2Hr+lZnSUEc6L4= X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:f:10:ad52:3246:e190:f070]) (user=seanjc job=sendgmr) by 2002:a0c:f147:: with SMTP id y7mr7334860qvl.17.1619225263973; Fri, 23 Apr 2021 17:47:43 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 23 Apr 2021 17:46:22 -0700 In-Reply-To: <20210424004645.3950558-1-seanjc@google.com> Message-Id: <20210424004645.3950558-21-seanjc@google.com> Mime-Version: 1.0 References: <20210424004645.3950558-1-seanjc@google.com> X-Mailer: git-send-email 2.31.1.498.g6c1eba8ee3d-goog Subject: [PATCH 20/43] KVM: SVM: Don't bother writing vmcb->save.rip at vCPU RESET/INIT From: Sean Christopherson To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnecessary initialization of vmcb->save.rip during vCPU RESET/INIT, as svm_vcpu_run() unconditionally propagates VCPU_REGS_RIP to save.rip. No true functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/svm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 5c12ba725186..4ea100c08cb3 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -1208,8 +1208,7 @@ static void init_vmcb(struct kvm_vcpu *vcpu) svm_set_efer(vcpu, 0); save->dr6 = 0xffff0ff0; kvm_set_rflags(vcpu, X86_EFLAGS_FIXED); - save->rip = 0x0000fff0; - vcpu->arch.regs[VCPU_REGS_RIP] = save->rip; + vcpu->arch.regs[VCPU_REGS_RIP] = 0x0000fff0; /* * svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0. -- 2.31.1.498.g6c1eba8ee3d-goog