From patchwork Thu Mar 2 08:25:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 658121 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp3937862wrb; Thu, 2 Mar 2023 00:25:36 -0800 (PST) X-Google-Smtp-Source: AK7set+Ut0lFMfUby/6jmKan7W21Qz3/ylDZjqWQdSyry1Npc03o1IvnHZ5ikNftCFIXj3CRc8zk X-Received: by 2002:a05:6214:d83:b0:56a:b623:9b09 with SMTP id e3-20020a0562140d8300b0056ab6239b09mr17363012qve.14.1677745536684; Thu, 02 Mar 2023 00:25:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677745536; cv=none; d=google.com; s=arc-20160816; b=aMR+BOfqTO2R7Zz1hgp2tTZ/MYX2/QIvfLpuicTF9kZlVIovJcTm9XVaX/CoEY6ACI fd3SulS0ZytYuLWt+jeWEpESN9aNVytP83AshcgQB0kw/+IKU/MIe3cVWB1IW+9Rilse NsnWZEkB8eMouwXBkyjG0DC0kHL8WjOkkplhnNhZCTs9eT/6RHy7t13hZcenXHYTebs7 DSYQOdWtjADwY6DZskBPC9BY97PvksPGBUOFtS8tt10j1csHnS3iGPuru4aMLENa9kGS IzMDD8v4vwoM0NonkU8oX2SLtk7Ypg05x3YjJePKtOuHzExpHD9H7nCvgqol8M76nnR1 CJug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2zjerUZt8B5fT3PtlV+vANrfuJpkyirv+ZgJLhS/Hnw=; b=e7VkQKs40T+f4S7hjPxGkigO5mg4Zj37Wt9QndUV0bfTE1XHAYppWSiV4fhm2rtYUY NkhaqnE4hUEkN75WUz+TfS6+uejd4Ptdkx7UjvhVcpSPISh7R7n3TURYTmanANU8SCbv Jk6o0dXGUHYLZx0ntDmUQhxVN1rO7Dwoo3OutCKF2aEz1TMmRmwXGuOxxktQXmQUQ06L AX8qQ6CWKDWjXaA8DQ23J/QtrZ/EpsEIaM4oPIB6PeSfnb1p/p0Y7MjXaZvg/VtyQnXZ CXFCkHEc0+f5CDSG24alJaoUmRPcOTJKFLAqFTstHEN1aXT7kPCYB0N9pQ81jyPTApRb R0Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ahp9JQCG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u13-20020a0cdd0d000000b0056eb3db1830si12621712qvk.559.2023.03.02.00.25.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Mar 2023 00:25:36 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ahp9JQCG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXeFo-0002iK-Ba; Thu, 02 Mar 2023 03:25:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXeFS-0002Ex-1H for qemu-devel@nongnu.org; Thu, 02 Mar 2023 03:25:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXeFQ-0002B0-6Q for qemu-devel@nongnu.org; Thu, 02 Mar 2023 03:25:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677745507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2zjerUZt8B5fT3PtlV+vANrfuJpkyirv+ZgJLhS/Hnw=; b=ahp9JQCGD7pvqKz5hS6ArsSdnXNEDEe8g8TlTmUV3acmMzUc+uDRSR60ZnrKwq+zohBGUr t77jJxzjJ7OBvHca0AWHddGPph1SVZJ6yUGcBfAC6yZkX9guto8LRKku0NGn61gfOXbfYy n6UzSHc9dDD4RmTzqxwTeoTtGAWcfTY= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-241-PTKf2_uUPKeNIR4WNJN6aA-1; Thu, 02 Mar 2023 03:25:06 -0500 X-MC-Unique: PTKf2_uUPKeNIR4WNJN6aA-1 Received: by mail-wr1-f71.google.com with SMTP id bh3-20020a05600005c300b002c70d6e2014so3054356wrb.10 for ; Thu, 02 Mar 2023 00:25:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677745504; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2zjerUZt8B5fT3PtlV+vANrfuJpkyirv+ZgJLhS/Hnw=; b=2OCgiCZf7llmVB/bS4pCQlaSLeiLAMckbQI8sve9aHCuMn4yxVPzOMDug6JdxFU62a rh+rZ130+u3yjVQ+kfLAC/HUdmTwz/DbmEmrSYceoHvzP3BekB+JkF5GrPAeEdl+QVXe IPt7wTGPK37bk0qzhTCZhqqzqW9/vNAYInsylput/hv8D2JC6MpT1zy2XLo9ZY8VLwCO O0G2KI9T9huSnFj5p5VtB+awCEhP8wM7Ny0ezklk3wr7HgubkV6CCVpaZjpQ2cPI+sZr ZeDSwStHx9Oc+Z3jep8QNN0eq4Ow97XQ1Oa4uoWVQWk+zivsACInvyLN7Vz/yQUKajBV VfCg== X-Gm-Message-State: AO0yUKXRJEwIinK2CueaNqvlxKK0ZGEBpJXy3enhyM40e7tvMOo3I2eD LmLLT2pVmICaRUfHlCD6HkM0yi2wv9CojkSvixrBdSGNG1SyGlMNoTmhRcyI/uToIsXERMPtwxO jyQ27T24xncGCKAA8ssYWtfx4N/jEVi7m8c/Dt0r2xmAeJ9/DT5s/BooMnNPKAy2jRA== X-Received: by 2002:a05:600c:92a:b0:3ea:c100:e974 with SMTP id m42-20020a05600c092a00b003eac100e974mr7734175wmp.26.1677745504754; Thu, 02 Mar 2023 00:25:04 -0800 (PST) X-Received: by 2002:a05:600c:92a:b0:3ea:c100:e974 with SMTP id m42-20020a05600c092a00b003eac100e974mr7734159wmp.26.1677745504539; Thu, 02 Mar 2023 00:25:04 -0800 (PST) Received: from redhat.com ([2.52.141.194]) by smtp.gmail.com with ESMTPSA id he11-20020a05600c540b00b003daf7721bb3sm2198394wmb.12.2023.03.02.00.25.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 00:25:04 -0800 (PST) Date: Thu, 2 Mar 2023 03:25:01 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= , Gerd Hoffmann , Stefan Hajnoczi Subject: [PULL 10/53] backends/vhost-user: remove the ioeventfd check Message-ID: <20230302082343.560446-11-mst@redhat.com> References: <20230302082343.560446-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230302082343.560446-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Alex Bennée While ioeventfds are needed for good performance with KVM guests it should not be a gating requirement. We can run vhost-user backends using simulated ioeventfds or inband signalling. With this change I can run: $QEMU $OPTS \ -display gtk,gl=on \ -device vhost-user-gpu-pci,chardev=vhgpu \ -chardev socket,id=vhgpu,path=vhgpu.sock with: ./contrib/vhost-user-gpu/vhost-user-gpu \ -s vhgpu.sock \ -v and at least see things start-up - although the display gets rotated by 180 degrees. Once lightdm takes over we never make it to the login prompt and just get a blank screen. Signed-off-by: Alex Bennée Cc: Gerd Hoffmann Message-Id: <20221202132231.1048669-1-alex.bennee@linaro.org> Message-Id: <20230130124728.175610-1-alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- backends/vhost-user.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/backends/vhost-user.c b/backends/vhost-user.c index 0596223ac4..94c6a82d52 100644 --- a/backends/vhost-user.c +++ b/backends/vhost-user.c @@ -20,12 +20,6 @@ #include "io/channel-command.h" #include "hw/virtio/virtio-bus.h" -static bool -ioeventfd_enabled(void) -{ - return kvm_enabled() && kvm_eventfds_enabled(); -} - int vhost_user_backend_dev_init(VhostUserBackend *b, VirtIODevice *vdev, unsigned nvqs, Error **errp) @@ -34,11 +28,6 @@ vhost_user_backend_dev_init(VhostUserBackend *b, VirtIODevice *vdev, assert(!b->vdev && vdev); - if (!ioeventfd_enabled()) { - error_setg(errp, "vhost initialization failed: requires kvm"); - return -1; - } - if (!vhost_user_init(&b->vhost_user, &b->chr, errp)) { return -1; } From patchwork Thu Mar 2 08:26:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 658122 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp3938358wrb; Thu, 2 Mar 2023 00:27:20 -0800 (PST) X-Google-Smtp-Source: AK7set+KnzYPsRn+dkCSDEMCUcM46IrEqiszQ06AWgSUoJWCJ4IAiGPxyE5d5dH3SyvjuAC9pHWX X-Received: by 2002:ac8:4e8a:0:b0:3b8:6b6b:28c2 with SMTP id 10-20020ac84e8a000000b003b86b6b28c2mr14397944qtp.68.1677745640333; Thu, 02 Mar 2023 00:27:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677745640; cv=none; d=google.com; s=arc-20160816; b=m0wAcQUcE/QsYuDxoL2jyJkc8EeGVMkJ7+n52qO1+oQYWkDX+VATtKRmbbd9St4c/J 0RZjV5idowVsL/fR1/d4i7ixLmdHLeRFuUGyiIcFNJg8eIObw0qOeLCZfwkqRcBP3ud6 uFKZqwkXzXpuJKzNTOPTp8NnR9ZVKk4dXAgTEUYJYLhFswqeGThEZw1QI8JY1vW2EgXZ oqFHcbutm/xBpdaOSHfHXx5nM0NS/W+WGp34ignRx3ADGSQ7arMpph9q3RJ05QILIWES fBLbPxSEPKOfK77NuayhXIEm8PvpYQAKlDR6uUVuKIC+O7oMLS7YwAb5oguHnPP0nTMg yzjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=w0RNEULKHXUI4bnIXmBTi+duJG2GyoHPzvmFBse0xtU=; b=doPFIIQ1myKNOniRju9xt4gIjxQt/iQ10yxBYQCK8NU36kYnX15HRIrgERFV0seJNb MFWa7Q7/Y/Mhg+izDqucsJZDUnn8DgXAmYeITKF3Fl5NiXeYBCZT9xhTYL/sMKmD7CMM 0yrPQQX6tHPdjOtvppwJByLgsjbOkdRbUnlDoGfTWgprrkMHwKfxs26Roe2k9cXBGL2Q /koYjTMl3pwhGRf3NCoTBUun+Y/2toXmZFdtzXhR3ADp3MzeemwJvMenGWV56NGgBFXd GSgEpsmCzCSAFSFSlaL2bL+zytaZS1Rupo8NVeDdAkZREbm6QjkeqHctVNxuS5ezNjld QZcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HYUyJfDW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r20-20020a05622a035400b003b9a3dc1b2dsi12406500qtw.490.2023.03.02.00.27.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Mar 2023 00:27:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HYUyJfDW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXeGd-0005SX-Ry; Thu, 02 Mar 2023 03:26:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXeGb-0005Ns-Je for qemu-devel@nongnu.org; Thu, 02 Mar 2023 03:26:21 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXeGZ-0002SA-8f for qemu-devel@nongnu.org; Thu, 02 Mar 2023 03:26:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677745578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w0RNEULKHXUI4bnIXmBTi+duJG2GyoHPzvmFBse0xtU=; b=HYUyJfDWHgRcHI2aBb1Fb2x+DiJor5oQavG2PnAhB/qoFjWhRFZNNIMufjMrbKRIxwxpAA 7VKVBSDt9ZhMZODP4CTgs9ylIy2S5iz6Zn3lo3Pgu15O6/MFbztGssHkQCEJZ3MjMWZ7ZM 5CF1ClGE+72gt+m+dZZvE6TB53qF0Uw= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-247-lhycS5JxNMKPt4tZ_TJolQ-1; Thu, 02 Mar 2023 03:26:17 -0500 X-MC-Unique: lhycS5JxNMKPt4tZ_TJolQ-1 Received: by mail-wr1-f72.google.com with SMTP id m10-20020adfe94a000000b002cdc5eac0d0so888534wrn.2 for ; Thu, 02 Mar 2023 00:26:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677745576; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=w0RNEULKHXUI4bnIXmBTi+duJG2GyoHPzvmFBse0xtU=; b=RycXKkPOUR20b9Mko+6zjlqyn/Yj/R6OqPefG+/a4Kxi8mZ3gdPwcl0SctchaaYndk 2fpgVGplsZndkZVMlIn/Ij9ev7JT24ToIV4m0YCcjyzqk7x6xx1A8XvjPpq7dthK1xnz DUQrEe4y59MDwcxXz4xgaAXZ/NxaES2v2EeLhthjnPR2okaFvKKO4utv6/8YUX1Gpj2s XpB9tOub/87daKLtUEr1+xekpbmQlWA7epNRyICptlD+CmcE1ytaRPLSS5nv0tQ1UQfs YuMUMyRtuezFQX+cv4Oxb9is+60fo24COxGRNhvggVQdvcI+GQ30iUoknrtwTEavfjYL HLtg== X-Gm-Message-State: AO0yUKUsgERnmZGc6JhFqmUorCCztOVg+/HuPoOVTwr8PXLfndj6LnsK RKNVCeuLNZZ5YSHxQxn12y/goYGd+4JyQ/CVAzelga/QdpxQLKGZW7K8qLVaTOYU4YHQ+1wGryt Qtz0bm6Jc662Xo9qGqhwcnV2+iaK1GWyP+RcGhzw2FTtGys5CRbz7kk3vk9AbgkFXdg== X-Received: by 2002:a05:600c:2e95:b0:3dc:4313:fd1e with SMTP id p21-20020a05600c2e9500b003dc4313fd1emr7056046wmn.34.1677745576030; Thu, 02 Mar 2023 00:26:16 -0800 (PST) X-Received: by 2002:a05:600c:2e95:b0:3dc:4313:fd1e with SMTP id p21-20020a05600c2e9500b003dc4313fd1emr7056032wmn.34.1677745575799; Thu, 02 Mar 2023 00:26:15 -0800 (PST) Received: from redhat.com ([2.52.141.194]) by smtp.gmail.com with ESMTPSA id m18-20020a05600c3b1200b003db0ad636d1sm2282185wms.28.2023.03.02.00.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 00:26:15 -0800 (PST) Date: Thu, 2 Mar 2023 03:26:12 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Philippe =?utf-8?q?Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Marcel Apfelbaum Subject: [PULL 34/53] hw/pci: Trace IRQ routing on PCI topology Message-ID: <20230302082343.560446-35-mst@redhat.com> References: <20230302082343.560446-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230302082343.560446-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Trace how IRQ are rooted from EP to RC. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230211152239.88106-3-philmd@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pci.c | 8 ++++++++ hw/pci/trace-events | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index bad8e63db3..08060b3e88 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -279,9 +279,13 @@ static void pci_change_irq_level(PCIDevice *pci_dev, int irq_num, int change) { PCIBus *bus; for (;;) { + int dev_irq = irq_num; bus = pci_get_bus(pci_dev); assert(bus->map_irq); irq_num = bus->map_irq(pci_dev, irq_num); + trace_pci_route_irq(dev_irq, DEVICE(pci_dev)->canonical_path, irq_num, + pci_bus_is_root(bus) ? "root-complex" + : DEVICE(bus->parent_dev)->canonical_path); if (bus->set_irq) break; pci_dev = bus->parent_dev; @@ -1600,8 +1604,12 @@ PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice *dev, int pin) PCIBus *bus; do { + int dev_irq = pin; bus = pci_get_bus(dev); pin = bus->map_irq(dev, pin); + trace_pci_route_irq(dev_irq, DEVICE(dev)->canonical_path, pin, + pci_bus_is_root(bus) ? "root-complex" + : DEVICE(bus->parent_dev)->canonical_path); dev = bus->parent_dev; } while (dev); diff --git a/hw/pci/trace-events b/hw/pci/trace-events index aaf46bc92d..42430869ce 100644 --- a/hw/pci/trace-events +++ b/hw/pci/trace-events @@ -3,6 +3,7 @@ # pci.c pci_update_mappings_del(const char *dev, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "%s %02x:%02x.%x %d,0x%"PRIx64"+0x%"PRIx64 pci_update_mappings_add(const char *dev, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "%s %02x:%02x.%x %d,0x%"PRIx64"+0x%"PRIx64 +pci_route_irq(int dev_irq, const char *dev_path, int parent_irq, const char *parent_path) "IRQ %d @%s -> IRQ %d @%s" # pci_host.c pci_cfg_read(const char *dev, uint32_t bus, uint32_t slot, uint32_t func, unsigned offs, unsigned val) "%s %02x:%02x.%x @0x%x -> 0x%x"