From nobody Wed Nov 27 03:46:16 2024 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701178739; cv=none; d=zohomail.com; s=zohoarc; b=ipEzwN0lkhVPQ/UCSNJn+Ag+n2kk/6mkb0CogzW5x9tETpU/Z76HNFWhgaMgk2yV4csdcMyvnPxySz7KrOIKxKdTVuUykNJuBEXmdJrNljIsz5JhRm20Ur11lgwlp7k57CwW8AUvkXO0ULKKHoC2r19oqJl/NcYDvpy4X4kcDd8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701178739; 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=htBKMVce+5k4Dd75IUusM/oeR5Wa1XdashAH0btXn4s=; b=D0OBEoqyUAYntHxOfK0AgKF0HDO8fChnG+DjvvkJkBVyw9kkIEDOSIpc9s5KE9ZaLCR4J5OWvaUblfK6CDO1oSBoD0Dbj09vZKPyvpFE6CwnxGgzvSXrfGmKFsmug6Hl7fEsYKxeHyz5gY278vIk1rN6u8lEm0o2wCDq6pL8Ktw= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170117873909120.334735936493303; Tue, 28 Nov 2023 05:38:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7yHh-0001sM-OU; Tue, 28 Nov 2023 08:37:53 -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 1r7yHg-0001qr-6M for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:37:52 -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 1r7yHe-0007ya-O1 for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:37:51 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a013d22effcso740507866b.2 for ; Tue, 28 Nov 2023 05:37:50 -0800 (PST) Received: from m1x-phil.lan (crb44-h02-176-184-13-61.dsl.sta.abo.bbox.fr. [176.184.13.61]) by smtp.gmail.com with ESMTPSA id q26-20020a17090622da00b00a0d74d56d66sm3154544eja.42.2023.11.28.05.37.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Nov 2023 05:37:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701178669; x=1701783469; 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=htBKMVce+5k4Dd75IUusM/oeR5Wa1XdashAH0btXn4s=; b=pvOS4t1YWqQkJ+frrO1KRiLgYsltZlr36WIdRcL/sg6mdGe5cjaC1Pvwfw+Vth7CUO KLbS1h+D1eQgpskQPYx86IndfRZgi9rPydocaNO5q5jfIxPsqRDYaxfjfCI82WqXXl4g VUy9g3YoRIFgbpndhHKABycEkd5Vcz7NuxaAG75iG0VEo9Su58aKZ8WLcoVAIYxoEih1 MYN4Sbc8oRn7p7oY251GDbtmbSCerid4l3NTLbueB+nbbMwBf7+ug44a0OD+yfmMLze6 qBjBCyE8wD/jWvSt/wSXsxBGYlTdQJ9rJRGoXmZvRzQdOhHooeyrUXvy1GpVvYtoBUa4 +Jtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701178669; x=1701783469; 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=htBKMVce+5k4Dd75IUusM/oeR5Wa1XdashAH0btXn4s=; b=RuRwnMtHIKh6wlaykDjG/xxYSE/m/qit02uABPJkB8GFyEr04seBjv1EmOeqRgB6+c 8aSs6C2kdQRiVJEFIcoczfgtM9W79afA/DhwvntjMW1ooyjNXSlIoBQndfuenvbW41H5 R43d36NabRHJKl1aMbmaQdn1QijvbEB0wrHawyrLOocbIu3yU06VkXpqXT0RyNWCsFio 1ZgWhp5hzobWVUHBBKUAZtIo8JFhwDvLCj1Qp9DspYt9niopaVoEMSH651dO3qY+pEar L6jR8Yh6+MlXWlnCmNW0s4qJMAKoYH8IZcEnqRVl/qsuIkVs7NPngCUiNXWXJA5IJ94w 3CGQ== X-Gm-Message-State: AOJu0YzeJwoNhYmVbdPZTOit1z8DCIxfBQOWsfMwJChMtsrGFfY1B7eg TFEPEeavrRMaVMyW4bI088L5NKvtfviiNbj1Tyg= X-Google-Smtp-Source: AGHT+IG0ddno8ozv8YjUVBb7izg3bRab+R+FnCAjN+JZKFsEabaqSQdBXsAo+aa7K0NoVhkv5GF/PQ== X-Received: by 2002:a17:907:c8f:b0:9c6:8190:359f with SMTP id gi15-20020a1709070c8f00b009c68190359fmr9290221ejc.33.1701178669125; Tue, 28 Nov 2023 05:37:49 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Michael Rolnik , BALATON Zoltan , Samuel Tardieu , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Anton Johansson , Alessandro Di Federico Subject: [PULL 1/7] target/hexagon/idef-parser/prepare: use env to invoke bash Date: Tue, 28 Nov 2023 14:37:34 +0100 Message-ID: <20231128133740.64525-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231128133740.64525-1-philmd@linaro.org> References: <20231128133740.64525-1-philmd@linaro.org> 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: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1701178741171000008 From: Samuel Tardieu This file is the only one involved in the compilation process which still uses the /bin/bash path. Signed-off-by: Samuel Tardieu Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Message-ID: <20231123211506.636533-1-sam@rfc1149.net> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/hexagon/idef-parser/prepare | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hexagon/idef-parser/prepare b/target/hexagon/idef-parse= r/prepare index 72d6fcbd21..cb3622d4f8 100755 --- a/target/hexagon/idef-parser/prepare +++ b/target/hexagon/idef-parser/prepare @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash =20 # # Copyright(c) 2019-2021 rev.ng Labs Srl. All Rights Reserved. --=20 2.41.0 From nobody Wed Nov 27 03:46:16 2024 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701178799; cv=none; d=zohomail.com; s=zohoarc; b=fu0VK6n4mhOhq0RxoYBE35Nb5zPbvMBlrgmPcoRGL17ERGLxnEKsyWXeOM6X4As7Sw2nJWHAyvOCwwCuAAn7cpMGvNn1mfr5WeQid+1lTBb4tO85feezRbbWE2wUhYOnFQeex/P5r4mIC6MvnkoCLvMxrnayPAaUUHiapwhQu9U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701178799; 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=Uzi8wIQSpfhO1cy29d4ly7tCccneF+ePwVBHrNodZ4k=; b=bX0yXhyutJ+fH3/OkkBvo+cS3VT4q8mv3puHQooGppVV7gwD7PByUhPN72pbpr9n0CdOvkcM+yOVpCAbIFk/blEAFUHSIYj/7Nj7m/IbsA+0d6QCl8l7NF7+jkOq9/3vLvJkhtDqa95qGYGzH68qdkXL4vus63zDkcFl7Wpmi8o= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170117879954743.370191816364354; Tue, 28 Nov 2023 05:39:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7yHn-0001uj-Dg; Tue, 28 Nov 2023 08:37:59 -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 1r7yHl-0001u5-QU for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:37:57 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7yHk-00082g-3f for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:37:57 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a02d12a2444so792151066b.3 for ; Tue, 28 Nov 2023 05:37:55 -0800 (PST) Received: from m1x-phil.lan (crb44-h02-176-184-13-61.dsl.sta.abo.bbox.fr. [176.184.13.61]) by smtp.gmail.com with ESMTPSA id f11-20020a17090624cb00b009fc3f347109sm6766375ejb.156.2023.11.28.05.37.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Nov 2023 05:37:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701178674; x=1701783474; 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=Uzi8wIQSpfhO1cy29d4ly7tCccneF+ePwVBHrNodZ4k=; b=yi4mU/YYZolzk3Fv1ye/mTwybAM8I+5uvnsDdKd+Hy9l/OHZ2ip64Wru6/Si/+WdYY ip0Q91DlZG60w/JYIE5ZgO9dTTR2QEpfBh9bNSJl18pucLPNmsb/tJMOMfwmXnfJGXV6 bp3IlglyghG/Znsv2wcL9x0KY83pzvTI9rZBq2DhaiqGyKaHOkAKM+N8DRoOyiB++gXc WOFhg6tTmWL7iCpSpny8qDa1br+3aqSPJYErum/9U3bgO/Ur8kIKqYw/MLkhw10FJu5s FqtkD43RMhwD/nHumBbKhQq/A3cr1aK6QaJMdNBtUgixGLCydNYiei+JzXSn56A9Rbbz 7P4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701178674; x=1701783474; 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=Uzi8wIQSpfhO1cy29d4ly7tCccneF+ePwVBHrNodZ4k=; b=vozNfJnbFJml0Z1FTmwoVytRS07UzvQabnwfy9JGsh1VMrY99HhNBDet8BeVrsGi6e A1ZUoCa7oI3op9Uvf6zx6zhTwSKp3uK3GrHJmjAHP3F3jfpbivrpz0A4c+xnE0bZPU8H 5jVUP5Qk53r0Cp2FyZxsZEnSZpCR+MJ0ZvAsVFgm/7A1ggnErWBuScA46BpG5kdT5B27 x+Zphep3Y3cf7TjcS4Dn+MrBnVT5aNhUA6MJIWem1afwsWVdRwmUwuZF37i9HOXqZiZa CM5C2UfYF5XigG19XOMuubcxTNvuf5nbf6cjfkcXe1jp7hn3mjZOIh4U1MYIN2YRtEN7 lxww== X-Gm-Message-State: AOJu0Yy8YBIWHraKqIYMEnuHS2oxEn3kb3bkicXeb9+K5OOZZ+ZYzO3d 7rTF1F3opZ1uJgZprVJLx92dqo7BkQEigDzgiMc= X-Google-Smtp-Source: AGHT+IEomZ6jm/Ms+MNRlNuUykBCCBmr6RxvAGfR8TSUNso/QQYyu1W0Dw+RlZlkbbO7F8sMuAfVWA== X-Received: by 2002:a17:907:9150:b0:9d5:ecf9:e6b5 with SMTP id l16-20020a170907915000b009d5ecf9e6b5mr8735393ejs.59.1701178674321; Tue, 28 Nov 2023 05:37:54 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Michael Rolnik , BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang Subject: [PULL 2/7] hw/isa/vt82c686: Bring back via_isa_set_irq() Date: Tue, 28 Nov 2023 14:37:35 +0100 Message-ID: <20231128133740.64525-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231128133740.64525-1-philmd@linaro.org> References: <20231128133740.64525-1-philmd@linaro.org> 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: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1701178802099000003 From: BALATON Zoltan The VIA integrated south bridge chips combine several functions and allow routing their interrupts to any of the ISA IRQs also allowing multiple sources to share the same ISA IRQ. E.g. pegasos2 firmware configures everything to use IRQ 9 but amigaone routes them to separate ISA IRQs so the current simplified routing does not work. Bring back via_isa_set_irq() and change it to take the component that wants to change an IRQ and keep track of interrupt status of each source separately and do the mapping to ISA IRQ within the ISA bridge. This may not handle cases when an ISA IRQ is controlled by devices directly, not going through via_isa_set_irq() such as serial, parallel or keyboard but these IRQs being conventionally fixed are not likely to be change by guests or share with other devices so this does not cause a problem in practice. This reverts commit 4e5a20b6da9b1f6d2e9621ed7eb8b239560104ae. Signed-off-by: BALATON Zoltan Message-ID: <1c3902d4166234bef0a476026441eaac3dd6cda5.1701035944.git.balato= n@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/isa/vt82c686.h | 2 ++ hw/isa/vt82c686.c | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/include/hw/isa/vt82c686.h b/include/hw/isa/vt82c686.h index b6e95b2851..da1722daf2 100644 --- a/include/hw/isa/vt82c686.h +++ b/include/hw/isa/vt82c686.h @@ -34,4 +34,6 @@ struct ViaAC97State { uint32_t ac97_cmd; }; =20 +void via_isa_set_irq(PCIDevice *d, int n, int level); + #endif diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 57bdfb4e78..6fad8293e6 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -549,6 +549,7 @@ struct ViaISAState { PCIDevice dev; qemu_irq cpu_intr; qemu_irq *isa_irqs_in; + uint16_t irq_state[ISA_NUM_IRQS]; ViaSuperIOState via_sio; MC146818RtcState rtc; PCIIDEState ide; @@ -592,6 +593,46 @@ static const TypeInfo via_isa_info =3D { }, }; =20 +void via_isa_set_irq(PCIDevice *d, int pin, int level) +{ + ViaISAState *s =3D VIA_ISA(pci_get_function_0(d)); + uint8_t irq =3D d->config[PCI_INTERRUPT_LINE], max_irq =3D 15; + int f =3D PCI_FUNC(d->devfn); + uint16_t mask =3D BIT(f); + + switch (f) { + case 2: /* USB ports 0-1 */ + case 3: /* USB ports 2-3 */ + max_irq =3D 14; + break; + } + + /* Keep track of the state of all sources */ + if (level) { + s->irq_state[0] |=3D mask; + } else { + s->irq_state[0] &=3D ~mask; + } + if (irq =3D=3D 0 || irq =3D=3D 0xff) { + return; /* disabled */ + } + if (unlikely(irq > max_irq || irq =3D=3D 2)) { + qemu_log_mask(LOG_GUEST_ERROR, "Invalid ISA IRQ routing %d for %d", + irq, f); + return; + } + /* Record source state at mapped IRQ */ + if (level) { + s->irq_state[irq] |=3D mask; + } else { + s->irq_state[irq] &=3D ~mask; + } + /* Make sure there are no stuck bits if mapping has changed */ + s->irq_state[irq] &=3D s->irq_state[0]; + /* ISA IRQ level is the OR of all sources routed to it */ + qemu_set_irq(s->isa_irqs_in[irq], !!s->irq_state[irq]); +} + static void via_isa_request_i8259_irq(void *opaque, int irq, int level) { ViaISAState *s =3D opaque; --=20 2.41.0 From nobody Wed Nov 27 03:46:16 2024 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701178739; cv=none; d=zohomail.com; s=zohoarc; b=cJp6Yn7X4QQQRpsudnwp//wzI7RtjoSAOBF9Su2ti3E/XpjXdv4ZNRWBI6dIsALwpmZogBFwTIjbq8U9hU5FGSeC0TS7T3Z4SGZ3UfFlcK+CumpAZyq4wC1L4YLOctckQrH1gg9FHwOSovn9hWEuS2wSFnHiE2s7vakme3GM7Ik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701178739; 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=AU3XHV66pWU29DJMHZUdephtHQTkVekgNrGzgZLdqHA=; b=QlPDd4QnIPqY49s6TEj8+7LjJI+OWqX+vYbMzI8sT9SJTmiXQXotV7Jbf+QC6VPaLlmvV5lH/QZtO3mgNpsXYvhckOfz40s0ZRZYCgaO9MBPx8en7VlU77PmqVgSgncEd9vKstJGkaxnEiuQscVsSINa9Q6PEqriiy5XGjL9+2U= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701178739402363.3328149000189; Tue, 28 Nov 2023 05:38:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7yHu-0001xv-CE; Tue, 28 Nov 2023 08:38:06 -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 1r7yHr-0001x6-RZ for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:03 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7yHp-000863-Jy for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:03 -0500 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-548f0b7ab11so7373779a12.1 for ; Tue, 28 Nov 2023 05:38:01 -0800 (PST) Received: from m1x-phil.lan (crb44-h02-176-184-13-61.dsl.sta.abo.bbox.fr. [176.184.13.61]) by smtp.gmail.com with ESMTPSA id bw24-20020a170906c1d800b009fc24437439sm6785378ejb.158.2023.11.28.05.37.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Nov 2023 05:37:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701178679; x=1701783479; 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=AU3XHV66pWU29DJMHZUdephtHQTkVekgNrGzgZLdqHA=; b=rSEU1WnVZbcXU60hPlgN8aASM/1URl015XiZqkvbcVbtXpk9MbVpXpIZVCyKA1JzGN FMBSczVgnko8hFwvgU+7SPu+N9sgH9FgC9zecLTFF7+rWXQUPgPSHJbztI3gR+/sf9Io /Wpk7G+eFpSX2muBvkMZhrqc5SRNidCIJxZuOwog6WavOjDGNS+cSLFhwNYAqY55EERl MtByU9EzqNoga7mx9cx41jF9WVMoibLx2v2gLlREuPJDQ0dbcNBEI5XsrT7W1V/h8foF SMkIaQXqEC4ROEPuQjPilLrNdd7B3137dIJVpfQ46hCb+Ii17CncSMSQpVaiq2Whwp0g gozQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701178679; x=1701783479; 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=AU3XHV66pWU29DJMHZUdephtHQTkVekgNrGzgZLdqHA=; b=CI3JxYl7zSlejuIlAI9zn2IZUmr/AN/bKMLa0nMBdiYHVepn2pcqAF3h+XKEhuOcet imU56qdAH3MapcvxJw3n5dmXMYHZYAmHm7Bw6+XX0myid7bd+Bny81uS26Y2EijHG/f/ cm9CtMvsBozs/91/WElFJGgbK4+lPI7YeDME86yUU6ixsChFU//FrcnwtWcVovItXtGv cbIFREpqucMGg+RGdIVsfsEUPrxuAd/AnmLjoYr77hEYDc6QstJxnWaDWn/x/jBj/x0A wfVcbw3a38lKwL6gvWsNlc9efrQl+EXsH7wFLFQabm8jqLTRi4bUEb7hhglJBfzlA5mu b8ZA== X-Gm-Message-State: AOJu0Ywygk6PMJM3hdf/psFzHB3FivvMz74Eb/qvmwZGJ4wJGexunVXs o7i2Oefx9nqbcQyiPRCReic3IsGEmPYU5QOKGpo= X-Google-Smtp-Source: AGHT+IG2YRrfzhFpMwaIEeVc531l5d0AFGSSIM4FRFac44qmYPsDPFjElgnaNdirkgIT3NHvIDgfJw== X-Received: by 2002:a17:906:583:b0:a00:893f:58cf with SMTP id 3-20020a170906058300b00a00893f58cfmr9986731ejn.54.1701178679633; Tue, 28 Nov 2023 05:37:59 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Michael Rolnik , BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Jiaxun Yang Subject: [PULL 3/7] hw/usb/vt82c686-uhci-pci: Use ISA instead of PCI interrupts Date: Tue, 28 Nov 2023 14:37:36 +0100 Message-ID: <20231128133740.64525-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231128133740.64525-1-philmd@linaro.org> References: <20231128133740.64525-1-philmd@linaro.org> 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: pass client-ip=2a00:1450:4864:20::534; envelope-from=philmd@linaro.org; helo=mail-ed1-x534.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1701178741165000007 From: BALATON Zoltan This device is part of a superio/ISA bridge chip and IRQs from it are routed to an ISA interrupt. Use via_isa_set_irq() function to implement this in a vt82c686-uhci-pci specific irq handler. This reverts commit 422a6e8075752bc5342afd3eace23a4990dd7d98. Signed-off-by: BALATON Zoltan Message-ID: Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/usb/vt82c686-uhci-pci.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/usb/vt82c686-uhci-pci.c b/hw/usb/vt82c686-uhci-pci.c index b4884c9011..6162806172 100644 --- a/hw/usb/vt82c686-uhci-pci.c +++ b/hw/usb/vt82c686-uhci-pci.c @@ -1,7 +1,14 @@ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/isa/vt82c686.h" #include "hcd-uhci.h" =20 +static void uhci_isa_set_irq(void *opaque, int irq_num, int level) +{ + UHCIState *s =3D opaque; + via_isa_set_irq(&s->dev, 0, level); +} + static void usb_uhci_vt82c686b_realize(PCIDevice *dev, Error **errp) { UHCIState *s =3D UHCI(dev); @@ -15,6 +22,8 @@ static void usb_uhci_vt82c686b_realize(PCIDevice *dev, Er= ror **errp) pci_set_long(pci_conf + 0xc0, 0x00002000); =20 usb_uhci_common_realize(dev, errp); + object_unref(s->irq); + s->irq =3D qemu_allocate_irq(uhci_isa_set_irq, s, 0); } =20 static UHCIInfo uhci_info[] =3D { --=20 2.41.0 From nobody Wed Nov 27 03:46:16 2024 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701178776; cv=none; d=zohomail.com; s=zohoarc; b=PcUMZG4WIGxKte+5R1P1LInBeuJNHeZFyvNcJuYrs/TldE8KTdqycyY0sUNBiZJGQx38MISySMs4nBPXGc6miYZU2jelMnxeUCJbtqfM2N5swKlzAAiAYHP+8aowCjB78k2+9F9WOpTjG0OdQkQyqE5jqeO6wXnosv+yaqHkEiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701178776; 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=leKlI1n6G5PcdrvHQ/d7MuXu3YgwQw5y2/1THyY9+Xg=; b=ab7y50Cqo70+EC3XMcQKU+Wv3Grm78eh0VS/inZhi/ftfWDnkSZsEVk2C14Vbm7og6VzlyXMNnmq0R6j2d8lfd9fxgiEJCK5RHhA8pRQLRb3D1IEt746UCTfeJPZ8aLNpSog/lsNICxvYVJPYDwV1+KbqvqxrG4Q4E1X6I7T75U= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701178776764402.8383955360712; Tue, 28 Nov 2023 05:39:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7yI0-0001zQ-KT; Tue, 28 Nov 2023 08:38:12 -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 1r7yHy-0001yj-Ld for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:10 -0500 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7yHw-00086p-RU for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:10 -0500 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2c87adce180so67022821fa.0 for ; Tue, 28 Nov 2023 05:38:08 -0800 (PST) Received: from m1x-phil.lan (crb44-h02-176-184-13-61.dsl.sta.abo.bbox.fr. [176.184.13.61]) by smtp.gmail.com with ESMTPSA id h1-20020a170906590100b00a0c68d3f486sm3861968ejq.94.2023.11.28.05.38.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Nov 2023 05:38:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701178687; x=1701783487; 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=leKlI1n6G5PcdrvHQ/d7MuXu3YgwQw5y2/1THyY9+Xg=; b=W3PzGoEmR6sbKFXX+T0JkywSJSgZuhQzLRzUNTjpq/Hrycn+yt6U1PVrCo3BAL5IqT nMw//cRi2OMzAunrmo0YVM3YbX0oLuWj/KRGdbGpiabkMcfLxFXoOLffTLO0t/Ry3ZzS Ydj3r26/nUTH7PpvSyZXvvYugfRyQJB5kvrBHIWlX9JVhebjtXkfnZPt6dl7Hti6M+f3 sW8PTfW6/poizaaIpOhUCHu3piZVURszJr+Kgy9MwaS01Zve42kbot0FYriH+ip5TaP4 IDDFTr0GiScr6Kaj8xhdx8s239961f64b6FOlDfHEuKVAVVJiTrwTOYK3qn8otGewqrH BEkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701178687; x=1701783487; 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=leKlI1n6G5PcdrvHQ/d7MuXu3YgwQw5y2/1THyY9+Xg=; b=nD7Es1Dr1NnVIbYyKQVqKAILXwKKptCSNxA3+fxO53G1IbS6OaU9DDiWiOL0lAcfGC rfggTYD/nqehVBAcWznXa5T8o20c2vto9cdkinZSLAIbVnU7L1pgRASHHaSaVgp3NVXy yrZqUu2kjlbQ8Ib+pNsHpFouj116gmMCW1KjYICMcLrqJbyvjo9V2/yRfw3VPhHlEHyS brWOF3DLpafkxk2HPzEYwpSMQeWzyGYIXLz7pejLEcuGTSZFifYQkNlE9PI+n1Jw3eP9 JCrHMpspwUc0uLq7oKIfs3FJUW2WuP9+ycS68mxQ1qgLTn27Xu797+vMS9XtJ8WBi6ZV XjzA== X-Gm-Message-State: AOJu0Yztd5YC71KVJ4Syfmfww9I+XU+5agGEysgThirkJkH7C3ytzdaX OJpEKaeKrq187fJ05t8xNvxwObyEiYGjU903L/Y= X-Google-Smtp-Source: AGHT+IE8wiBjnwfCL5bMqaeO9Xah0oMqPsbyQocrFtXmrx4tTb020gmqmGxGUJ8rI1dR/DmqzSWJ8A== X-Received: by 2002:a19:ac47:0:b0:507:a766:ad27 with SMTP id r7-20020a19ac47000000b00507a766ad27mr9934289lfc.16.1701178686759; Tue, 28 Nov 2023 05:38:06 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Michael Rolnik , BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang Subject: [PULL 4/7] hw/isa/vt82c686: Route PIRQ inputs using via_isa_set_irq() Date: Tue, 28 Nov 2023 14:37:37 +0100 Message-ID: <20231128133740.64525-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231128133740.64525-1-philmd@linaro.org> References: <20231128133740.64525-1-philmd@linaro.org> 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: pass client-ip=2a00:1450:4864:20::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1701178777413000001 From: BALATON Zoltan The chip has 4 pins (called PIRQA-D in VT82C686B and PINTA-D in VT8231) that are meant to be connected to PCI IRQ lines and allow routing PCI interrupts to the ISA PIC. Route these in via_isa_set_irq() to make it possible to share them with internal functions that can also be routed to the same ISA IRQs. Fixes: 2fdadd02e675caca4aba4ae26317701fe2c4c901 Signed-off-by: BALATON Zoltan Message-ID: <8c4513d8b78fac40e6d4e65a0a4b3a7f2f278a4b.1701035944.git.balato= n@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/vt82c686.c | 67 ++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 42 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 6fad8293e6..a3eb6769fc 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -593,6 +593,21 @@ static const TypeInfo via_isa_info =3D { }, }; =20 +static int via_isa_get_pci_irq(const ViaISAState *s, int pin) +{ + switch (pin) { + case 0: + return s->dev.config[0x55] >> 4; + case 1: + return s->dev.config[0x56] & 0xf; + case 2: + return s->dev.config[0x56] >> 4; + case 3: + return s->dev.config[0x57] >> 4; + } + return 0; +} + void via_isa_set_irq(PCIDevice *d, int pin, int level) { ViaISAState *s =3D VIA_ISA(pci_get_function_0(d)); @@ -601,6 +616,10 @@ void via_isa_set_irq(PCIDevice *d, int pin, int level) uint16_t mask =3D BIT(f); =20 switch (f) { + case 0: /* PIRQ/PINT inputs */ + irq =3D via_isa_get_pci_irq(s, pin); + f =3D 8 + pin; /* Use function 8-11 for PCI interrupt inputs */ + break; case 2: /* USB ports 0-1 */ case 3: /* USB ports 2-3 */ max_irq =3D 14; @@ -633,52 +652,17 @@ void via_isa_set_irq(PCIDevice *d, int pin, int level) qemu_set_irq(s->isa_irqs_in[irq], !!s->irq_state[irq]); } =20 +static void via_isa_pirq(void *opaque, int pin, int level) +{ + via_isa_set_irq(opaque, pin, level); +} + static void via_isa_request_i8259_irq(void *opaque, int irq, int level) { ViaISAState *s =3D opaque; qemu_set_irq(s->cpu_intr, level); } =20 -static int via_isa_get_pci_irq(const ViaISAState *s, int irq_num) -{ - switch (irq_num) { - case 0: - return s->dev.config[0x55] >> 4; - case 1: - return s->dev.config[0x56] & 0xf; - case 2: - return s->dev.config[0x56] >> 4; - case 3: - return s->dev.config[0x57] >> 4; - } - return 0; -} - -static void via_isa_set_pci_irq(void *opaque, int irq_num, int level) -{ - ViaISAState *s =3D opaque; - PCIBus *bus =3D pci_get_bus(&s->dev); - int i, pic_level, pic_irq =3D via_isa_get_pci_irq(s, irq_num); - - /* IRQ 0: disabled, IRQ 2,8,13: reserved */ - if (!pic_irq) { - return; - } - if (unlikely(pic_irq =3D=3D 2 || pic_irq =3D=3D 8 || pic_irq =3D=3D 13= )) { - qemu_log_mask(LOG_GUEST_ERROR, "Invalid ISA IRQ routing"); - } - - /* The pic level is the logical OR of all the PCI irqs mapped to it. */ - pic_level =3D 0; - for (i =3D 0; i < PCI_NUM_PINS; i++) { - if (pic_irq =3D=3D via_isa_get_pci_irq(s, i)) { - pic_level |=3D pci_bus_get_irq_level(bus, i); - } - } - /* Now we change the pic irq level according to the via irq mappings. = */ - qemu_set_irq(s->isa_irqs_in[pic_irq], pic_level); -} - static void via_isa_realize(PCIDevice *d, Error **errp) { ViaISAState *s =3D VIA_ISA(d); @@ -689,6 +673,7 @@ static void via_isa_realize(PCIDevice *d, Error **errp) int i; =20 qdev_init_gpio_out(dev, &s->cpu_intr, 1); + qdev_init_gpio_in_named(dev, via_isa_pirq, "pirq", PCI_NUM_PINS); isa_irq =3D qemu_allocate_irqs(via_isa_request_i8259_irq, s, 1); isa_bus =3D isa_bus_new(dev, pci_address_space(d), pci_address_space_i= o(d), errp); @@ -702,8 +687,6 @@ static void via_isa_realize(PCIDevice *d, Error **errp) i8254_pit_init(isa_bus, 0x40, 0, NULL); i8257_dma_init(isa_bus, 0); =20 - qdev_init_gpio_in_named(dev, via_isa_set_pci_irq, "pirq", PCI_NUM_PINS= ); - /* RTC */ qdev_prop_set_int32(DEVICE(&s->rtc), "base_year", 2000); if (!qdev_realize(DEVICE(&s->rtc), BUS(isa_bus), errp)) { --=20 2.41.0 From nobody Wed Nov 27 03:46:16 2024 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701178781; cv=none; d=zohomail.com; s=zohoarc; b=aF+hZlgqe1IiGM8ILAFzv0zd7tXsV1UkO0lTgeT1A0WdLJB3J8iRxu2r24+Sp1TvbedfheLWVS1WWRJKYCI3+CtwT4WcIlXwym2J3mP6zpYkLvARtyLFzz/NNqR0UirTbVK/+vOhkEvLOTElfenIqLWNkK8beHLnMN+339bO18w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701178781; 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=qTMVhitieSJNZvrttwpbFm3rdYpSlAZIyeSRfKEX9cE=; b=Fm6wOfM/mmXg0uqyW8MBWJrG9G1T68iQvfBT9sEKD1Iia3iU90UvMeI6diq+y3Mbz+9WKs4dwB5Ju4xhHFQsmlKUPJvtlc+sBh7z0+ReM3Ypp350z0IeYGn4uX40liQRDeSxYGkzM2PL07izhcEzcfNB3lvJ1HyLMm3rVpIC2Xg= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17011787815111003.0364167264; Tue, 28 Nov 2023 05:39:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7yI5-000211-4o; Tue, 28 Nov 2023 08:38:17 -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 1r7yI3-0001zx-C9 for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:15 -0500 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7yI1-00087X-Of for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:15 -0500 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a02d91ab199so749211066b.0 for ; Tue, 28 Nov 2023 05:38:13 -0800 (PST) Received: from m1x-phil.lan (crb44-h02-176-184-13-61.dsl.sta.abo.bbox.fr. [176.184.13.61]) by smtp.gmail.com with ESMTPSA id h18-20020a1709063b5200b009fdd2c6d042sm6955414ejf.148.2023.11.28.05.38.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Nov 2023 05:38:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701178692; x=1701783492; 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=qTMVhitieSJNZvrttwpbFm3rdYpSlAZIyeSRfKEX9cE=; b=ArAKQ7vpO1RhuyIn3poB/u+rL+XcRgg/oFG/DjICEuEFQVxgaaRuzwF/XSHbc7g5hM ow/KoUFdKhpaiUGFxinahBA7Gie+ITN3Vnu5SUIfpMSz6xxsw/3iKAbRSz7xwKFs8EGM zSAFeatRMVqXyLg0Gr1CsZvbwXNhmZFxMoWJjjh3UxA8knv/OEfrxqw4RKCOPlBDM3hW hZmrjCpgBkRo7XkJ8wH1S+Ioni84l0uYmszDgVH1+h9v5JSvOitq+1UCTckiVo/4x4rq qZq+m8vkEXXupm6CD0enleGKHD26DHnddZrBfHVVFEYiDnH+lWCb5rwoqE8mrsHj5UCq Oedg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701178692; x=1701783492; 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=qTMVhitieSJNZvrttwpbFm3rdYpSlAZIyeSRfKEX9cE=; b=kL+SmDBUqlRdltqDV3wae8K6Nf3TihUuv4kzHICD8m0EAMbuFSbHG7i4rbteH7tsKp rpDTIBMX1QDys2StTLZ4Px88VOiBDHktb+N2zlf1qJJPJdlCl9XIHsDxa5qiUCtgdLEE r6e0N2JOkC2uy7GQTzdyapd5Ln+l1WThh29hBpMSN9RLE4NJ+BjivQoengjBTgCg0FcP nSgx0T0QXHqYWN3OP6oK0Hnq/m3owjTa+/lIbV65hcOJ77sGmPZcA5Xz59qI0IGsRyk+ Mf458kSKAqbn8PAoY3aiybObHs3tsgQUfAOdUTIIkbdpg5/xWAMAgRuyHqbDidOmPzuN njDg== X-Gm-Message-State: AOJu0YyWOoPULXTGVTPLTEEGLTHGnSXdg5+io/VvjUBju/I5MINWlqYH iStgY0Xi9WSJW/oIPqsDVLTH65jzBgl9cUHAFLA= X-Google-Smtp-Source: AGHT+IGFTktVv509/Xn1us4Zntg7l7ytNYzzZNufxod4L5ytUjErq3eZCr/oqAzvhkz1k3iC6bWmHA== X-Received: by 2002:a17:907:6d06:b0:9e5:2c72:9409 with SMTP id sa6-20020a1709076d0600b009e52c729409mr13673712ejc.43.1701178692301; Tue, 28 Nov 2023 05:38:12 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Michael Rolnik , BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Jiaxun Yang Subject: [PULL 5/7] hw/audio/via-ac97: Route interrupts using via_isa_set_irq() Date: Tue, 28 Nov 2023 14:37:38 +0100 Message-ID: <20231128133740.64525-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231128133740.64525-1-philmd@linaro.org> References: <20231128133740.64525-1-philmd@linaro.org> 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: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701178783187000007 From: BALATON Zoltan This device is a function of VIA south bridge and should allow setting interrupt routing within that chip. This is implemented in via_isa_set_irq(). Fixes: eb604411a78b82c468e2b8d81a9401eb8b9c7658 Signed-off-by: BALATON Zoltan Message-ID: <5329840e4be6dd8ae143d07cbfe61d8d2d106654.1701035944.git.balato= n@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/audio/via-ac97.c | 8 ++++---- hw/isa/vt82c686.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/audio/via-ac97.c b/hw/audio/via-ac97.c index 30095a4c7a..4c127a1def 100644 --- a/hw/audio/via-ac97.c +++ b/hw/audio/via-ac97.c @@ -211,14 +211,14 @@ static void out_cb(void *opaque, int avail) AUD_set_active_out(s->vo, 0); } if (c->type & STAT_EOL) { - pci_set_irq(&s->dev, 1); + via_isa_set_irq(&s->dev, 0, 1); } } if (CLEN_IS_FLAG(c)) { c->stat |=3D STAT_FLAG; c->stat |=3D STAT_PAUSED; if (c->type & STAT_FLAG) { - pci_set_irq(&s->dev, 1); + via_isa_set_irq(&s->dev, 0, 1); } } if (CLEN_IS_STOP(c)) { @@ -305,13 +305,13 @@ static void sgd_write(void *opaque, hwaddr addr, uint= 64_t val, unsigned size) if (val & STAT_EOL) { s->aur.stat &=3D ~(STAT_EOL | STAT_PAUSED); if (s->aur.type & STAT_EOL) { - pci_set_irq(&s->dev, 0); + via_isa_set_irq(&s->dev, 0, 0); } } if (val & STAT_FLAG) { s->aur.stat &=3D ~(STAT_FLAG | STAT_PAUSED); if (s->aur.type & STAT_FLAG) { - pci_set_irq(&s->dev, 0); + via_isa_set_irq(&s->dev, 0, 0); } } break; diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index a3eb6769fc..9c2333a277 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -622,6 +622,7 @@ void via_isa_set_irq(PCIDevice *d, int pin, int level) break; case 2: /* USB ports 0-1 */ case 3: /* USB ports 2-3 */ + case 5: /* AC97 audio */ max_irq =3D 14; break; } --=20 2.41.0 From nobody Wed Nov 27 03:46:16 2024 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701178738; cv=none; d=zohomail.com; s=zohoarc; b=Dg7OaVEDOPO2xtAMUKn+CmLl5u2KfEzECmpBHzEM5kXy3ENUD+E5m3ddTPnHCAEHJSMF5rorNAMu43hDAQm+Qa6dVKa/m5q3N1D5xakLOhjZQsli0m9bO5yorXODAcHAmHXePZsr+V51QeDvIrbG+wjts+sY3OTxp/qKv2Doj7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701178738; 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=peKa62xUsod/edNIYUpkMuF8n0prRBNW2awRUt91oBs=; b=HN5OpWoVZCZSB6rvxl1NFWyYi0JXGOJWtevKvUDZ8s9c0B28GfhpI6Q4LdcUeJY1nis8RkfyuKPzYCegC9wlDnfYFh0cHWkxMckGJY+p2SYCoSrbPwlJOuQfR7X/vaDcxq0BgxObzHSRDVKMtKndjPk/GxD4yrydD+9SUPvDqJc= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170117873897350.259970782361734; Tue, 28 Nov 2023 05:38:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7yIB-00022q-AC; Tue, 28 Nov 2023 08:38: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 1r7yI9-00022T-Vs for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:22 -0500 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7yI8-00088B-Ag for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:21 -0500 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a03a900956dso1030857066b.1 for ; Tue, 28 Nov 2023 05:38:19 -0800 (PST) Received: from m1x-phil.lan (crb44-h02-176-184-13-61.dsl.sta.abo.bbox.fr. [176.184.13.61]) by smtp.gmail.com with ESMTPSA id f3-20020a170906c08300b00a0a25541153sm5049993ejz.93.2023.11.28.05.38.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Nov 2023 05:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701178699; x=1701783499; 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=peKa62xUsod/edNIYUpkMuF8n0prRBNW2awRUt91oBs=; b=LbAnZXgaoxF9OaPVqGHvYHvjK3zskXNd9NiWOmxPOWhw1VVjS6rJl9hOfyq8uiEbtQ jCd5Zn0NL89iaynSXS3SbcgP07WPir6C9a7ZDMhlls6qwpCmPYq5Bsxr9+1lWb76JfCK wMHQqGHAOqcTiwJketdwBIrqGG3lHjviqYERr5ctW5/3s0ife8ACkS8jpwwTkAMKLQfm 4//oxzdNrASYNHpP2dstE/yUhy8I3teFwmsiKe9kJhiRZ62ZtPjFqpelPpXANCXiQOsY 9ukHXABBTVhTLVaFqfxh0+R8nEi5/CyjNEIoEQC5q5Im5Yv9yfzsJBCaxSfiozqVJnw+ /1Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701178699; x=1701783499; 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=peKa62xUsod/edNIYUpkMuF8n0prRBNW2awRUt91oBs=; b=DtE6jLTojFnEn/TPCoce+QZCQaZCp+KOvVJnMojft3QnPwUMh8JU2ybO449QTIGe1n h9X3N+lidwli1lBVFi58icdTv90iKBIVGHNOfwUu/K5ZbWzcjerBrnySU9OUml+MCGIa y6MPHxkrFNzY3ybMIADi1XEAZ1GOfqLEZLNSgz9pRJtYLSvdXDvds4AYG63mId/OCK4h N6/SpUcrr+umnOq3DZ6eg5DURmEcdG3eBxYUguMNqcYNmmvgg23PAAVVsWp0Y60AOqhg w6EPerOFGZx6QmEm9r5uxF/YzDV614qYlzqc/vQ50a8TUsFJF/9y8Pyo8ZZq9p4uOTu9 j10A== X-Gm-Message-State: AOJu0YyLqkdrDiXVfohZDaljv4ugMAE8a6py9sgV0ZdJr9qr53eZ9uIz 0oOVuSiD4h7LsRQd91mVZwTX0hhGkcFYQY1fHiI= X-Google-Smtp-Source: AGHT+IHXs9TvCJCJ6Opq0VNRw/iNFvEnutEDCISq3W96dQ8yyYngqYKmic/SXOwifg2PGLpZ85BEkw== X-Received: by 2002:a17:906:7398:b0:a0f:e0fc:c41d with SMTP id f24-20020a170906739800b00a0fe0fcc41dmr5591613ejl.34.1701178698932; Tue, 28 Nov 2023 05:38:18 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Michael Rolnik , BALATON Zoltan , Gihun Nam , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 6/7] hw/avr/atmega: Fix wrong initial value of stack pointer Date: Tue, 28 Nov 2023 14:37:39 +0100 Message-ID: <20231128133740.64525-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231128133740.64525-1-philmd@linaro.org> References: <20231128133740.64525-1-philmd@linaro.org> 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: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1701178741889000011 From: Gihun Nam The current implementation initializes the stack pointer of AVR devices to 0. Although older AVR devices used to be like that, newer ones set it to RAMEND. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1525 Signed-off-by: Gihun Nam Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/avr/cpu.h | 3 +++ hw/avr/atmega.c | 4 ++++ target/avr/cpu.c | 10 +++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/target/avr/cpu.h b/target/avr/cpu.h index 8a17862737..7960c5c57a 100644 --- a/target/avr/cpu.h +++ b/target/avr/cpu.h @@ -145,6 +145,9 @@ struct ArchCPU { CPUState parent_obj; =20 CPUAVRState env; + + /* Initial value of stack pointer */ + uint32_t init_sp; }; =20 /** diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c index a34803e642..31c8992d75 100644 --- a/hw/avr/atmega.c +++ b/hw/avr/atmega.c @@ -233,6 +233,10 @@ static void atmega_realize(DeviceState *dev, Error **e= rrp) =20 /* CPU */ object_initialize_child(OBJECT(dev), "cpu", &s->cpu, mc->cpu_type); + + object_property_set_uint(OBJECT(&s->cpu), "init-sp", + mc->io_size + mc->sram_size - 1, &error_abort= ); + qdev_realize(DEVICE(&s->cpu), NULL, &error_abort); cpudev =3D DEVICE(&s->cpu); =20 diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 44de1e18d1..999c010ded 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -25,6 +25,7 @@ #include "cpu.h" #include "disas/dis-asm.h" #include "tcg/debug-assert.h" +#include "hw/qdev-properties.h" =20 static void avr_cpu_set_pc(CPUState *cs, vaddr value) { @@ -95,7 +96,7 @@ static void avr_cpu_reset_hold(Object *obj) env->rampY =3D 0; env->rampZ =3D 0; env->eind =3D 0; - env->sp =3D 0; + env->sp =3D cpu->init_sp; =20 env->skip =3D 0; =20 @@ -152,6 +153,11 @@ static void avr_cpu_initfn(Object *obj) sizeof(cpu->env.intsrc) * 8); } =20 +static Property avr_cpu_properties[] =3D { + DEFINE_PROP_UINT32("init-sp", AVRCPU, init_sp, 0), + DEFINE_PROP_END_OF_LIST() +}; + static ObjectClass *avr_cpu_class_by_name(const char *cpu_model) { ObjectClass *oc; @@ -228,6 +234,8 @@ static void avr_cpu_class_init(ObjectClass *oc, void *d= ata) =20 device_class_set_parent_realize(dc, avr_cpu_realizefn, &mcc->parent_re= alize); =20 + device_class_set_props(dc, avr_cpu_properties); + resettable_class_set_parent_phases(rc, NULL, avr_cpu_reset_hold, NULL, &mcc->parent_phases); =20 --=20 2.41.0 From nobody Wed Nov 27 03:46:16 2024 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701178791; cv=none; d=zohomail.com; s=zohoarc; b=cW0evXeY6BBoUKLrgFYlcdfZbFT9nZTXxHfnZOr5HzKsdRQqL5m1PIGSWfhEpbZEa/bupGTAVTil+LOXjp5Ua+K0DmLLjc8ARtZRayVdRVx3wefu2+YZjZAD2G+wyNOKvQ53jIqeu2Gj9hrUyZ0fjjmSc6N9amunQCfHHm38eRo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701178791; 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=LowDtlS1mSCv15/zQIclQz5ifQEKy3t4KP1QtlXYuNc=; b=HklMYS7UpR4CFyzs+cJa8B/+m6uBRNhy0HpnajunmtLoTpJoBN6QoOokKIHQMS7r4KxNeHT4/BoC3Ivf2fJRG0bxQr86510Wxy43e7KvwVeReSyyMi06hBrPHGVLTmYzXPdwJfALFG9IcyPRxDiqqxOR4Oha1JB/lWiYOKGh6lk= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701178791883592.6831052173341; Tue, 28 Nov 2023 05:39:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7yII-00024L-Ds; Tue, 28 Nov 2023 08:38: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 1r7yIF-000243-Cj for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:27 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7yID-00088X-Re for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:27 -0500 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a08e4352992so554380066b.1 for ; Tue, 28 Nov 2023 05:38:25 -0800 (PST) Received: from m1x-phil.lan (crb44-h02-176-184-13-61.dsl.sta.abo.bbox.fr. [176.184.13.61]) by smtp.gmail.com with ESMTPSA id hg12-20020a1709072ccc00b009fe1dd221a3sm6848556ejc.92.2023.11.28.05.38.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Nov 2023 05:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701178704; x=1701783504; 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=LowDtlS1mSCv15/zQIclQz5ifQEKy3t4KP1QtlXYuNc=; b=Ic8Jx5gBdLpLFwk8K5/m32WrfvWWpx2tq5HB4776TdzvkELJzgc2vcz2lqg0kDzYuP 06DoBMKe/R+yONxhXn4TF/HhfsNlxsV4Kk5i9o5Vo3yQl6X8BGf3A7zuUTTuwz+cTtTk SrM/67kVXj55uFjnYZSXF5JkNDyoLj1QQIaWsfE5ojrarcgGfwfSq91AEUPFmW38fU8N Nf7rkC0vt5V+ldOPSA0nxBfunTOvf6lnKpEvhcJMdxf+oh7bmM0pwrRbCLiXhpe+mekC pTNtXPaSd5x8Ljxhwek9tLKobChyWQYgywgXntM3QurWm3U43BsfH/PN6prtI+aeNpnP FUcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701178704; x=1701783504; 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=LowDtlS1mSCv15/zQIclQz5ifQEKy3t4KP1QtlXYuNc=; b=W/8GittJEifOySR8KYW9htYAJVpo2uvmvfxeSw388HkT4YxM94LT79JzMCdz/lQJv9 jWUDrABbvOoPie/ZnMIP96+wq3WIrnwACfRKlP0YTkujNmsN1sB4l9cU4Vr83wZScsbj Vv6NmuDnVwD+DfWdXNdbDYSS9AjJnooMSEYf2ck5WhVEy101q/hpPi0QV4VK2vwclbKk TPhVZ2C4bwyN1aHY4ckqnS4Qpwbteph35EJSzQTQRaRJTye7Vy1IGSRate4YmoMNuLfl prP4V+biSTZMaxQGbdg8z8npWOXUBMCselS7MLq9DOkG61qvtFVjt+qKLklud9mC/jyl SnOQ== X-Gm-Message-State: AOJu0YygccMav8WAxte6+QyzYQpRuE6P79TnQcYKq2JFQ1i7LpYL4d0M wmK+IfHOInb8UsnHdJVFMT68oPhK7suJSDFGKZs= X-Google-Smtp-Source: AGHT+IEgsDJu1zAqCRu+2E4RSrYBIN+Yh7UntyOaZPNBSJ+gvUvpQzWbxybYhDblWriXhuGmIhs5yA== X-Received: by 2002:a17:906:224c:b0:a0c:fd56:c30 with SMTP id 12-20020a170906224c00b00a0cfd560c30mr5957986ejr.70.1701178704292; Tue, 28 Nov 2023 05:38:24 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Michael Rolnik , BALATON Zoltan , Zhao Liu , Nina Schoetterl-Glausch , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PULL 7/7] docs/s390: Fix wrong command example in s390-cpu-topology.rst Date: Tue, 28 Nov 2023 14:37:40 +0100 Message-ID: <20231128133740.64525-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231128133740.64525-1-philmd@linaro.org> References: <20231128133740.64525-1-philmd@linaro.org> 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: pass client-ip=2a00:1450:4864:20::634; envelope-from=philmd@linaro.org; helo=mail-ej1-x634.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701178793254000003 From: Zhao Liu From s390_possible_cpu_arch_ids() in hw/s390x/s390-virtio-ccw.c, the "core-id" is the index of possible_cpus->cpus[], so it should only be less than possible_cpus->len, which is equal to ms->smp.max_cpus. Fix the wrong "core-id" 112, because it isn't less than maxcpus (36) in -smp, and the valid core ids are 0-35 inclusive. Signed-off-by: Zhao Liu Reviewed-by: Nina Schoetterl-Glausch Message-ID: <20231127134917.568552-1-zhao1.liu@linux.intel.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- docs/devel/s390-cpu-topology.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/devel/s390-cpu-topology.rst b/docs/devel/s390-cpu-topolog= y.rst index 9eab28d5e5..48313b92d4 100644 --- a/docs/devel/s390-cpu-topology.rst +++ b/docs/devel/s390-cpu-topology.rst @@ -15,7 +15,7 @@ have default values: -smp 1,drawers=3D3,books=3D3,sockets=3D2,cores=3D2,maxcpus=3D36 \ -device z14-s390x-cpu,core-id=3D19,entitlement=3Dhigh \ -device z14-s390x-cpu,core-id=3D11,entitlement=3Dlow \ - -device z14-s390x-cpu,core-id=3D112,entitlement=3Dhigh \ + -device z14-s390x-cpu,core-id=3D12,entitlement=3Dhigh \ ... =20 Additions to query-cpus-fast @@ -78,7 +78,7 @@ modifiers for all configured vCPUs. "dedicated": true, "thread-id": 537005, "props": { - "core-id": 112, + "core-id": 12, "socket-id": 0, "drawer-id": 3, "book-id": 2 @@ -86,7 +86,7 @@ modifiers for all configured vCPUs. "cpu-state": "operating", "entitlement": "high", "qom-path": "/machine/peripheral-anon/device[2]", - "cpu-index": 112, + "cpu-index": 12, "target": "s390x" } ] --=20 2.41.0