From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (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 E9E0213E02A for ; Thu, 7 May 2026 00:36:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778114189; cv=none; b=oqyPZZp54pgMB1qGZfdbupgYhLQaDBBbBBBrBs41jNT3DHFMlcgOvyv9QzA0KHbtvgIbydFMo8DR24QUg8wmcg1+tUF4avlin2j90QJ6Tn8bSOPN9rPwoHu5FIY0rtCalNh1aTR4pcjqcNK0tx+qWIIN2ALVfEN+Z0TqEfQMjZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778114189; c=relaxed/simple; bh=Yh9xe8AG6jjQPJ6UiqlA1MZfkBSjqxuraWDZVcQcQnQ=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=ju1Nr2R8MRrPPeCZ+ql7RLuV9RF3aPIMQy0VllxZbyQp+fU00Re0b37tDB6O8yp12yftkRRoPOsdyQv+WTt1myYzLUANB7R997LwO7ZsJmQG8HSN61r4q/+7JeRqIabUa26fUeSHuTO8FPMa2raMlKoGe3e2t1n0ikON6PuIrtA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--vannapurve.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=KL87VbGg; arc=none smtp.client-ip=209.85.210.201 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--vannapurve.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="KL87VbGg" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-837d0d71c61so100491b3a.1 for ; Wed, 06 May 2026 17:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778114186; x=1778718986; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=eIF+rRdu+3QEPXRzJYaUTeKGzH60I48spkgDcIc/KrY=; b=KL87VbGgoxb/st8IhnBOy12gHC6Zbp/hVQ3U7OYEveacvy6JFnxzpjIG3lafEU/DAU vpvKI9P9F1Q5yyTmwBsno+R/us3cT1mtnoGpQ3A8B0+TdKL0qaO7jfTqIEW+7nC4qKp6 r5JECgZWh2aFZwIMQamTT5MfmnGScSsePuIk/ecomV8psmd1D24RMxzXuGjQGCCZEwKl Qj/CRWI9uRXIjAsB0tItPxcvaW85EGo7JQh7YF5p1IaSUdtcXegYxO7T5rm0FIPb/60e 34OpfeF3kqgKZtvK/C/9z6IZtLNoEfbMSOFqDUVSCRAwCMP7gLdVeoopd2+ZqW97dCbl VYfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778114186; x=1778718986; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=eIF+rRdu+3QEPXRzJYaUTeKGzH60I48spkgDcIc/KrY=; b=WyD+S5N94xEc+CN34wWSMjhD6+s+hVqFdLGRmTYm3DO8QPqy+dOVCZOGVmFmvI4mMz y3omhESN1xt6z1yaawmMEBafTgSeDdzsLwZgROcahE8dqs5PQIYcteIUOGVVer+/M84L GIVL+ioo9JmAwjmqDnwR0Wcv+bt6XjdCjzJeY8rkGXXetpNxOMKMki0k+p2+r8hzRd9S BIEarWTXLES5YuWSN3h7LJ/Mk6ZWC0cIZh6HUZanfekYqVEqUHWahsiW0ytodFXu0QEL rzyj7E8d+CLo1TtLQjMR1DV1cNe6kL0IlRGcl4UQxH9OBxsVda6SJ33cGRwYfS5C6BD2 VBgw== X-Forwarded-Encrypted: i=1; AFNElJ8xyJBLtyIfQjhiMMYPzQt9AORfrZUhMLjnzCOtduKcU9JFjBx9UDWtoOAkTjRXrogslN7IB/9Pt4gR5wY=@vger.kernel.org X-Gm-Message-State: AOJu0YwofQazEG4qBIc/WRv7Ltny04sWaCjWOSOgdK0wANRVNvhKJDAr aOfh0D1zEtUz3Z0MgqH/NNzLPVSD68jUXlWNYVmYnRdHpqya0xTKL7JdgjzyoSYyStJX8nnRJtD mX4vb7lPmdMAQjZzZ9ZQywg== X-Received: from pfbhu17.prod.google.com ([2002:a05:6a00:6991:b0:82c:e899:f089]) (user=vannapurve job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:4508:b0:835:38fc:ba1 with SMTP id d2e1a72fcca58-83a5e84346dmr5324793b3a.46.1778114185949; Wed, 06 May 2026 17:36:25 -0700 (PDT) Date: Thu, 7 May 2026 00:36:11 +0000 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.54.0.563.g4f69b47b94-goog Message-ID: <20260507003613.1784851-1-vannapurve@google.com> Subject: [PATCH v2 0/2] KVM: TDX: Disable PMU virtualization for TDX VMs From: Vishal Annapurve To: seanjc@google.com, pbonzini@redhat.com, dave.hansen@linux.intel.com Cc: rick.p.edgecombe@intel.com, dapeng1.mi@linux.intel.com, mizhang@google.com, kai.huang@intel.com, jmattson@google.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Vishal Annapurve Content-Type: text/plain; charset="UTF-8" TDX module virtualizes PMU for TDX VMs [1]. KVM has limited role to play in virtualizing PMU accesses and needs additional enlightenment to support all toggles provided by TDX module. This series disables PMU virtualization within KVM for TDX VMs, which is a safe bet until the complete set of PMU controls are implemented within KVM. [1] Section 15.2: https://cdrdv2.intel.com/v1/dl/getContent/733575 Vishal Annapurve (2): KVM: x86: Introduce arch specific has_protected_pmu state KVM: TDX: Set the has_protected_pmu flag for TDX VMs arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/vmx/tdx.c | 6 ++++++ arch/x86/kvm/x86.c | 8 ++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) -- 2.54.0.563.g4f69b47b94-goog