From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) (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 BF5F219309C for ; Tue, 23 Dec 2025 23:13:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766531591; cv=none; b=FfZUC0pBLU3HYmjfeyXoUxYU/Z6sPn7tJMzaLYs/dDKMdWkxTPtsU8AH6G2l7bqk/nMEsukUU3I9k55QF53Zlsh2ImA74sAQizgYz5MXm6rP081ZDuzWO7aPjSrDKwKmd/kWbAYZqB7NK+JsEDFPRL0fDjFIkzcYWQVi0TxYZmI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766531591; c=relaxed/simple; bh=5w5B+VTiwQYahGBulKy2nMzvnVhceVxrwSZU6RxYxOk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=juvB3fdIf/kJlSHVGEe3TipMBzvp0dt7fwGh6WCBHYya1rruuMValRLmovDJ4bwuU3HuZvje8iY7I4n1fQ3j9HgLEUTQXzmUHG1T0Gzw7zY/4nuMEZiJCGf1KP4xC1wfnxQNStfV9W79YktAW3GvdDnWw7Agf8YiHe8qtDtaDdc= 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=wSCfNvGk; arc=none smtp.client-ip=209.85.210.202 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="wSCfNvGk" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-7ba9c366057so11833238b3a.1 for ; Tue, 23 Dec 2025 15:13:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1766531589; x=1767136389; 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=nAjw9xAsX3Up9hZd9vxqQvG59DsVgwu4e5m3aPL20t4=; b=wSCfNvGkcgL299MLIeuv9GGif8jAYfXvqa2tvzKto5s/kvdTAUULDLoVIuh2ql+VbX nC9+nrflshuHiQ+oGujF59Q5j3FPRIRNnzcxerYuMb0RVjrp+mFvWsPt7BdrjF+bTf0u n6/YtOzDjTpKOi+8ZuvbuiGLVz+irlNQCeF2acrk6EHSJVTnyFB5/rB0IcU3SSmS3BUv cNOkv3XPDLdNRPmGo1ldZs7RzJewNYOQyVTGCpVlQyL66796s+ctQv6Wm2f17Q+GxdgA /8Obt9xuENuHHY+m4uFeBFUIH8PExbLjQ0UQT8KmaH/tp9BVOREp5yVpkiyR1taOVJN+ x+6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766531589; x=1767136389; 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=nAjw9xAsX3Up9hZd9vxqQvG59DsVgwu4e5m3aPL20t4=; b=jTjF0cnAA5AK3m0uY3xD7BnGzX0h9Ssj1e75xwq8S5N3D/EX/BmllokN3WY3iYw+od X37I7EzLQnFLsry7Fb56YdmtG3hq29Jts1tXIuMSKdVXS37wjclvnfSdDIkC5uQwuW3E DohCODQt3fTzsC1JugwzBrbIbQpwjPYaznhvMLRGUpdMg8Ys6xyR+b5coW89TRB3eDeD kN5AZZL1hyAp0R8B60dpfalNzNBVT57eaDn5Wszm4kFhMsfxkeV0R0C80y1QCZHaf+Wa AlxFyblSAXX3qUWcSiOnoqGj5hTo3Zocu3K1MGA7+3xGqS6C+Y6iIal5fqwzfaxZaxWq OOzg== X-Forwarded-Encrypted: i=1; AJvYcCVYIR2B+ESiIslImD7iwxhW1ouy6mky1Vrp8IOlMNG/lK/m8lBIAfUAj2lmf8F2Q6ZrYyD4BOqdTsXuFMM=@vger.kernel.org X-Gm-Message-State: AOJu0YxPNw1PgEvpqOK0g1xWkQqFtb32JGISUXt3S0lg48jzR9TAhVdw XT9Xa9WVMLlepvM8OSuc++Md9Zifr7UAnjcttDGzRhrdrKMYhhOQALWcAHDWtrvFG+ly726SlYl w8YVKOA== X-Google-Smtp-Source: AGHT+IGP22zhOhgzkN1r2AQZwnGHyQl5Jj6jxDY+NIHSobFPuQvY2I25qLFQ63/rRfcOA+OnBa+tucH4R30= X-Received: from pfij11.prod.google.com ([2002:aa7:800b:0:b0:7b2:129d:2cc1]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:aa7:9a85:0:b0:7f7:5d81:172b with SMTP id d2e1a72fcca58-7ff664807a0mr15860071b3a.42.1766531589107; Tue, 23 Dec 2025 15:13:09 -0800 (PST) Date: Tue, 23 Dec 2025 15:13:07 -0800 In-Reply-To: <20251127013440.3324671-12-yosry.ahmed@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251127013440.3324671-1-yosry.ahmed@linux.dev> <20251127013440.3324671-12-yosry.ahmed@linux.dev> Message-ID: Subject: Re: [PATCH v3 11/16] KVM: selftests: Move TDP mapping functions outside of vmx.c From: Sean Christopherson To: Yosry Ahmed Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Thu, Nov 27, 2025, Yosry Ahmed wrote: > diff --git a/tools/testing/selftests/kvm/lib/x86/processor.c b/tools/testing/selftests/kvm/lib/x86/processor.c > index 8b0e17f8ca37..517a8185eade 100644 > --- a/tools/testing/selftests/kvm/lib/x86/processor.c > +++ b/tools/testing/selftests/kvm/lib/x86/processor.c > @@ -467,6 +467,77 @@ void virt_arch_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent) > } > } > > +/* > + * Map a range of TDP guest physical addresses to the VM's physical address > + * > + * Input Args: > + * vm - Virtual Machine > + * nested_paddr - Nested guest physical address to map > + * paddr - VM Physical Address > + * size - The size of the range to map > + * level - The level at which to map the range > + * > + * Output Args: None > + * > + * Return: None > + * > + * Within the VM given by vm, creates a nested guest translation for the > + * page range starting at nested_paddr to the page range starting at paddr. > + */ Eh, opportunistically drop this function comment. If the reader can't figure out what tdp_map() is doing, a failure generic comment isn't likely to help. > +void __tdp_map(struct kvm_vm *vm, uint64_t nested_paddr, uint64_t paddr, > + uint64_t size, int level) > +{