From patchwork Fri Aug 30 04:35:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 13784251 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 14751CA0EDF for ; Fri, 30 Aug 2024 04:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Cc:To: From:Subject:Message-ID:References:Mime-Version:In-Reply-To:Date: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=udiDa1YXNVQe9YQdq8pNqA0v4AMGb+sHHwac6qQVu4U=; b=ZIEX9eR5GYVLGOBIjR7ADbN41X v+A0UR+hcc7nKHzuXbRz7EH8AbhCQEGVgdrX+Es2Dld8Qy9+WMpxfXVEJ58pbbwSKrJxGQU029mmt kKqOGtmQiXHSVioDz1xOylpmoksrASavKPOd5A30NXJ0dyHA93MXrqZmlyG2ZSsW+rNWjuUbOPPQq hpL8L5FXSZLBfJ9Q1ecCstO3jUr4Z8LB8aq79c6gY+sg8zs/eb5FesF+L/c5BrddvxRrKL1FgVUxq GA/qezb6YzkDLaf3Vwm7EOkKo0E3O5LopKoIlYNj8u0SuNFepG+b+Md/frwDQf29wD2yEp9rHityf i6c3ZW4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjtT3-00000004hWv-2moE; Fri, 30 Aug 2024 04:42:37 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjtN2-00000004fts-3BoW for linux-arm-kernel@bombadil.infradead.org; Fri, 30 Aug 2024 04:36:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Cc:To:From:Subject: Message-ID:References:Mime-Version:In-Reply-To:Date:Reply-To:Sender: Content-Transfer-Encoding:Content-ID:Content-Description; bh=udiDa1YXNVQe9YQdq8pNqA0v4AMGb+sHHwac6qQVu4U=; b=NLB4E0TrElWjlhrR4eINBZ4gm2 nq4CUSFlXu4gglbu3F6zBa45R+o3L2FPj0+K+4NMlMk54urtIkRkmkqSQTd7EVkvaqi/+q+xLwTdt TFF7Ue24J9fAXcii0jH5iZJvOSHpNu9pmkUiephIem6LGwSGK8dAXbqc1bFIGr9V23D2dvs2sMydd lFUPsOW/DnFLAbiUBPH234FhjmM2/OLlHciqOQJVSQvhugsTKG6uUQ+3yyz+EJGpYu9VPoEWnzuAx 9BC9JSc5wDWomwxnHQfUcTY96bqpFqo6sTde/dpYisPQwfnD8ZSX436jDrWK0jTS/cQFsIk78gavy 0KM3PWGg==; Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjtMu-0000000BYdO-2Bvj for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 04:36:23 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-6d3e062dbeeso5901727b3.0 for ; Thu, 29 Aug 2024 21:36:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1724992574; x=1725597374; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=udiDa1YXNVQe9YQdq8pNqA0v4AMGb+sHHwac6qQVu4U=; b=LG0k+UnkpaWm0HiPRveyQirdctz9QyRerwH3QNgroVinFBw56oviB5Rjk5H2HRuBk5 rhhWtBaL+hErpinjf268P7GB/3TNQaLC66SkBJasWQ9z5mKKrbM5r9dG1UuZ+Pzy1jC2 QwqST5KwKons9nxLLn87jzVgUmpadNko6Q8TuVV/Fy/qJP+PNAXNE1/4JZY8f/WXx936 X264Bxp1rfOKOcDqLJcJ9YSsnX0ROESoZjkU/QGe6PUIv2v8j5MabwMY5BudWvc3A7H0 bAlWp9zvrTYYoZpAHLT7dlht9nlir1Hw4AL+pmR/0lOjv4gqoLg7AqSo7qPRkmFhKUD2 kr+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724992574; x=1725597374; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=udiDa1YXNVQe9YQdq8pNqA0v4AMGb+sHHwac6qQVu4U=; b=QE7cpw/xDBDVuuzQNFiC5vUiXCOhNvDKgg+W+T8TXPc1VU27rXkqbpG2eLAFuuG/ip MNodZXFS4GaQJdbLvtwsJ8ZSv/+eHEYIWlI4AAZ2TLjaQ6PId0rPftwEINOkUwUCbySm ggiyEkNAhE9u6qfHY+9Dv6hmyplFzY4fAZXucSxmAkuxCxJCac96iXgFUYXbprS9l+Tk L65xreqzDLI+sYO2blYj3eMp9jIfUHme1JRQliZAiHmbyzs/cJwiNS/Y3pqBFm5DgPf8 3vbRsSZWPzJMwV0lhxOrO7J+h0LAI/zHbCrYB1uibnkS/+zykR5bWxc53UJLPTljlb3W x+eQ== X-Forwarded-Encrypted: i=1; AJvYcCWNyv4ZxuY3satpvjBt5Syz8vU9VqMJPP25B5YsIr20CkMDSWWOn8eaV6j/xKtx2BSM80j/IsLg7wkGndb9OgG+@lists.infradead.org X-Gm-Message-State: AOJu0Yye067aCMEvSRLXqosMN5LrzoqQ826I47rAUNO7YUu7MU9SbEQL 1/jgFO4YWM+4LkkoQrkOHLpnLcn0LQ541Qak8UPXHtKjc2NSJu+BAtj+Udt1EtDDTGVyw6xfGXW 4Wg== X-Google-Smtp-Source: AGHT+IF7AfgBrJe8PwdncYuFwENH9bcWVSUBeh2Gmsa0ZJKxp7DrJ4HVnhtseSn5Ja9qHK89gyQHI56lkSI= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:690c:6681:b0:665:24b0:e936 with SMTP id 00721157ae682-6d286f64db5mr2502337b3.4.1724992574565; Thu, 29 Aug 2024 21:36:14 -0700 (PDT) Date: Thu, 29 Aug 2024 21:35:55 -0700 In-Reply-To: <20240830043600.127750-1-seanjc@google.com> Mime-Version: 1.0 References: <20240830043600.127750-1-seanjc@google.com> X-Mailer: git-send-email 2.46.0.469.g59c65b2a67-goog Message-ID: <20240830043600.127750-6-seanjc@google.com> Subject: [PATCH v4 05/10] KVM: MIPS: Rename virtualization {en,dis}abling APIs to match common KVM From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Tianrui Zhao , Bibo Mao , Huacai Chen , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sean Christopherson Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Chao Gao , Kai Huang , Farrah Chen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_053616_948274_DEE2DBE5 X-CRM114-Status: GOOD ( 13.54 ) 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: , Reply-To: Sean Christopherson Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Rename MIPS's trampoline hooks for virtualization enabling to match the recently renamed arch hooks. No functional change intended. Signed-off-by: Sean Christopherson --- arch/mips/include/asm/kvm_host.h | 4 ++-- arch/mips/kvm/mips.c | 4 ++-- arch/mips/kvm/vz.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index 6743a57c1ab4..f7222eb594ea 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h @@ -728,8 +728,8 @@ struct kvm_mips_callbacks { int (*handle_fpe)(struct kvm_vcpu *vcpu); int (*handle_msa_disabled)(struct kvm_vcpu *vcpu); int (*handle_guest_exit)(struct kvm_vcpu *vcpu); - int (*hardware_enable)(void); - void (*hardware_disable)(void); + int (*enable_virtualization_cpu)(void); + void (*disable_virtualization_cpu)(void); int (*check_extension)(struct kvm *kvm, long ext); int (*vcpu_init)(struct kvm_vcpu *vcpu); void (*vcpu_uninit)(struct kvm_vcpu *vcpu); diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 52e1f275351e..60b43ea85c12 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c @@ -127,12 +127,12 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu) int kvm_arch_enable_virtualization_cpu(void) { - return kvm_mips_callbacks->hardware_enable(); + return kvm_mips_callbacks->enable_virtualization_cpu(); } void kvm_arch_disable_virtualization_cpu(void) { - kvm_mips_callbacks->hardware_disable(); + kvm_mips_callbacks->disable_virtualization_cpu(); } int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) diff --git a/arch/mips/kvm/vz.c b/arch/mips/kvm/vz.c index 99d5a71e4300..ccab4d76b126 100644 --- a/arch/mips/kvm/vz.c +++ b/arch/mips/kvm/vz.c @@ -2869,7 +2869,7 @@ static unsigned int kvm_vz_resize_guest_vtlb(unsigned int size) return ret + 1; } -static int kvm_vz_hardware_enable(void) +static int kvm_vz_enable_virtualization_cpu(void) { unsigned int mmu_size, guest_mmu_size, ftlb_size; u64 guest_cvmctl, cvmvmconfig; @@ -2983,7 +2983,7 @@ static int kvm_vz_hardware_enable(void) return 0; } -static void kvm_vz_hardware_disable(void) +static void kvm_vz_disable_virtualization_cpu(void) { u64 cvmvmconfig; unsigned int mmu_size; @@ -3280,8 +3280,8 @@ static struct kvm_mips_callbacks kvm_vz_callbacks = { .handle_msa_disabled = kvm_trap_vz_handle_msa_disabled, .handle_guest_exit = kvm_trap_vz_handle_guest_exit, - .hardware_enable = kvm_vz_hardware_enable, - .hardware_disable = kvm_vz_hardware_disable, + .enable_virtualization_cpu = kvm_vz_enable_virtualization_cpu, + .disable_virtualization_cpu = kvm_vz_disable_virtualization_cpu, .check_extension = kvm_vz_check_extension, .vcpu_init = kvm_vz_vcpu_init, .vcpu_uninit = kvm_vz_vcpu_uninit,