Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3945240pxk; Tue, 22 Sep 2020 06:47:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzTmVPyeW5KnyHDP3iYSdoVPC5lWkf82rGzyCDQiRSi0k66IqBbzoWRSccGqYBVM7jbRws X-Received: by 2002:a17:906:8682:: with SMTP id g2mr5031905ejx.110.1600782435963; Tue, 22 Sep 2020 06:47:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600782435; cv=none; d=google.com; s=arc-20160816; b=qKS8OBquE5quzjtWYNCjX3U0wvVljYMyV0KoUl19F/nuyMeE9A3m7tUxdFGpQ10K/c jYaOTUZ7aH6cyNpNkU+78xkzFpbjSNWvkJkQ92QfD4Tj2VvKfbWfTjt0EGUwjv/lLVJb mHU9AMAo4ukLh2yrornWbwGH9Kf2pf3SzDYgeUykFLahwCcXPP6HhfJOCnWKizuMl4ri e8c8QAnde36QDvivot5nA6ztOihcCZ3dtSOaRSSpK+osopGsFvi6zoj0jymLXwDT66/M xxyiWZ8xrWZP/7MqEEmRPvJY9kZREz67HQhxgCQcL9SxRUgCtfQajlwRu9bvKWKiJZvY 74lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=+RjqZZpcz133eDPIDFweleVoraiJQPcRg1Z09eullZA=; b=Gr8qp9r5cB7buiqcKalNvNrKafDrykon9890HNZTvOtYgR478az7ITf5C41g1+k+S7 b22GoAfJboGu/v62AX9jWOeq45ygYo3CmNzYYeADvfSfChq1oI8GIYP6KeJ1QqO6dAi+ jOfxXLLuS3wQc8Vf+qUt8b1rkFvWbFbHdpX73ie7ncLHOL98Y9jvyaZ6+TDDay7bXC3/ w0/qbhaaXbrB76Jpby7KKfilyknS2hrrYKJdpi+q3+uaw/pGtzceM63wc25Ls244TkrZ imJUsCrIHVgMf50pNer9G5RziIj0JcRO6dPMJTow2qMPslDh8HVrQcMfr7ThaoIao2l4 LcsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QwXC7xYw; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z18si11448701edm.355.2020.09.22.06.46.49; Tue, 22 Sep 2020 06:47:15 -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=@redhat.com header.s=mimecast20190719 header.b=QwXC7xYw; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726607AbgIVNnn (ORCPT + 99 others); Tue, 22 Sep 2020 09:43:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43587 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbgIVNnm (ORCPT ); Tue, 22 Sep 2020 09:43:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600782221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+RjqZZpcz133eDPIDFweleVoraiJQPcRg1Z09eullZA=; b=QwXC7xYwdpbWvrTTJcuyl9vH31Z25aqFGBr0iLqMJU+fO8qQpfWfDIUaEDRJmY4Mog2n6J Ri0ZB+f34RS/4x5aW9t/Ahjnml8Az08ezc1pxw8Xp4G5gbZN4MAhuRo6cMtKcarvrD4BFT 4GgyYb2Nqwq47SM51JAMdaDm7H7VgLs= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-427-26BbOyNyOOSe3WsSTqOvYQ-1; Tue, 22 Sep 2020 09:43:38 -0400 X-MC-Unique: 26BbOyNyOOSe3WsSTqOvYQ-1 Received: by mail-wm1-f71.google.com with SMTP id t10so585473wmi.9 for ; Tue, 22 Sep 2020 06:43:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+RjqZZpcz133eDPIDFweleVoraiJQPcRg1Z09eullZA=; b=MhajYWpVgVmrUEapfEXZ8roKC8yMVHgsDF4pEEyxLzZu9wUCfvZJ6P+0NeYmuUjJcD 4tii2xyUe05e8LZFNovfWFvwdnFVCQmj/K4CVbJ8TOAWTse6jSeJbULQp7ZV6RReeq3K r+j4Q+MQsWASx1Sjcb1PivUaYJtraln3A+uXUBuG3UgIMlRD8lQngeZM8vZHldntLjBK G+J41h5QOlFun+cKSPitIrkavYpbo10jEtYRdP5s80gwtOyw9P0uatrYC5GDNZC3C21g LK1WWS2MXWDGhqYqi3X8a3/cJGz7N1UhBjNMwRgGoD7y5h18PTrFWjIswD/bnYo01yIT ptww== X-Gm-Message-State: AOAM5332I6CWn/uMXKHpe+ExoRQVUzhwwPIpbMwuVhwIiBtTNU/WYmd0 6wqaVHbkue9zIiKLMAX5S+aAb7dM1WLKUQirP2rZ2A3bWeHyhh1UscOerldpKOdt2XNgbdGR9UK fXj5wrqZj6HLC7j8OOof3xRTZ X-Received: by 2002:a5d:4811:: with SMTP id l17mr3442599wrq.252.1600782217720; Tue, 22 Sep 2020 06:43:37 -0700 (PDT) X-Received: by 2002:a5d:4811:: with SMTP id l17mr3442574wrq.252.1600782217526; Tue, 22 Sep 2020 06:43:37 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:ec2c:90a9:1236:ebc6? ([2001:b07:6468:f312:ec2c:90a9:1236:ebc6]) by smtp.gmail.com with ESMTPSA id l10sm25008213wru.59.2020.09.22.06.43.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Sep 2020 06:43:36 -0700 (PDT) Subject: Re: [PATCH] KVM: SVM: Analyze is_guest_mode() in svm_vcpu_run() To: Krish Sadhukhan , Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel References: <1600066548-4343-1-git-send-email-wanpengli@tencent.com> From: Paolo Bonzini Message-ID: <91baab6a-3007-655a-5c59-6425473d2e33@redhat.com> Date: Tue, 22 Sep 2020 15:43:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/09/20 22:43, Krish Sadhukhan wrote: >> > > Not related to your changes, but should we get rid of the variable > 'exit_fastpath' and just do, > >         return svm_exit_handler_fastpath(vcpu); > > It seems the variable isn't used anywhere else and svm_vcpu_run() > doesn't return from anywhere else either. Yes (also because vmx will do the same once we can push EXIT_FASTPATH_REENTER_GUEST handling up to vcpu_enter_guest)... > Also, svm_exit_handlers_fastpath() doesn't have any other caller.  > Should we get rid of it as well ? ... and no, because svm_vcpu_run is a very large function and therefore it's better to keep its flow streamlined. Paolo