From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) (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 07A1F22FF22 for ; Fri, 28 Nov 2025 15:51:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764345063; cv=none; b=Ayg/FT+Ro3AhA4Oq/rtp/UF9Ct53ZZfmR3Vn/MmPa5NBpHJAtmMsUtLY9m+4PeToUmNfjxaq7v9deGvSOFL45aetLbmFoFFv/ktw5OllziDGW29QtixGtFqKoJiZ1omivi7OhlSctlhReTQqt86iTJg2rFDWh7nCAc+nDTEeQqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764345063; c=relaxed/simple; bh=MGtL6DfpEfB/mkAXzLzzie/i+p22c/hsHzJYktd8RzM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SGAkZ+UGflo7qoitY5/N9044l6oiXOt4ChAhlazFFK9YDBrUh4qRb3xbhUq+avhONaWnDv8YrJGYMxBilXXvd/dPoJc6RO8ojNP5OZzyzfWgC+AXL++67s7Oa6Jm4PwKiXiFnalusEElILVA/MEUeV54YIjUVd7LrxhLql617Q8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=REIDaUaU; arc=none smtp.client-ip=209.85.216.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="REIDaUaU" Received: by mail-pj1-f65.google.com with SMTP id 98e67ed59e1d1-34381ec9197so1754275a91.1 for ; Fri, 28 Nov 2025 07:51:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764345060; x=1764949860; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=P61WKJnqyh8/Q+jWB9OZ6DHYmVs1u+jLgIH+gZ1ifWY=; b=REIDaUaUqcK9gN6uRpXDMYDFlBZZbLmjufKjW66gKJ+MMbzZXG5CLtLhxHdNRa2skM GSXkVjt0N0jjNw/1KXhSdQrr5IzFF1/Hkn2Vjg8xYLCKGGg/48uixSAQM5Lq+1o/o8Ez c/DWKqFYACOVxHrI6Hq89HKclWHmLMAzvzFpMBGWACG67LchHc28TGf92tN/2PxhMVu3 KUWKrE03pd9n2MgH7yOmOoOjr2VPMRvQTSj5NBj3tOcrbezAj4BuX7/P4mgpSthsg+ii xNNKnMu5r3kzFGjqKfGGWA3utyAeQtSUrxVKJ22hG2drr9Ky0AC2HaN101sydM/PQ/Dw 6m2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764345060; x=1764949860; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P61WKJnqyh8/Q+jWB9OZ6DHYmVs1u+jLgIH+gZ1ifWY=; b=r6nIoBufn4E3NhUZr/qHhKDsyaSnG5rssdYcdKvnVd3dl0SPhEuTTonCem0VZsi7Pq KD+E9ALTPeRsttzRfhYHzwSb/KnCRbZkUMDRRmqJn/ZIrybe7ylFY53S8EA7Z84e81T1 /5voWmDcS63vYjpLEYPCfQt3WUFP8YeBAhHPaqJb86S12KH7o4/TbyEwjLe9yatTT2RV BjBVT3fW47rJUU2ifnf64XL/Z7OZe2b1KCB+oXOKxFpDdK3pjN0ir2FJb8A6dy3w6EB6 gy4be9vwRNzuHQJ3BhzHYWymVyjsUGlES4Im3MrCkvYFSMa0+I0x7imihhbl+dQol1rG 9awQ== X-Forwarded-Encrypted: i=1; AJvYcCVZ9G8KPfzmpp5yB3lUkBwT2gECxAGX2cBLM95/OgSNwyOQ088Lm+oJiShbYRHogifGvT/NTtKHWSHQ5jo=@vger.kernel.org X-Gm-Message-State: AOJu0YxTbeucgZembbVYdaFNgs3ZRRY1ZtJzeVpLQkVzWGHlxJRD4MoA 1vbL047mCUZ82hbwLbkHXTwmtwQKj0ZwTypndyj4Cm+EgiJATzd4Ttff X-Gm-Gg: ASbGncu/PZIuAnZaSrjzUZcteon96Rh5gtVaKx4IxvV3OJCKxnSkVWmOcPR5t4M7vsn teSvY74kJpD5bFir8+Qums6vVo+yLamr85LpfiqRJo5Vmsp9MFLD9oeBfxc3O+M63IU0me50Mfy dAY5OYhHjrdJj/QnjNUpqvuxe+gZol+7XJTtup0afk9+Ybhveq8H0Da8AViDGukrvO8WDMS0lE+ qa8XDFS6rE9blFqzgyBzg+qtJJgh7Bn3dFboI2EDXiL8j8wOkRA3yyST1cotQ6K6OfW4FCCBepO jvTrEBmLnoQCXcKp782ah/pzLXJ6nwXICcupad+Nzql30AuR9KNhalp4HWWKwOgOf1Oe4liOQks I++yPs2WqQRGB8n3FtUe3xNr0J9dA38U18x5AYoCWSZd9OdxCsrFzhqzNtCvTD51dciEO7jOwoS 4CA+nX0LSpb9G75VkKpjnWjHCMdXcryw== X-Google-Smtp-Source: AGHT+IHDXjnEWiD4Ij3Aoqmu0wuirePC/DePO6Ksg/pXsaBSBRnUOru5vuneh2uWo3PUFH/miirhXQ== X-Received: by 2002:a17:90b:4b8c:b0:340:d578:f2a2 with SMTP id 98e67ed59e1d1-34733e4cb74mr28454632a91.6.1764345060177; Fri, 28 Nov 2025 07:51:00 -0800 (PST) Received: from fedora ([103.120.31.122]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-be6ec21e044sm2533746a12.12.2025.11.28.07.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Nov 2025 07:50:59 -0800 (PST) Date: Fri, 28 Nov 2025 21:20:53 +0530 From: Ankit Khushwaha To: Sean Christopherson Cc: Paolo Bonzini , Shuah Khan , kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@vger.kernel.org Subject: Re: [PATCH] KVM: selftests: Include missing uapi header for *_VECTOR definitions Message-ID: References: <20251115110830.26792-1-ankitkhushwaha.linux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Nov 17, 2025 at 07:06:57AM -0800, Sean Christopherson wrote: > That means your build is picking up stale kernel headers (likely the ones installed > system-wide). The "#include " in kvm_util.h is what pulls in the kernel > uAPI headers. > > Selftests uapi headers are a bit of a mess. In the past, selftests would > automatically do "make headers_install" as part of the build, but commit > 3bb267a36185 ("selftests: drop khdr make target") yanked that out because there > are scenarios where it broke the build. > > So the "right" way to build selftest is to first do "make headers_install", and > then build selftests. > > Note, if you build KVM selftests directly, tools/testing/selftests/lib.mk will > define the includes to be relative to the source directory, i.e. expects the > headers to be installed in the source. > > ifeq ($(KHDR_INCLUDES),) > KHDR_INCLUDES := -isystem $(top_srcdir)/usr/include > endif > > You can explicitly set KHDR_INCLUDES when building if you install headers somewhere > else. E.g. my build invocation looks something like this, where "$output" is an > out-of-tree directory. > > KHDR_INCLUDES="-isystem $output/usr/include" EXTRA_CFLAGS="-static -Werror -gdwarf-4" make \ > INSTALL_HDR_PATH="$output/usr" OUTPUT=$output Hi Sean, Thanks for pointing it out, i am not aware of these details. Will take care of this now onwards Thank you -- Ankit