Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp625966ybp; Wed, 9 Oct 2019 01:26:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyznZUzfqlxbkUsDWK7vbrU/+uBtJwvHnHCpH59aIfww9OFV0/vhqTO5myTLI3o2Imri2cm X-Received: by 2002:a05:6402:1252:: with SMTP id l18mr1843815edw.64.1570609571543; Wed, 09 Oct 2019 01:26:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570609571; cv=none; d=google.com; s=arc-20160816; b=nL7DWOGIODU/3LlSQrPRQPjfR6i70Uy4kePwcQhJLeA1n06s3r1M+DUI+Uzr2Qhfyf qxEt96XjMsv/k0EC4FxBIjE6Je0PAJYxZe+ZA7wBIetvS8WT2egaYVL2EB+7QhXEO1rF A9fZLSClZ2koJLsI9Y/vvXflDrwDDAgOz8rKcujb3eoXe2XmVfHQrpPovjG9tkONhWwi qze4KoPEmqUvDbNLJETPcKJEfzWFj/uKsaiGdsz9pzFUewQOdu6OO9W6nt87iB9qcJWK vu1o8UrAGg/fBMBoLNTQ5sGbPKl3xWCZQymFHHkXGJfa5bBUeShQ4k8sOASe1wOlAF7l OcRw== 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:openpgp:from:references:cc:to:subject; bh=FGjIyp+V4zvVe8nGelmZ1TCF9IV0uDpPZ4FIyT58LwQ=; b=RpZkcO2XEPS5qwadfeCaeRNiQkrYRRuWcrn/SQyUug9Zf5YesA1/BmSzFxQcZaj6YV SwFPfn2ZRZwm7Sir5TmEAtg0CtlvsaLuGOEDMSuH59QEGqIfWN/LRGKTL9dYp4O8/16L K+FvWBIPDLmCZqYfvjEL5JI8RfVPdNEAZ10xbg7uwhYPmt5TpiZi+qqhsKxkPA26oHp3 CEIVL294MhK4YN18d/1JZVO2rEiE5DoYfOO+wDdho2WCq+XMgKsfFtMS+N0FYZR3GNPi CO6Sd0MKmnmtZJNOoNNTMpMRiMpPYnGY/SO+CwyotPVrmCNX5DjrAtBFJPQGZV9NJPrP L4Pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p38si938048edc.449.2019.10.09.01.25.48; Wed, 09 Oct 2019 01:26:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729677AbfJIIZH (ORCPT + 99 others); Wed, 9 Oct 2019 04:25:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57756 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725440AbfJIIZG (ORCPT ); Wed, 9 Oct 2019 04:25:06 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6100C3B717 for ; Wed, 9 Oct 2019 08:25:06 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id y18so751464wrw.8 for ; Wed, 09 Oct 2019 01:25:06 -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:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FGjIyp+V4zvVe8nGelmZ1TCF9IV0uDpPZ4FIyT58LwQ=; b=WR9I+inV5bNN4kwZQ7ADlHbpa5vXe5fjapBGsNmZ1VM2TMpIisdHA/MzUs04BbSWnk wyhXzzGJ1Uo7yCgXwkleTLrIZEifKGjpiIYrdeIrUxoEKqAjXfzNItnMvsTvPiE3zLEg /lTJLcjqgEv8FeLm5Ghpzb+3ENuvQ2ilfGUF7xwHebz7UYftXaQJ9uKqij7/PzVjvdcv ItxYBD9sPAWr5q3zxHCB/+soPHshgVq3RsMNAalKFcZQulydBCb1ZDfLhNbf0oHmYVEJ uBp2RyLBDe3NJk2vO6MOdKGU0AArGdUc9rtbEVDtzK2F54b+ZgSqdxn+lLHOHX7VyUqE Ytlw== X-Gm-Message-State: APjAAAUVANizcYlYLjIGvHv7zFsbueb5UU9uLyvKVQEccYtIDk0VnIS+ FRYQllr9c5R0EXyOSs7gnvv7GjOO+Uf+XlJEUEhOxEMeCZ5GH9rLC0CTxsavVDy9XGKuEc76fFE q+xkjD8yWKIUvPePNv7ytpYZn X-Received: by 2002:a1c:7d92:: with SMTP id y140mr1738598wmc.151.1570609505003; Wed, 09 Oct 2019 01:25:05 -0700 (PDT) X-Received: by 2002:a1c:7d92:: with SMTP id y140mr1738573wmc.151.1570609504741; Wed, 09 Oct 2019 01:25:04 -0700 (PDT) Received: from [192.168.10.150] ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id b12sm1168930wrt.21.2019.10.09.01.25.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2019 01:25:04 -0700 (PDT) Subject: Re: [PATCH v3 06/16] kvm: x86: svm: Add support to activate/deactivate posted interrupts To: "Suthikulpanit, Suravee" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" Cc: "rkrcmar@redhat.com" , "joro@8bytes.org" , "vkuznets@redhat.com" , "graf@amazon.com" , "jschoenh@amazon.de" , "karahmed@amazon.de" , "rimasluk@amazon.com" , "Grimm, Jon" References: <1568401242-260374-1-git-send-email-suravee.suthikulpanit@amd.com> <1568401242-260374-7-git-send-email-suravee.suthikulpanit@amd.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: Date: Wed, 9 Oct 2019 10:25:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1568401242-260374-7-git-send-email-suravee.suthikulpanit@amd.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/09/19 21:00, Suthikulpanit, Suravee wrote: > +++ b/arch/x86/kvm/x86.c > @@ -7198,6 +7198,9 @@ void kvm_vcpu_activate_apicv(struct kvm_vcpu *vcpu) > kvm_apic_update_apicv(vcpu); > > kvm_x86_ops->refresh_apicv_exec_ctrl(vcpu); > + > + if (kvm_x86_ops->activate_pi_irte) > + kvm_x86_ops->activate_pi_irte(vcpu); > } > EXPORT_SYMBOL_GPL(kvm_vcpu_activate_apicv); > > @@ -7212,6 +7215,8 @@ void kvm_vcpu_deactivate_apicv(struct kvm_vcpu *vcpu) > > vcpu->arch.apicv_active = false; > kvm_apic_update_apicv(vcpu); > + if (kvm_x86_ops->deactivate_pi_irte) > + kvm_x86_ops->deactivate_pi_irte(vcpu); > kvm_x86_ops->refresh_apicv_exec_ctrl(vcpu); > } > EXPORT_SYMBOL_GPL(kvm_vcpu_deactivate_apicv); This can be done in refresh_apicv_exec_ctrl. Paolo