From nobody Thu Jan 9 10:16:54 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1735301779; cv=none; d=zohomail.com; s=zohoarc; b=fyjLhEVB6MXqnKz4PUVcz5KuAaIe9vH3Fzh18BFGX2glBbIqSj480HCFiBucDHv11/boRtroQ2WLJWdCfwg0R0UmhX4BU9HXWepjtZFgent+zDQKQaeeqxUURhO4b2etVgZw/WbKXEKtifPp1MV6M+I+ilSChNK2QF3h9SJUBrc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1735301779; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4U+f2LVOSjCieG+oVfsElVkg5nzALNjfOKDCd96XFZY=; b=bvfPnDNUOhG+N5++VMEBvRvjfgEwSQOr68DSSBor5F83hak6S8sVXJt6rel0Ly5V6N1HBOp3kbHSjrkFiy4RZ0ud2xWvIV0PMV4wO7D1gDimdry39xqiOpkZNAjm1yEsIuGw1xUBW5WZV78LkJ9bx3LVt7jyH1r55L3q/THmvSU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1735301779759120.39139229454372; Fri, 27 Dec 2024 04:16:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tR9EZ-000309-Iv; Fri, 27 Dec 2024 07:14:27 -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 1tR9E9-0002v7-BJ for qemu-devel@nongnu.org; Fri, 27 Dec 2024 07:14:04 -0500 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tR9Dz-0005Fc-P5 for qemu-devel@nongnu.org; Fri, 27 Dec 2024 07:13:55 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-aaee0b309adso576605966b.3 for ; Fri, 27 Dec 2024 04:13:47 -0800 (PST) Received: from localhost.localdomain (h082218084190.host.wavenet.at. [82.218.84.190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e82ede9sm1098662766b.2.2024.12.27.04.13.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 27 Dec 2024 04:13:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philjordan-eu.20230601.gappssmtp.com; s=20230601; t=1735301626; x=1735906426; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4U+f2LVOSjCieG+oVfsElVkg5nzALNjfOKDCd96XFZY=; b=mIfBtrTkp+px4qWvXFmYlqdfsmTKf2ffLPC7reX8iiJa5f1E5QpkPCFWp4iO+o1Li5 z02MQHYoae8Ossu82o2t7L13UrEqowTdTzQIuM1g4GeTtQpbESL1Nhn9/iBakwUqlvUP pjEl7zDYHpMDOXmqZnwAVNI0yjWCRPqcMqhwdkWGwDxMn4AA1cD99d9clnGMhpdJ4keA ya8BbImI5NRzIv7qkKqNqDkVyWi0YACIscvpqokzBzjUgtRZvnMjhSqBHcXQGsYfMBEj sKWz1HZa1UF/xMFdS+FtuqNk111R9BhwrLaVaPyF/l1BiBl3whhmHbhA6PxQGTVfsj9L z/8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735301626; x=1735906426; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4U+f2LVOSjCieG+oVfsElVkg5nzALNjfOKDCd96XFZY=; b=fpwEaw2OZZ+C0b8p/J5w2CubjORrOkoqo8QmYA5MmryHx6iQ+19PygQdvIYLPv51Ks Y1DlER/g1VAVtUwQ/YqBgnrZ+xDMcE6sZOaYOVLgHcKMYC2U+wo6TUYXKNjbogejHVoz IXPWj91OndEGZUippaNdup02WahRND1flcAeI9oYCGPbsp4K4b8+ga+c7H4Pj2EtP3Mq gVDpnvNG1wurlu1zr9x4UZhv3IiF/J9pTYSrlBsWwfE8WYhJiOuFlV6tbRgaq/vGIT/z 6q83Ti6Zb4PPda7KmZAxLQl2nLIptLawI3m+U30uUY7DUf9WVooLuUpKirxuoiENiBSf 6DOw== X-Gm-Message-State: AOJu0YxAtEh0UCuO1oWAps2OEgfMYtgGWs+JnV6Rov0S7UqoS1N0/fqt w5LXaOWyXBPu/Qq9T3JBzOq7EoKwwgjLCzzahGh1OolqL6ZDY8M2IrARUIxMvFeUX5tYgoltsbQ = X-Gm-Gg: ASbGncuJczPQSqn/HlvVVzhVLtdLnH8SDItkJKZeRGM2INd9TlZ8jNgSWxMKbu5jMrQ b+hMVfa3FBZwDVThXYu6yiMOPhcrgYK9dkVpRjkjDoCBu+YNrcXvDjDOZ19FvgIt9RgYZmPvWcJ xCCj5ZW68Vb4EhPiM3wJFi9C8k9AZGCj1zRj9Su9a3pETP42OZ+zinQ85uteuDmMknjicsY1Vgv 6GlDyE47h5xLCgmCSYMcvWJAd5TFCRgA5Ao5Ewgy/1e2JQpnTybrBTgzlnffn60qkmH2/C4ecEb 9XrD4eQWB46vDMRi2qI7s8I2UxXOTacJ X-Google-Smtp-Source: AGHT+IGTBZTE94nTPwaxzTFbk0znrl3hKxdMssXGV4zjHHxa58vn4O1BDbPoKSJibJo9I2tY1KOr1w== X-Received: by 2002:a17:907:360e:b0:aa6:8d51:8fdc with SMTP id a640c23a62f3a-aac348c4e1bmr2700299566b.58.1735301626121; Fri, 27 Dec 2024 04:13:46 -0800 (PST) From: Phil Dennis-Jordan To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, philmd@linaro.org, thuth@redhat.com, zhao1.liu@intel.com, imammedo@redhat.com, akihiko.odaki@daynix.com, npiggin@gmail.com, Phil Dennis-Jordan Subject: [PATCH v3 2/6] hw/usb/hcd-xhci-pci: Move msi/msix properties from NEC to superclass Date: Fri, 27 Dec 2024 13:13:32 +0100 Message-Id: <20241227121336.25838-3-phil@philjordan.eu> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20241227121336.25838-1-phil@philjordan.eu> References: <20241227121336.25838-1-phil@philjordan.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: neutral client-ip=2a00:1450:4864:20::62a; envelope-from=phil@philjordan.eu; helo=mail-ej1-x62a.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=no 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @philjordan-eu.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1735301781219116600 The NEC XHCI controller exposes the underlying PCI device's msi and msix properties, but the superclass and thus the qemu-xhci device do not. There does not seem to be any obvious reason for this limitation. This change moves these properties to the superclass so they are exposed by both PCI XHCI device variants. Signed-off-by: Phil Dennis-Jordan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v3: * In line with recent upstream changes, the property table is now const and no longer carries an end-of-list marker. hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index b1df95b52a..1df518baf5 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -37,8 +37,6 @@ struct XHCINecState { }; =20 static const Property nec_xhci_properties[] =3D { - DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO), - DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), }; diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index e5e7330387..49642aab58 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -198,6 +198,11 @@ static void xhci_instance_init(Object *obj) qdev_alias_all_properties(DEVICE(&s->xhci), obj); } =20 +static const Property xhci_pci_properties[] =3D { + DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO), + DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), +}; + static void xhci_class_init(ObjectClass *klass, void *data) { PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); @@ -209,6 +214,7 @@ static void xhci_class_init(ObjectClass *klass, void *d= ata) k->realize =3D usb_xhci_pci_realize; k->exit =3D usb_xhci_pci_exit; k->class_id =3D PCI_CLASS_SERIAL_USB; + device_class_set_props(dc, xhci_pci_properties); } =20 static const TypeInfo xhci_pci_info =3D { --=20 2.39.5 (Apple Git-154)