From patchwork Thu Feb 15 16:01:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Jimenez X-Patchwork-Id: 201611 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp498456dyb; Thu, 15 Feb 2024 08:03:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUApzYLpslcd4LVhF7w6uwNnU3fKPue9634z3TA8lSfjN0nQq6r3ghJ5xaIsCkE54RdJWg3+5S4skmsv21zhaiPjc8vVw== X-Google-Smtp-Source: AGHT+IHMnOq+WNZjplkTv8c+T2dN3+rCCNgPhjX1ZvVazxLyy/ZWvulKOPv/OO2QRYSlniSbyMqq X-Received: by 2002:a17:906:1c07:b0:a3d:28:919a with SMTP id k7-20020a1709061c0700b00a3d0028919amr1396707ejg.70.1708012994934; Thu, 15 Feb 2024 08:03:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708012994; cv=pass; d=google.com; s=arc-20160816; b=tbbVemBkY/RJR7W42dYcLnW7uxzrlqwGG8sh0rj2xvT86zqw/l/MSocsbgZDqWVVuZ KA81jLvm/lFLk3H8Zvj1m1+SRziEpCrxXEqb8BmGAjSuKu2LEMiY3iDcz4M1RHwuXuG4 igYeTODwgL2ldjzNqWZs5ftgDavfZP9vulMCPslz4CyOMIkdx3GgeBy3/e1QmATUyOYI KywC4bKViuIXHl668n2GuyN2OPCY14o9SxB0kxVK3qtH+Q0Z31xZ8Po21VfGusKu5gzm 9qyyktv+d4Lj5RSZdmKOsppe99pMSBLLDceycV3wX2qcTXqMhg88Ks1UuPWRTkUeKkdt +lkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=fUQwbcSa7JIfZs3FFwCfuYGrDzAceP85zj8kWQZplu8=; fh=ymAMBhZFm6ec5ziNEh7TItdAbNlAOEinVl2jZLuT8nk=; b=0ezZBTEhhcG84rGyEwVa+TRrLzdXcBbpRCMi8RfunwW29laEzhTfNisjJvrALOC5Td 01x6IsgU+F6DangDGwzvIvmx0J4B8SEOdQ6d0UBJaFgt0aH6vB89UdvdXWcjXPGyguLI 0oU9xAKT8xhVRPeuCLlz2+a7U5YiIrNQJIGX8LF3AnuyymtySGAit3R94myHaK5oMFli Vo560J5Vw6P5P9KdISjeIHGF3F/3hiJarnkGGdRVRjvUwRxn/mzbjFqnh/qv6cu9mOHk /oFFgP63PIO6F07GxZrWWqHBbBOJYkuS/U+e9xS4DingQrM+Ju1dReqbdhClRWEMsxeP tk0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=Nv1C6qI1; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-67253-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67253-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l8-20020a170906078800b00a3caa41bd8asi762077ejc.82.2024.02.15.08.03.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 08:03:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67253-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=Nv1C6qI1; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-67253-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67253-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8B4511F22565 for ; Thu, 15 Feb 2024 16:03:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E6551350EB; Thu, 15 Feb 2024 16:01:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Nv1C6qI1" Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 224731339BB; Thu, 15 Feb 2024 16:01:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.165.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708012912; cv=none; b=FOeq9CRFlVZ7E6i+TyoXnozNnKhOqsJOEp+ab+kNNTB5Ey3Ng7DoQVrTg1i8KVZ6d/MPLVliFztqWdk5fnfPtRw9k8K37a1VDpFw5M8bk1G+ZsPlQChpS7jmx0o7yM+txs7+he7NoQ5bwJkCIo23H76OTNoN638XQXXmibYgh2w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708012912; c=relaxed/simple; bh=AwzV7l6ngJMH/6dLMFfjKrzBAa6wt7rrkiY5JB/Q8fI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Vgek9oNdm+RpHSmQnux7HaaSSd/hMDSqxsy8qyB9j1BAH9Xxtv4Ti16/Z673XWo4I6bi8xkvvEJq5Wrb/sRbnm6TTZHzbba0ECyWqagkEvYzLpfyuVrKt/kMnHcfOzsnFq+JYY0YKQpgD8qAO4xcU7cJytdq8mEO9oPxpb8xJsU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=Nv1C6qI1; arc=none smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41FFTZrA030241; Thu, 15 Feb 2024 16:01:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=fUQwbcSa7JIfZs3FFwCfuYGrDzAceP85zj8kWQZplu8=; b=Nv1C6qI1Z5ks6SYBT1JUXvTL6Q8Dndhj2WgYfudUth+RqnAjBlUqAyS2xn8ttN1Dea1/ lDIe/YoKFIjAgiKSEFeUtm4vse42qAS2DTGumj5fLktSNO7yM2n5sMNcczw3RUg6RLsD hcey1mhr1jGhRaVHW/aaLOB/fPjBHNfmC3EpDj99CC27cU3z4kK1Ha0cyUcUjH3wVahm VTD9oeommIUL+cfIKXguqnWNx18Ej9RTGnQGvn7d5dvQeoLvHNU3TXqNey0ixDRmHhbJ 2EV0n4K1zb/011OOUZ318PlYc+FBbEb8f9rcF23Xzip25ZDKMVnZgsAN2gWb/dARnZyo /w== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3w91f02t8w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 16:01:40 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 41FEtq5H013770; Thu, 15 Feb 2024 16:01:40 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3w6apdkesw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 16:01:40 +0000 Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 41FG1cZU031601; Thu, 15 Feb 2024 16:01:39 GMT Received: from alaljime-dev-e4flex-vm.osdevelopmeniad.oraclevcn.com (alaljime-dev-e4flex-vm.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.249.106]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3w6apdkep6-2; Thu, 15 Feb 2024 16:01:39 +0000 From: Alejandro Jimenez To: kvm@vger.kernel.org Cc: seanjc@google.com, pbonzini@redhat.com, linux-kernel@vger.kernel.org, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, mark.kanda@oracle.com, suravee.suthikulpanit@amd.com, mlevitsk@redhat.com, alejandro.j.jimenez@oracle.com Subject: [RFC 1/3] x86: KVM: stats: Add a stat to report status of APICv inhibition Date: Thu, 15 Feb 2024 16:01:34 +0000 Message-Id: <20240215160136.1256084-2-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240215160136.1256084-1-alejandro.j.jimenez@oracle.com> References: <20240215160136.1256084-1-alejandro.j.jimenez@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-15_14,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402150128 X-Proofpoint-ORIG-GUID: SGy7if_VQHKWaR8sDeMhTLlXqfzv_VaW X-Proofpoint-GUID: SGy7if_VQHKWaR8sDeMhTLlXqfzv_VaW X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790981433885874519 X-GMAIL-MSGID: 1790981433885874519 The inhibition status of APICv can currently be checked using the 'kvm_apicv_inhibit_changed' tracepoint, but this is not accessible if tracefs is not available (e.g. kernel lockdown, non-root user). Export inhibition status as a binary stat that can be monitored from userspace without elevated privileges. Signed-off-by: Alejandro Jimenez --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/x86.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index ad5319a503f0..9b960a523715 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1524,6 +1524,7 @@ struct kvm_vm_stat { u64 nx_lpage_splits; u64 max_mmu_page_hash_collisions; u64 max_mmu_rmap_size; + u64 apicv_inhibited; }; struct kvm_vcpu_stat { diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index b66c45e7f6f8..f7f598f066e7 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -255,7 +255,8 @@ const struct _kvm_stats_desc kvm_vm_stats_desc[] = { STATS_DESC_ICOUNTER(VM, pages_1g), STATS_DESC_ICOUNTER(VM, nx_lpage_splits), STATS_DESC_PCOUNTER(VM, max_mmu_rmap_size), - STATS_DESC_PCOUNTER(VM, max_mmu_page_hash_collisions) + STATS_DESC_PCOUNTER(VM, max_mmu_page_hash_collisions), + STATS_DESC_IBOOLEAN(VM, apicv_inhibited) }; const struct kvm_stats_header kvm_vm_stats_header = { @@ -10588,6 +10589,13 @@ void __kvm_set_or_clear_apicv_inhibit(struct kvm *kvm, */ kvm_make_all_cpus_request(kvm, KVM_REQ_APICV_UPDATE); kvm->arch.apicv_inhibit_reasons = new; + + /* + * Update inhibition statistic only when toggling APICv + * activation status. + */ + kvm->stat.apicv_inhibited = !!new; + if (new) { unsigned long gfn = gpa_to_gfn(APIC_DEFAULT_PHYS_BASE); int idx = srcu_read_lock(&kvm->srcu); From patchwork Thu Feb 15 16:01:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Jimenez X-Patchwork-Id: 201608 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp498185dyb; Thu, 15 Feb 2024 08:02:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXL70sSwyATTTab8cYCIOcEtjzeIvlrcroUB8m7lnLdMDrUz4F827EL/CH2CWDacqgtL5wmJ7aFSFE5BoFmXsELF7dlaQ== X-Google-Smtp-Source: AGHT+IEiij0XmMhM28liH2r8ZVavejtoRWcQ3LhL8RM0faqiwG0ZXDrhmYx3oLQ1UfeOT/jRTHES X-Received: by 2002:a17:90b:3a8f:b0:299:aae:b58a with SMTP id om15-20020a17090b3a8f00b002990aaeb58amr1719258pjb.22.1708012977670; Thu, 15 Feb 2024 08:02:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708012977; cv=pass; d=google.com; s=arc-20160816; b=WW2BfDyu+FAZlsXy/OcdCJyF9ar9rmiXLN04Bx0/M3DEhGGaU156qPUuL3UX1PtwTW lK07hPRH9D7aGTU6gzQ0nNurdIkS5Z7glAsZ0OYahojsADGY7qCzmG/Dxhu31nz2B2Yb 01Ewldp7SNsk8EikuYTQU/MPBT8O9gy2kqS/064rdzRwGLTag5zR53UQmuof1jlsUTAG FoJ3vXZYXyXektqtQYxIB/HS5aCyi3MaR4zPv0Yy1GdYJ95+OP0t0d7WKSAEKuftq3d0 EI/nktRq84be7ZDpYa9V5fJWsymUPhRy3Cwepl8EeYKWZhYm3PACOgsEAPcILmLKG5ht 056w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=tFGju7bPNchiqt2tnKGa3v1xLt3nHlirTspnDjTX6L4=; fh=ymAMBhZFm6ec5ziNEh7TItdAbNlAOEinVl2jZLuT8nk=; b=C4B0ZTztkUpOBoJEVTKQj1UVZRnUanPOTAs1ac4o31u7Ow/bCFoNxVM6Qzbxq6bEN0 oU1iOtj/xiHrXMaLz9hRiIS3LJRoiu/T6tWUZdELXVfUnUCsxbBrDhltjeFrPgfiPOxc 8HVOjsin44w8wmiz9ijdnSxUWuVTF/aiMMuyvrUT8RWHqtvsEmojE+EJkLjB3YRUCzZn THtxvv2nb/+GWpCGLfRRCPY3KaXOSb2kIUqctqCQ7DJO6SzVzN7hD59ihKcnD9p4WR8/ UAnB/pYqlYh2EbaJ4tdBVv/bqO7nIy338REW5pd2XpoqSdS004t5ItzfpPKLKn66VVrT lJVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=icbN689W; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-67251-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67251-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s68-20020a635e47000000b005dc85fb4f55si1298312pgb.432.2024.02.15.08.02.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 08:02:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67251-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=icbN689W; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-67251-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67251-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 446F2290EA6 for ; Thu, 15 Feb 2024 16:02:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDA051350C6; Thu, 15 Feb 2024 16:01:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="icbN689W" Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A8B953369; Thu, 15 Feb 2024 16:01:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.165.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708012911; cv=none; b=Ar8jkNk1L9d2uP8U7MUI0UHag7LCqoNF3QWii/AgXgFfP8ieETm+3i0k5EMB7aQqbmgd41ZbWSqUsITdVAs5jSov4ZK1mdoZ/CHUStmLRoU004XsgBGHnEr27WCmMTWNAic6vlelZYnwYVZG/VnfOvbX1fGsD0kgwiIFST4Kl78= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708012911; c=relaxed/simple; bh=R8BSvkkG8B1Q3ey87bWjhKkTTn8tS5TYT9HTwPNq0CU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lAD9D63ZCNE4hUM2e9czlmszgqxZjtKpGdL6JJa5KUZAT7SVP19pts1L1LmMZ7569LD8PoYzF4B4IUo9DLXb47TaM6qdJRIHTESG/maTesGfwz/qZ5fCiARE8khClI+aBAksMAJXKvTXj/RiuA/YE9DHECM73fz/MhWMLh1XcEs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=icbN689W; arc=none smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41FFTYmv030204; Thu, 15 Feb 2024 16:01:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=tFGju7bPNchiqt2tnKGa3v1xLt3nHlirTspnDjTX6L4=; b=icbN689W0HGSoYorX178SmDDUqn6jZmge5q+bcM0X0oZiDe9tZjsIvbs+Uto87U6SeN2 PLChoH/tE98WMJRO/iKEMgat0y5gm6ReImvfARef6reYqA0JVWLM+gcEweAsqxle1rfx zhPxqN8Qfoey/tB5fNXxH7tY6fwHwe4cPcN+r3dma/9nSGispnc1znu0rdHHxh2CHAZn mo5E8CNjVa5yqrq4OyrykYlfUF3EnJWJ3HQzDxVCsKQaevAJzmy9c0nAdzPPqYg176gP eEe6S/KgYQpr6f4LBY0yJA60DFYY2V3zZJwgV186Dz1Qw6dH9cGblVEAcqcHNHHMsm8B Ig== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3w91f02t93-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 16:01:42 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 41FFecT6013775; Thu, 15 Feb 2024 16:01:41 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3w6apdkeup-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 16:01:41 +0000 Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 41FG1cZW031601; Thu, 15 Feb 2024 16:01:41 GMT Received: from alaljime-dev-e4flex-vm.osdevelopmeniad.oraclevcn.com (alaljime-dev-e4flex-vm.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.249.106]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3w6apdkep6-3; Thu, 15 Feb 2024 16:01:41 +0000 From: Alejandro Jimenez To: kvm@vger.kernel.org Cc: seanjc@google.com, pbonzini@redhat.com, linux-kernel@vger.kernel.org, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, mark.kanda@oracle.com, suravee.suthikulpanit@amd.com, mlevitsk@redhat.com, alejandro.j.jimenez@oracle.com Subject: [RFC 2/3] x86: KVM: stats: Add stat counter for IRQs injected via APICv Date: Thu, 15 Feb 2024 16:01:35 +0000 Message-Id: <20240215160136.1256084-3-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240215160136.1256084-1-alejandro.j.jimenez@oracle.com> References: <20240215160136.1256084-1-alejandro.j.jimenez@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-15_14,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402150128 X-Proofpoint-ORIG-GUID: ecyd8N_T40VKvEXxh8sQtaG9KXfqb93D X-Proofpoint-GUID: ecyd8N_T40VKvEXxh8sQtaG9KXfqb93D X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790981415704822222 X-GMAIL-MSGID: 1790981415704822222 Export binary stat counting how many interrupts have been delivered via APICv/AVIC acceleration from the host. This is one of the most reliable methods to detect when hardware accelerated interrupt delivery is active, since APIC timer interrupts are regularly injected and exercise these code paths. Signed-off-by: Alejandro Jimenez --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm/svm.c | 3 +++ arch/x86/kvm/vmx/vmx.c | 2 ++ arch/x86/kvm/x86.c | 1 + 4 files changed, 7 insertions(+) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 9b960a523715..b6f18084d504 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1564,6 +1564,7 @@ struct kvm_vcpu_stat { u64 preemption_other; u64 guest_mode; u64 notify_window_exits; + u64 apicv_accept_irq; }; struct x86_instruction_info; diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index e90b429c84f1..2243af08ed39 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -3648,6 +3648,9 @@ void svm_complete_interrupt_delivery(struct kvm_vcpu *vcpu, int delivery_mode, } trace_kvm_apicv_accept_irq(vcpu->vcpu_id, delivery_mode, trig_mode, vector); + + ++vcpu->stat.apicv_accept_irq; + if (in_guest_mode) { /* * Signal the doorbell to tell hardware to inject the IRQ. If diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index d4e6625e0a9a..f7db75ae2c55 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -4275,6 +4275,8 @@ static void vmx_deliver_interrupt(struct kvm_lapic *apic, int delivery_mode, } else { trace_kvm_apicv_accept_irq(vcpu->vcpu_id, delivery_mode, trig_mode, vector); + + ++vcpu->stat.apicv_accept_irq; } } diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f7f598f066e7..2ad70cf6e52c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -304,6 +304,7 @@ const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { STATS_DESC_COUNTER(VCPU, preemption_other), STATS_DESC_IBOOLEAN(VCPU, guest_mode), STATS_DESC_COUNTER(VCPU, notify_window_exits), + STATS_DESC_COUNTER(VCPU, apicv_accept_irq), }; const struct kvm_stats_header kvm_vcpu_stats_header = { From patchwork Thu Feb 15 16:01:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Jimenez X-Patchwork-Id: 201610 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp498304dyb; Thu, 15 Feb 2024 08:03:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXg3AzopqJMctH/djbWTNlNCpLLAssnwdgNfaS316j+xwZE+BYytcsSjZSCxpGFX5ZamGH8ENZ40M+VEfZ9zXj7tfJ6yQ== X-Google-Smtp-Source: AGHT+IG8hpafhKYVPCfuu9gCEKac/L7LY0yR4VtcwWOuJHU2Pz25Ps+PbsUkoh3gqQE/jV9Xae7O X-Received: by 2002:a17:903:2289:b0:1d9:8e37:56d6 with SMTP id b9-20020a170903228900b001d98e3756d6mr2974965plh.40.1708012985893; Thu, 15 Feb 2024 08:03:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708012985; cv=pass; d=google.com; s=arc-20160816; b=pGccYolpNSw2Dm+qjmd/1btVLTytk9hCsxOlAKg8/udN9FSxdB9VufBl6P87sJnDrg bDoxOCocAXmspTDmce5C5uYZj+xMvrzFcxUepdZ0L/d4JJhmB7PpkoTX6rQmtDRafZgG Fbt76gRO8oEHEL6GootciXW9fGobcl3KCed/Y9/db+EXdLBus5mOTdPUi8q8oNe8wFpL 6IGefZYA6vg4g2pC01EPOoiqG1Z5XDnT4Xi9zr2xlt0BnSuLffad3D+M897OGFrQkTt6 VRYQ9F5oTXeT96hBcf3R4r4Ft/qaMc3gErSY8wykY89t+03lU5H1M3RZjHQiTK2o7brR urpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=saWiS+8K1cygqHiQXZAlnKyAJWO/e2zPPqHJyjJ7EyQ=; fh=ymAMBhZFm6ec5ziNEh7TItdAbNlAOEinVl2jZLuT8nk=; b=Mj0lBu04nE0I8ancVRO1T9Z1NGY56eSSkrKYo5WdxghFKid3pxFYtAWTZeEYPiU+cq 28ED9H6Hgx8OyVnfRkPsu5QC7061eukn6QH4AhWB1dMVNZ73WORxIbcZEHZmWlGk1iVU sds6CkXoogez6AWqWzwnlzGOotJfK7ZZAECnEb3gZtU5xRsDk03G1V9x8U//GMgyho6R BF+knI0A8QB/cCkuao3qTUskC0hE6EXOKl0yoRLm3r26Nf0f3FPTWw4WGr1cWMCqE0QZ TCTe7RTKTlcq0WVYD6lpKDgi7PBpv+EH4Io5BfoZcLvGxypjJEXKVv4byTD6tiLNDqzx zbXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=MupD0bbz; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-67252-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67252-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t17-20020a17090340d100b001d8a94d10d9si1320408pld.448.2024.02.15.08.03.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 08:03:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67252-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=MupD0bbz; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-67252-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67252-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AAA01290E80 for ; Thu, 15 Feb 2024 16:03:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 798021350DE; Thu, 15 Feb 2024 16:01:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="MupD0bbz" Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEA5013399E; Thu, 15 Feb 2024 16:01:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.165.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708012911; cv=none; b=Avz+LX4aJzIzyq7ra7wd4Jwp1t/QSOpjOCR58xVefsdjCvEyKYDLiHasfFkJaI2Zea/TysTnq17uRIN0dUOJxFr9i8b22fFHEITqGpUlEPWGWh/ulYhs6RNUW9AHotGDAf3rEsRy+SoZIA0X6mRs1oGIPiuqc1Tz3YSj2RBxH7w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708012911; c=relaxed/simple; bh=Xo9WnM9493Bm4oY4MEkdUim500HA8+J/7lGWj8KvKaU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K3B4nt1EvQ3u1o5sWpMYeNLB2/9zafBHUgb7/a4AkdwU00YOdAq2T/eBEDtBoLULVRZJbrsQQQG09ceZCQ1ASGA8/nQ97e7Oc4tPHaVLyqZFJBLQyh2xEfftFmzYk54L6hf8wyt6vu5JjT+V33gNDkKA9VSdnjm1a6AKUmBf86M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=MupD0bbz; arc=none smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41FFTS7Q006052; Thu, 15 Feb 2024 16:01:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-11-20; bh=saWiS+8K1cygqHiQXZAlnKyAJWO/e2zPPqHJyjJ7EyQ=; b=MupD0bbzprxVOlTYGacXFVKrsQ4lXxUz+uLbFX33oX6oAHdprRurmF+vs6iuZjf4ahGA EA86E6+7EoOxBh1QMJPnbjzxMBaa0/3fbOIXD7IjxNGpS5Tupn3w4bmA2YnPwawcA9x0 o2RSMvgzLarmF5Xg7UqZJUhueb9oVI0gQV7sxvmQDhsIRoCzzM1CuJ5N/pXK7LSLDORG E3t+cqbz+L4DwAaQCTdM6ifiLQNZPPTp446Kma+WvjwvpZXkW5KKHWDNxL7gX6Kg49CM ozXPaM0Vcxhew9RNB5TNonzIdureRSOtklcrVpLRLc138ZS0zG8fs3SpBfc/Az4vdyzc Bg== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3w92s72h72-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 16:01:43 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 41FExkjD013877; Thu, 15 Feb 2024 16:01:43 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3w6apdkewc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 16:01:43 +0000 Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 41FG1cZY031601; Thu, 15 Feb 2024 16:01:42 GMT Received: from alaljime-dev-e4flex-vm.osdevelopmeniad.oraclevcn.com (alaljime-dev-e4flex-vm.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.249.106]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3w6apdkep6-4; Thu, 15 Feb 2024 16:01:42 +0000 From: Alejandro Jimenez To: kvm@vger.kernel.org Cc: seanjc@google.com, pbonzini@redhat.com, linux-kernel@vger.kernel.org, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, mark.kanda@oracle.com, suravee.suthikulpanit@amd.com, mlevitsk@redhat.com, alejandro.j.jimenez@oracle.com Subject: [RFC 3/3] x86: KVM: stats: Add a stat counter for GALog events Date: Thu, 15 Feb 2024 16:01:36 +0000 Message-Id: <20240215160136.1256084-4-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240215160136.1256084-1-alejandro.j.jimenez@oracle.com> References: <20240215160136.1256084-1-alejandro.j.jimenez@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-15_14,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402150128 X-Proofpoint-GUID: twgFqR75LUrbW0Xlv5Pf4z4UXp1zkY80 X-Proofpoint-ORIG-GUID: twgFqR75LUrbW0Xlv5Pf4z4UXp1zkY80 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790981424679230249 X-GMAIL-MSGID: 1790981424679230249 Export a per-vCPU binary stat counting GALog events received. Such events are specific to IOMMU AVIC, and their presence can be used to confirm that this capability is active. Also, exporting this statistic is useful to assert that device interrupts are being sent to specific vCPUs, confirming IRQ affinity settings. Signed-off-by: Alejandro Jimenez --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm/avic.c | 4 +++- arch/x86/kvm/x86.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index b6f18084d504..74e08b57f2e0 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1565,6 +1565,7 @@ struct kvm_vcpu_stat { u64 guest_mode; u64 notify_window_exits; u64 apicv_accept_irq; + u64 ga_log_event; }; struct x86_instruction_info; diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c index 4b74ea91f4e6..853cafe4a9af 100644 --- a/arch/x86/kvm/svm/avic.c +++ b/arch/x86/kvm/svm/avic.c @@ -165,8 +165,10 @@ int avic_ga_log_notifier(u32 ga_tag) * bit in the vAPIC backing page. So, we just need to schedule * in the vcpu. */ - if (vcpu) + if (vcpu) { kvm_vcpu_wake_up(vcpu); + ++vcpu->stat.ga_log_event; + } return 0; } diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 2ad70cf6e52c..6a1df29ae650 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -305,6 +305,7 @@ const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { STATS_DESC_IBOOLEAN(VCPU, guest_mode), STATS_DESC_COUNTER(VCPU, notify_window_exits), STATS_DESC_COUNTER(VCPU, apicv_accept_irq), + STATS_DESC_COUNTER(VCPU, ga_log_event), }; const struct kvm_stats_header kvm_vcpu_stats_header = {