From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) (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 51283345EDF for ; Tue, 25 Aug 2026 17:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787680124; cv=none; b=KDNpzaIfrWtgmepms9r5piP4WhNerfI0Qy5Xq3Y2L7iGbDsT9vmip7LIwLFcYALP4jTCRw8PU6S26SzuNLFlS435M2Ul0s8s2ONUisfI9AY7c8TRksj7EBS+BnL70qFwHHo/HdLWB8h2cxtqJ+Afg2mmsAD+hBZD1Uw8nKJjgXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787680124; c=relaxed/simple; bh=c4O1YuM86p+GvK8W1WI4s9QhFG6ZLMMG+9fo6oalN1k=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=rq+M02624VezxNc+VVszr+UN9XCPJQkr/Xmo3KRYUkXCrYABZiuIoY9fgcKRyj6svxp/rcYQLAM/Y2C66eG2w8xXVgQar0fa00UDj49ThiLBBp8AYG1fbeWeVI5Uv4W0YymNghgLbyE/1BXhzRPiTUWdn45N6pNjckJhTnRu7Mo= 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=F4yOUsj8; arc=none smtp.client-ip=209.85.215.199 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="F4yOUsj8" Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-cc1a439db36so4779a12.2 for ; Tue, 25 Aug 2026 10:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1787680122; x=1788284922; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=LfNdtxjurrpQVrdCO19VGPq2Y4QeRrOBNLADjxjp0d0=; b=F4yOUsj85ppj0t3AzgC5q0wp9DupcAqDRNejrqCZ4H7PS9Nv0qO1h5AdD7DOVaysHJ 2011ZnhO5mDvD1jUcPe/mSKjpZFV87SuQQ6KRGeVepKqDy5SPPSUw3qUr3FjfFuDwAHc gNiWfH4adqpnRJpoqIUK9iI7MNcLy+ZFVqhTQdcdWslceTfGAxNJeZlC3e75zTMxvgNL I3XEyTf51F4FlUomSrgGWwzfCjkJnXXr3fm5kXknu/Oj7AbuvdtyK8I2RMTpsDGRx7q3 VWgaTUx9jbwwofmUnFsWY3vZF93hflm2F887EWgunrO+/oO+ldqM0yuRdtdBd1ckQvHi tNvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787680122; x=1788284922; h=content-type: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:content-type; bh=LfNdtxjurrpQVrdCO19VGPq2Y4QeRrOBNLADjxjp0d0=; b=INhoJoXWL0E81ef3Z0yhNvJkO58N/22umYe7nCINVqDoVJmJItzXi3VwnYhOVjqtxJ PcIiH45KpdGSE4IleD8++F2SgcoNSbjtzbHK7TkkV6Ej8FPf3yGrrFXomG04KYArKMf5 UIXPEgr7alWruSl7iyIknrRHTrY89oTWHitGFMBsiSNjXvdtApzs/fRxhyLFm9hY4VGa 8vl/+GeqkHNnXq2PAi8BD15aKPMJJTuBrA+xofq33iAXWcxgwvpUkxXf7IaoLBj9Ypi6 OA+AmLMx2Eyc3TM6sFJdLjbyaD4BROSsMim5TXSZiT+D0bjF6nJINlq91Z1VhGuqGzMT qHLw== X-Forwarded-Encrypted: i=1; AHgh+RpbcwIO46R9rVTJI2OmLUUnhCnbtjupz5axTNuJt/BzgLsN4+6lOSjOA9JsKEfUpWXu0i091FLT3ajkwNE=@vger.kernel.org X-Gm-Message-State: AFuF++mazOJ9IZa9LmaY91E/WMBHBm+hEVQ22V6qPdTF1yK1Ktw/GvpP riJ7D2y2tsGKFbV9qMivB8b7iYwqYR/RFzzVFXlREUSTXSBq7prPgygWD+BrtY1CQfqkkK1jDkb h/zPQBw== X-Received: from pgbbh9.prod.google.com ([2002:a05:6a02:209:b0:cc1:b199:ca6]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:6ca7:b0:84e:24df:3870 with SMTP id d2e1a72fcca58-8536ee112damr1011928b3a.0.1787680122302; Tue, 25 Aug 2026 10:48:42 -0700 (PDT) Date: Tue, 25 Aug 2026 10:48:41 -0700 In-Reply-To: <1f12e12f1d5e7baed6630fd15cea5420c40ada68.camel@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260825025533.25663-1-yan.y.zhao@intel.com> <1f12e12f1d5e7baed6630fd15cea5420c40ada68.camel@intel.com> Message-ID: Subject: Re: [PATCH] x86/virt/tdx: Warn on !4K level in tdh_mem_page_aug() From: Sean Christopherson To: Rick P Edgecombe Cc: "kas@kernel.org" , Yan Y Zhao , "dave.hansen@linux.intel.com" , "kvm@vger.kernel.org" , Xiaoyao Li , "linux-coco@lists.linux.dev" , Kai Huang , Dave Hansen , "linux-kernel@vger.kernel.org" , "mingo@redhat.com" , "pbonzini@redhat.com" , "binbin.wu@linux.intel.com" , "ackerleytng@google.com" , "sagis@google.com" , Vishal Annapurve , "bp@alien8.de" , "tglx@kernel.org" , "yilun.xu@linux.intel.com" , "x86@kernel.org" Content-Type: text/plain; charset="us-ascii" On Tue, Aug 25, 2026, Rick P Edgecombe wrote: > On Tue, 2026-08-25 at 10:55 +0800, Yan Zhao wrote: > > Do not drop the "level" parameter instead, as it will be needed once huge > > page support is added. > > TDX and coco has so many plans for the future. An abnormal amount of concurrent > thinking. I think everyone agrees we need to wrangle it by doing things > iteratively, and cheating when it comes to uABI. > > Since we have TDX huge pages coming so soon, it seems ok to leave it. But I just > wanted to say having the level arg here originally was wrong. So this should not > be precedent for pre-enabling of things years in the future. Eh, I would argue that in this particular case, including @level was ok from a process perspective, the main issue is the implementation was buggy. Which is very arguably _because_ there was no user to validate the code, but given all the pre-existing KVM MMU code at play, at some point we'd have to insert code to say "hugepages aren't supported". E.g. in this specific case, assuming PG_LEVEL_4K could have been just as bad as having a partially-dead @level. But nitpicking aside, +1 to not building out unused, untestable infrastructure.