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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5692C2D0E5 for ; Wed, 25 Mar 2020 18:47:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 89DE72074D for ; Wed, 25 Mar 2020 18:47:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727177AbgCYSrt (ORCPT ); Wed, 25 Mar 2020 14:47:49 -0400 Received: from mga03.intel.com ([134.134.136.65]:53481 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727027AbgCYSrt (ORCPT ); Wed, 25 Mar 2020 14:47:49 -0400 IronPort-SDR: lQAMRVfMC5uhTTel3MP2HVQrp543pnQhw6dp2BRhf60rh8TjNtKm8JvIafEBvtxeSqo52A6oYa LEMVHHp2+cAA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2020 11:47:42 -0700 IronPort-SDR: q13Gvqo8nPRJc1Uw5Sc4GokeBFpqpnCJ5cnXAqZf5qjY30hPaGZm6LXZZHir7XfTHITTn3zJo2 SdkDa7HFhnCQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,305,1580803200"; d="scan'208";a="446714675" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by fmsmga005.fm.intel.com with ESMTP; 25 Mar 2020 11:47:41 -0700 Date: Wed, 25 Mar 2020 11:47:41 -0700 From: Sean Christopherson To: Paolo Bonzini Cc: Randy Dunlap , Stephen Rothwell , Linux Next Mailing List , Linux Kernel Mailing List , KVM , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel Subject: Re: linux-next: Tree for Mar 25 (arch/x86/kvm/) Message-ID: <20200325184741.GI14294@linux.intel.com> References: <20200325195350.7300fee9@canb.auug.org.au> <064720eb-2147-1b92-7a62-f89d6380f40a@infradead.org> <85430f7e-93e0-3652-0705-9cf6e948a9d8@redhat.com> <20200325161405.GG14294@linux.intel.com> <7b71119b-4594-2535-24ba-2c59430e4f30@redhat.com> <20200325164606.GH14294@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200325164606.GH14294@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-next-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org On Wed, Mar 25, 2020 at 09:46:06AM -0700, Sean Christopherson wrote: > On Wed, Mar 25, 2020 at 05:26:20PM +0100, Paolo Bonzini wrote: > > On 25/03/20 17:14, Sean Christopherson wrote: > > >> Doh, right. I think the only solution for that one is to degrade it to > > >> WARN_ON(1). > > > I reproduced the error, give me a bit to play with the code to see if the > > > BUILD_BUG can be preserved. I'm curious as to why kvm_cpu_cap_mask() is > > > special, and why it only fails with this config. > > > > > > > I could not reproduce it, but I would not be surprised if there are > > other configurations where the compiler cannot constant-propagate from > > the reverse_cpuid struct into __cpuid_entry_get_reg. > > The error is related to UBSAN. There is at least one legitimate (but benign) > underlying issue. I'm chasing down a second instance of the BUILD_BUG. Argh, red herring. There is no underlying issue other than gcc tripping up when -fsanitize=alignment is enabled by UBSAN. Good news is that the build error can be fixed without resorting to a hack.