From patchwork Mon Jul 12 23:58:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongli Zhang X-Patchwork-Id: 12372593 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70471C07E9C for ; Tue, 13 Jul 2021 00:00:37 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFA7061158 for ; Tue, 13 Jul 2021 00:00:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFA7061158 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m35qm-00070V-0I for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 20:00:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m35ot-0004Jr-FM for qemu-devel@nongnu.org; Mon, 12 Jul 2021 19:58:39 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:23552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m35oo-00031m-At for qemu-devel@nongnu.org; Mon, 12 Jul 2021 19:58:39 -0400 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16CNlI93002492; Mon, 12 Jul 2021 23:58:32 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 : content-type : mime-version; s=corp-2020-01-29; bh=9HxkYQ/O+HsJdfuUzZPsIevzuoCcFFrW4Ae/+4BJcw0=; b=cxzTWKJ4VaBsvuY6fQmuSiWpUSTMwJHKVIyPuze0AIQWJLUELG4JxZup12Rfz9X6TYmD Bp9FYJ/nGg50ROxIcoOSzj0bSQJ20l4/MnhZJetBYNn3kPiO20KUm6DngSiitBr54lwv MbgjVNuZD8lMe7ncAZPD3jhdnRRbYQz8+r8oexXeJLsafpJrsXhSV5tiy16z8Xd1g7wz KfOL7p0QM6WgcyjzO55od9bz2T1wi0vd8t2A9mMl8KSlNzGuUJlHs2BLI3rIRWim4FU+ q6rAAHPTDuMlqk/LCqnd9OXZpVJACCTlIc+z6oIWdEYc0TD+xXoWHtzEc7gaa2zDK8DY xA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 39r9hcjdm3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Jul 2021 23:58:29 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 16CNosEf167701; Mon, 12 Jul 2021 23:58:28 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2176.outbound.protection.outlook.com [104.47.55.176]) by userp3020.oracle.com with ESMTP id 39qnavtx6v-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Jul 2021 23:58:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m9UMrBggLdc3tVESCuOuR0i9iEShta/0t4yf+wJPGzzr9FjRACFEObiNYK3yQUDum86jaGTXIXhkMdVbtXGQU1Jz/DI8CH1Xb4gD5LqPMgW56F1fTM2BaAvN+hP/9kh+zqHFnWX8MawZ+acWxy8HxRqSYTU5SybyOnJxTGGEhKJoLvcpmx+BJSwA3W1yMnpLseQpGnM3H4mtdTY1SXdSqDZ+3ZrQIGflfXVfDImPvYi4By155g1CBFdNPhwk+oy0/z7JhJ0T+3wgWsBYx16oCG7GThbOhWVHwpSvI/byURWCcQuzV0w1K2DInD2Cy0eO3zT8CPZw97ArO3BJGoVSrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9HxkYQ/O+HsJdfuUzZPsIevzuoCcFFrW4Ae/+4BJcw0=; b=PXDeQ0MfHL7TaZiZ8VZZGolAEL82qAd6ZAuA66p7iul+AkBRb7BDI9OvqAfR5B/civcJ93eTOUJk8BhiwtRJ9scfd0NPj18FVGa5J239lahGb1FnkNRrlU/R8MK5FsYUwKtca1iUlpuXju+Zbdm5fmE4hjVoyRz4rY+RCiOsijtEC0GpblVtkHA4W+ZTQD57v76P5ySyDxm+OsFpWd6+kLZjHF6i2nZHHNuPkmBmVFsTlCYDyyt5pnrdI/VNhNhe7RwBusbZpPymlCeuLkNEJ369sQedzzsOFEn5muCBP7IDjLH6IxVYZRxVujqPmh7ZRADFtLDvsBrlz6ENSGQDIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9HxkYQ/O+HsJdfuUzZPsIevzuoCcFFrW4Ae/+4BJcw0=; b=ojL1jOKLX9aDU61cvJ0QPMSEiJhXUM4/kfjfRaEzinObqx+EzLmMPGlvzRs781Bj44Qbucegrb26HfsX5lxM6gH0drzTvXlg9ZLLhBpTwzN/o76u8FTSpKJiJOrOoDI1t+iysjmyYD1ZiE3vCVISm2+1dLI4moiFng7lgop5PU8= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) by BYAPR10MB2598.namprd10.prod.outlook.com (2603:10b6:a02:b1::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.26; Mon, 12 Jul 2021 23:58:26 +0000 Received: from BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::18a:7c1f:bf20:ba6c]) by BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::18a:7c1f:bf20:ba6c%3]) with mapi id 15.20.4308.027; Mon, 12 Jul 2021 23:58:26 +0000 From: Dongli Zhang To: qemu-devel@nongnu.org Subject: [PATCH RESEND v2 1/3] msix/hmp: add hmp interface to dump MSI-X info Date: Mon, 12 Jul 2021 16:58:10 -0700 Message-Id: <20210712235812.19725-2-dongli.zhang@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210712235812.19725-1-dongli.zhang@oracle.com> References: <20210712235812.19725-1-dongli.zhang@oracle.com> X-ClientProxiedBy: SA0PR11CA0019.namprd11.prod.outlook.com (2603:10b6:806:d3::24) To BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (138.3.200.16) by SA0PR11CA0019.namprd11.prod.outlook.com (2603:10b6:806:d3::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Mon, 12 Jul 2021 23:58:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 48695a3c-e0e5-4308-a4f6-08d94590f063 X-MS-TrafficTypeDiagnostic: BYAPR10MB2598: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:256; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Zio8NkLnOsM+3wiUU7xHKE2if+u9KqA/fwgB3MbjPBsdcPhYt2Z7SrzZpYd7s+Gjqc4BZiSQNsEQI8R+H+i5vVTxIZjd2KlAjVl2KfSBBgq7X2vhmyGVlqKg092Yu20AiPc1OqUz6bI3HsXu/D5FUJgB8pQPR+si4f5ViU5F+uxhhbXabI4h7QAwA8zkpd00lPgcBuzP5Y0ZI5uaRwwfvD9nMbvr9VU1+xsbNqRHf61iOmfHGKb3EnQNzW76rYhq48wy+/00Hi3grlkJaPGS3n+RNGnfxlyFKO53Dos2/9WcBdRFdBOhcfaOfQ5WlI/j0pz69v1EAlkAynuZfeEKDJ8/Zh9YY4zA9j7cPa7pUMBTL2rKqRh0mmertKBP/yOux/qC+ZruPY8l0qVC8cI3lZpKTFntQakCa4sx75SUZtLRBheEIBO3ymwuVZnEBIoN98VMuS1mfEneOwuHbLUnCGAY/Q6EbZAlC5R3LnNlAm5AOjdcVFb8xvs2bg29JmInCsw2L7nIqNxugqX76ZkfuC1+3x/n2YovjaYYp14RDEiBkvZROzEmEn9VKAUiHNshx0uVlKvesglzfBUaaoZyitR1oh9ez33JeH9xgmVOI41O5Y5U5Y+nZ7zmP/LErrSyVwW10mE4jnY1kb6RCAgxrqLHwCStBtqlqJRh9bYhtQlGNhXOlOv0VYsxYY6zfWpl2ApaFMne6CqVSOj1bDxiVh9XSseJqdG/HxxlVf7b8UU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR10MB2663.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(39860400002)(136003)(376002)(396003)(366004)(5660300002)(6666004)(86362001)(38350700002)(38100700002)(52116002)(6506007)(66476007)(44832011)(66556008)(66946007)(6486002)(36756003)(956004)(2906002)(83380400001)(2616005)(8676002)(107886003)(186003)(6512007)(6916009)(4326008)(1076003)(478600001)(8936002)(316002)(26005)(309714004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: S6+zsMqb8UUW9LjQztAYPKUYRhs1BZTCY07poudi1o7bWbDS4/t+Jdj52So1LD+7/OWFUJW3l9vSnztd668gZT7G+cfZwn/bZ1V0aX6D5ZWM+oesvJw4+kcq31ELVRLC40qnqa2Ul0QuhUw8QvkROkvAB6+DIpRaWPWxKoF9tZeh3qqDlLjcyGSDVLKvo0qd6HP/fz3WSPfecWUG0/DyL3/Doa7iDOp4pRzE6e+JTCYnA37AbLnQujECr2/UcJf/AkFUEaDWTRdTYnOXIB/gwXiaxh80VEFSeTuXRP1T9mKAsijLWmSnD1BRniIgj41B20bxuv6teTCbmqEYUg0gT+k/pdMNCZrdYm2a3xM40xD9anYwUgqOD+Y+CJqwRajVMpqNt7gqb3O5IvBZG7UOp7sr3qnoAJ/PzvW9kgbBZsNmm2fLST5x4Muz/nj5D9NWYij8KIjZOlLlkyqQ4lMWjbTvafpZiMudmlvWCW0qGov4aUWL8Ud67Afegb1f5q2GExPIC+Pl3pKdjNWyTf9VA7gFFYLLh4qumxnlQftlhGSt8dg1/Yi3Rp3hulndUV5VTRjzWhKVuTxZUc/DDOvC5tX5S6oCaR4diMTNF926v7LZGGxKo1fa25WybMAtMl/SqTuV+IBeeJdmzIZlszUYgCSR2Pi1YhwRNdVSccRLSvXzfbHdgnlyTYnHTADqpkOre5m/U3x+2NQcH0lv1h1TM3U2se30V7WQvrCAbQoZqELocBBRyZEXLzqVMQBFa6+xqaSB8G2K9rpEeapjW2W2IX2DnbVMdpUnUDPAbH/SpMloHFj0YgU5vKrYr53Cu9QnKSBHnvYy3gLa5KqWvbJPu+l7cMHvVYvBIlxLJLpsF2yThtCq/b87z06k+IwphiKdgXXXnony+3tenRnKzzch4HueXNwTz2zgFj1NrMtW7mH7MZVv15W0x0d8k29QowHOmy6wyGAjuEagKP8eB/spsPI9qoIHNPZa5HWAW7n/pgdDrODXcD5dzWqt/9lAZ/NpZ5Mazxy8gkNbTaZzjCfjU9KpFNFV+FXQYCCQ81O8XO2F2lwPVhv0u8q8PkRbXMAeVUAMvvrPML0NwyBOuDy7+h0TB3YTOKCKyTMjPjWLgzPS58ZD0gsVBqbpYryRfl+loFbMS3oSgRAGCKC/ta1hIrqw0Kf45PP8Q6x3CG+RRPfI/fb0AdDENwcAJdK2EOMqKxiv7P+EAnqZanc9mFNTqTF2To8tCsM0VCiWSFhlcvOZzEY5iHCi9nDoacG39xl4ttrUR4yo9iG7kFbnLhwzN5+HabFrWATR2si/VLVm5bEXScy+/PQLBWWVILQ3Ie4Q X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48695a3c-e0e5-4308-a4f6-08d94590f063 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB2663.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2021 23:58:26.1814 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R95gDXz6Zhq1CbHK3ZOKZQ6syOvwdEThUKPftC3m8bHeLfNkqhZdwUxkw2LTMBpFIifnidW6dpzUr2Qk6eSQqQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2598 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10043 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 mlxlogscore=644 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107120162 X-Proofpoint-ORIG-GUID: wiYy0dE39_Dh97i9eCUgNA2bJxK75wMm X-Proofpoint-GUID: wiYy0dE39_Dh97i9eCUgNA2bJxK75wMm Received-SPF: pass client-ip=205.220.165.32; envelope-from=dongli.zhang@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, jasowang@redhat.com, joe.jin@oracle.com, dgilbert@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This patch is to add the HMP interface to dump MSI-X table and PBA, in order to help diagnose the loss of IRQ issue in VM (e.g., if an MSI-X vector is erroneously masked permanently). Here is the example with vhost-scsi: (qemu) info msix /machine/peripheral/vscsi0 Msg L.Addr Msg U.Addr Msg Data Vect Ctrl 0xfee00000 0x00000000 0x00004041 0x00000000 0xfee00000 0x00000000 0x00004051 0x00000000 0xfee00000 0x00000000 0x00004061 0x00000000 0xfee00000 0x00000000 0x00004071 0x00000000 0xfee01000 0x00000000 0x000040b1 0x00000000 0xfee02000 0x00000000 0x000040c1 0x00000000 0xfee03000 0x00000000 0x000040d1 0x00000000 MSI-X PBA 0 0 0 0 0 0 0 Since the number of MSI-X entries is not determined and might be very large, it is sometimes inappropriate to dump via QMP. Therefore, this patch dumps MSI-X information only via HMP, which is similar to the implementation of hmp_info_mem(). Cc: Jason Wang Cc: Joe Jin Signed-off-by: Dongli Zhang Acked-by: Dr. David Alan Gilbert Acked-by: Jason Wang --- hmp-commands-info.hx | 13 +++++++++ hw/pci/msix.c | 63 ++++++++++++++++++++++++++++++++++++++++++ include/hw/pci/msix.h | 2 ++ include/monitor/hmp.h | 1 + softmmu/qdev-monitor.c | 25 +++++++++++++++++ 5 files changed, 104 insertions(+) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 27206ac049..ce5c550d44 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -221,6 +221,19 @@ SRST Show PCI information. ERST + { + .name = "msix", + .args_type = "dev:s", + .params = "dev", + .help = "dump MSI-X information", + .cmd = hmp_info_msix, + }, + +SRST + ``info msix`` *dev* + Dump MSI-X information for device *dev*. +ERST + #if defined(TARGET_I386) || defined(TARGET_SH4) || defined(TARGET_SPARC) || \ defined(TARGET_PPC) || defined(TARGET_XTENSA) || defined(TARGET_M68K) { diff --git a/hw/pci/msix.c b/hw/pci/msix.c index ae9331cd0b..4b4ec87eee 100644 --- a/hw/pci/msix.c +++ b/hw/pci/msix.c @@ -22,6 +22,7 @@ #include "sysemu/xen.h" #include "migration/qemu-file-types.h" #include "migration/vmstate.h" +#include "monitor/monitor.h" #include "qemu/range.h" #include "qapi/error.h" #include "trace.h" @@ -669,3 +670,65 @@ const VMStateDescription vmstate_msix = { VMSTATE_END_OF_LIST() } }; + +static void msix_dump_table(Monitor *mon, PCIDevice *dev) +{ + int vector; + uint32_t val; + uint8_t *table_entry; + + monitor_printf(mon, "Msg L.Addr "); + monitor_printf(mon, "Msg U.Addr "); + monitor_printf(mon, "Msg Data "); + monitor_printf(mon, "Vect Ctrl\n"); + + for (vector = 0; vector < dev->msix_entries_nr; vector++) { + table_entry = dev->msix_table + vector * PCI_MSIX_ENTRY_SIZE; + + val = pci_get_long(table_entry + PCI_MSIX_ENTRY_LOWER_ADDR); + monitor_printf(mon, "0x%08x ", val); + + val = pci_get_long(table_entry + PCI_MSIX_ENTRY_UPPER_ADDR); + monitor_printf(mon, "0x%08x ", val); + + val = pci_get_long(table_entry + PCI_MSIX_ENTRY_DATA); + monitor_printf(mon, "0x%08x ", val); + + val = pci_get_long(table_entry + PCI_MSIX_ENTRY_VECTOR_CTRL); + monitor_printf(mon, "0x%08x\n", val); + } + + monitor_printf(mon, "\n"); +} + +static void msix_dump_pba(Monitor *mon, PCIDevice *dev) +{ + int vector; + + monitor_printf(mon, "MSI-X PBA\n"); + + for (vector = 0; vector < dev->msix_entries_nr; vector++) { + monitor_printf(mon, "%d ", !!msix_is_pending(dev, vector)); + + if (vector % 16 == 15) { + monitor_printf(mon, "\n"); + } + } + + if (vector % 16 != 15) { + monitor_printf(mon, "\n"); + } + + monitor_printf(mon, "\n"); +} + +void msix_dump_info(Monitor *mon, PCIDevice *dev, Error **errp) +{ + if (!msix_present(dev)) { + error_setg(errp, "MSI-X not available"); + return; + } + + msix_dump_table(mon, dev); + msix_dump_pba(mon, dev); +} diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h index 4c4a60c739..10a4500295 100644 --- a/include/hw/pci/msix.h +++ b/include/hw/pci/msix.h @@ -47,6 +47,8 @@ int msix_set_vector_notifiers(PCIDevice *dev, MSIVectorPollNotifier poll_notifier); void msix_unset_vector_notifiers(PCIDevice *dev); +void msix_dump_info(Monitor *mon, PCIDevice *dev, Error **errp); + extern const VMStateDescription vmstate_msix; #define VMSTATE_MSIX_TEST(_field, _state, _test) { \ diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index 3baa1058e2..97c040a3c8 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -36,6 +36,7 @@ void hmp_info_irq(Monitor *mon, const QDict *qdict); void hmp_info_pic(Monitor *mon, const QDict *qdict); void hmp_info_rdma(Monitor *mon, const QDict *qdict); void hmp_info_pci(Monitor *mon, const QDict *qdict); +void hmp_info_msix(Monitor *mon, const QDict *qdict); void hmp_info_tpm(Monitor *mon, const QDict *qdict); void hmp_info_iothreads(Monitor *mon, const QDict *qdict); void hmp_quit(Monitor *mon, const QDict *qdict); diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 721dec2d82..7837a17d0d 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "hw/pci/msix.h" #include "monitor/hmp.h" #include "monitor/monitor.h" #include "monitor/qdev.h" @@ -1005,3 +1006,27 @@ bool qmp_command_available(const QmpCommand *cmd, Error **errp) } return true; } + +void hmp_info_msix(Monitor *mon, const QDict *qdict) +{ + const char *name = qdict_get_str(qdict, "dev"); + DeviceState *dev = find_device_state(name, NULL); + PCIDevice *pci_dev; + Error *err = NULL; + + if (!dev) { + error_setg(&err, "Device %s not found", name); + goto exit; + } + + if (!object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) { + error_setg(&err, "Not a PCI device"); + goto exit; + } + + pci_dev = PCI_DEVICE(dev); + msix_dump_info(mon, pci_dev, &err); + +exit: + hmp_handle_error(mon, err); +} From patchwork Mon Jul 12 23:58:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongli Zhang X-Patchwork-Id: 12372589 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FCEFC07E9A for ; Tue, 13 Jul 2021 00:00:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1D7761158 for ; Tue, 13 Jul 2021 00:00:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1D7761158 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m35qj-0006xm-Fk for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 20:00:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m35os-0004J1-7c for qemu-devel@nongnu.org; Mon, 12 Jul 2021 19:58:38 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:46890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m35om-00030O-Vf for qemu-devel@nongnu.org; Mon, 12 Jul 2021 19:58:37 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16CNkXuu027063; Mon, 12 Jul 2021 23:58:31 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 : content-type : mime-version; s=corp-2020-01-29; bh=TyB3YHk5pbJuNdHCnsEOD1oq20ebr4PwcsqUnGIM0ik=; b=yvQQtKb4njueuFaruvbWKLKt89ekQurv6uL5Pi47QMyblO4rFjg48NUHn28Pl8NmEIP3 PGRn61PrPavqxjDro1t4mNlNzLjlCCbYZVuYCOSdLNSCcUwjajdb5/32z6mpFbkmv7ra VDg4SXSNo4/7UVa8gAtYCL0DIm/1MaqF2RfjiOka+xStLVfjYEFsc0L/2ooQv/Br1KRC ConNZDLPHmILNUbBb1mkxVfIi2uUYfbIZUDaQcnzSlynq3y7dEfTowzIrAvp3H885MQH hGFmLfqtsKAWKdjHqjS7J50a4ujJaFz0xbgrQzGkRbI4/mmMLGRyRXHIVSP8KGVWtCDR Xg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 39rqm0s497-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Jul 2021 23:58:31 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 16CNon9D078762; Mon, 12 Jul 2021 23:58:30 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by aserp3030.oracle.com with ESMTP id 39qycten6x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Jul 2021 23:58:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RTRl55a08AJAqod7rE+D5kBlFpnaxktY46RBc94nC1ijoef/fqjdjJul5QHIcl6MU7FdX8z0a5iERqzwz7X+IwNY0fsZXilv0/eiKAba/yNryIjv5mTiT4IPVKyFCZWkU3gBDO2X5qNh3NjY4d8M1njDuvZbdJwA3tNEGDKAfLTLGUE/rNvBZnXx0NpYz8fkNeeAAqn21Wvz+nxIYdT5TyeitKcI5gWQa5tVnd8oc764TOjtzWg8d5gt7Jc9VFuEbydstFx+UIgCerzSW2COJxO54Y00aVb7Qh18Le9pFWzx0WqHsXbvI+RhDtX0jbYGx7nzu9GoPRXyk+5nY5gN+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TyB3YHk5pbJuNdHCnsEOD1oq20ebr4PwcsqUnGIM0ik=; b=VgV1+JJCvYaMbM/8jXuMOua09Yfr98h9MDgEGqU8Yb0N8PGhqRYfKAAJc2BrNqjDG0t+/Yg3j78202O8hWaMYKSL543kfHN2/3LZQsGyjKYMUBcJYkpRxjPV+Qvf2SNo897FNQeYz/F3ixGb2IRH+eEoD4LygbY9qIFXIzZcksRPo4VWh5BeZZXtDTNEN2v3dJmn0C7jpRT9Ow83hZUKz7TIIaCPnwYPvf/RNMcvlG+guJBTiIiPZveAyStiUjdER4kEovMFeBJFc+2iMEBh+MYLJwuIMpHVwmHZ3ximB4gXpL6bb7Oo3pOnMqPz314pjbTwAGZwHkQQZcqCTM+AIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TyB3YHk5pbJuNdHCnsEOD1oq20ebr4PwcsqUnGIM0ik=; b=ejB47ubpuREXqujMypcy1qdg7rO3Kwl3eHLqg7TVz9krUnP8tosYtlJRjFs4Ormd78zQEgUcD9oS0YRhP3DaUlvZc4bWzUEVs3Xaz9BObe4D9J1EXwwowPbYy6qANxmRZN6QIODieC/7OU5G5yFzvWMrQ0z0EcWZupLerYpmVsY= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) by BYAPR10MB2598.namprd10.prod.outlook.com (2603:10b6:a02:b1::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.26; Mon, 12 Jul 2021 23:58:27 +0000 Received: from BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::18a:7c1f:bf20:ba6c]) by BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::18a:7c1f:bf20:ba6c%3]) with mapi id 15.20.4308.027; Mon, 12 Jul 2021 23:58:27 +0000 From: Dongli Zhang To: qemu-devel@nongnu.org Subject: [PATCH RESEND v2 2/3] msix/hmp: add interface to dump device specific info Date: Mon, 12 Jul 2021 16:58:11 -0700 Message-Id: <20210712235812.19725-3-dongli.zhang@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210712235812.19725-1-dongli.zhang@oracle.com> References: <20210712235812.19725-1-dongli.zhang@oracle.com> X-ClientProxiedBy: SA0PR11CA0019.namprd11.prod.outlook.com (2603:10b6:806:d3::24) To BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (138.3.200.16) by SA0PR11CA0019.namprd11.prod.outlook.com (2603:10b6:806:d3::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Mon, 12 Jul 2021 23:58:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3f4c57f2-e868-4681-cffb-08d94590f121 X-MS-TrafficTypeDiagnostic: BYAPR10MB2598: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:183; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FIWX2UNTZvKZ+2yPiyYi+3UwCctOaUjMkX5YYs9Y8Vh++zcIIId3NJvl4EhFjojom/5pMspKcV1aBMuQIm3LUde4bzyjS9V2Y5HBlTAxcYXYfqxE73TiXoaBI2GVfJsrutfxMydlnZzsXIaJNz/x9OCY59e2rR/xEfxZVsF0bh6JkHgA+Z3sqaMYJYXRU11g/osnvbkJPtM+0GBZEx+0pM1+7fUVeZKhqSTEs1r8ACIDCGTqHYZgy6TY/ZjcdpsAmW+CUXfkwfZM0Zqk2ErkgPHxxnNSVr1y1OrWIJGkQLPgrdv9ac4ta/S43IZrwxdrMhgYVO6S8R+K9+H4ZlxiFMG2RFP33ujKUOG/jlvbw8Dtw2LhZqZhUYpQt0j32Py7EdxDuXI6BaPcHE9CqDWEzaEo6scfbVoOur997EhF7LlepkhP35yfrPtNqxQ0pP1De04UzFo7s42Umq/DHWecvY5UI1ASun+BnhLhh93L0oAqYDQqcm1dKwW8NINvM8b/XtEHIl+/GbSX6279eiJ5AWFp2wkPd5/dDb/rh0sPmtu9qkmnFnVmp1jfZ0pwvD9oM6ufONGiBOXm/ZBC6V7LGNg2dZ5UDIIpx4z3PY34cl2LraVOm0uFFtEstx77MpY1dIgasbxkUhFfZScFjCCs/OpDWq+wE6uILzIwoATZ/5US4Dhdgu+yl1IoZYQRzLzNZjz0BmhDwlWw2nISn4kGjg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR10MB2663.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(39860400002)(136003)(376002)(396003)(366004)(5660300002)(6666004)(86362001)(38350700002)(38100700002)(52116002)(6506007)(66476007)(44832011)(66556008)(66946007)(6486002)(36756003)(956004)(2906002)(83380400001)(2616005)(8676002)(107886003)(186003)(6512007)(6916009)(4326008)(1076003)(478600001)(8936002)(316002)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +HVW56ZodZnONNQD8m4kAf0JnCRDUSzUCKDa1Zfnk/Hk0wbg7C0lWYv38XAhgslPlegIPw75U842QRRpdJCAVIUU5FuIaCQswiYIS00zguAM9rrCyOponPP8socvOI7WcVf+ZitQgQM46/azGIRZVxJA7ZkMtoIcHKH5ESZS9QLIYO2gS3kP3ME3grszFO365A58SizIKv9j0OakOVM+hRPdoT9GiHxNfA4oYei7qH4eEMXXQP2ELu2ns4r2yFeB4tn/0jtqo96wUlXN7dVKHnhTGbF5IXNWh4az7HVcU81j5Q94Nx6IKxsBqpo8EJnuAppVXSlaDTLpFbDoO9YrzcVIPxWp2o0ZXNScMTdkWQ9+afJL2dIDlpgdQ/9rE2KayVP+2oMSLIOiTqb1w81SDA0h9Mlp8RQrpd5yQnKAJoQ4ucaEik2M2fJxYo9P9n31Bb3vGrzEEHhne9mRkSdlQv/AELyZrLqqfmNTgXW9XN5J1GY2CrUCp0cPK01IDFVmdKFDC7GFFictXq17v34lVD7iyxdd2wQ0zBUIWTWw2cfs1lOStlUHo082f+pIFXkt4giZK72jeY2OWCHWwPqoBY2BXc/6s573WBHFd/Jexu7jq+V2MMLmYWOe9LwzV56iCmJq6T+gcH3WruX92McbhL7pcw0cRb4fe41QYLZpOsBfDjfFYTyw5r4xEq82HnCQB1M3pKZDbNTXPk2eZlN1euoW0Y6Ji855bj1YayiJxPRI1OYzitmpa48/nNx0lvzk0MBZCfvHRzhl5phvlANSqum+RjGdFD/+545cFvIooVT1EvodF2A+0Vid9FtaCqcYThEh2VlDAZ0Swt8ttz+aolyM7yq13nWtPeRSBwDGtxxz28Yb/zMncSN8+5JTCbyfgADJn3B4a6Coxz8hQPDsigE7RCq45luMYBsUWTs09m0KZge/pNpe6BZrXhAL0itci1QH6QIqvI/y67sS3keBgwj+rdk6nhvUQcQRLnR5TTxElXy8atu/bGJBF8nY18rfxitIo6U2g99DT3HiONL9VrJw2hTTcfEfr0F3UyYszJGMIrmc7PgW/xDw+p78GjNqUAg5Sn6axfqCZsWSxzvBTpVHoo37C6LNpls1n90xbtPyF9Lo1ji0s8RPMjCtWxRKrgtF79Y2+JH96uMmubbyrk3fVNCtFez2liVgUHV1EQ5QO97S/nFA4SXOZAQDzI7xEETbbX22XQ6pf1cFMWgE9bp/hK4V9bSwEwA/DEQXr77AecO70Fp9lJWuL9X8Mi5+O/Yd0znrfZfdvVMfYw9bd6ZzVgdR2Ahl/ijLJvByf2ldbAbDaQ9ziShMhk1YxZ7i X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f4c57f2-e868-4681-cffb-08d94590f121 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB2663.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2021 23:58:27.4107 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mvxNw2ajfNgG2nCcN1BaywiEh1nXP5hrAK0vxhDHKJvJVjbTbwO2jeuluFOJGgfRvoW/oUkhW7YtCzhV0GWEIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2598 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10043 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 bulkscore=0 mlxscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107120162 X-Proofpoint-GUID: PnoCFTqeiwEoADEhoMmuHsKwWj_su_Do X-Proofpoint-ORIG-GUID: PnoCFTqeiwEoADEhoMmuHsKwWj_su_Do Received-SPF: pass client-ip=205.220.177.32; envelope-from=dongli.zhang@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_BL=0.001, RCVD_IN_MSPIKE_L3=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, jasowang@redhat.com, joe.jin@oracle.com, dgilbert@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" While the previous patch is to dump the MSI-X table, sometimes we may need to dump device specific data, e.g., to help match the vector with the specific device queue. This patch is to add the PCI device specific interface to help dump those information. Any PCI device class may implement this PCIDeviceClass->msix_info interface. Cc: Jason Wang Cc: Joe Jin Suggested-by: Jason Wang Signed-off-by: Dongli Zhang Acked-by: Jason Wang --- hmp-commands-info.hx | 7 ++++--- include/hw/pci/pci.h | 3 +++ softmmu/qdev-monitor.c | 11 +++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index ce5c550d44..4e831d7ae4 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -223,9 +223,10 @@ ERST { .name = "msix", - .args_type = "dev:s", - .params = "dev", - .help = "dump MSI-X information", + .args_type = "info:-d,dev:s", + .params = "[-d] dev", + .help = "dump MSI-X information; " + "(-d: show device specific info)", .cmd = hmp_info_msix, }, diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 6be4e0c460..4620b9e757 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -129,6 +129,8 @@ typedef void PCIMapIORegionFunc(PCIDevice *pci_dev, int region_num, pcibus_t addr, pcibus_t size, int type); typedef void PCIUnregisterFunc(PCIDevice *pci_dev); +typedef void PCIMSIXInfoFunc(Monitor *mon, PCIDevice *dev, Error **errp); + typedef struct PCIIORegion { pcibus_t addr; /* current PCI mapping address. -1 means not mapped */ #define PCI_BAR_UNMAPPED (~(pcibus_t)0) @@ -224,6 +226,7 @@ struct PCIDeviceClass { PCIUnregisterFunc *exit; PCIConfigReadFunc *config_read; PCIConfigWriteFunc *config_write; + PCIMSIXInfoFunc *msix_info; uint16_t vendor_id; uint16_t device_id; diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 7837a17d0d..7fd3fe0ada 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -1011,7 +1011,9 @@ void hmp_info_msix(Monitor *mon, const QDict *qdict) { const char *name = qdict_get_str(qdict, "dev"); DeviceState *dev = find_device_state(name, NULL); + bool info = qdict_get_try_bool(qdict, "info", false); PCIDevice *pci_dev; + PCIDeviceClass *pc; Error *err = NULL; if (!dev) { @@ -1027,6 +1029,15 @@ void hmp_info_msix(Monitor *mon, const QDict *qdict) pci_dev = PCI_DEVICE(dev); msix_dump_info(mon, pci_dev, &err); + if (info) { + pc = PCI_DEVICE_GET_CLASS(pci_dev); + if (pc->msix_info) { + pc->msix_info(mon, pci_dev, &err); + } else { + error_setg(&err, "Device specific info not supported"); + } + } + exit: hmp_handle_error(mon, err); } From patchwork Mon Jul 12 23:58:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongli Zhang X-Patchwork-Id: 12372595 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12CD7C07E9A for ; Tue, 13 Jul 2021 00:01:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 809D661154 for ; Tue, 13 Jul 2021 00:01:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 809D661154 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m35rA-0007CV-L5 for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 20:01:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m35ow-0004Rn-6y for qemu-devel@nongnu.org; Mon, 12 Jul 2021 19:58:42 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:47610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m35on-00031h-D4 for qemu-devel@nongnu.org; Mon, 12 Jul 2021 19:58:41 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16CNkXuv027063; Mon, 12 Jul 2021 23:58:32 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 : content-type : mime-version; s=corp-2020-01-29; bh=pOUOkrLDxwy08vEw86GdZvYTKurgDcLSp5cbw46jsJ8=; b=mQ0qKKEmyNVxNyshxYmWzz/G7GPSogy3BwNLYBsyzH9F7aCVpFwRlbSEMpYQfEPI2+XO ytGQPiZLKHXuAD2HgxyOsz+HejqCTMSZKBljm1ctUwe9nvOErMDt3gQ3208vkLMCd7yI SXAnIsP48lrvZilOhmU2fC+8KRBJ2VwV626/1PF7jsnBKDcGsKrvWOQpGNUQqZ0NJB5d ciDJWzNWxWMxaWnf4um2E4K/2tGWINcpwEFhikXGOJKcBKlsV6Yd+6RxAixKhPTv5Wm0 BqP91m8gWwKAYQf0ptjK5ZLRgXhtSRCNgXerO2r04jt6PjSl+zlg60A2G/UmWCFJZGQm jg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 39rqm0s499-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Jul 2021 23:58:32 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 16CNon9F078762; Mon, 12 Jul 2021 23:58:31 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by aserp3030.oracle.com with ESMTP id 39qycten6x-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Jul 2021 23:58:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GcX8vFEBiXvuNDzAtdPtENg6wu7CFurG+dj/cgsHA1TvEfeQ63XDPu48WL8CGDfOg1+4ytp38AivqZ3Srf8MnTs/CrBK/shq+vH3Xi1X0Jb732dMx16HfHZIq0rjNTIEkNIywZ8BrvomGB9Jy+gKpfxBRs1v2CujzcBC1BkK3ZMiN2wAEtc8OGTvwAf4DTaKIlsUgYKVjv4filvIrHinaHYjPLiNW42yqXVJCUuW2PsmehptHTFAa7OhF0bpkZ/jHFhEXIwN6GouC2d6Zm9e8O8py6v6NaS7oKFi2KZzawz6qCm3KgAEb0yaa76IElPiFw73RYEAWirvL/Kf3dWERQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pOUOkrLDxwy08vEw86GdZvYTKurgDcLSp5cbw46jsJ8=; b=bidOp8kgZiS1iVyJjdFNx8+sFlfAKBRdiXGPdKFprg1DKHAn/BM0U2OS8U8TgN53ipOC3TaFrSE/ar4hO1n/LPdfpygguOYZvkgt0qWZiUlv5oP7iYF0wOUBQoEv9wxHsExiCO5DwwCWVrPL+Ata/tTG2ZFKa0/SV+BfLX+J60vKNwrVVk64AdN7P1mqwV8/FcfE1y58YE4AJVRV1jHpecPSm4baSB0LXPk0u8ee2M/n7KzovasGG3ZQ7QZnblMAQ7orMZZo8q7J9uXMHyonJlmZKIFR6mqbWDdFIcjupb6BCdqeC4JLQpWgi3WWoJvkxV5UxzSH7VFPCzsqvnPiSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pOUOkrLDxwy08vEw86GdZvYTKurgDcLSp5cbw46jsJ8=; b=Ne8aWjcKL18mMRXRHlFSeHXceJiZqIuiGMRAsOD7KRhImp1bacjm1W00iyqfYUvyKqM0FvIuTlp51XyAZGkXD9wDrDWZT1q9sxGavdvR9PCHjr1HLdvQ2ijsC4NZHMXastI6Nlvj+oU6Zh/o+QmtUIghplQipNJ9kDZdAiQt8OA= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=oracle.com; Received: from BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) by BYAPR10MB2598.namprd10.prod.outlook.com (2603:10b6:a02:b1::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.26; Mon, 12 Jul 2021 23:58:28 +0000 Received: from BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::18a:7c1f:bf20:ba6c]) by BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::18a:7c1f:bf20:ba6c%3]) with mapi id 15.20.4308.027; Mon, 12 Jul 2021 23:58:28 +0000 From: Dongli Zhang To: qemu-devel@nongnu.org Subject: [PATCH RESEND v2 3/3] virtio-pci/hmp: implement device specific hmp interface Date: Mon, 12 Jul 2021 16:58:12 -0700 Message-Id: <20210712235812.19725-4-dongli.zhang@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210712235812.19725-1-dongli.zhang@oracle.com> References: <20210712235812.19725-1-dongli.zhang@oracle.com> X-ClientProxiedBy: SA0PR11CA0019.namprd11.prod.outlook.com (2603:10b6:806:d3::24) To BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (138.3.200.16) by SA0PR11CA0019.namprd11.prod.outlook.com (2603:10b6:806:d3::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Mon, 12 Jul 2021 23:58:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e09bea4-791e-4180-e5d6-08d94590f1d7 X-MS-TrafficTypeDiagnostic: BYAPR10MB2598: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:192; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kaCSghbBqhRU2YdKJEQ9rhAK3/EQaHRrsF3iIpdalfJI+b1NtykSNPFrkRuYnwT/yePaG0QBBDUY8ya7CXXUy03fcARGHiI1tiNdEeoUfxOCSmWYyIVMEo8adMgyKbetkxsvDx/uRWLSQwPcPXgfuB8idrJV/fDj7HfR+EDYk8xBpXeAeeuzhBC2MoJ/O5kgciclc03ZsR7TsGbwDxt4whCGE4BVJcCi4eZwsNQq8yOW8wz212LR4MszC7UTgsO7e0dH3780zsBb3woCo3r5LeieLaHeaLbnnL+AQWSfZr58fyUy/GMc9k+3vy8lSfbUCF35nm5p+gOeO8B+RhgIgh4TxuydJcLGEOR+6tLnnmoNuprjMWNLWPBCbVpZMqQPzWPOX3EpmlOX3s0/Uvb5r66vpGwu7Wyb5UACdU+wTC3/or9x+OU/Sko4+/Xt8r4zJReMdkrmGPJkigiHTHgKQMjdyqzNqJDW1atcwmQ6NBOjKWhs8fBvi/bg1b5wGo8QBCs8NJYh5N3yzlUodWxJAFTaBziXCyKAV9oj6hTARdc76immJuso4NcI7kmXrxRZ1699ypSZHaQA54OlTY3VIi+u/H4l37uNf01meRyHZGAwcNfg3E4KSFrEjuJ00hLmjbuTH2mA+5pa9YAC69GPOZ8W9NFMyOVRefzrDb3JOTSDqBHgv/gzI9li0jlCBAKWjsiY1vBscARfEejZwjKIsg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR10MB2663.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(39860400002)(136003)(376002)(396003)(366004)(5660300002)(6666004)(86362001)(38350700002)(38100700002)(52116002)(6506007)(66476007)(44832011)(66556008)(66946007)(6486002)(36756003)(956004)(2906002)(83380400001)(2616005)(8676002)(107886003)(186003)(6512007)(6916009)(4326008)(1076003)(478600001)(8936002)(316002)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kJJB+iMiLdYapweZiTcKbG++BIerxDecNsEWwhYf0+xh1P0eHQhs79MfHPov2H6rBZkjxbzD2dza80qP+q+Jizi6MkP2W11qh7zNF1GWsHII6MaMD0VWAdY32yQ7pgAnA6J7qNq/wnahOwWmHK3E81MQzay77ibzcCgYBcXfzV5iu98cyt0KkOiZl5VlEnVOLGfZ1eWeeWKCoQFuY0hCk7R1PRZ36cHx3NppJZWbl7kB2AJreaJroOAk1dBSyClO618mboS4TEIl7cRZFBzX+fT1SImfOHnTE9wGsQ8OYes2C4yTvgaMtZxe1YFTaeRr7W4OS9orb3n7aD/Up2JRbvy2rfcA38JkJlV2J/MeohL0ucBvkU7gBM8rgNcPGiErfgbBPeKZf/b6Ji7ycAjV2gVSsTHEcF1DyAPqfKUpQN3aPTSgqdoucdCW7gXDZgnJoJj+4i3kCVCF6EpPPIdrFPN22QJrtCt8mQbju6h3QeukcJ/lKGnTpyl8IGOK9znIvgxPKioktiJ4lRH8HqgV468kHNk2Md+EV4i0n4ZANyudwZ2GnxDk7wbF2X6l+hb0SmeKkN3qgXanWjCWrsL/xaSliOH+KAA1ubN3EUJUzzsEi7EZoQ0ryJEVB4wzPfTK+q4hi8F5MrfkHDwIUMOa1fD10IkwIAEKSKcj23gF6bP3XcaClAFREg2CZyuQGqskS8v+XspUIq+0aRohmdglqEFslS+KhWCPFcxKqOMLDUNYGx1Q6cQ91/7DoYkRTm+hCcg0Ov+ekCgZA6NNDMyu60gXI8DBuLFQ1pnAD2cot9Mw2Oy5EySsSBQX+aSJT60prHcawISWdpQd1PIbPMZyyFYweikOwovQoBNc4jMjPMJneUBkIgRGEkDKlEuWMh3RCe9C54T3rOWXS3TDwf4pm/wstIdShr8C/xZ1K5IMwnja/yp1+bSjboYCdOWVOL97uSMJEOu7IQswWr2IlWYRrgnR6hChx4DKuyzq+Hrc82l1Ia0jsXVxtP5dHyCGNni2td8RJY8kaCCJSuLJUhcfI3s/UFoBLerI2h3zcEZHSLND3VTU790raptdiBtkthWdF8tza9F9gblaB+Cb/OyQTQkV8RAZMLS8A0+7somo/nw3VNrC9DmMtvehV6cX5IpcTZh4+jP7c5+oXsc8TwnTKTHNByAwxqUDeALcMFlvIYOoEkr7JEbbYESBUkEFPKy8wP69+FDj8x3rL+ju6Eg6tXDXYAsHr4zKCtblOdp5AQjEqZNeMyqiTbm49iP6wTnkdTdAyMMEub12zajIO6KafgKX67ZNhKvGYqRuqeaxbMdRqeuXEyv8888RCJmxFgAI X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e09bea4-791e-4180-e5d6-08d94590f1d7 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB2663.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2021 23:58:28.5870 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sXioWNkqtf48G056hK65v2hp1pVfN4otDpzcieOmtN1SKn2IJkiW6N5TUOmwvulsvYo2SHxv0gZfzB/sEPWm5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2598 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10043 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 bulkscore=0 mlxscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107120162 X-Proofpoint-GUID: 5ZH8khKnzz_Qeb5fhgkFSkus8Rjxlreg X-Proofpoint-ORIG-GUID: 5ZH8khKnzz_Qeb5fhgkFSkus8Rjxlreg Received-SPF: pass client-ip=205.220.177.32; envelope-from=dongli.zhang@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_BL=0.001, RCVD_IN_MSPIKE_L3=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com, jasowang@redhat.com, joe.jin@oracle.com, dgilbert@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This patch is to implement the device specific interface to dump the mapping between virtio queues and vectors. (qemu) info msix -d /machine/peripheral/vscsi0 Msg L.Addr Msg U.Addr Msg Data Vect Ctrl 0xfee00000 0x00000000 0x00004041 0x00000000 0xfee00000 0x00000000 0x00004051 0x00000000 0xfee00000 0x00000000 0x00004061 0x00000000 0xfee00000 0x00000000 0x00004071 0x00000000 0xfee01000 0x00000000 0x000040b1 0x00000000 0xfee02000 0x00000000 0x000040c1 0x00000000 0xfee03000 0x00000000 0x000040d1 0x00000000 MSI-X PBA 0 0 0 0 0 0 0 virtio pci vector info: config: 0 queue 0: 1 queue 1: 2 queue 2: 3 queue 3: 4 queue 4: 5 queue 5: 6 Cc: Jason Wang Cc: Joe Jin Suggested-by: Jason Wang Signed-off-by: Dongli Zhang Acked-by: Jason Wang --- hw/virtio/virtio-pci.c | 22 ++++++++++++++++++++++ hw/virtio/virtio.c | 10 ++++++++++ include/hw/virtio/virtio.h | 2 ++ 3 files changed, 34 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 433060ac02..2971e8049c 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -38,6 +38,7 @@ #include "hw/virtio/virtio-bus.h" #include "qapi/visitor.h" #include "sysemu/replay.h" +#include "monitor/monitor.h" #define VIRTIO_PCI_REGION_SIZE(dev) VIRTIO_PCI_CONFIG_OFF(msix_present(dev)) @@ -1587,6 +1588,26 @@ static void virtio_pci_modern_io_region_unmap(VirtIOPCIProxy *proxy, ®ion->mr); } +static void virtio_pci_dc_msix_info(Monitor *mon, PCIDevice *dev, + Error **errp) +{ + DeviceState *qdev = DEVICE(dev); + VirtIOPCIProxy *proxy = to_virtio_pci_proxy_fast(qdev); + VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus); + int num = virtio_get_num_queues(vdev); + int i; + + monitor_printf(mon, "virtio pci vector info:\n"); + + monitor_printf(mon, "config: %d\n", virtio_get_config_vector(vdev)); + + for (i = 0; i < num; i++) + monitor_printf(mon, "queue %d: %u\n", + i, virtio_get_vector(vdev, i)); + + monitor_printf(mon, "\n"); +} + static void virtio_pci_pre_plugged(DeviceState *d, Error **errp) { VirtIOPCIProxy *proxy = VIRTIO_PCI(d); @@ -2004,6 +2025,7 @@ static void virtio_pci_class_init(ObjectClass *klass, void *data) k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET; k->revision = VIRTIO_PCI_ABI_VERSION; k->class_id = PCI_CLASS_OTHERS; + k->msix_info = virtio_pci_dc_msix_info; device_class_set_parent_realize(dc, virtio_pci_dc_realize, &vpciklass->parent_dc_realize); dc->reset = virtio_pci_reset; diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 874377f37a..ea54939e98 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -2581,6 +2581,16 @@ void virtio_notify_config(VirtIODevice *vdev) virtio_notify_vector(vdev, vdev->config_vector); } +uint16_t virtio_get_vector(VirtIODevice *vdev, int n) +{ + return vdev->vq[n].vector; +} + +uint16_t virtio_get_config_vector(VirtIODevice *vdev) +{ + return vdev->config_vector; +} + static bool virtio_device_endian_needed(void *opaque) { VirtIODevice *vdev = opaque; diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 8bab9cfb75..6746227f73 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -268,6 +268,8 @@ int virtio_set_status(VirtIODevice *vdev, uint8_t val); void virtio_reset(void *opaque); void virtio_update_irq(VirtIODevice *vdev); int virtio_set_features(VirtIODevice *vdev, uint64_t val); +uint16_t virtio_get_vector(VirtIODevice *vdev, int n); +uint16_t virtio_get_config_vector(VirtIODevice *vdev); /* Base devices. */ typedef struct VirtIOBlkConf VirtIOBlkConf;