From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (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 87EDC1E4B2 for ; Tue, 21 Jan 2025 16:00:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737475231; cv=none; b=VfdBvet3WQq+dbtDnceOuWQKIsRTcNcg6Q1GGi7qwvTmZh3dwj3FaBynIwGfNVla+CvHyWN++rFs/fM/inmGR1M+RYFEqPBHJ2sOercV5oNFqSMjQNv4Goyd2odgNnEppqCmYFUOtPHTqGUSVIc/X2DZIrRrlaIMgA8KMF5lIdQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737475231; c=relaxed/simple; bh=EicM7X3YMAmO/4d6190TcVVMcOWHVZUm/HS8XF4cjUo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=PL+O3dARdVUsvG7ZMms/M7dExwaMyceKVXqRNeNWnYH4T1Nw6THTWi5fwQI+dr+BBOMoCy4bxrAQ8sNXkDThl8bEc9gaJELP22POBjUFuUxHpGUQly3pheDwYrT5bY+1jDmCEyGfYoQwojqFM9/E9N0A6RQvATwVoAcbEkt9UZs= 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=oUn6XRqF; arc=none smtp.client-ip=209.85.216.74 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="oUn6XRqF" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2ee5616e986so16668373a91.2 for ; Tue, 21 Jan 2025 08:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1737475229; x=1738080029; 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=FcvouzLzCbsOet6nyiRu1sxyIbD8hK9cg7WAyq0uGH0=; b=oUn6XRqF31l9L8r0ULhkrLyaUCJFz/js9sYqiWloCfAfcqng0bJW11AxpHgCaByd0n oCYoebR0bzEvfms7BqdNl4GEt6wYsE0p8mAaFyyrgm/ygcX5gPpLaKjJlv8GnV7rljXn 8lYLXN/TSkfUhH+utCa/c+XFEul77g7ILiIYbzeLxHq87oKU34+5Evj8Ab/9rk/eI9tx ekeU72dCyjeg5+N4sFE6F7B4qPKJp1qZHpBMrP2Z4DfTSbFVQbbxNN07UZZbd30u5wDw GGi/uXNLsibLpejsKKg6oVkHrK6q923sTAQ89dsZhQll6teKm7egITB9TUq5iu4OH6V0 0gsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737475229; x=1738080029; 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=FcvouzLzCbsOet6nyiRu1sxyIbD8hK9cg7WAyq0uGH0=; b=AumtzHWKVliGn7q610LXFGDaSA9M0XbK7pPgsAeFCcLpeBcH/WXbYs8W2jaOo0721W Ko/VG44ZsgLdg+t2sCFwilwk5YIKOeugm7pPqedGxFnJBqPZ8f511wIMQU1QOq5KwCkn pXhRwl1Y6Dh7CfvJ/jIxPD7AM4+rP1+kAymBhmoM/jTjhrVbclSbCkuXVXAMpuq7Som9 L48Nf+jeoLpfMF2mVrAzIbTKYdqMIdJRHMkyqBxtsYCY5A7FsR9rHh0V1NzhL1hNvm3u Mwg/buIb56AyUEMK0+n7FIKqAqVuu0xcZLMNPJnhxcnGzY8hlpczGDqYtsCjhqrmzIxj UEtw== X-Forwarded-Encrypted: i=1; AJvYcCUZPl1cKlGpU5BLiOlsDdEqcoPnBAUG/zcAzMJ39+N+Th4siKAn1DWiJGoEWB0E0LXAxI8cHzRqT/8wrPs=@vger.kernel.org X-Gm-Message-State: AOJu0YzuSbnzQGLWFXtu00QmMsTES5bOa9FvOjT6xIqpYIzIgI8zmcig K7cN3E0IqbB0JGLNqLvx0lZEh2oTK34iVvRVqtSBT3/eZc1J/lQJLT3rJWEbZMSQjKoM/6EvRvN jdg== X-Google-Smtp-Source: AGHT+IFvQ29y/16pSDIesJONr3YtfNFhioLCrBobAQRpweKPd0JZ7QQznRTp9GRySClzqwYoEEjbzpPkMO0= X-Received: from pfbbe3.prod.google.com ([2002:a05:6a00:1f03:b0:72d:4132:7360]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:811:b0:72a:a7a4:b641 with SMTP id d2e1a72fcca58-72dafb71a28mr29231118b3a.18.1737475228851; Tue, 21 Jan 2025 08:00:28 -0800 (PST) Date: Tue, 21 Jan 2025 08:00:27 -0800 In-Reply-To: <877c6p8t35.fsf@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250118003454.2619573-1-seanjc@google.com> <20250118003454.2619573-5-seanjc@google.com> <877c6p8t35.fsf@redhat.com> Message-ID: Subject: Re: [PATCH v2 4/4] KVM: selftests: Add CPUID tests for Hyper-V features that need in-kernel APIC From: Sean Christopherson To: Vitaly Kuznetsov Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Dongjie Zou Content-Type: text/plain; charset="us-ascii" On Mon, Jan 20, 2025, Vitaly Kuznetsov wrote: > > diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c b/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c > > index 3188749ec6e1..8f26130dc30d 100644 > > --- a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c > > +++ b/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c > > @@ -43,6 +43,7 @@ static bool smt_possible(void) > > > > static void test_hv_cpuid(struct kvm_vcpu *vcpu, bool evmcs_expected) > > { > > + const bool has_irqchip = !vcpu || vcpu->vm->has_irqchip; > > const struct kvm_cpuid2 *hv_cpuid_entries; > > int i; > > int nent_expected = 10; > > @@ -85,12 +86,19 @@ static void test_hv_cpuid(struct kvm_vcpu *vcpu, bool evmcs_expected) > > entry->eax, evmcs_expected > > ); > > break; > > + case 0x40000003: > > + TEST_ASSERT(has_irqchip || !(entry->edx & BIT(19)), > > + "Synthetic Timers should require in-kernel APIC"); > > Nitpick: BIT(19) of CPUID.0x40000003(EDX) advertises 'direct' mode > for Synthetic timers and that's what we have paired with > lapic_in_kernel() check. Thus, we may want to be a bit more specific and > say > > "Direct Synthetic timers should require in-kernel APIC" > (personally, I'd prefer "Synthetic timers in 'direct' mode" name but > that's not how TLFS calls them) What about adding quotes to try and communicate that it's a property of Syntehtic Timers? E.g. "\"Direct\" Synthetic Timers should require in-kernel APIC");