Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1106755ybm; Fri, 29 May 2020 22:14:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfnjunBwy9HP6UJmigFpappuRE9QokO9A6KZERh+NFUYYAcHjHaG1/lVrGjjqQGXgSE5Sp X-Received: by 2002:a17:906:580e:: with SMTP id m14mr11319098ejq.457.1590815662035; Fri, 29 May 2020 22:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590815662; cv=none; d=google.com; s=arc-20160816; b=Yfg132ksy5yYqoZhOrfylXZjziqkWfG91m+7gmxiOmZciOFaCare/Ykuz3mgc/pYFF FMnmq9KVpqz+/857eCOQBNBu7iqNu1QwURvzR7vBaDGeUntK6SGXjH+pt+YMs4BvEDNr nCsl5Qnq9m+4PKG6rN2j4Seq2xyBSyzkNW8eWeeyzRxW6GqELvHw5ra0n7HU7VL4Ltwx /OxnQXc7XnXRu3VOiJzEjHEqg0E5dI6w3Qz2D5ID1P0/ctJOvGZr8CaNfUaVFU65hiei IG3VxsBj0cFsLdzsxoIUjjDereENmGnXUmJVbDYiXOcyvDP1qJ+cJZqz5GcexwFi4qyj 6VVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=/Kf6XO5g1mQ6NPxd92AMMUcl7wDe8Zvf48X720rxLRo=; b=XcvooyfL43BMfDEb6Ax7RIE3WzfhdUM7o4kzPB7c3IZSEPcyip91HNAxN20G7fnUQG NXtcjYF8uaJd449kJXhcGWIaobj7qpEoRlru4b0OIUDR8IxmtyWZmdClfJUl6AX+E3Oz JAB9ZBTUwfI87p2AKuySCjZshRogKpEA1bVptq4MfdDkvvUCNajWVmvAkG+ZctnEzKiZ FwR44kwVBD+adLyOOzteBf5VWM1f0NURT3Wp1cWV27f5MyBnt/mtfUIgrkCT8TTuYqbz IT0l16zywlLoeR9FPkSlt2d/Sz35jd2MeKInbPN9AmMwlPPQOLNaTAR+WpEnpSMgFQVL /DGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ftFr0phx; 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 b22si6586693edx.194.2020.05.29.22.13.58; Fri, 29 May 2020 22:14:22 -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=ftFr0phx; 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 S1727971AbgE3FKz (ORCPT + 99 others); Sat, 30 May 2020 01:10:55 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:26240 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726173AbgE3FKy (ORCPT ); Sat, 30 May 2020 01:10:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590815453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/Kf6XO5g1mQ6NPxd92AMMUcl7wDe8Zvf48X720rxLRo=; b=ftFr0phxlcLpItXJlJpuKC5Rr08JopMjZNufKyxoYlZihfBqC6bmxEPtW92KPgg002ooUY MxmVUZSuuvW9pKwJ4lT2WqBb6SDntvKYw6QyT8S2b5rP6kLY7/ufFEkrH9+Sb/tNme18OQ n8uTGpyrfms2lcA4gY/3Ndh67GJQbwE= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-254-XY_mnefCPemKW1x1I61Cew-1; Sat, 30 May 2020 01:10:49 -0400 X-MC-Unique: XY_mnefCPemKW1x1I61Cew-1 Received: by mail-wr1-f71.google.com with SMTP id p10so1798432wrn.19 for ; Fri, 29 May 2020 22:10:48 -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:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/Kf6XO5g1mQ6NPxd92AMMUcl7wDe8Zvf48X720rxLRo=; b=Edi5ZoyoQVWm/kbmDhr1L1Y9I2YMh7tclOTIvh8T1Fpqr4IWFJdAq/QR8L/Lj/v2uZ Wj14VKDr2vyYeblWcvelO1pi6sGMCe7LhxM+LInUX+nHdoWFg07vbhY1b5DIxvNy/Ovz hhayosm0AIVkpYb6oU3+W6zk1LtNfWCHOIqiOWvdG/xr0Xb9OvclMnj1yMk/zyN7lUOl Es94Fd7abKxH1NtXK0J4V5TG2t1/YZnOz24xxW/lZColJypjTsWPU5jd0Tto5VuWuk2b dyT7ooyc9yEEofw39e7RSKWcJ83pC83kCysbEWKeBiANnuefsgI5VD+6HeFt6gjab5Iz OFLw== X-Gm-Message-State: AOAM53126h7hZuw2DoP6ETK/vtTXjAIlbuHeMSVU68IPqq0Kt5shWNDu +PdLzBMoXRXqnG27zdM9+pgXFw/j75XGxPqvmoHrXkb2fmMLlQ4gqqktfaJ61wnKQjtpNBbnQ+z gWwAt/rjK9v53XHRWurUXYYWS X-Received: by 2002:a7b:cd94:: with SMTP id y20mr11333446wmj.87.1590815447746; Fri, 29 May 2020 22:10:47 -0700 (PDT) X-Received: by 2002:a7b:cd94:: with SMTP id y20mr11333434wmj.87.1590815447492; Fri, 29 May 2020 22:10:47 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:3c1c:ffba:c624:29b8? ([2001:b07:6468:f312:3c1c:ffba:c624:29b8]) by smtp.gmail.com with ESMTPSA id s2sm1949988wmh.11.2020.05.29.22.10.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 May 2020 22:10:46 -0700 (PDT) Subject: Re: [PATCH 17/30] KVM: nSVM: synchronize VMCB controls updated by the processor on every vmexit To: Krish Sadhukhan , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20200529153934.11694-1-pbonzini@redhat.com> <20200529153934.11694-18-pbonzini@redhat.com> <128fe186-219f-75d0-7ce2-9bb6317e1e7d@oracle.com> From: Paolo Bonzini Message-ID: Date: Sat, 30 May 2020 07:10:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <128fe186-219f-75d0-7ce2-9bb6317e1e7d@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/05/20 04:06, Krish Sadhukhan wrote: >> >>   -    nested_vmcb->control.int_ctl           = vmcb->control.int_ctl; >> -    nested_vmcb->control.int_vector        = vmcb->control.int_vector; > > > While it's not related to this patch, I am wondering if we need the > following line in enter_svm_guest_mode(): > >     svm->vmcb->control.int_vector = nested_vmcb->control.int_vector; > > If int_vector is used only to trigger a #VMEXIT after we have decided to > inject a virtual interrupt, we probably don't the vector value from the > nested vmcb. KVM does not use int_vector, but other hypervisor sometimes trigger virtual interrupts using int_ctl+int_vector instead of eventinj. (Unlike KVM they don't intercept EXIT_VINTR). Hyper-V operates like that. Paolo