From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 38FBD4C6E for ; Sat, 18 Jan 2025 00:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737160498; cv=none; b=uuX/F8PV+M0XlmU/VvPVvcPW/1cd3M8toVfj4kMorDwb7J0XeHw5tLsMd5Gmyrwo2ypiyaErBChOjR8HouFyYC4lN0Pg0Audbs3DU8Q5joytyp+v32p/gEWUjiBn61semHQpIp4yvi0k8vEqC2TRImjPZDA1pAmIjpSwdx4DZzs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737160498; c=relaxed/simple; bh=cW808BCqdtgev2PbF78Zdv4OWMlvRuDi4veOyGzWzNU=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=flhOBzMHVNiX8KowiIwoV3KjkDf5HC8+7UraPDUj65bWQJ6h0Tp8qKVExxM/HB5AU7KIxU1vFNb3U7EKC9PCq4643U2BPwvvUaVeDNKDYqYJgsxpUB14lOMCbyeD/pHbMb19yZxU3w+Pr4zyLtvkLt683xxqb/EhuI6spW2W+EY= 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=GizOGnGl; arc=none smtp.client-ip=209.85.216.73 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="GizOGnGl" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-2efa0eb9dacso5216905a91.1 for ; Fri, 17 Jan 2025 16:34:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1737160496; x=1737765296; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:reply-to:from:to:cc :subject:date:message-id:reply-to; bh=N+CieEtMwZCamh7rLQ2Z6X/RWLVIdMiNeUhZ8Yn8RTc=; b=GizOGnGlCd8nXLsXOjXEw2J8E0o6nugL6cqacexgVOJ3MpIFXWf7gv7ISUuJERVvM9 HRe0CJLWpevJX4RwsmNfDDv2KuP24anUppul8x7DK4yDlqsShD3KstLLIOSlz3SxC2Oa ulSpT77tEZaw0abz7gM53CdwRUUgB1K506oohEBdGBBATkhSus/i4VTcKipWRyaeFPFT 9teD7CrOOP6nJDK34mqt+foyXcw9mLkQLaGi3Wsi5668WDkuVMJDzQfUULjDIY772ind sdIXfRqZMwnBEaWDKyjVMXKeiG0qhMP/C0wUwDV1cUzMdxJlKgvJJsFZrT1svx4ZacbL 5nMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737160496; x=1737765296; h=cc:to:from:subject:message-id:mime-version:date:reply-to :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N+CieEtMwZCamh7rLQ2Z6X/RWLVIdMiNeUhZ8Yn8RTc=; b=paTriRi0Vps8EW6Ie2OOXkAp896mFKD0hKezWbkYikPOF9hSOtHAafj0soWTdBrRhU grSxoKYQ1/PkO82iwmsNzyJAE9iHOxE3PfwbN3DZTKQXnEfOIo0P1pdPnD47QXXorUz4 UhEafDyv+MubHtF4lTTjKQtl+6bRBN01bYLrq2Q3QPmDOGCyqBNvyr+kEP+VOex2FDBg oLa+7ARW3hZSNPV/T0qzVgsHiaG+KwVawX77/+Vby0ACp92kcRd1frKgmNy64NQt/1Y2 y2VibD562aoTrBnTzYoboB8BNQ0D0SODTKeG5vRDo0oDukopBhmrOjeIyP+zLswfLxER Nw8w== X-Forwarded-Encrypted: i=1; AJvYcCX1Tb6UhMRNNjbDHGy9ZoQiRwPxuh6QUlVpMMSy33wBn1hftTQ2WmFLjd9JGRfNuI86OXIW/FfWJpNgkfw=@vger.kernel.org X-Gm-Message-State: AOJu0YxSCaLHx28j2qsdV7sTD9ASDJZUBdPQ1wzdX1ENO/aGZmXjpLTP pCx3lDUFfeWSZrF2Jx+ICDwuCoZaqQB+QN+jSSuGrGhL1b1DR9QlhWHb6yGtjdz5B45IASgdKCk T6g== X-Google-Smtp-Source: AGHT+IGjMBYb/zLbIa4CoE7spBv2Xl++z8HEkjct+m7a3sxg34uQTB+J+n/lfyMVbXXqrVVB0OqvZZD3MNs= X-Received: from pjbsz8.prod.google.com ([2002:a17:90b:2d48:b0:2e0:9fee:4b86]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90a:d2d0:b0:2ee:b6c5:1de7 with SMTP id 98e67ed59e1d1-2f782c4c297mr7113007a91.2.1737160496226; Fri, 17 Jan 2025 16:34:56 -0800 (PST) Reply-To: Sean Christopherson Date: Fri, 17 Jan 2025 16:34:50 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.48.0.rc2.279.g1de40edade-goog Message-ID: <20250118003454.2619573-1-seanjc@google.com> Subject: [PATCH v2 0/4] KVM: x86: Hyper-V SEND_IPI fix and partial testcase From: Sean Christopherson To: Vitaly Kuznetsov , Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Dongjie Zou Content-Type: text/plain; charset="UTF-8" Fix a NULL pointer deref due to exposing Hyper-V enlightments to a guest without an in-kernel local APIC (found by syzkaller, highly unlikely to affect any "real" VMMs). Expand the Hyper-V CPUID test to verify that KVM doesn't incorrectly advertise support. v2 - Fix the stable@ email. Hilariously, I was _this_ close to sending this with stable@vger.kernel@kernel.org instead of stable@vger.kernel.org, *after* I wrote this exact blurb about fat-fingering the email a second time. Thankfully, git send-email told me I was being stupid :-) - Don't free the system-scoped CPUID entries object. [Vitaly] - Collect reviews. [Vitaly] v1: https://lore.kernel.org/all/20250113222740.1481934-1-seanjc@google.com Sean Christopherson (4): KVM: x86: Reject Hyper-V's SEND_IPI hypercalls if local APIC isn't in-kernel KVM: selftests: Mark test_hv_cpuid_e2big() static in Hyper-V CPUID test KVM: selftests: Manage CPUID array in Hyper-V CPUID test's core helper KVM: selftests: Add CPUID tests for Hyper-V features that need in-kernel APIC arch/x86/kvm/hyperv.c | 6 ++- .../selftests/kvm/x86_64/hyperv_cpuid.c | 47 +++++++++++++------ 2 files changed, 37 insertions(+), 16 deletions(-) base-commit: a5546c2f0dc4f84727a4bb8a91633917929735f5 -- 2.48.0.rc2.279.g1de40edade-goog