Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1661702rdf; Sun, 5 Nov 2023 08:35:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGq7aRJ6fUA455QxRGgQQSXjV4NO47ZZ49t424hL3itUMe2oGrQwZc82BeE6jEJgsSNsOZq X-Received: by 2002:a17:902:dac4:b0:1cc:51b8:8100 with SMTP id q4-20020a170902dac400b001cc51b88100mr17851894plx.7.1699202101360; Sun, 05 Nov 2023 08:35:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699202101; cv=none; d=google.com; s=arc-20160816; b=XIeD8TKthztQ2VQ7ng+hU7Zo/tkWiE/DHORIxFQdoRSXi6qqsi+Qq5MJQG+U3Kf/Pn ewUKtxzOGWXloqf+531UmPesqDv5UKR5F0WeeCDbMKhUoVlq0xLxFUr5Yb6+COiZt3Y7 AJypONh804K7aY1h5npCfHlc92Egyo9PY3KavOiqpYbpOAWFtIRpeDG/lKs+bnEMsV+d 8Qd0a50/j5ugAzg3eIDYgScLL73LS9OAkIMCDDm31n6dw4qOiWCnb4upM1bll3yrRj7f LzGxto7+HUQh9LalJXwEkpRgXs/oFXbUCmAaZ057B0+5tswIpDVwB3R3n6x3eeo9XXdE LFrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qfeiaA9Zm3lDYCkoTrnfofIiBFTO8MQOwDWpndcpgFA=; fh=HrMuB0qA2qw4RqBwyiyN+RBlGw+Ob1hcALwHW/PphXs=; b=qhbtjpO3YNCdmwtzqVbm6EU9xhkZjfIF7FGWB6wJb6mMXHPAP/9bFwxvHMDU0q7RAu hc+EyPIZtaXYt4ZpDdURIssJkkOW3pmtZd07PvypyVpSMP3VH3t/SKdiAdJ7wD8N9pFw uvDgF+NuNq/eIlQALjcSbF9nM28jPIwvFkNuGVCZB7E46nfXNHeWybx67GPVKnq0tzaC ta2ymUCmm83J5DlUY4xIzDsY6L9/O5YlVpsLx+oRkQnM9ouBIYHutFbZ4nIN7uxFQXtV KWEr7jhFejMreZ5HjROfLccFYg6DNbHzQwDoSZ56oQCzdPpyD9dfGryGTd6V5f/t3+Gs 4tPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KtQBnDgY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o18-20020a170902e29200b001cc41a2b752si5651080plc.206.2023.11.05.08.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 08:35:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KtQBnDgY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5062480B2324; Sun, 5 Nov 2023 08:35:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230324AbjKEQe5 (ORCPT + 99 others); Sun, 5 Nov 2023 11:34:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230289AbjKEQeP (ORCPT ); Sun, 5 Nov 2023 11:34:15 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99C69D7E for ; Sun, 5 Nov 2023 08:33:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699202004; 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=qfeiaA9Zm3lDYCkoTrnfofIiBFTO8MQOwDWpndcpgFA=; b=KtQBnDgYHh/B8D+ADgc01ilf1ZBAS6xefDscktqB6gNhOYCmzY+jTJ5zanIi5Po1p/OULe o0d4wGkXeKko/rkFpcJjTL/0CBOVoCUc5DqRpHdldjNUw7yl/8GjQ40ic9aLYUA62PknOz EOjN+jQebF4a+mhkDCohoUggeCxm91g= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-695-2hs99GbVMSuoqusTkGwtCA-1; Sun, 05 Nov 2023 11:33:20 -0500 X-MC-Unique: 2hs99GbVMSuoqusTkGwtCA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BD00180B642; Sun, 5 Nov 2023 16:33:18 +0000 (UTC) Received: from avogadro.redhat.com (unknown [10.39.192.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id 387F52166B26; Sun, 5 Nov 2023 16:33:10 +0000 (UTC) From: Paolo Bonzini To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sean Christopherson , Alexander Viro , Christian Brauner , "Matthew Wilcox (Oracle)" , Andrew Morton Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xiaoyao Li , Xu Yilun , Chao Peng , Fuad Tabba , Jarkko Sakkinen , Anish Moorthy , David Matlack , Yu Zhang , Isaku Yamahata , =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Vlastimil Babka , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A. Shutemov" Subject: [PATCH 19/34] KVM: Drop superfluous __KVM_VCPU_MULTIPLE_ADDRESS_SPACE macro Date: Sun, 5 Nov 2023 17:30:22 +0100 Message-ID: <20231105163040.14904-20-pbonzini@redhat.com> In-Reply-To: <20231105163040.14904-1-pbonzini@redhat.com> References: <20231105163040.14904-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 05 Nov 2023 08:35:00 -0800 (PST) From: Sean Christopherson Drop __KVM_VCPU_MULTIPLE_ADDRESS_SPACE and instead check the value of KVM_ADDRESS_SPACE_NUM. No functional change intended. Reviewed-by: Paolo Bonzini Signed-off-by: Sean Christopherson Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-22-seanjc@google.com> Signed-off-by: Paolo Bonzini --- arch/x86/include/asm/kvm_host.h | 1 - include/linux/kvm_host.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index fa0d42202405..061eec231299 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -2136,7 +2136,6 @@ enum { #define HF_SMM_MASK (1 << 1) #define HF_SMM_INSIDE_NMI_MASK (1 << 2) -# define __KVM_VCPU_MULTIPLE_ADDRESS_SPACE # define KVM_ADDRESS_SPACE_NUM 2 # define kvm_arch_vcpu_memslots_id(vcpu) ((vcpu)->arch.hflags & HF_SMM_MASK ? 1 : 0) # define kvm_memslots_for_spte_role(kvm, role) __kvm_memslots(kvm, (role).smm) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 67dfd4d79529..db423ea9e3a4 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -690,7 +690,7 @@ bool kvm_arch_irqchip_in_kernel(struct kvm *kvm); #define KVM_MEM_SLOTS_NUM SHRT_MAX #define KVM_USER_MEM_SLOTS (KVM_MEM_SLOTS_NUM - KVM_INTERNAL_MEM_SLOTS) -#ifndef __KVM_VCPU_MULTIPLE_ADDRESS_SPACE +#if KVM_ADDRESS_SPACE_NUM == 1 static inline int kvm_arch_vcpu_memslots_id(struct kvm_vcpu *vcpu) { return 0; -- 2.39.1