Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8487984rwp; Wed, 19 Jul 2023 10:27:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlFCHBsB+6NlZi4QVKm5gmQzIpcBo/uLhEjr/v087Cm6Lbd3awtG5Neun7KGhZiKGKas3fvv X-Received: by 2002:a05:6a20:8f22:b0:128:ffb7:dcfe with SMTP id b34-20020a056a208f2200b00128ffb7dcfemr3818265pzk.1.1689787631176; Wed, 19 Jul 2023 10:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689787631; cv=none; d=google.com; s=arc-20160816; b=0XP/XnWIzhkuEbrHzr4iis6KJ96OY9h6BZ4lX8tSejXcgQr6SSLTyrKyoInq9m1IUb Ikie5yDdv1ADwCMjb9pEXJoYZezfS3OrfQK+djoAN6vQbXz2lILIf7FT+16kq3P/skgP PumOQbxQ81cb8Ifni3AG3lxwZosuDzupS2W+1/eL7AwXoV7p8QKGGe1W4m8HfW/6BNAc HmeueY2XHAp9trNspg/EAHJktL/q7WQAD9KWYNyOitdJXr4lSXGetuoJQLdYG3xRdC/L jAjIwe27CgvtSJnqogGx1biLuWAL8adwFt39RoLG0c5CfiuQDknYiEfsIo7GowdQ24CB BAfA== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ybZMnwXlmIEE0ADI9FsKUlcEynrHTdW2zV41y3cU4q8=; fh=Ha0fK0q/QRDhu63ZqG+O6WFFibL7W0Vai9siCdqdoHU=; b=L/Ye31x44qRZ48jzZVPjwjsdmk+dhYC7y+9GFgR7/XtovwfnNC4a3j8V8LSfPxRd1v SZLtUIFsDf5o6seNIwR6D8oRvD1lkj0Otu+tte5DhCxt+Ztr7lo8LqUqYlZRGiyzDJf2 D6BHW/ySeD5rDn1+TOq1bazJ0u9N6GcOhjwNi5pcubgTUARPdKpy1747E2gk1zBsV2Ix jivuskD3bEOBuTqQuS2wmU3/tvkAEEbfe4FZ5Qa8uIp3OGMwsWEvAlpVyo5rhh+dDnPv Bwfj6qvNaqcyQr0Moiaz4svAaUA5koJlnQzyoni+AcKZHDq4yRJuWXWfmd5hMIvutxS/ vPDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GywAJTHH; 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 p19-20020a056a000b5300b00668230a86edsi3764486pfo.256.2023.07.19.10.26.59; Wed, 19 Jul 2023 10:27:11 -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=GywAJTHH; 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 S230169AbjGSQ4W (ORCPT + 99 others); Wed, 19 Jul 2023 12:56:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229757AbjGSQ4V (ORCPT ); Wed, 19 Jul 2023 12:56:21 -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 22A171BF2 for ; Wed, 19 Jul 2023 09:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689785732; 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=ybZMnwXlmIEE0ADI9FsKUlcEynrHTdW2zV41y3cU4q8=; b=GywAJTHHLcxJVwUJVakntTMUsC9ImefzxWcs8ba2GGuU7mN0qPIBWmkS6OiMKea8ncFEmX GqmxHuyFFHDhYM5yhA6J+t4roOPPCnCIaXDkG4qsKtkkTzaNZ1kPGNB4hsHV+fZywytjKw m1nR9lV36gw3ZVAxhygmL3U5yVEGzxY= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-518-5D0pByogNIGoACwDtMJDLw-1; Wed, 19 Jul 2023 12:55:30 -0400 X-MC-Unique: 5D0pByogNIGoACwDtMJDLw-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5218b9647a8so2537559a12.1 for ; Wed, 19 Jul 2023 09:55:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689785729; x=1692377729; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ybZMnwXlmIEE0ADI9FsKUlcEynrHTdW2zV41y3cU4q8=; b=WhRvB3iXQmbSBKtvyA0JJPOtiNRTvkduXBFJUrzpCFpVJQ4sROJIeasm1PSDM9Jkko fbj0jmivj7I3COW+DnV4fskdPGoZE2+3LMU4h6316X94LktBBFk7YkDTLNtHxQ5tspOy rICABapmSAD8Q8cn6FIywi53JCEq8s7n1SLfH6wdCXMjYC904+XLQadk0fTL3l59eic7 VxufBJkNERC3iYYUg3/BuI0Kmdmc7hsKUBJSjH5IhbZLgiw/B+VMV1Fix/2i1ETMD+OB t60S8X7lnAKw8g9SK8yvusXB7bDDBc0ZkBr9BEhcbYZRoFaBDJgY1qcoWLgmpcew9Vw2 ipnw== X-Gm-Message-State: ABy/qLZ5GmW7pqETlQaMbEupqXdmrVH15lvLy4bJ4Xp+0oVk4VSMFhce Y38dn2xTYef3okuDBC9wHUcD5dfXX/79ksty+2cB47QG2EKZKVwO1MLPcrjOCuTrtZPH25PTFwN JMiiOdiEWYDGwNYzYQVP80AcE X-Received: by 2002:aa7:df12:0:b0:51e:28e6:3838 with SMTP id c18-20020aa7df12000000b0051e28e63838mr2675095edy.17.1689785729747; Wed, 19 Jul 2023 09:55:29 -0700 (PDT) X-Received: by 2002:aa7:df12:0:b0:51e:28e6:3838 with SMTP id c18-20020aa7df12000000b0051e28e63838mr2675066edy.17.1689785729461; Wed, 19 Jul 2023 09:55:29 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e? ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.googlemail.com with ESMTPSA id r18-20020aa7d592000000b0051df5eefa20sm2911736edq.76.2023.07.19.09.55.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jul 2023 09:55:28 -0700 (PDT) Message-ID: <711f74d6-fe15-6bd4-a9b9-c4f178d95bf3@redhat.com> Date: Wed, 19 Jul 2023 18:55:25 +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 01/29] KVM: Wrap kvm_gfn_range.pte in a per-action union 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-2-seanjc@google.com> Content-Language: en-US From: Paolo Bonzini In-Reply-To: <20230718234512.1690985-2-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_BLOCKED,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 On 7/19/23 01:44, Sean Christopherson wrote: > + BUILD_BUG_ON(sizeof(gfn_range.arg) != sizeof(gfn_range.arg.raw)); > + BUILD_BUG_ON(sizeof(range->arg) != sizeof(range->arg.raw)); I think these should be static assertions near the definition of the structs. However another possibility is to remove 'raw' and just assign the whole union. Apart from this, Reviewed-by: Paolo Bonzini Paolo > + BUILD_BUG_ON(sizeof(gfn_range.arg) != sizeof(range->arg));