From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48B72C433FE for ; Thu, 28 Oct 2021 15:47:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2F192610C7 for ; Thu, 28 Oct 2021 15:47:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230444AbhJ1Pth (ORCPT ); Thu, 28 Oct 2021 11:49:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36159 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230407AbhJ1Pta (ORCPT ); Thu, 28 Oct 2021 11:49:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635436023; 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=CbmNsSUrvGPtUZE+MWwRLOXXOyUhB+AbdYKB6eOYzgI=; b=A2+MzG9VRxzCdP01FQTteiGI9DnLvYndC+MU2PY5uYdrJ4eyo+H24bptCO3kLCDW46xB3o eUQQQPSL8ewMKaUSiXq56bwh/DkLDZMPxdnEhY/jIFf0q6owCjXifBICI3D/7g9qw78Dj1 +djfTCMGZhinv3PRXE0McP1ZdEbZmxQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-qmR5zb0kMGqaJpP-fhah4A-1; Thu, 28 Oct 2021 11:47:01 -0400 X-MC-Unique: qmR5zb0kMGqaJpP-fhah4A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00705802682; Thu, 28 Oct 2021 15:46:58 +0000 (UTC) Received: from starship (unknown [10.40.194.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 193772637D; Thu, 28 Oct 2021 15:46:48 +0000 (UTC) Message-ID: <412931e082b33403c8778cae7376325871ab0d54.camel@redhat.com> Subject: Re: [PATCH v2 34/43] KVM: x86: Remove defunct pre_block/post_block kvm_x86_ops hooks From: Maxim Levitsky To: Sean Christopherson , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Paolo Bonzini Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , Atish Patra , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, David Matlack , Oliver Upton , Jing Zhang Date: Thu, 28 Oct 2021 18:46:11 +0300 In-Reply-To: <20211009021236.4122790-35-seanjc@google.com> References: <20211009021236.4122790-1-seanjc@google.com> <20211009021236.4122790-35-seanjc@google.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2021-10-08 at 19:12 -0700, Sean Christopherson wrote: > Drop kvm_x86_ops' pre/post_block() now that all implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson > --- > arch/x86/include/asm/kvm-x86-ops.h | 2 -- > arch/x86/include/asm/kvm_host.h | 12 ------------ > arch/x86/kvm/vmx/vmx.c | 13 ------------- > arch/x86/kvm/x86.c | 6 +----- > 4 files changed, 1 insertion(+), 32 deletions(-) > > diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h > index cefe1d81e2e8..c2b007171abd 100644 > --- a/arch/x86/include/asm/kvm-x86-ops.h > +++ b/arch/x86/include/asm/kvm-x86-ops.h > @@ -96,8 +96,6 @@ KVM_X86_OP(handle_exit_irqoff) > KVM_X86_OP_NULL(request_immediate_exit) > KVM_X86_OP(sched_in) > KVM_X86_OP_NULL(update_cpu_dirty_logging) > -KVM_X86_OP_NULL(pre_block) > -KVM_X86_OP_NULL(post_block) > KVM_X86_OP_NULL(vcpu_blocking) > KVM_X86_OP_NULL(vcpu_unblocking) > KVM_X86_OP_NULL(update_pi_irte) > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index 328103a520d3..76a8dddc1a48 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -1445,18 +1445,6 @@ struct kvm_x86_ops { > const struct kvm_pmu_ops *pmu_ops; > const struct kvm_x86_nested_ops *nested_ops; > > - /* > - * Architecture specific hooks for vCPU blocking due to > - * HLT instruction. > - * Returns for .pre_block(): > - * - 0 means continue to block the vCPU. > - * - 1 means we cannot block the vCPU since some event > - * happens during this period, such as, 'ON' bit in > - * posted-interrupts descriptor is set. > - */ > - int (*pre_block)(struct kvm_vcpu *vcpu); > - void (*post_block)(struct kvm_vcpu *vcpu); > - > void (*vcpu_blocking)(struct kvm_vcpu *vcpu); > void (*vcpu_unblocking)(struct kvm_vcpu *vcpu); > > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c > index a24f19874716..13e732a818f3 100644 > --- a/arch/x86/kvm/vmx/vmx.c > +++ b/arch/x86/kvm/vmx/vmx.c > @@ -7462,16 +7462,6 @@ void vmx_update_cpu_dirty_logging(struct kvm_vcpu *vcpu) > secondary_exec_controls_clearbit(vmx, SECONDARY_EXEC_ENABLE_PML); > } > > -static int vmx_pre_block(struct kvm_vcpu *vcpu) > -{ > - return 0; > -} > - > -static void vmx_post_block(struct kvm_vcpu *vcpu) > -{ > - > -} > - > static void vmx_setup_mce(struct kvm_vcpu *vcpu) > { > if (vcpu->arch.mcg_cap & MCG_LMCE_P) > @@ -7665,9 +7655,6 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = { > .cpu_dirty_log_size = PML_ENTITY_NUM, > .update_cpu_dirty_logging = vmx_update_cpu_dirty_logging, > > - .pre_block = vmx_pre_block, > - .post_block = vmx_post_block, > - > .pmu_ops = &intel_pmu_ops, > .nested_ops = &vmx_nested_ops, > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 909e932a7ae7..9643f23c28c7 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -9898,8 +9898,7 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) > { > bool hv_timer; > > - if (!kvm_arch_vcpu_runnable(vcpu) && > - (!kvm_x86_ops.pre_block || static_call(kvm_x86_pre_block)(vcpu) == 0)) { > + if (!kvm_arch_vcpu_runnable(vcpu)) { > /* > * Switch to the software timer before halt-polling/blocking as > * the guest's timer may be a break event for the vCPU, and the > @@ -9921,9 +9920,6 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) > if (hv_timer) > kvm_lapic_switch_to_hv_timer(vcpu); > > - if (kvm_x86_ops.post_block) > - static_call(kvm_x86_post_block)(vcpu); > - > if (!kvm_check_request(KVM_REQ_UNHALT, vcpu)) > return 1; > } Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FB0BC433F5 for ; Thu, 28 Oct 2021 15:47:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2179F610C8 for ; Thu, 28 Oct 2021 15:47:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2179F610C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:Cc:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=K52/QEU7RxJB0dVZTioCMNaZFcBtTMbJsw+99RxfSVI=; b=oa5/hBkwutaB1E vd2fVficnL8DHvmaL8sUk+n0D7UagjIeae2rAecGVpGqk2KG2ZoInbdwnqS45OAVf8RVCvTwFT4VV X6tysqTe9MfyaXKbDRGY0fhfqb9hctifB9lNku6MD+vOQxSg9k1xFrKg928p6ZaNeM0VmBuwHoZaL 5nU/vyotHgn2qonBkJMKb8f/frcd3UagusWy894ohnppg3HTQV0X5ljxtdYqxz1ao7Lb1/0Tc45hC ABHjhdWA9ZrWFbS5AcotA+VGKsFLcd24V+KB1nYpV40Stmjy9AdVP0PzSFfuZ4+Mtc6vgHKdpbaqn u8iG4MRORZxgNfRcsaVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mg7cs-008SUT-9p; Thu, 28 Oct 2021 15:47:34 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mg7cQ-008SLS-4v for linux-riscv@lists.infradead.org; Thu, 28 Oct 2021 15:47:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635436025; 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=CbmNsSUrvGPtUZE+MWwRLOXXOyUhB+AbdYKB6eOYzgI=; b=Y3WxijuaKfiaIu0APqEtTdSU6Yf4oqezv+Qd10pAJZWjc0/D1NijsBlbcYovSjjqAF9Dak 3OgygD6QBHDA71IN/3kYI0/n/Dn/CW9Ni4KHxLoSWZzFHSiBw/bmSK9HTaymgQ4nphJGTm DeP2dzfjhd4xLrxDQK88DUVsFLSbUf4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-qmR5zb0kMGqaJpP-fhah4A-1; Thu, 28 Oct 2021 11:47:01 -0400 X-MC-Unique: qmR5zb0kMGqaJpP-fhah4A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00705802682; Thu, 28 Oct 2021 15:46:58 +0000 (UTC) Received: from starship (unknown [10.40.194.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 193772637D; Thu, 28 Oct 2021 15:46:48 +0000 (UTC) Message-ID: <412931e082b33403c8778cae7376325871ab0d54.camel@redhat.com> Subject: Re: [PATCH v2 34/43] KVM: x86: Remove defunct pre_block/post_block kvm_x86_ops hooks From: Maxim Levitsky To: Sean Christopherson , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Paolo Bonzini Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , Atish Patra , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, David Matlack , Oliver Upton , Jing Zhang Date: Thu, 28 Oct 2021 18:46:11 +0300 In-Reply-To: <20211009021236.4122790-35-seanjc@google.com> References: <20211009021236.4122790-1-seanjc@google.com> <20211009021236.4122790-35-seanjc@google.com> User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211028_084706_403222_066DE2D2 X-CRM114-Status: GOOD ( 23.90 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, 2021-10-08 at 19:12 -0700, Sean Christopherson wrote: > Drop kvm_x86_ops' pre/post_block() now that all implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson > --- > arch/x86/include/asm/kvm-x86-ops.h | 2 -- > arch/x86/include/asm/kvm_host.h | 12 ------------ > arch/x86/kvm/vmx/vmx.c | 13 ------------- > arch/x86/kvm/x86.c | 6 +----- > 4 files changed, 1 insertion(+), 32 deletions(-) > > diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h > index cefe1d81e2e8..c2b007171abd 100644 > --- a/arch/x86/include/asm/kvm-x86-ops.h > +++ b/arch/x86/include/asm/kvm-x86-ops.h > @@ -96,8 +96,6 @@ KVM_X86_OP(handle_exit_irqoff) > KVM_X86_OP_NULL(request_immediate_exit) > KVM_X86_OP(sched_in) > KVM_X86_OP_NULL(update_cpu_dirty_logging) > -KVM_X86_OP_NULL(pre_block) > -KVM_X86_OP_NULL(post_block) > KVM_X86_OP_NULL(vcpu_blocking) > KVM_X86_OP_NULL(vcpu_unblocking) > KVM_X86_OP_NULL(update_pi_irte) > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index 328103a520d3..76a8dddc1a48 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -1445,18 +1445,6 @@ struct kvm_x86_ops { > const struct kvm_pmu_ops *pmu_ops; > const struct kvm_x86_nested_ops *nested_ops; > > - /* > - * Architecture specific hooks for vCPU blocking due to > - * HLT instruction. > - * Returns for .pre_block(): > - * - 0 means continue to block the vCPU. > - * - 1 means we cannot block the vCPU since some event > - * happens during this period, such as, 'ON' bit in > - * posted-interrupts descriptor is set. > - */ > - int (*pre_block)(struct kvm_vcpu *vcpu); > - void (*post_block)(struct kvm_vcpu *vcpu); > - > void (*vcpu_blocking)(struct kvm_vcpu *vcpu); > void (*vcpu_unblocking)(struct kvm_vcpu *vcpu); > > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c > index a24f19874716..13e732a818f3 100644 > --- a/arch/x86/kvm/vmx/vmx.c > +++ b/arch/x86/kvm/vmx/vmx.c > @@ -7462,16 +7462,6 @@ void vmx_update_cpu_dirty_logging(struct kvm_vcpu *vcpu) > secondary_exec_controls_clearbit(vmx, SECONDARY_EXEC_ENABLE_PML); > } > > -static int vmx_pre_block(struct kvm_vcpu *vcpu) > -{ > - return 0; > -} > - > -static void vmx_post_block(struct kvm_vcpu *vcpu) > -{ > - > -} > - > static void vmx_setup_mce(struct kvm_vcpu *vcpu) > { > if (vcpu->arch.mcg_cap & MCG_LMCE_P) > @@ -7665,9 +7655,6 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = { > .cpu_dirty_log_size = PML_ENTITY_NUM, > .update_cpu_dirty_logging = vmx_update_cpu_dirty_logging, > > - .pre_block = vmx_pre_block, > - .post_block = vmx_post_block, > - > .pmu_ops = &intel_pmu_ops, > .nested_ops = &vmx_nested_ops, > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 909e932a7ae7..9643f23c28c7 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -9898,8 +9898,7 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) > { > bool hv_timer; > > - if (!kvm_arch_vcpu_runnable(vcpu) && > - (!kvm_x86_ops.pre_block || static_call(kvm_x86_pre_block)(vcpu) == 0)) { > + if (!kvm_arch_vcpu_runnable(vcpu)) { > /* > * Switch to the software timer before halt-polling/blocking as > * the guest's timer may be a break event for the vCPU, and the > @@ -9921,9 +9920,6 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) > if (hv_timer) > kvm_lapic_switch_to_hv_timer(vcpu); > > - if (kvm_x86_ops.post_block) > - static_call(kvm_x86_post_block)(vcpu); > - > if (!kvm_check_request(KVM_REQ_UNHALT, vcpu)) > return 1; > } Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7DFBC433EF for ; Thu, 28 Oct 2021 15:53:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8534E60FC1 for ; Thu, 28 Oct 2021 15:53:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8534E60FC1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:Cc:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=B6v6Cr/MrFi4es/Z7x6Gym5dNETBbbvo2xVyMGzwt2w=; b=OYM6OA5oO9XxTP SN3UZgm037b05+bKpSN0uYO5pAHdpMWtnezn4+3dVYe/G09ZDc4oVIrEWZ2pMQCfsNzN2wu3EbVQ4 abYLSVnGHu8IIBgUT3PbXc8aPElUfi3+mLCQR3gZO3LDaiYzPTqfd5GXiUw8qM+tLl0ZBdKFuOOtb kUiksaqMu2KEnmQi9mls1g/MVN2ZpoCl+TAm+ALnV3HiB/cctT4nIay589tG+UKSt2TdxcF6L9jJr 7GVquZmpkeNgqHZJuSDhuTJAP1vH/5nZ2yWscKggyhZLvCQjLNoqdfdZZa2LC/pyAXy08pyNFJL7j S/88y2cY7KaeNT/zLP9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mg7cg-008SQq-Rw; Thu, 28 Oct 2021 15:47:23 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mg7cO-008SKX-0w for linux-arm-kernel@lists.infradead.org; Thu, 28 Oct 2021 15:47:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635436023; 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=CbmNsSUrvGPtUZE+MWwRLOXXOyUhB+AbdYKB6eOYzgI=; b=A2+MzG9VRxzCdP01FQTteiGI9DnLvYndC+MU2PY5uYdrJ4eyo+H24bptCO3kLCDW46xB3o eUQQQPSL8ewMKaUSiXq56bwh/DkLDZMPxdnEhY/jIFf0q6owCjXifBICI3D/7g9qw78Dj1 +djfTCMGZhinv3PRXE0McP1ZdEbZmxQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-qmR5zb0kMGqaJpP-fhah4A-1; Thu, 28 Oct 2021 11:47:01 -0400 X-MC-Unique: qmR5zb0kMGqaJpP-fhah4A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00705802682; Thu, 28 Oct 2021 15:46:58 +0000 (UTC) Received: from starship (unknown [10.40.194.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 193772637D; Thu, 28 Oct 2021 15:46:48 +0000 (UTC) Message-ID: <412931e082b33403c8778cae7376325871ab0d54.camel@redhat.com> Subject: Re: [PATCH v2 34/43] KVM: x86: Remove defunct pre_block/post_block kvm_x86_ops hooks From: Maxim Levitsky To: Sean Christopherson , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Paolo Bonzini Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , Atish Patra , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, David Matlack , Oliver Upton , Jing Zhang Date: Thu, 28 Oct 2021 18:46:11 +0300 In-Reply-To: <20211009021236.4122790-35-seanjc@google.com> References: <20211009021236.4122790-1-seanjc@google.com> <20211009021236.4122790-35-seanjc@google.com> User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211028_084704_191756_58147396 X-CRM114-Status: GOOD ( 24.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 2021-10-08 at 19:12 -0700, Sean Christopherson wrote: > Drop kvm_x86_ops' pre/post_block() now that all implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson > --- > arch/x86/include/asm/kvm-x86-ops.h | 2 -- > arch/x86/include/asm/kvm_host.h | 12 ------------ > arch/x86/kvm/vmx/vmx.c | 13 ------------- > arch/x86/kvm/x86.c | 6 +----- > 4 files changed, 1 insertion(+), 32 deletions(-) > > diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h > index cefe1d81e2e8..c2b007171abd 100644 > --- a/arch/x86/include/asm/kvm-x86-ops.h > +++ b/arch/x86/include/asm/kvm-x86-ops.h > @@ -96,8 +96,6 @@ KVM_X86_OP(handle_exit_irqoff) > KVM_X86_OP_NULL(request_immediate_exit) > KVM_X86_OP(sched_in) > KVM_X86_OP_NULL(update_cpu_dirty_logging) > -KVM_X86_OP_NULL(pre_block) > -KVM_X86_OP_NULL(post_block) > KVM_X86_OP_NULL(vcpu_blocking) > KVM_X86_OP_NULL(vcpu_unblocking) > KVM_X86_OP_NULL(update_pi_irte) > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index 328103a520d3..76a8dddc1a48 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -1445,18 +1445,6 @@ struct kvm_x86_ops { > const struct kvm_pmu_ops *pmu_ops; > const struct kvm_x86_nested_ops *nested_ops; > > - /* > - * Architecture specific hooks for vCPU blocking due to > - * HLT instruction. > - * Returns for .pre_block(): > - * - 0 means continue to block the vCPU. > - * - 1 means we cannot block the vCPU since some event > - * happens during this period, such as, 'ON' bit in > - * posted-interrupts descriptor is set. > - */ > - int (*pre_block)(struct kvm_vcpu *vcpu); > - void (*post_block)(struct kvm_vcpu *vcpu); > - > void (*vcpu_blocking)(struct kvm_vcpu *vcpu); > void (*vcpu_unblocking)(struct kvm_vcpu *vcpu); > > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c > index a24f19874716..13e732a818f3 100644 > --- a/arch/x86/kvm/vmx/vmx.c > +++ b/arch/x86/kvm/vmx/vmx.c > @@ -7462,16 +7462,6 @@ void vmx_update_cpu_dirty_logging(struct kvm_vcpu *vcpu) > secondary_exec_controls_clearbit(vmx, SECONDARY_EXEC_ENABLE_PML); > } > > -static int vmx_pre_block(struct kvm_vcpu *vcpu) > -{ > - return 0; > -} > - > -static void vmx_post_block(struct kvm_vcpu *vcpu) > -{ > - > -} > - > static void vmx_setup_mce(struct kvm_vcpu *vcpu) > { > if (vcpu->arch.mcg_cap & MCG_LMCE_P) > @@ -7665,9 +7655,6 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = { > .cpu_dirty_log_size = PML_ENTITY_NUM, > .update_cpu_dirty_logging = vmx_update_cpu_dirty_logging, > > - .pre_block = vmx_pre_block, > - .post_block = vmx_post_block, > - > .pmu_ops = &intel_pmu_ops, > .nested_ops = &vmx_nested_ops, > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 909e932a7ae7..9643f23c28c7 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -9898,8 +9898,7 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) > { > bool hv_timer; > > - if (!kvm_arch_vcpu_runnable(vcpu) && > - (!kvm_x86_ops.pre_block || static_call(kvm_x86_pre_block)(vcpu) == 0)) { > + if (!kvm_arch_vcpu_runnable(vcpu)) { > /* > * Switch to the software timer before halt-polling/blocking as > * the guest's timer may be a break event for the vCPU, and the > @@ -9921,9 +9920,6 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) > if (hv_timer) > kvm_lapic_switch_to_hv_timer(vcpu); > > - if (kvm_x86_ops.post_block) > - static_call(kvm_x86_post_block)(vcpu); > - > if (!kvm_check_request(KVM_REQ_UNHALT, vcpu)) > return 1; > } Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55452C433F5 for ; Thu, 28 Oct 2021 17:16:08 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id ED4B6610E5 for ; Thu, 28 Oct 2021 17:16:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ED4B6610E5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9FA094B104; Thu, 28 Oct 2021 13:16:07 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@redhat.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uj5Q2xD-t2XI; Thu, 28 Oct 2021 13:16:06 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D7C264B202; Thu, 28 Oct 2021 13:16:00 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E96B84B15E for ; Thu, 28 Oct 2021 11:47:06 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vxajnzQxEqQa for ; Thu, 28 Oct 2021 11:47:05 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 372954B0D7 for ; Thu, 28 Oct 2021 11:47:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635436025; 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=CbmNsSUrvGPtUZE+MWwRLOXXOyUhB+AbdYKB6eOYzgI=; b=Y3WxijuaKfiaIu0APqEtTdSU6Yf4oqezv+Qd10pAJZWjc0/D1NijsBlbcYovSjjqAF9Dak 3OgygD6QBHDA71IN/3kYI0/n/Dn/CW9Ni4KHxLoSWZzFHSiBw/bmSK9HTaymgQ4nphJGTm DeP2dzfjhd4xLrxDQK88DUVsFLSbUf4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-qmR5zb0kMGqaJpP-fhah4A-1; Thu, 28 Oct 2021 11:47:01 -0400 X-MC-Unique: qmR5zb0kMGqaJpP-fhah4A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00705802682; Thu, 28 Oct 2021 15:46:58 +0000 (UTC) Received: from starship (unknown [10.40.194.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 193772637D; Thu, 28 Oct 2021 15:46:48 +0000 (UTC) Message-ID: <412931e082b33403c8778cae7376325871ab0d54.camel@redhat.com> Subject: Re: [PATCH v2 34/43] KVM: x86: Remove defunct pre_block/post_block kvm_x86_ops hooks From: Maxim Levitsky To: Sean Christopherson , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Paolo Bonzini Date: Thu, 28 Oct 2021 18:46:11 +0300 In-Reply-To: <20211009021236.4122790-35-seanjc@google.com> References: <20211009021236.4122790-1-seanjc@google.com> <20211009021236.4122790-35-seanjc@google.com> User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mailman-Approved-At: Thu, 28 Oct 2021 13:15:59 -0400 Cc: Wanpeng Li , kvm@vger.kernel.org, David Hildenbrand , linux-kernel@vger.kernel.org, Atish Patra , linux-riscv@lists.infradead.org, Claudio Imbrenda , kvmarm@lists.cs.columbia.edu, Joerg Roedel , kvm-ppc@vger.kernel.org, David Matlack , linux-arm-kernel@lists.infradead.org, Jim Mattson , Cornelia Huck , linux-mips@vger.kernel.org, kvm-riscv@lists.infradead.org, Vitaly Kuznetsov X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Fri, 2021-10-08 at 19:12 -0700, Sean Christopherson wrote: > Drop kvm_x86_ops' pre/post_block() now that all implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson > --- > arch/x86/include/asm/kvm-x86-ops.h | 2 -- > arch/x86/include/asm/kvm_host.h | 12 ------------ > arch/x86/kvm/vmx/vmx.c | 13 ------------- > arch/x86/kvm/x86.c | 6 +----- > 4 files changed, 1 insertion(+), 32 deletions(-) > > diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h > index cefe1d81e2e8..c2b007171abd 100644 > --- a/arch/x86/include/asm/kvm-x86-ops.h > +++ b/arch/x86/include/asm/kvm-x86-ops.h > @@ -96,8 +96,6 @@ KVM_X86_OP(handle_exit_irqoff) > KVM_X86_OP_NULL(request_immediate_exit) > KVM_X86_OP(sched_in) > KVM_X86_OP_NULL(update_cpu_dirty_logging) > -KVM_X86_OP_NULL(pre_block) > -KVM_X86_OP_NULL(post_block) > KVM_X86_OP_NULL(vcpu_blocking) > KVM_X86_OP_NULL(vcpu_unblocking) > KVM_X86_OP_NULL(update_pi_irte) > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index 328103a520d3..76a8dddc1a48 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -1445,18 +1445,6 @@ struct kvm_x86_ops { > const struct kvm_pmu_ops *pmu_ops; > const struct kvm_x86_nested_ops *nested_ops; > > - /* > - * Architecture specific hooks for vCPU blocking due to > - * HLT instruction. > - * Returns for .pre_block(): > - * - 0 means continue to block the vCPU. > - * - 1 means we cannot block the vCPU since some event > - * happens during this period, such as, 'ON' bit in > - * posted-interrupts descriptor is set. > - */ > - int (*pre_block)(struct kvm_vcpu *vcpu); > - void (*post_block)(struct kvm_vcpu *vcpu); > - > void (*vcpu_blocking)(struct kvm_vcpu *vcpu); > void (*vcpu_unblocking)(struct kvm_vcpu *vcpu); > > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c > index a24f19874716..13e732a818f3 100644 > --- a/arch/x86/kvm/vmx/vmx.c > +++ b/arch/x86/kvm/vmx/vmx.c > @@ -7462,16 +7462,6 @@ void vmx_update_cpu_dirty_logging(struct kvm_vcpu *vcpu) > secondary_exec_controls_clearbit(vmx, SECONDARY_EXEC_ENABLE_PML); > } > > -static int vmx_pre_block(struct kvm_vcpu *vcpu) > -{ > - return 0; > -} > - > -static void vmx_post_block(struct kvm_vcpu *vcpu) > -{ > - > -} > - > static void vmx_setup_mce(struct kvm_vcpu *vcpu) > { > if (vcpu->arch.mcg_cap & MCG_LMCE_P) > @@ -7665,9 +7655,6 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = { > .cpu_dirty_log_size = PML_ENTITY_NUM, > .update_cpu_dirty_logging = vmx_update_cpu_dirty_logging, > > - .pre_block = vmx_pre_block, > - .post_block = vmx_post_block, > - > .pmu_ops = &intel_pmu_ops, > .nested_ops = &vmx_nested_ops, > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 909e932a7ae7..9643f23c28c7 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -9898,8 +9898,7 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) > { > bool hv_timer; > > - if (!kvm_arch_vcpu_runnable(vcpu) && > - (!kvm_x86_ops.pre_block || static_call(kvm_x86_pre_block)(vcpu) == 0)) { > + if (!kvm_arch_vcpu_runnable(vcpu)) { > /* > * Switch to the software timer before halt-polling/blocking as > * the guest's timer may be a break event for the vCPU, and the > @@ -9921,9 +9920,6 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) > if (hv_timer) > kvm_lapic_switch_to_hv_timer(vcpu); > > - if (kvm_x86_ops.post_block) > - static_call(kvm_x86_post_block)(vcpu); > - > if (!kvm_check_request(KVM_REQ_UNHALT, vcpu)) > return 1; > } Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Levitsky Date: Thu, 28 Oct 2021 15:46:11 +0000 Subject: Re: [PATCH v2 34/43] KVM: x86: Remove defunct pre_block/post_block kvm_x86_ops hooks Message-Id: <412931e082b33403c8778cae7376325871ab0d54.camel@redhat.com> List-Id: References: <20211009021236.4122790-1-seanjc@google.com> <20211009021236.4122790-35-seanjc@google.com> In-Reply-To: <20211009021236.4122790-35-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Sean Christopherson , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Paolo Bonzini Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , Atish Patra , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, David Matlack , Oliver Upton , Jing Zhang On Fri, 2021-10-08 at 19:12 -0700, Sean Christopherson wrote: > Drop kvm_x86_ops' pre/post_block() now that all implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson > --- > arch/x86/include/asm/kvm-x86-ops.h | 2 -- > arch/x86/include/asm/kvm_host.h | 12 ------------ > arch/x86/kvm/vmx/vmx.c | 13 ------------- > arch/x86/kvm/x86.c | 6 +----- > 4 files changed, 1 insertion(+), 32 deletions(-) > > diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h > index cefe1d81e2e8..c2b007171abd 100644 > --- a/arch/x86/include/asm/kvm-x86-ops.h > +++ b/arch/x86/include/asm/kvm-x86-ops.h > @@ -96,8 +96,6 @@ KVM_X86_OP(handle_exit_irqoff) > KVM_X86_OP_NULL(request_immediate_exit) > KVM_X86_OP(sched_in) > KVM_X86_OP_NULL(update_cpu_dirty_logging) > -KVM_X86_OP_NULL(pre_block) > -KVM_X86_OP_NULL(post_block) > KVM_X86_OP_NULL(vcpu_blocking) > KVM_X86_OP_NULL(vcpu_unblocking) > KVM_X86_OP_NULL(update_pi_irte) > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index 328103a520d3..76a8dddc1a48 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -1445,18 +1445,6 @@ struct kvm_x86_ops { > const struct kvm_pmu_ops *pmu_ops; > const struct kvm_x86_nested_ops *nested_ops; > > - /* > - * Architecture specific hooks for vCPU blocking due to > - * HLT instruction. > - * Returns for .pre_block(): > - * - 0 means continue to block the vCPU. > - * - 1 means we cannot block the vCPU since some event > - * happens during this period, such as, 'ON' bit in > - * posted-interrupts descriptor is set. > - */ > - int (*pre_block)(struct kvm_vcpu *vcpu); > - void (*post_block)(struct kvm_vcpu *vcpu); > - > void (*vcpu_blocking)(struct kvm_vcpu *vcpu); > void (*vcpu_unblocking)(struct kvm_vcpu *vcpu); > > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c > index a24f19874716..13e732a818f3 100644 > --- a/arch/x86/kvm/vmx/vmx.c > +++ b/arch/x86/kvm/vmx/vmx.c > @@ -7462,16 +7462,6 @@ void vmx_update_cpu_dirty_logging(struct kvm_vcpu *vcpu) > secondary_exec_controls_clearbit(vmx, SECONDARY_EXEC_ENABLE_PML); > } > > -static int vmx_pre_block(struct kvm_vcpu *vcpu) > -{ > - return 0; > -} > - > -static void vmx_post_block(struct kvm_vcpu *vcpu) > -{ > - > -} > - > static void vmx_setup_mce(struct kvm_vcpu *vcpu) > { > if (vcpu->arch.mcg_cap & MCG_LMCE_P) > @@ -7665,9 +7655,6 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = { > .cpu_dirty_log_size = PML_ENTITY_NUM, > .update_cpu_dirty_logging = vmx_update_cpu_dirty_logging, > > - .pre_block = vmx_pre_block, > - .post_block = vmx_post_block, > - > .pmu_ops = &intel_pmu_ops, > .nested_ops = &vmx_nested_ops, > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 909e932a7ae7..9643f23c28c7 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -9898,8 +9898,7 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) > { > bool hv_timer; > > - if (!kvm_arch_vcpu_runnable(vcpu) && > - (!kvm_x86_ops.pre_block || static_call(kvm_x86_pre_block)(vcpu) = 0)) { > + if (!kvm_arch_vcpu_runnable(vcpu)) { > /* > * Switch to the software timer before halt-polling/blocking as > * the guest's timer may be a break event for the vCPU, and the > @@ -9921,9 +9920,6 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) > if (hv_timer) > kvm_lapic_switch_to_hv_timer(vcpu); > > - if (kvm_x86_ops.post_block) > - static_call(kvm_x86_post_block)(vcpu); > - > if (!kvm_check_request(KVM_REQ_UNHALT, vcpu)) > return 1; > } Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky