From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0770F27F75F for ; Fri, 5 Sep 2025 08:39:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757061598; cv=none; b=UpDd/M//pKQvn3ZAVRzRY8kljKrxkgg761hj330Vcyy5U6OxN5KXbhZmtf/tWtc6DBxDQOv63Ocr6YXLtCDVKDo1rXQq/8wvrnhrtY0bmXZ+0iPKJETdC/uLYep1/mGPPwd9/2nV5tt14k40QRsc1d72I7NtkHjXVUi8zJUNuP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757061598; c=relaxed/simple; bh=2uw7HuzgrJw6Tl3/iFOPwWaXxB3idEJMwXtoGqGnLec=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=a6FoSXdRUH+JMfagxx8ePyXMWDq+1NXZG5GBPaDOaGCXckMjQaDxvb/O2RCo24PebBecGLZyk70Dg+BBeFYA019zuIyKvem+4+B+0kEwfBeDsKcoJXg7rcK/SslGTaZ9nGiFdHBD8mjXkS4axNK0Tb3Obyn6HjfH0QcHVQxlMNs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=oaT3H2ES; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="oaT3H2ES" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-24ca417fb41so24860065ad.1 for ; Fri, 05 Sep 2025 01:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1757061596; x=1757666396; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=KGaAkM61h3VIdibL8CNrJAlZjHRjWbnHUBI3WLmTg+w=; b=oaT3H2ESt6P96BRnWGaynTcLVctNl1avg4xfFHk8s0LONtl3QPZ/1+dNBgJSVaKbb8 UmJhkZFe7EQTepcVu7vbVlG/YKxfD+f1KcQcso3UqnD2vAf1YmqWoEIvWd41bPIL7Gup P1BJqA2YhJqVbzKze2NKgKIwJSYDz2nIddh+jZYarV3zgmPYFVEOd07Z1tkknUqmAL61 uH69+3gHiMMrPGZyWG5AEvb7fvwO/1LNf8+w2IRD7u2UWkW/dZDZRslJ9YKA+fFHqTlt aq3YTNTqjBy0UrQHc3Y/yU3Ii0AfsG18k4ESHHiApMhArdCTeGgi3CkruXokMkFiNCgD aTxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757061596; x=1757666396; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KGaAkM61h3VIdibL8CNrJAlZjHRjWbnHUBI3WLmTg+w=; b=lvSDBUDmvt91Dsqe5dMJ/Gq+2WQFxvqTbP5OXMVdnMmsEFGHwjyBnJg71mQyA/hzyM l74faUpQeuENGtmuaST8DsjWBB9bxx87V147R5zNEl5J9o9qz5ayKKdOEe0Yt9wG8H/U vtn3JrqfDwEB+T1GR9HfD8VY7QfVA+KUK74f2hIHmsJ/3biiZyKxXdRzfc5XDQUP3fN7 YaVty4MmoWKySYTyI87N4ra0ZyAeStr9p9yKY6db0NbbYN/YxIFccWHgcrZ0gvVsDr/u Qf1aF3hDObUvSfkF6abNgjHS/uzbxR9/qre+GZ/8vZC+XZx4LpwKkMGVDqZP3jkG8IY9 oTJA== X-Gm-Message-State: AOJu0YxxFv1cYEjLBZmZ6C7N1KyAWCDcUIjNx1reLO5ML/fphZNo77qi JTQaDuFnTUelRJp6hmdi2OdKnoxEptSX0D4tWeomjhK1RNzTHspgJ6+AM9nsbwWeEY+8892uDVs jP+xwzw== X-Google-Smtp-Source: AGHT+IF9Ey0l0Twra047lmw7Mv180RmWg4iz+sNKmRb5BvkP839d48enj0OX/10NKGQmanskpRfLbSpQ8dw= X-Received: from pjbtd4.prod.google.com ([2002:a17:90b:5444:b0:32b:6e12:e965]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:f790:b0:24c:ba67:95 with SMTP id d9443c01a7336-24cba67045fmr65288585ad.9.1757061596257; Fri, 05 Sep 2025 01:39:56 -0700 (PDT) Date: Fri, 5 Sep 2025 08:39:54 +0000 In-Reply-To: <33701547-13AA-467D-AC41-A1A05963B1DD@amazon.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250829142556.72577-1-aqibaf@amazon.com> <20250829142556.72577-6-aqibaf@amazon.com> <33701547-13AA-467D-AC41-A1A05963B1DD@amazon.com> Message-ID: Subject: Re: [PATCH 5/9] KVM: selftests: Prevent PAGE_SIZE redefinition on x86 From: Sean Christopherson To: "Faruqui, Aqib" Cc: kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" +lists Please keep discussions on-list unless there's something that can't/shouldn't be posted publicly, e.g. for confidentiality or security reasons. On Tue, Sep 02, 2025, Faruqui, Aqib wrote: > I suppose a fix for blindly using PAGE_SIZE in subsequent macros: > > #ifdef PAGE_SIZE > #undef PAGE_SIZE > #endif > #define PAGE_SIZE (1ULL << PAGE_SHIFT) > > Is no better and is instead blindly suppressing the compiler's redefinition warning. > > I'm having trouble finding what causes the conflict, any advice here? Maybe try a newer compiler? E.g. gcc-14.2 will spit out the exact location of the previous definition. In file included from include/x86/svm_util.h:13, from include/x86/sev.h:15, from lib/x86/sev.c:5: include/x86/processor.h:373:9: error: "PAGE_SIZE" redefined [-Werror] 373 | #define PAGE_SIZE (1ULL << PAGE_SHIFT) | ^~~~~~~~~ include/x86/processor.h:370:9: note: this is the location of the previous definition 370 | #define PAGE_SIZE BIT(12) | ^~~~~~~~~