From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (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 B43C7377020 for ; Fri, 10 Jul 2026 05:06:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783659997; cv=none; b=HviutsB1GFTddm4mLF3LrSBklavCjlGEUUCoTGcOplyTrtfHVXX/GiB1LnVB0unnEleZLToAkwrsWsDGO/gGUd+D5J2RYD4XENEiJRb4nwIUjhA2YF+MVdY4ERd5oD3lbCiMPaYq8Hyc3/h51pbeibagFT8Vde9/J+X4jhoLOxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783659997; c=relaxed/simple; bh=tqNjoAgnA9FBPaw/OgwTVGIEq2ZEoyk6fxq9pWfgyts=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MSkbEq3uHGasIU9gec0BvprDLpel73HmBTLGbq3tgvN6AgLmAkvyTOdY+RTQYJx/p/q4KoTQU5WD1mZJvx31JHq9cIqN3pNzT12Uo3/jL98v7Rsh54acP+BA9qzcv5DZozQcv5/r3s/7SQKbjWoR9pliR2vweMFuU+kkfycbuww= 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=oga1ocQg; arc=none smtp.client-ip=209.85.215.182 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="oga1ocQg" Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-ca12086c06eso455593a12.0 for ; Thu, 09 Jul 2026 22:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783659995; x=1784264795; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ImNIiwacby35FVtPkvIxY12uGz7n2N70CkNy2HlFDRQ=; b=oga1ocQgkwGiJFx//QKQF4V3Xud+5fOmk1Kj7EK7FYSsSrgHIo8Ax0fvnQNsZCZBS4 wJPcOv+DADcNg3+BwlzcYch0uYiDHvcKPMsi4eKAJPNEoFVKbBNkMJRBxMobm+qcoBQA 7N48XWLi/ds5wb6kU2q3dRXAYGqhL70ze1IXMamW2vkc7LhwQavIfUEo13F61OUsPFtO +tk53z+eoGCSL70mPAJM62wHMH+ImkdGqr3B0G50A0A3osbKeiecg/+KIjfmHKCQBSiS QyZm/WdGmLs/0J32Sce5hVy1lQacDti46o+gVr7PaT0lWh0OQaPTSH6rghlKbV/9MFic +P7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783659995; x=1784264795; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=ImNIiwacby35FVtPkvIxY12uGz7n2N70CkNy2HlFDRQ=; b=D026PnPEPIOc7pDVxXcSTYAAlM+S1GgZaWiN3JwCqkoO7veo7CBB+ilp2mnIxakiy1 bUYx29JeQQNer4IowOWr3hfDJRbqTRgsbzUJ1Nyn7mNVMiiJgc5H+CJGLZ1dzdLZjDAq r+S0N3+tA2zn/XojHWJS6CFgGONy0gjQGMkor74RiUXcBsSQthGNIXwJ5C0eWPHE+OOi tk9CL4kIYFj7hXYQLZUB/OfHJdqoK840jGRLyFlK/pmQBrUeS5KZJhfq+V5CD4VSWGVn zg0Cnz4FxH14tBuiaIHv4h8n/flXX1+7pdc4LAgzlqH4iF9tpYEpoJbwk0Zx6+UTxiti odag== X-Forwarded-Encrypted: i=1; AHgh+RpCL+N2zsDH7WytYeil98uShT8vLVvJ7S47HO8BfGKvNeA4DfcEiPGqxBV+sKXHaY9WrEQcQIgmr7JfJAE=@vger.kernel.org X-Gm-Message-State: AOJu0Yw88G0x7nuSkouQ6iXcVfwme3xXqgdfyXF7iLtlVaWdgYLVDgh2 XQGmrpBs3PKzLeYefeMebwtxUGED1LTYmqmcrAgdMJFLSODViSvmYuO9oWc/1ayp X-Gm-Gg: AfdE7ckGKMCxwoT0i0RiGTrp5WDE1DZT2BMmXDhDSn4z3/wzdFMjclRmVdB6FuMWW6P POm1AS30q6QYBp9w2pAtvxkfVYzV8DkMhSwU3KKtDytNuenl58gU7OZOetWdDTst8EMh09jvtdt kMMUqxfh04rvt58yYy9ZPxoWt5rrm5k2ivM16J7BrSQ4KPSbvpz3jkdtEsyfFsORLGuBE5sTmjf oV19GDctI4lC2LQ7MB52rGfhSulS3TQQybgWE2T2xR5CFfwSAXbwNsDkc1nMD4yE2d6wiUp2vYs fWC7nzgKlr6RpnyifGOpstvPb66BiiQpxHX8QsioTXzVikAOMkINHBbpmH8LOmtWM/hV88A1Ij0 gYsZ7h7Vcvf9pAEJh01CyIv+ju9NZ0XZW7/+cF3Se9dldquoydqGQUXXOYVhovmPSU1uoFbe9I6 CHk5T0hZU0mfeXMTDl3jRT2jbmozp04GC0bow= X-Received: by 2002:a05:6a20:158e:b0:3bf:ee42:195 with SMTP id adf61e73a8af0-3c0bc90146amr11909587637.11.1783659994980; Thu, 09 Jul 2026 22:06:34 -0700 (PDT) Received: from volcano9f8e-host.amd.com ([165.204.217.251]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13b659c865asm38752224c88.11.2026.07.09.22.06.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 22:06:34 -0700 (PDT) From: Hemanth Selam To: seanjc@google.com Cc: pbonzini@redhat.com, shuah@kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Hemanth Selam Subject: Re: [PATCH v2 1/2] KVM: selftests: SEV: Verify unsupported VM types are rejected at creation Date: Fri, 10 Jul 2026 10:36:26 +0530 Message-ID: <20260710050626.844624-1-hemanth.selam@gmail.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: <20260709174955.628913-2-hemanth.selam@gmail.com> References: <20260709174955.628913-2-hemanth.selam@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, Jul 09, 2026, Sean Christopherson wrote: > Literally every test relies on the kernel to clean up fds on an early > exit. I see no reason for this to behave differently. > > Also, Sashiko was wrong. If KVM_CREATE_VM fails with something other > than EINVAL, the assert will NOT fire, but fd will be < 0. Agreed on both; dropped the manual close() and the errno latching. > test_assert logs the errno, no need to spit it out here as well. Removed. > Heh, I agree with the comment: put this in a separate selftest. This > doesn't have anything to do with KVM_SEV_INIT2, and in fact doesn't > even have anyting to do with SEV+ or even x86. E.g. add a > kvm_vm_types_test that attempts to create all possible VM types, and > asserts success/failure based on the output from > kvm_check_cap(KVM_CAP_VM_TYPES). Done. v3 drops the sev_init2_tests changes and adds a standalone, arch-generic test that walks all type values (including out-of-range ones) and asserts KVM_CREATE_VM success/failure against KVM_CAP_VM_TYPES: https://lore.kernel.org/all/20260710050442.826777-1-hemanth.selam@gmail.com/ I also dropped the "SEV: Sanity check the launch measurement" patch for now; v3 is just the VM-types test. Thanks for the review! Hemanth