Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp52579rwo; Fri, 21 Jul 2023 08:23:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlFOkas5776nV/IR1CnObGLVCT/DJh3w7bshoSVA4PKiWPRh+c67Ejm2wD5Lz891XKg0zKdg X-Received: by 2002:a05:6830:160c:b0:6b9:ba0c:cb21 with SMTP id g12-20020a056830160c00b006b9ba0ccb21mr374827otr.9.1689953031772; Fri, 21 Jul 2023 08:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689953031; cv=none; d=google.com; s=arc-20160816; b=LB9WCyRpkE9mSSrpEXPNO5TiiSBJtlXLBJp9fRhJgu0j+YoBhjaMUXvcwcgcGexVa6 1E7dyOT63qsdqADuAjuDpVYBeqYfqRdfK4R+p3PX+u2MFfyH33noCvlnNCxh1QcDGTpn Of461K0ptR6HZM5WqP9Cdipwq0eWFZU96XFCX7wqO4UsX1NcjRJVtDtacxHMJnNJRq6y 9FV1cEIbBfJe+ndt6s1dyKax7EFmA5/OeLrDXUojx7AeK7iZN72z0yBtjEC9Td6d+8Qy 6L2eC3CBCbVNk+7hxGdRNkeEzFR0VpBu8zp50x3VX7U2qN+173o88+uUkg5lIvA3zazV nmdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=AtcGzkETEnO18qgeRoihrAkrVd5qbbNpgaZO4bjwaRo=; fh=Ha0fK0q/QRDhu63ZqG+O6WFFibL7W0Vai9siCdqdoHU=; b=UpO78jPh/EHrJ+4/z9olssl/OC0L/uVJCNn9HtbHy3BGjjgxpaOsMEGG6XIPYynx7y HKTXaBVe+7kCdJifATDu1KSlJesFVtqqqZo8fHFeFszDUNyuo/OHUE6si2xAe2Rz46z4 pX5pIQnGHAV9FZJ4nYfSgxnafpsmuK/gGK5kNJTzoqcr5UmS5afuflUPNCu3pS5Kx7ST DwdU6IYmNToX4+JB79Oo5EJ+hDQaAQuUfh26hRREaxNdlIvAdIiJ8UeCLwKcZuu69Kwe hz+5kr4jBZAdBGrx4/T/t9TUXsmOLzH0iQxW8mV0oOtmcllV5xnaW2Os6PCwhX2L/AIT yZug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DNnTUCWP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r78-20020a632b51000000b00543cc3151f9si3251366pgr.461.2023.07.21.08.23.38; Fri, 21 Jul 2023 08:23:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DNnTUCWP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231871AbjGUPJY (ORCPT + 99 others); Fri, 21 Jul 2023 11:09:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231755AbjGUPIn (ORCPT ); Fri, 21 Jul 2023 11:08:43 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD74A30E8 for ; Fri, 21 Jul 2023 08:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689952073; 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=AtcGzkETEnO18qgeRoihrAkrVd5qbbNpgaZO4bjwaRo=; b=DNnTUCWPU2TZ3Xn8s6UOvF/8Zi65yekk2925WEcJiwqh8wHF1vlukAOECt1V9zBB61yEKN 899pWZo1o4spBOO1wGZNpUyNhbTjeo7S+45me8iZPHJuKMrNR9BFVL+lNl8ghW7Vqz9gPT i/tO6nUc5zQ74fFH77/WFFuT2igmTmQ= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-28-Ve35ZHY8NE-kesL11FFVRg-1; Fri, 21 Jul 2023 11:07:52 -0400 X-MC-Unique: Ve35ZHY8NE-kesL11FFVRg-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-4fb76659d37so2051351e87.2 for ; Fri, 21 Jul 2023 08:07:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689952067; x=1690556867; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AtcGzkETEnO18qgeRoihrAkrVd5qbbNpgaZO4bjwaRo=; b=kMmJblAoyvi7G48FoZBS70/OZmamph+nu2s9XnfDKz6ec1IS2yxyLBuFWolgPdCGzQ YGxG8szGyD4tVcfHk9XEeqxRa4RJe5oLIgepl45Sy8nesk2OT89lJNkuOi3sxoh7ffQa N48tfU8ccjySBsE0HjJjyp+/LratbCLjhv/VVzdqN63rZ3t/yCuFNCe6tU64weVp8vMb pLhewRg9lS73PT+JN5Q/adiSi3bBHmS/s380d2kbIpr/twlFE3RuAkTNmbANzjg8UdnU 43F+K2sJtdDNzuOFqjeMmM8LNdcZGkJhL3UM7fcUAzE0XTt9xRljNvsFKWznwQ4XWO6M IQWw== X-Gm-Message-State: ABy/qLawt6WgS0oK1oYHiGzmYwZ2wqH3pwEgVXKt4ohgf37Epn/tQ62F Rm7EcFKY0bQbDRYbv2f4f0js31SBEEZWfj/6VluMSEuLrgPg6QMeA8U0VOoTGUu5rJsTJsI2NEU 26mUETiYOi9l0h2Uoy7WTzApx X-Received: by 2002:ac2:4191:0:b0:4f8:5ab0:68c4 with SMTP id z17-20020ac24191000000b004f85ab068c4mr1303812lfh.59.1689952067656; Fri, 21 Jul 2023 08:07:47 -0700 (PDT) X-Received: by 2002:ac2:4191:0:b0:4f8:5ab0:68c4 with SMTP id z17-20020ac24191000000b004f85ab068c4mr1303798lfh.59.1689952067306; Fri, 21 Jul 2023 08:07:47 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:9af8:e5f5:7516:fa89? ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.googlemail.com with ESMTPSA id p1-20020a056402074100b0051df5eefa20sm2257329edy.76.2023.07.21.08.07.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Jul 2023 08:07:46 -0700 (PDT) Message-ID: <123035a3-9d0d-70be-9894-f89a84c7e8fd@redhat.com> Date: Fri, 21 Jul 2023 17:07:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [RFC PATCH v11 15/29] KVM: Drop superfluous __KVM_VCPU_MULTIPLE_ADDRESS_SPACE macro Content-Language: en-US To: Sean Christopherson , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Matthew Wilcox (Oracle)" , Andrew Morton , Paul Moore , James Morris , "Serge E. Hallyn" 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-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Chao Peng , Fuad Tabba , Jarkko Sakkinen , Yu Zhang , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , Vlastimil Babka , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A . Shutemov" References: <20230718234512.1690985-1-seanjc@google.com> <20230718234512.1690985-16-seanjc@google.com> From: Paolo Bonzini In-Reply-To: <20230718234512.1690985-16-seanjc@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 7/19/23 01:44, Sean Christopherson wrote: > Signed-off-by: Sean Christopherson > --- > 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 b87ff7b601fa..7a905e033932 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -2105,7 +2105,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 0d1e2ee8ae7a..5839ef44e145 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -693,7 +693,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; Reviewed-by: Paolo Bonzini