From patchwork Wed Feb 7 11:14:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1896090 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BhNYxEYc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TVHbf4lzdz23gT for ; Wed, 7 Feb 2024 22:15:42 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXfsk-0002po-7X; Wed, 07 Feb 2024 06:14:22 -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 1rXfsi-0002pX-Ss for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXfsh-0003OV-CI for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707304458; 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=0Egdkh5QoX3O/dzVIy8K+U7p2KokwdNAc13mHN8rwZY=; b=BhNYxEYc/qJHRXKgBcvGB4w/SQCUVcrw4uvMgwmx0iktCRhkQY4UrwRRva1DWHKY56dwAp a4o0KHPhOe9kjWf4dMog0jYqZTzkd9unDTbibnG5FIomWg+uoi6JCXqp17SoSMhP0bYBCg 8VkIChWkWmty9fd9COQB+i7gtQujPr4= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-660-8gmOZVFcNC67slQrFb9tCA-1; Wed, 07 Feb 2024 06:14:17 -0500 X-MC-Unique: 8gmOZVFcNC67slQrFb9tCA-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a37f4a71019so24844266b.3 for ; Wed, 07 Feb 2024 03:14:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707304456; x=1707909256; 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=0Egdkh5QoX3O/dzVIy8K+U7p2KokwdNAc13mHN8rwZY=; b=c+W7tEJLDGH6E+CbR4Td0fypzUWCVJ+1a+wT8KMdIYPY0FjYqKsdc4/t9ch6QF5UrO eNOqWR9t+ikwPZhcqXcJhFUpWompFR4eUkF97zK0xu8cQ/c5hSSjkOaIs0NhTNDMRAFH EyXwYotupfJSy1OwmhTboPQER0GXAcCrkFFz+L0pBU70T+Dkfa0aFFpDInSxRBPubJiu Vf43R8QYsfDi97UNES6RnYjQMsCTPG81Ve2l78KG7zMgkDLNKnUkIuqnR1idX/nytfmm cXqALq2A1Hib1YX7qxa1DLu65/z0oKCrlWr4OoML/fW+yfngXofF244AM/wSd+TeIB+U b/Ug== X-Gm-Message-State: AOJu0YxnMyjK53M0O8Ot75JbexxYeDESBGTlqe0kiIL2pPf1e8llT19V 7h5aqm0FhW7xvVTYxNiz4cBPnzHaVH6WMAwNbphoksp/+PYx91jZAG9SFoypVWFY737l8Xy3SFW WAytzPn1SfBJNPrshGEs7W9DYCK3PxxlsDzhPOLl+KbZ53MsulndU1QmiKmUA4wNvfUCO6BgZmu AbfvWSidjJo36N9lxT6zejaQhzMa2UozHcsDky X-Received: by 2002:a17:906:3295:b0:a38:2739:d849 with SMTP id 21-20020a170906329500b00a382739d849mr3053866ejw.16.1707304455773; Wed, 07 Feb 2024 03:14:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzZ6FAe7n4m61ThP0ekV/i0Pn+t+H1YQ8MaInRVCIztpfBvYuf45zyWWewXBXjmo/a3Rn5aw== X-Received: by 2002:a17:906:3295:b0:a38:2739:d849 with SMTP id 21-20020a170906329500b00a382739d849mr3053856ejw.16.1707304455342; Wed, 07 Feb 2024 03:14:15 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVMFNL9tIAkCCXmKiul8xkizkSvCKWkvexRgT7RyQihhCT6iBjLQOdmJdsEgVKj6DIkCAS58J+cSkusQq7VDK36xJnxYSE4bgjAgmMRq00uqH0scCyd8achdxX2huB5GA== Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id cf17-20020a170906b2d100b00a38382c34c9sm635358ejb.120.2024.02.07.03.14.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 03:14:14 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: shentey@gmail.com, philmd@linaro.org, Richard Henderson Subject: [PATCH v2 1/8] usb: inline device creation functions Date: Wed, 7 Feb 2024 12:14:03 +0100 Message-ID: <20240207111411.115040-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207111411.115040-1-pbonzini@redhat.com> References: <20240207111411.115040-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.294, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Allow boards to use the device creation functions even if USB itself is not available; of course the functions will fail inexorably, but this can be okay if the calls are conditional on the existence of some USB host controller device. This is for example the case for hw/mips/loongson3_virt.c. Acked-by: Richard Henderson Signed-off-by: Paolo Bonzini --- include/hw/usb.h | 27 ++++++++++++++++++++++++--- hw/usb/bus.c | 23 ----------------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 32c23a5ca2a..cfeead28403 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -30,6 +30,7 @@ #include "qemu/iov.h" #include "qemu/queue.h" #include "qom/object.h" +#include "qapi/error.h" /* Constants related to the USB / PCI interaction */ #define USB_SBRN 0x60 /* Serial Bus Release Number Register */ @@ -500,9 +501,6 @@ void usb_bus_release(USBBus *bus); USBBus *usb_bus_find(int busnr); void usb_legacy_register(const char *typename, const char *usbdevice_name, USBDevice *(*usbdevice_init)(void)); -USBDevice *usb_new(const char *name); -bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **errp); -USBDevice *usb_create_simple(USBBus *bus, const char *name); USBDevice *usbdevice_create(const char *cmdline); void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index, USBPortOps *ops, int speedmask); @@ -582,4 +580,27 @@ void usb_pcap_init(FILE *fp); void usb_pcap_ctrl(USBPacket *p, bool setup); void usb_pcap_data(USBPacket *p, bool setup); +static inline USBDevice *usb_new(const char *name) +{ + return USB_DEVICE(qdev_new(name)); +} + +static inline USBDevice *usb_try_new(const char *name) +{ + return USB_DEVICE(qdev_try_new(name)); +} + +static inline bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **errp) +{ + return qdev_realize_and_unref(&dev->qdev, &bus->qbus, errp); +} + +static inline USBDevice *usb_create_simple(USBBus *bus, const char *name) +{ + USBDevice *dev = usb_new(name); + + usb_realize_and_unref(dev, bus, &error_abort); + return dev; +} + #endif diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 59c39945ddd..76fda41b7ec 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -329,29 +329,6 @@ void usb_legacy_register(const char *typename, const char *usbdevice_name, } } -USBDevice *usb_new(const char *name) -{ - return USB_DEVICE(qdev_new(name)); -} - -static USBDevice *usb_try_new(const char *name) -{ - return USB_DEVICE(qdev_try_new(name)); -} - -bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **errp) -{ - return qdev_realize_and_unref(&dev->qdev, &bus->qbus, errp); -} - -USBDevice *usb_create_simple(USBBus *bus, const char *name) -{ - USBDevice *dev = usb_new(name); - - usb_realize_and_unref(dev, bus, &error_abort); - return dev; -} - static void usb_fill_port(USBPort *port, void *opaque, int index, USBPortOps *ops, int speedmask) { From patchwork Wed Feb 7 11:14:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1896096 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IVdb1D+2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TVHcZ6Mv2z23gT for ; Wed, 7 Feb 2024 22:16:30 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXfsn-0002qd-7W; Wed, 07 Feb 2024 06:14:25 -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 1rXfsl-0002qB-5K for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:23 -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 1rXfsj-0003P6-QK for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707304461; 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=BbG1UcNnrJXHseB/1jw2t7pVf1ZGHlpH133WcB15Tq4=; b=IVdb1D+2Rf0T260n1ZMjeoEjCusAwCEDqNcKzVxs5VLE/L5pfEVvtD0yoJlyWfKvtNe5hU s0eSbZWL5jLY/AtGegyC7eB+BnlJXhWGqwwuqmB4kp8bJgU6Jmvf7gEAmAzOiLWnjgkCH8 jKZiuT0Yg6oS29Diq5uxNF9sX6sf630= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-401-6E1RqNE-O9Kiw8EjYSpLSg-1; Wed, 07 Feb 2024 06:14:20 -0500 X-MC-Unique: 6E1RqNE-O9Kiw8EjYSpLSg-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a384e39d0d4so26958266b.1 for ; Wed, 07 Feb 2024 03:14:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707304458; x=1707909258; 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=BbG1UcNnrJXHseB/1jw2t7pVf1ZGHlpH133WcB15Tq4=; b=dgfYDCjA4zLeEEzPyAbiDcDdW4bKmkLQUH3GdW4yz76KUCChvV4ATskRkVHF0mZuAg ZxQQ1AUK2psIvJ/qqJIXT709d73yzw2GQoKmJ2/+ezNsg+A6x8k4+PvJXWF1dfsYsjqH aUk9/+NqZqtt0AYRK7cYS+DCJsXAxtoAUTQCmzLVXs89ZPjywK1IHjpQ4AIFoCK2sydj SqTm7qASDoH6CTnTAZEsOkOaRM9/gjz+eYLcTVLw7iBL4ldbaM+6iYD44RaZX0fQ0hJJ 5GAmHE33PBhL+b2YPwQ6YTkDqtV0xiV/uSNnNjpi83P6HPRBqlQKAcqDioOtbm04ynrJ zCgQ== X-Gm-Message-State: AOJu0YxS11CzOdnO8ZA++4qpw6yBo07oM9s8M2Whp48A+1e/a9Lk09yN 9CxdYG28rZnOiKOFy3fY8yfSjmtNDT3i3gXON5E5xyZdhk1ynt86P+fjLIKdHYsXnjRbc+08mAh hIFELIr1tPjG4GTW19Lp7K/Ay85/j17aHSwN9b6mvN8PaYLdqs/sr9vqBVB4t1TBW0ex7JNxkxQ AlrNLzhcB0PxL/nzC1NVNPUonzp27ZGPzveH99 X-Received: by 2002:a17:907:3c1e:b0:a38:916e:a4fe with SMTP id gh30-20020a1709073c1e00b00a38916ea4femr303719ejc.39.1707304458268; Wed, 07 Feb 2024 03:14:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4TiO4hr1rmyq0zBji3b49kdjYr3FQdBJWf/tJk+1bI5hHuiXssMaxi7fY8TvQKc6GK7MHOA== X-Received: by 2002:a17:907:3c1e:b0:a38:916e:a4fe with SMTP id gh30-20020a1709073c1e00b00a38916ea4femr303707ejc.39.1707304457891; Wed, 07 Feb 2024 03:14:17 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXUilhRUYNNqt83bzv7acwUt0ciWI+oVTAeW7vMfbwR0ufSyIvdkuEeN9WVuteHyjdRqRLcV134QoPlKIxErUTrkgdfJm8a9MwhTPcUAF+MYtkneU5WgebiygdDaDggzA== Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id i16-20020a1709061cd000b00a36c3e2e52dsm639263ejh.61.2024.02.07.03.14.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 03:14:16 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: shentey@gmail.com, philmd@linaro.org, Richard Henderson Subject: [PATCH v2 2/8] isa: clean up Kconfig selections for ISA_SUPERIO Date: Wed, 7 Feb 2024 12:14:04 +0100 Message-ID: <20240207111411.115040-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207111411.115040-1-pbonzini@redhat.com> References: <20240207111411.115040-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.294, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org All users of ISA_SUPERIO include a floppy disk controller, serial port and parallel port via the automatic creation mechanism of isa-superio.c. Select the symbol and remove it from the dependents. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- hw/isa/Kconfig | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index 040a18c0709..7884179d08b 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -17,7 +17,11 @@ config ISA_SUPERIO bool select ISA_BUS select PCKBD + select PARALLEL + select SERIAL_ISA select FDC_ISA + # Some users of ISA_SUPERIO do not use it + #select IDE_ISA config PC87312 bool @@ -26,9 +30,6 @@ config PC87312 select I8254 select I8257 select MC146818RTC - select SERIAL_ISA - select PARALLEL - select FDC_ISA select IDE_ISA config PIIX @@ -49,8 +50,6 @@ config VT82C686 select ISA_SUPERIO select ACPI select ACPI_SMBUS - select SERIAL_ISA - select FDC_ISA select USB_UHCI select APM select I8254 @@ -58,14 +57,10 @@ config VT82C686 select I8259 select IDE_VIA select MC146818RTC - select PARALLEL config SMC37C669 bool select ISA_SUPERIO - select SERIAL_ISA - select PARALLEL - select FDC_ISA config LPC_ICH9 bool From patchwork Wed Feb 7 11:14:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1896085 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FxQ4kteh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TVHZr6wchz23g7 for ; Wed, 7 Feb 2024 22:15:00 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXfsr-0002rp-SQ; Wed, 07 Feb 2024 06:14:30 -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 1rXfsp-0002qu-Ns for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:27 -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 1rXfsn-0003Pk-Aw for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707304463; 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=22m3lVs8Rcr/AULyQQp7muXracEJFhELmG8wj9R5NH4=; b=FxQ4ktehlXv73nFlibaxDnIqpRZvvXquqf/AwUYyMie08yEphlrZIFy2KRhlvoojVx24lX LX5Hc+0CjyN4JCUndhWzRy4NtwEf9ikrRFqr/dtiNfwcB8CUW24Fnk7Mv/fG2GAxNn+NDV ZqZuP80aY0wWJ4d+SozI1goRJFHcW7Y= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-403-t3CRKQajOYGoYuJb9QAtTQ-1; Wed, 07 Feb 2024 06:14:22 -0500 X-MC-Unique: t3CRKQajOYGoYuJb9QAtTQ-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a3120029877so165163466b.1 for ; Wed, 07 Feb 2024 03:14:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707304460; x=1707909260; 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=22m3lVs8Rcr/AULyQQp7muXracEJFhELmG8wj9R5NH4=; b=badnLYxzFsK/AeY5/04quUv4kS1qeJjyCpArZW3/ZZvtc3E6hLS9s4fixDQCe3yxFq bcZIAJoBY9mmZU3R/mB1jOcXBaSiq/LnI4DMr31keAa2ygUPrjernd7IPzTLaUEH1g7F WJo/ssKbqoIYzTaVLa73g6SUgAHcUTEV0JzpYuBmjoPDuQ9il6GF2jEeOoFoXMzvDn7/ ceFWJki+Tv+k0/Ub1xbUajaQFL5dO8ie/SdlVIqDwR79zb6Yc7xAXulhoUUk8495EXPx +Kz8ePPK7t4GjBdbXnfCQiw1n6eVRF4WaqVKhsaAbyO+ysw8Bun8O5Y310I2DsCPBpR5 pipQ== X-Gm-Message-State: AOJu0YzbHiLxNVjA/z8rQ4Q5pc3v8MKYBPmvT7tZZLPjc13qKh2FS4Qh vPRqjiG9834OVJzZ9W/R0BNTR09mLMfdwc0E9N21GsllYZABz6Is67ALbLTmPr3BJmApOerN2/g 5QtIa0PkLOIzOfNwECFDbM7WiC85WmN5VANAEsMrv65DiVJMDjR2krPQ1PXokKLvUBlqiNYldwA Mj3NZ8yK3BQmLggJJ9k4tDNSudT7IJB6kqw10+ X-Received: by 2002:a17:906:168e:b0:a38:1a75:787d with SMTP id s14-20020a170906168e00b00a381a75787dmr5437713ejd.24.1707304460600; Wed, 07 Feb 2024 03:14:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+I7UvQuCkfJeT8qsOzxYAqKKLeb7PoknbBgk4/TOSfQKpvFWvy72K2CNdbrVtFZZl7h+qOA== X-Received: by 2002:a17:906:168e:b0:a38:1a75:787d with SMTP id s14-20020a170906168e00b00a381a75787dmr5437695ejd.24.1707304460306; Wed, 07 Feb 2024 03:14:20 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUgqgYbl1+17M7diVzr2FFiJixDLFvi0YQa6XeDNW7vw0elNJ59mDOMMS02EM71wo0ljmfyu7szxOttHJg1gPIUbw== Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id p14-20020a056402500e00b0055edfb81384sm573133eda.60.2024.02.07.03.14.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 03:14:18 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: shentey@gmail.com, philmd@linaro.org Subject: [PATCH v2 3/8] hw/mips/Kconfig: Remove ISA dependencies from MIPSsim board Date: Wed, 7 Feb 2024 12:14:05 +0100 Message-ID: <20240207111411.115040-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207111411.115040-1-pbonzini@redhat.com> References: <20240207111411.115040-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.294, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Bernhard Beschow The board doesn't seem to have an ISA bus at all. Signed-off-by: Bernhard Beschow Message-ID: <20230109204124.102592-3-shentey@gmail.com> Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- hw/mips/mipssim.c | 1 - hw/mips/Kconfig | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c index 01e323904d9..abbeb6390e1 100644 --- a/hw/mips/mipssim.c +++ b/hw/mips/mipssim.c @@ -31,7 +31,6 @@ #include "hw/clock.h" #include "hw/mips/mips.h" #include "hw/char/serial.h" -#include "hw/isa/isa.h" #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/boards.h" diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index ab61af209a0..afcfb2b8eca 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -6,8 +6,7 @@ config MALTA config MIPSSIM bool - select ISA_BUS - select SERIAL_ISA + select SERIAL select MIPSNET config JAZZ From patchwork Wed Feb 7 11:14:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1896097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=JdNn+0Tx; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TVHcb0rNzz23gb for ; Wed, 7 Feb 2024 22:16:31 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXfss-0002s3-Vr; Wed, 07 Feb 2024 06:14:31 -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 1rXfsr-0002rc-KR for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:29 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXfsq-0003Pz-8P for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707304465; 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=ub5GUD57Lh/GVgnjxd7D37mJ+L/nM2kPJlsENhc1GS0=; b=JdNn+0TxVTOJqRe/2RU3jYDpGAZpSPQyw0alHdy4MumbTTAFdoeozfGQpb2iDpRCPcZq3w WiQfVnC8wgAhQkQ/avhaBWBUNPlSJEEJ5bZ97wQXXUSEsuvA3Iq9LbIdn7fD8NgLv0lc5F 2NshPdm+cvScRO4Wf6iQCZcQwl7IQjM= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-ReYZndccOeyebEJkCWArlA-1; Wed, 07 Feb 2024 06:14:24 -0500 X-MC-Unique: ReYZndccOeyebEJkCWArlA-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5605c7b1f34so620172a12.1 for ; Wed, 07 Feb 2024 03:14:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707304463; x=1707909263; 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=ub5GUD57Lh/GVgnjxd7D37mJ+L/nM2kPJlsENhc1GS0=; b=n1aci9L8Bv05iKjm39lVpoAqs7DFwX4Fl5APYTC9BifgU6nR4CL3LUL4Zi8IDT/8IC D7E0BkmsIGrb80SBIKkW2SFgiXzp7NZVIe/9/2uIkp0XxgjWJw1bul+ZV0jqQb0u7uwz Y3kPpnshEiWrIY1haZkqfiMQ9FoZW6ZQMOeXE0jfvCX3WTWMwdcyiJgT56igMR7xpDfQ xib87P2TrTp+om8IcKyn3noep3dX60b6F+UCRlVKbtNi4G/d5bN8sbdwHX8B29u1kB8K sqab2iDieRKNTl5/DLcI1SnQTfE8NpRqB2L9df713nmIZ6bQoQD4MG1sGdazz/hogedU f4PA== X-Gm-Message-State: AOJu0YymFL6RfTfAd6AX5aDZnidbJwZEKWkNy+49K9n/JkA1klB5EK+4 FXNDYk7+z6z1lVFKma7XmpkfcZHkAtMS+FR+iEzlB2tVsPsG2cQ23+7XFQpTUj6Iw56CgOX9Wg5 2Ixj1+CWU5gi99Tt1C4QqmB4nu/lKyRhOoB+YStavm2auZhrFiDZpfj0AcJzszXU5YzCc3YhXKY uhNWZkGQXb1ev0t+CEKXnMtL998xkfcZFCgIGA X-Received: by 2002:a05:6402:286:b0:560:2c15:38b9 with SMTP id l6-20020a056402028600b005602c1538b9mr5649293edv.4.1707304462824; Wed, 07 Feb 2024 03:14:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmCghDX0qlZpkGFYtgTm35RlroUM6n7wGJ+n1m3AFEX0BxWZR6Df3IlRSJ/O6xr0BazSL2fg== X-Received: by 2002:a05:6402:286:b0:560:2c15:38b9 with SMTP id l6-20020a056402028600b005602c1538b9mr5649280edv.4.1707304462573; Wed, 07 Feb 2024 03:14:22 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWr3/qGeZqQk0A3F7kLSvKOza8o3rPKQ1/umbBhnjB0p0gUfv5dbY0j3E8GoQd8GAzBMtrv72e6q3mOieHIxkRJdA== Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id dn6-20020a05640222e600b00560422bd11asm561407edb.30.2024.02.07.03.14.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 03:14:21 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: shentey@gmail.com, philmd@linaro.org Subject: [PATCH v2 4/8] isa: fix ISA_SUPERIO dependencies Date: Wed, 7 Feb 2024 12:14:06 +0100 Message-ID: <20240207111411.115040-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207111411.115040-1-pbonzini@redhat.com> References: <20240207111411.115040-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.294, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org ISA_SUPERIO does not provide an ISA bus, so it should not select the symbol: instead it requires one. Among its users, VT82C686 is the only one that is a PCI-ISA bridge and does not already select ISA_BUS. Signed-off-by: Paolo Bonzini Reviewed-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bernhard Beschow --- hw/isa/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index 7884179d08b..5df3c09cd51 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -15,7 +15,7 @@ config I82378 config ISA_SUPERIO bool - select ISA_BUS + depends on ISA_BUS select PCKBD select PARALLEL select SERIAL_ISA @@ -47,6 +47,7 @@ config PIIX config VT82C686 bool + select ISA_BUS select ISA_SUPERIO select ACPI select ACPI_SMBUS From patchwork Wed Feb 7 11:14:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1896087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=blnR9KF3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TVHb71Xt4z23gT for ; Wed, 7 Feb 2024 22:15:15 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXfst-0002s4-Mh; Wed, 07 Feb 2024 06:14:31 -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 1rXfss-0002ru-6N for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:30 -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 1rXfsq-0003QV-L6 for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707304467; 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=paACPjx5AjJVvktrAw4tevc/RRfo0mRznAwClB4qJvw=; b=blnR9KF34Av4whSRx7tzfSHBY0Ci+Z4yVlaiRVA/4qNt3sZrnLbRO8E1jGPknNWuvkVs+8 JIs4YyqDhhYwLTwyHmOFdzdnoWBh8FU8ePzC1blvsBmz3N6QjZqCqUV12kNHteVsYkyAlJ 6CiNYYZMhggEK14Axi5EdMtVClJo2F8= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-557-j4aA4aYGPLyujMnYoRxIbg-1; Wed, 07 Feb 2024 06:14:26 -0500 X-MC-Unique: j4aA4aYGPLyujMnYoRxIbg-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a2bc664528fso38452066b.3 for ; Wed, 07 Feb 2024 03:14:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707304465; x=1707909265; 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=paACPjx5AjJVvktrAw4tevc/RRfo0mRznAwClB4qJvw=; b=VDagfUZ3aNZtDh/5rHbzUkOSeEZEzKQd7Pi8jDwI4nHmMziqGHOxWpSPi3kNWF6Sxv gq7io5o13ROLvJDJL+GQyMwdXPopMeBSH8PNz/kWfoh2Adl/HsAfEPTLnD2t82cCQbT0 godlP9Fx2nIelXMeQVAff+Dxw58MQbFVoYhfWOaBkb5xZl0QAAdU94jrkS76Zo5sDEcw IQcG8OBHQ0z1yQTAK0lUjxxISTHP1PBmbnppvkZMgg7LZtHLsWePMnDy1oO3X7B+P5Oo KiBKxN/j3BwOkF+Yt9NHHvUMiRYaOMKUSGBG+2qxXQGof0J0ossx6/jlj1GBOmztv03l HXSA== X-Gm-Message-State: AOJu0Yxnqhmvcv8s//qzeUSItNfpaNaXuMtqJjufYxEQGkEXnDcQMRh0 +8CVdH5rvDrF4RCxlWuMxqT0ENSIAN18TyZFgbkgDzl+JH8RWDcA4eS3pyvZHCElyLi5UFZFdAR 01JLays5567Ml7OLDGvaL6CDORrUiVwJBLjxHBG3+hgCOWPRBZGBUMZyGNK3kFWDW7eRIF/dunE OX7j3gfy1+0LOfpt9breJHypwwr27dnns3giV7 X-Received: by 2002:a17:907:30c5:b0:a38:5cce:1bad with SMTP id vl5-20020a17090730c500b00a385cce1badmr1594826ejb.68.1707304465058; Wed, 07 Feb 2024 03:14:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBegPk8NMvyYS9bRNuEzov70JG/E2VoC7DBp/TnXxVgjJnmn3i3PuSogfhT8OUjORf9ibypA== X-Received: by 2002:a17:907:30c5:b0:a38:5cce:1bad with SMTP id vl5-20020a17090730c500b00a385cce1badmr1594808ejb.68.1707304464741; Wed, 07 Feb 2024 03:14:24 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUZZ1os9kWU/5oYW2MozpVKZ4jD4Y4kKHyfq/p38dCZTCjMPI0PQ4GPAZYJy5XHy6fWOw53Vt04Sie8qrdljmI+/w== Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id qo8-20020a170907874800b00a2b1a20e662sm644165ejc.34.2024.02.07.03.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 03:14:23 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: shentey@gmail.com, philmd@linaro.org Subject: [PATCH v2 5/8] isa: specify instance_size in isa_superio_type_info Date: Wed, 7 Feb 2024 12:14:07 +0100 Message-ID: <20240207111411.115040-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207111411.115040-1-pbonzini@redhat.com> References: <20240207111411.115040-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.294, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Right now all subclasses of TYPE_ISA_SUPERIO have to specify an instance_size, because the ISASuperIODevice struct adds fields to ISADevice but the type does not include the increased instance size. Failure to do so results in an access past the bounds of struct ISADevice as soon as isa_superio_realize is called. Fix this by specifying the instance_size already in the superclass. Cc: Bernhard Beschow Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bernhard Beschow --- hw/isa/isa-superio.c | 2 +- hw/isa/smc37c669-superio.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c index e06a548c682..98d50844f71 100644 --- a/hw/isa/isa-superio.c +++ b/hw/isa/isa-superio.c @@ -187,6 +187,7 @@ static const TypeInfo isa_superio_type_info = { .abstract = true, .class_size = sizeof(ISASuperIOClass), .class_init = isa_superio_class_init, + .instance_size = sizeof(ISASuperIODevice), }; /* SMS FDC37M817 Super I/O */ @@ -203,7 +204,6 @@ static void fdc37m81x_class_init(ObjectClass *klass, void *data) static const TypeInfo fdc37m81x_type_info = { .name = TYPE_FDC37M81X_SUPERIO, .parent = TYPE_ISA_SUPERIO, - .instance_size = sizeof(ISASuperIODevice), .class_init = fdc37m81x_class_init, }; diff --git a/hw/isa/smc37c669-superio.c b/hw/isa/smc37c669-superio.c index 388e2ed9371..d2e58c9a895 100644 --- a/hw/isa/smc37c669-superio.c +++ b/hw/isa/smc37c669-superio.c @@ -85,7 +85,6 @@ static void smc37c669_class_init(ObjectClass *klass, void *data) static const TypeInfo smc37c669_type_info = { .name = TYPE_SMC37C669_SUPERIO, .parent = TYPE_ISA_SUPERIO, - .instance_size = sizeof(ISASuperIODevice), .class_size = sizeof(ISASuperIOClass), .class_init = smc37c669_class_init, }; From patchwork Wed Feb 7 11:14:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1896098 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Xzv1cdSE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TVHcb55x2z23gt for ; Wed, 7 Feb 2024 22:16:31 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXfsx-0002st-JW; Wed, 07 Feb 2024 06:14:35 -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 1rXfsu-0002sP-OC for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:32 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXfst-0003RA-26 for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707304470; 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=GKhWTRg2zOTnE9OJbj6ui0Mke5/Ni7WWZc/qd5ynn60=; b=Xzv1cdSE3dlxEqLNnChzI+hx5Cu/jeKin4WYqx8bNYgzNNWZX2+iqOKiiiLvwCvHqC6BfK ZZYmJX/jnMzYdxP17nwA8yrM6VMjgwYlSHA3261c30tADXQUi4161cEaZpFcRGu7MxCtaM 0ZRg0Y8rSpl/SUI8/iHnQiAVqD6/hPw= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-688-CGPTnnidMXOkfEWc-m0wxw-1; Wed, 07 Feb 2024 06:14:29 -0500 X-MC-Unique: CGPTnnidMXOkfEWc-m0wxw-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5605a2937d4so234418a12.1 for ; Wed, 07 Feb 2024 03:14:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707304467; x=1707909267; 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=GKhWTRg2zOTnE9OJbj6ui0Mke5/Ni7WWZc/qd5ynn60=; b=DcR+soM64FRLgZ6Kv+9Wuf8YLpIHHosMOKi983irQf5UxmmmglA1xV9vRzNY3DueEK ELuoj0Boq1iz3cpvfoKkoY1Qbs50JjL5pUmj9roiuoqdhT4V5ujKKZKMxSymvOgphiUR VmZwwy2NrxqbxfDAATS95c9Oc6sRnqW8CeWyhQRhN6j/4Rz4ILAZYx4J+c0qBninwX0r TI5mQ/SzY36u4PpTTMfne1FH6GqJdqkD9BuBRjwq4wNzO4avB4ym1FHBXN38om/6qNhl 220fTus4v0dYlykIDScpYdIOuGkwGWqruwKpyruXwsFKgJujOZNgZk7T4Bqt5oI7OkFP gwfg== X-Gm-Message-State: AOJu0Ywf75lo5xKHuCT4SijPrb/0fveAAO23uKcGAx2JO36ctcM7be6b v6g46qXBuu5eq6KftLcznrTuwrHWffG/wsVWS6jxT37CSoybRLS/PEKKVK1o/zrglMdWLB2ZPZU p5faFnIK//GfuaDqj7Ew7WQlHtlZNi40l6cmAjlFxdpN+soITRM3y9wp1KbgUxg9881LvppG3hl C7yS0JJ9R6fClknGyHe6aNriv3kkIgYHVdSzsr X-Received: by 2002:a05:6402:2297:b0:560:b758:5e24 with SMTP id cw23-20020a056402229700b00560b7585e24mr2980366edb.0.1707304467518; Wed, 07 Feb 2024 03:14:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8IcOc8ktNPSWavxQV3k/ItXtVp8TenHKbGlepN8a3z5faXGerVWdFHe1t//5ieEsliIiVdA== X-Received: by 2002:a05:6402:2297:b0:560:b758:5e24 with SMTP id cw23-20020a056402229700b00560b7585e24mr2980346edb.0.1707304467101; Wed, 07 Feb 2024 03:14:27 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUGWHS+AAV42q0UVzGmb8Hc+l9XNiGGmf2jBpzMYkkbqNZmNkLBtJtJZ7d0Nl6Y1dNFzMZ00p49FCzqMVAyOr9doQ== Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id n5-20020a056402434500b00560c43b48f4sm546040edc.10.2024.02.07.03.14.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 03:14:25 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: shentey@gmail.com, philmd@linaro.org Subject: [PATCH v2 6/8] isa: extract FDC37M81X to a separate file Date: Wed, 7 Feb 2024 12:14:08 +0100 Message-ID: <20240207111411.115040-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207111411.115040-1-pbonzini@redhat.com> References: <20240207111411.115040-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.294, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org isa-superio.c currently defines a SuperIO chip that is not used by any other user of the faile. Extract the chip to a separate file. Signed-off-by: Paolo Bonzini Reviewed-by: Bernhard Beschow --- hw/isa/fdc37m81x-superio.c | 32 ++++++++++++++++++++++++++++++++ hw/isa/isa-superio.c | 18 ------------------ hw/isa/Kconfig | 4 ++++ hw/isa/meson.build | 1 + hw/mips/Kconfig | 2 +- 5 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 hw/isa/fdc37m81x-superio.c diff --git a/hw/isa/fdc37m81x-superio.c b/hw/isa/fdc37m81x-superio.c new file mode 100644 index 00000000000..55e91fbca17 --- /dev/null +++ b/hw/isa/fdc37m81x-superio.c @@ -0,0 +1,32 @@ +/* + * SMS FDC37M817 Super I/O + * + * Copyright (c) 2018 Philippe Mathieu-Daudé + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/isa/superio.h" + +static void fdc37m81x_class_init(ObjectClass *klass, void *data) +{ + ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass); + + sc->serial.count = 2; /* NS16C550A */ + sc->parallel.count = 1; + sc->floppy.count = 1; /* SMSC 82077AA Compatible */ + sc->ide.count = 0; +} + +static const TypeInfo types[] = { + { + .name = TYPE_FDC37M81X_SUPERIO, + .parent = TYPE_ISA_SUPERIO, + .class_init = fdc37m81x_class_init, + }, +}; + +DEFINE_TYPES(types) diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c index 98d50844f71..a8c8c58ef7f 100644 --- a/hw/isa/isa-superio.c +++ b/hw/isa/isa-superio.c @@ -190,27 +190,9 @@ static const TypeInfo isa_superio_type_info = { .instance_size = sizeof(ISASuperIODevice), }; -/* SMS FDC37M817 Super I/O */ -static void fdc37m81x_class_init(ObjectClass *klass, void *data) -{ - ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass); - - sc->serial.count = 2; /* NS16C550A */ - sc->parallel.count = 1; - sc->floppy.count = 1; /* SMSC 82077AA Compatible */ - sc->ide.count = 0; -} - -static const TypeInfo fdc37m81x_type_info = { - .name = TYPE_FDC37M81X_SUPERIO, - .parent = TYPE_ISA_SUPERIO, - .class_init = fdc37m81x_class_init, -}; - static void isa_superio_register_types(void) { type_register_static(&isa_superio_type_info); - type_register_static(&fdc37m81x_type_info); } type_init(isa_superio_register_types) diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index 5df3c09cd51..73c6470805c 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -23,6 +23,10 @@ config ISA_SUPERIO # Some users of ISA_SUPERIO do not use it #select IDE_ISA +config FDC37M81X + bool + select ISA_SUPERIO + config PC87312 bool select ISA_SUPERIO diff --git a/hw/isa/meson.build b/hw/isa/meson.build index 2ab99ce0c6b..f650b395071 100644 --- a/hw/isa/meson.build +++ b/hw/isa/meson.build @@ -4,6 +4,7 @@ system_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('isa-bus.c')) system_ss.add(when: 'CONFIG_ISA_SUPERIO', if_true: files('isa-superio.c')) system_ss.add(when: 'CONFIG_PC87312', if_true: files('pc87312.c')) system_ss.add(when: 'CONFIG_PIIX', if_true: files('piix.c')) +system_ss.add(when: 'CONFIG_FDC37M81X', if_true: files('fdc37m81x-superio.c')) system_ss.add(when: 'CONFIG_SMC37C669', if_true: files('smc37c669-superio.c')) system_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686.c')) diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index afcfb2b8eca..e57db4f6412 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -1,7 +1,7 @@ config MALTA bool + select FDC37M81X select GT64120 - select ISA_SUPERIO select PIIX config MIPSSIM From patchwork Wed Feb 7 11:14:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1896086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VeJ2nHOA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TVHZs11xwz23gb for ; Wed, 7 Feb 2024 22:15:01 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXfsz-0002tE-R8; Wed, 07 Feb 2024 06:14:37 -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 1rXfsx-0002sx-FR for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:35 -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 1rXfsv-0003Rb-Oh for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707304473; 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=R0KI2721IFtb4WAKrG3+R+L2haa/vmvr3mnGCgCOoT4=; b=VeJ2nHOA0XqLRqeyo5W1ikbjRCjt+IXFB9PHzM3Jsv8xWTSjQ87DWytdRhiKrQOlB3pxBs /CTPKx5AKJSAy6VA5PXj0SBn5JoiCFp4YKAEvzMBA/4pcQCQYIKbtWKTdp1dz1V6jX2eDk 7y6sNLeICkTkPqCBgJxP0YY76a2aSq4= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-621-RGmsWFqNODaAKBZkFEfNEg-1; Wed, 07 Feb 2024 06:14:32 -0500 X-MC-Unique: RGmsWFqNODaAKBZkFEfNEg-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2d0c1aa652eso5957221fa.2 for ; Wed, 07 Feb 2024 03:14:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707304470; x=1707909270; 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=R0KI2721IFtb4WAKrG3+R+L2haa/vmvr3mnGCgCOoT4=; b=NbCB21tDg8DXEYcQhUTA4ancCwfPPSH+RPdAqrol8ceJmVdkBdIUkZtYlmnEU9tes/ 456YSux8xh1J6bBLPSS7SZbGPjNKvpqTqvcESfnbPJpiNL3OAGvM46NXxwcMRTS9f0QQ Wq7aue7aS3NSbClBXOc0qR5gqoLXowzK+0uCjjBj5+RUp7IXk3WCoWtOQTZ9aFlG6NKX CsyRYotfO2FvMn4HjyGPKpr68uxVN35ZtEgvGtf8CrjSpWx6rj8DIh9kA+u55zqyhevK 1+76ZQBcbIXRxOlFimVhaUoOPCbWN4pmb1gheIVMkZk5KFld5RWDyXPyq96zLlQGhBby NC9A== X-Gm-Message-State: AOJu0YzHNT4dTmRlxoNwtW/tkxvvUxGozPEcGAmnJWDbc+dLsdHAfuax bqXNaFNLuj19w0GV7F7JAEKiLxsVv2Uvs32VZFkAKUD738o6yfECE8eH1YYLyDeZZKbtruCCXYW eA1DbMY7M5qlmD2dHv8mKHSdfoJPX9oiU6vU+BzW2YDpzTXsugp+EkqMIICWaj+Hg+NEowJor3o q+N+tiy4t4k+oV+nkw7TZXnrtfCVnnY65lKkEJ X-Received: by 2002:a05:651c:695:b0:2d0:b025:f1ee with SMTP id x21-20020a05651c069500b002d0b025f1eemr3027851ljb.21.1707304470016; Wed, 07 Feb 2024 03:14:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEY0eYuSBAGKAd1+PxkefcHY7yc6nAL7p53a+kSRfZYZVtqDT6Dxj9Yw63JP+R7Ed7wIN+BZw== X-Received: by 2002:a05:651c:695:b0:2d0:b025:f1ee with SMTP id x21-20020a05651c069500b002d0b025f1eemr3027835ljb.21.1707304469595; Wed, 07 Feb 2024 03:14:29 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXx/zhrZv/znHdBPtHtBcJzixxiO/iDTu5fY95DbYdFU+ti5g30/O9V+kXE0PAEmVk5UPCOePrYHE9+YFeRi5F2kA== Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id v2-20020aa7d802000000b0055efaddeafdsm552613edq.86.2024.02.07.03.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 03:14:28 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: shentey@gmail.com, philmd@linaro.org Subject: [PATCH v2 7/8] mips: allow compiling out CONFIG_MIPS_ITU Date: Wed, 7 Feb 2024 12:14:09 +0100 Message-ID: <20240207111411.115040-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207111411.115040-1-pbonzini@redhat.com> References: <20240207111411.115040-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.294, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org itc_reconfigure() is referenced from TCG, provide a stub if needed. This makes it possible to build a QEMU binary that only includes boards without a CPS device (only Malta and Boston create one). Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- hw/mips/mips_itu-stub.c | 26 ++++++++++++++++++++++++++ hw/mips/meson.build | 1 + 2 files changed, 27 insertions(+) create mode 100644 hw/mips/mips_itu-stub.c diff --git a/hw/mips/mips_itu-stub.c b/hw/mips/mips_itu-stub.c new file mode 100644 index 00000000000..4cc82b8461f --- /dev/null +++ b/hw/mips/mips_itu-stub.c @@ -0,0 +1,26 @@ +/* + * Inter-Thread Communication Unit emulation. + * + * Copyright (c) 2016 Imagination Technologies + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#include "qemu/osdep.h" +#include "hw/misc/mips_itu.h" + +void itc_reconfigure(MIPSITUState *tag) +{ + abort(); +} diff --git a/hw/mips/meson.build b/hw/mips/meson.build index f06d88f3430..2b1b96147a6 100644 --- a/hw/mips/meson.build +++ b/hw/mips/meson.build @@ -4,6 +4,7 @@ mips_ss.add(when: 'CONFIG_FW_CFG_MIPS', if_true: files('fw_cfg.c')) mips_ss.add(when: 'CONFIG_LOONGSON3V', if_true: files('loongson3_bootp.c', 'loongson3_virt.c')) mips_ss.add(when: 'CONFIG_MALTA', if_true: files('malta.c')) mips_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('cps.c')) +mips_ss.add(when: 'CONFIG_MIPS_ITU', if_false: files('mips_itu-stub.c')) if 'CONFIG_TCG' in config_all_accel mips_ss.add(when: 'CONFIG_JAZZ', if_true: files('jazz.c')) From patchwork Wed Feb 7 11:14:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1896088 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YvgT/9ji; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TVHbN3Sbdz23gT for ; Wed, 7 Feb 2024 22:15:28 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXft1-0002tx-G3; Wed, 07 Feb 2024 06:14:39 -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 1rXfsz-0002tM-Ts for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:37 -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 1rXfsy-0003S1-AC for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707304475; 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=LYJ8/tFAmrh3VcWdElUpsPrqIWISPJqBMUPEWn4+ITY=; b=YvgT/9jiMsqoPdL2cP2Qu5AuyGHRuNSsUPq6p/ElzKSnYegQErt63+5alO/TFX4VgeSUSV 9LzCo1kbyVKHS+ir0E+FFvlj5hR5UE/QMLQJ51pFPF0qb5VGEgOcSLelMFCE0Vq4vwwpf8 RllXJscE5sy9gQD0ECQvNyFqlGSdg18= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-349-zrJ0iPp5NpipG2Z8S5kTNQ-1; Wed, 07 Feb 2024 06:14:33 -0500 X-MC-Unique: zrJ0iPp5NpipG2Z8S5kTNQ-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a3821399b38so28030666b.0 for ; Wed, 07 Feb 2024 03:14:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707304472; x=1707909272; 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=LYJ8/tFAmrh3VcWdElUpsPrqIWISPJqBMUPEWn4+ITY=; b=WAnw7UNj1sXixR0EDZbOCx3yvilbyU0qxxMTWHWzKPh1Ua5HhwTNlvjUjiEMB6KZlt nITtkpOfte2TIHu/PmVur9LDK2+7djuFOm6MYGAty4386THBNX7I1WtG9lgwnGrjERYL BKFNceJBLYwrPIQoyyYjv/kmwcT8hX1ey2J+FPEJ8karPurKmLlg2s0w4NpdLTtte+YL H+25Ciybh4a6ogPvm4mNMnJ8oWGM0iJ7dQ8a+lQ8Vtn52gGdosEp/cLv6RqIWYdNNCbf 45iZaFHJ90qYWeqQ9UzOPzvDdgLn/hm5ZP/aF5g/XjWonhfyyTCI+V4ITRYsxbTND1we hn8Q== X-Gm-Message-State: AOJu0YzpjUfIm80Hx4NFaK5i4IHqesLbaOhgYyfvBb01dxcygahtTrBh P4RSLl6rDmlmMrgmxb0NuL9xcb5QgrLjhXLevCfGNAF5BiwAUSRZOOBLp0denfzfMY7f1dSoRvx Ea4yeGHpk3ffdYNtte76JXAsAIg3TFjtavC1XFHnIJCqtfES7CuPvoQ7YT0JPdMHbkc6uQSbIIV obS7/5oB3LC7y/RRFgcxvSS5edwwq4eU4uNJ4G X-Received: by 2002:a17:906:710e:b0:a36:5079:d6c9 with SMTP id x14-20020a170906710e00b00a365079d6c9mr3434321ejj.76.1707304472282; Wed, 07 Feb 2024 03:14:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFt7d4EUP9ian+AzAurGomldHgYv/TOxXdYxnsVEfgwtCbrhkVmhIs/bTF4DV+is4tnLJFb9g== X-Received: by 2002:a17:906:710e:b0:a36:5079:d6c9 with SMTP id x14-20020a170906710e00b00a365079d6c9mr3434303ejj.76.1707304471966; Wed, 07 Feb 2024 03:14:31 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUJTewOuL7R/I4PQlNiLbtrZ0paX3w1QGY9OKOKEXs53zrJ+BvTOeoDukpggfQsDeXSp1CyxA2BD77zequ1CO1QfQ== Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id ty13-20020a170907c70d00b00a338fedb9ebsm650303ejc.54.2024.02.07.03.14.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 03:14:30 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: shentey@gmail.com, philmd@linaro.org Subject: [PATCH v2 8/8] mips: do not list individual devices from configs/ Date: Wed, 7 Feb 2024 12:14:10 +0100 Message-ID: <20240207111411.115040-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207111411.115040-1-pbonzini@redhat.com> References: <20240207111411.115040-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.294, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add new "select" and "imply" directives if needed. The resulting config-devices.mak files are the same as before. Signed-off-by: Paolo Bonzini --- configs/devices/mips-softmmu/common.mak | 28 +++----------------- configs/devices/mips64el-softmmu/default.mak | 3 --- hw/mips/loongson3_virt.c | 5 ++-- hw/display/Kconfig | 2 +- hw/mips/Kconfig | 20 +++++++++++++- 5 files changed, 27 insertions(+), 31 deletions(-) diff --git a/configs/devices/mips-softmmu/common.mak b/configs/devices/mips-softmmu/common.mak index 1a853841b27..416a5d353e8 100644 --- a/configs/devices/mips-softmmu/common.mak +++ b/configs/devices/mips-softmmu/common.mak @@ -1,28 +1,8 @@ # Common mips*-softmmu CONFIG defines -CONFIG_ISA_BUS=y -CONFIG_PCI=y -CONFIG_PCI_DEVICES=y -CONFIG_VGA_ISA=y -CONFIG_VGA_MMIO=y -CONFIG_VGA_CIRRUS=y -CONFIG_VMWARE_VGA=y -CONFIG_SERIAL=y -CONFIG_SERIAL_ISA=y -CONFIG_PARALLEL=y -CONFIG_I8254=y -CONFIG_PCSPK=y -CONFIG_PCKBD=y -CONFIG_FDC=y -CONFIG_I8257=y -CONFIG_IDE_ISA=y -CONFIG_PFLASH_CFI01=y -CONFIG_I8259=y -CONFIG_MC146818RTC=y -CONFIG_MIPS_CPS=y -CONFIG_MIPS_ITU=y +# Uncomment the following lines to disable these optional devices: +# CONFIG_PCI_DEVICES=n +# CONFIG_TEST_DEVICES=n + CONFIG_MALTA=y -CONFIG_PCNET_PCI=y CONFIG_MIPSSIM=y -CONFIG_SMBUS_EEPROM=y -CONFIG_TEST_DEVICES=y diff --git a/configs/devices/mips64el-softmmu/default.mak b/configs/devices/mips64el-softmmu/default.mak index d5188f7ea58..88a37cf27f1 100644 --- a/configs/devices/mips64el-softmmu/default.mak +++ b/configs/devices/mips64el-softmmu/default.mak @@ -3,8 +3,5 @@ include ../mips-softmmu/common.mak CONFIG_FULOONG=y CONFIG_LOONGSON3V=y -CONFIG_ATI_VGA=y -CONFIG_RTL8139_PCI=y CONFIG_JAZZ=y -CONFIG_VT82C686=y CONFIG_MIPS_BOSTON=y diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index 33eae01eca2..da47af2fa71 100644 --- a/hw/mips/loongson3_virt.c +++ b/hw/mips/loongson3_virt.c @@ -447,8 +447,9 @@ static inline void loongson3_virt_devices_init(MachineState *machine, if (defaults_enabled() && object_class_by_name("pci-ohci")) { pci_create_simple(pci_bus, -1, "pci-ohci"); - usb_create_simple(usb_bus_find(-1), "usb-kbd"); - usb_create_simple(usb_bus_find(-1), "usb-tablet"); + Object *usb_bus = object_resolve_path_type("", TYPE_USB_BUS, NULL); + usb_create_simple(USB_BUS(usb_bus), "usb-kbd"); + usb_create_simple(USB_BUS(usb_bus), "usb-tablet"); } for (i = 0; i < nb_nics; i++) { diff --git a/hw/display/Kconfig b/hw/display/Kconfig index 1aafe1923d2..5b2b3840f7a 100644 --- a/hw/display/Kconfig +++ b/hw/display/Kconfig @@ -55,7 +55,7 @@ config VGA_MMIO config VMWARE_VGA bool - default y if PCI_DEVICES && PC_PCI + default y if PCI_DEVICES && (PC_PCI || MIPS) depends on PCI select VGA diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index e57db4f6412..5c83ef49cf6 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -1,8 +1,15 @@ config MALTA bool + imply PCNET_PCI + imply PCI_DEVICES + imply TEST_DEVICES select FDC37M81X select GT64120 + select MIPS_CPS select PIIX + select PFLASH_CFI01 + select SERIAL + select SMBUS_EEPROM config MIPSSIM bool @@ -31,17 +38,26 @@ config JAZZ config FULOONG bool + imply PCI_DEVICES + imply TEST_DEVICES + imply ATI_VGA + imply RTL8139_PCI select PCI_BONITO + select SMBUS_EEPROM select VT82C686 config LOONGSON3V bool + imply PCI_DEVICES + imply TEST_DEVICES + imply VIRTIO_PCI + imply VIRTIO_NET imply VIRTIO_VGA imply QXL if SPICE + imply USB_OHCI_PCI select SERIAL select GOLDFISH_RTC select LOONGSON_LIOINTC - select PCI_DEVICES select PCI_EXPRESS_GENERIC_BRIDGE select MSI_NONBROKEN select FW_CFG_MIPS @@ -53,6 +69,8 @@ config MIPS_CPS config MIPS_BOSTON bool + imply PCI_DEVICES + imply TEST_DEVICES select FITLOADER select MIPS_CPS select PCI_EXPRESS_XILINX