From patchwork Mon Jan 18 23:22:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioanna Alifieraki X-Patchwork-Id: 1428335 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DKSVg3b8tz9sWL; Tue, 19 Jan 2021 10:22:19 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1l1dqi-0006mr-6A; Mon, 18 Jan 2021 23:22:16 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l1dqg-0006mJ-7N for kernel-team@lists.ubuntu.com; Mon, 18 Jan 2021 23:22:14 +0000 Received: from mail-wr1-f69.google.com ([209.85.221.69]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l1dqf-0005Ol-VW for kernel-team@lists.ubuntu.com; Mon, 18 Jan 2021 23:22:14 +0000 Received: by mail-wr1-f69.google.com with SMTP id r8so8983013wro.22 for ; Mon, 18 Jan 2021 15:22:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=3JpBwK2Gm172Gy4PIiCtSfqV4Fsn5Yd0LTKIflL7TXs=; b=HX6pjpy6F+mquRA4ZSAdj0iHHWdN6AUfWziPCaLkqOBR7NeB9DUqtkAknHlskdprXe zDMlnaG2UYuWs6xr/3owBAtDkPzZD8RBMufvmTM/HRycoJxfFuDb+VAGI31mlW+DfiUV xo4aVZLV3aodeK5zmYd+Ggqp03iNy2BRPayBclTkluV7U3qDXA8d7gWzJaSqo/21XPe3 dSTugK2H4v+A/Hfjj4vCDIW0WCSVd6MDXydvANZKoxteDejekrhgg4n80LZ/KQ6VTYKz zBrfPLBhRvUQDbpQTZNPIt8GnywCg1g/6OzYTzuvFDGQ9WfjmZWi5teChM1WSmqTSPhn fRug== X-Gm-Message-State: AOAM530J8gS5yad6dWPgf8i3fZGIVnPeSdz5Yxl03POygNIPPd6QMAre DQy3kX1f+YF0EG5REf4kQxzgKV7/coI9kR7s+SP+Mv+2pIctkgMXVQ/fGPFkCTeUZBHZGw4JCgZ xomFbslDVuqMmftFC3lpjtcbc+/NrJXolVhwUV3vn4A== X-Received: by 2002:adf:ef12:: with SMTP id e18mr1567787wro.192.1611012133459; Mon, 18 Jan 2021 15:22:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBBCif57O67l0D3q/C33nxMLNNY45p+wz6tPE08MCw27PMQ7xoF/iCYO4WcQaJNvjyR3m//w== X-Received: by 2002:adf:ef12:: with SMTP id e18mr1567774wro.192.1611012133220; Mon, 18 Jan 2021 15:22:13 -0800 (PST) Received: from localhost ([2001:67c:1560:8007::aac:c2e0]) by smtp.gmail.com with ESMTPSA id u16sm21018497wrn.68.2021.01.18.15.22.12 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jan 2021 15:22:12 -0800 (PST) From: Ioanna Alifieraki To: kernel-team@lists.ubuntu.com, ioanna-maria.alifieraki@canonical.com Subject: [SRU][Xenial][PATCH v3 1/4] kvm: vmx: rename vmx_pre/post_block to pi_pre/post_block Date: Mon, 18 Jan 2021 23:22:05 +0000 Message-Id: <20210118232208.11178-2-ioanna-maria.alifieraki@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210118232208.11178-1-ioanna-maria.alifieraki@canonical.com> References: <20210118232208.11178-1-ioanna-maria.alifieraki@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Yunhong Jiang BugLink: https://bugs.launchpad.net/bugs/1908428 Prepare to switch from preemption timer to hrtimer in the vmx_pre/post_block. Current functions are only for posted interrupt, rename them accordingly. Signed-off-by: Yunhong Jiang Signed-off-by: Paolo Bonzini (cherry picked from commit bc22512bb24c480fae8ae96b233378ef96007590) Signed-off-by: Ioanna Alifieraki --- arch/x86/kvm/vmx.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 46d1293..d73ad4b 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -11158,7 +11158,7 @@ static void vmx_enable_log_dirty_pt_masked(struct kvm *kvm, * this case, return 1, otherwise, return 0. * */ -static int vmx_pre_block(struct kvm_vcpu *vcpu) +static int pi_pre_block(struct kvm_vcpu *vcpu) { unsigned long flags; unsigned int dest; @@ -11224,7 +11224,15 @@ static int vmx_pre_block(struct kvm_vcpu *vcpu) return 0; } -static void vmx_post_block(struct kvm_vcpu *vcpu) +static int vmx_pre_block(struct kvm_vcpu *vcpu) +{ + if (pi_pre_block(vcpu)) + return 1; + + return 0; +} + +static void pi_post_block(struct kvm_vcpu *vcpu) { struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); struct pi_desc old, new; @@ -11265,6 +11273,11 @@ static void vmx_post_block(struct kvm_vcpu *vcpu) } } +static void vmx_post_block(struct kvm_vcpu *vcpu) +{ + pi_post_block(vcpu); +} + /* * vmx_update_pi_irte - set IRTE for Posted-Interrupts *