From patchwork Mon Feb 26 16:49:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 775873 Delivered-To: patch@linaro.org Received: by 2002:a5d:6103:0:b0:33d:da16:65b6 with SMTP id v3csp427128wrt; Mon, 26 Feb 2024 08:49:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUHCj7g1YYYoLDW22g0VxCWHqjU4J92g/UGL3XaFaeQLbzQ0LMnA1Py/A7JP4gvRH+BA5ShycWBO9c66wqkmANt X-Google-Smtp-Source: AGHT+IH3aHB2c+aOMApFIZ33s8VSREqys8wwZcrTJpKZI0yZ8SUIz2Acrz7xgDLORFxeQipOiXYA X-Received: by 2002:a67:f51a:0:b0:470:9874:78b4 with SMTP id u26-20020a67f51a000000b00470987478b4mr4878959vsn.3.1708966196838; Mon, 26 Feb 2024 08:49:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708966196; cv=none; d=google.com; s=arc-20160816; b=G/Acc8xPsOTV752wb8YDv+hsm54E/BU/ZmnK72W8FrQ6DE+MegHYu617iwL0xuHN/d xWpDdU0BXLH73iQtFE2mqwpJCzPKxfZvZ2Qpa/Mwy3oOnzAYzFyuNnPSSbyFEFp1vPTG UTUr33U/RjUPq+OH2k35o60aQPhslHX3sCIBgTaAism/8ipvzQpWovwLWRdmTM9a30HD k+xGcQej8o6fmJBxgF45jaEHakrpDIYvVC6sbR+c4qIdvKCnbvRugDbWlAKgSLPJKulN S/Z3skXuFZzlTL6iYyLAyCRoH4kyl7q5NXH+dZgPQe1ogG/47nnMjLlo+QMUATepY0Ah k/7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=9RSIg5MfPMyLdHeCWQZgIMl/x6MtwhIPf52e94miu3U=; fh=afD/k2HZXMBaufC+DpUvb9x31uKmY7+wEY31QP4pBTk=; b=GnMjoVtBxh6LTvUGC01MLm/ffxfKpOZNpE8z5kRj++FdA9sBshHWlxJU0nuwiVa04j rHXUsfKj/mNAzTVUzqb49AciF59fuyFDNhDI8/Yr4XnfC8vtAJQg1d+/c81Y2H80e/dH oICKJ8URyINXu/XYskH1JW3AEvO5CvHUzHbbz4FCtnznNCZxupmSbOP6PDZ/wFVTjXsu bjkwU2qdi/WmeOywzjXiJdQg54qVqpi2FFMihjzAkya9QPz8hVk5leFCABe8/Y3KxkzA 0sdwIaYbGNpf1sFtPpuewzFE6hcndMZ0NLVm43Y+FUT2EdM8bECq9tJtZGiQ5KNnTVTA 7CYQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qmjhs4pM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v17-20020a05622a015100b0042e76eba2adsi5232635qtw.653.2024.02.26.08.49.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Feb 2024 08:49:56 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qmjhs4pM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reeAS-0005wM-0Q; Mon, 26 Feb 2024 11:49:28 -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 1reeAP-0005w5-M5 for qemu-devel@nongnu.org; Mon, 26 Feb 2024 11:49:25 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reeAI-0006C9-SO for qemu-devel@nongnu.org; Mon, 26 Feb 2024 11:49:25 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-33d38c9ca5bso1756817f8f.2 for ; Mon, 26 Feb 2024 08:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708966156; x=1709570956; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9RSIg5MfPMyLdHeCWQZgIMl/x6MtwhIPf52e94miu3U=; b=qmjhs4pMZjhyaN+ZKc4gpbrGRC4LE1XBdZDiZbPyZaGLD/783CoclyrfbNVtFVLZa7 XouZbuvHlO9CLBdG+wvwtDP6eQve78ca5m0p5isX9/rdFDlpZrWFwQDWHVQ4ygPqW4Il tuT5fIxvfJAMAzY473pEeAH9iy+I+o3Wn8Yk91lVhjf8tM6gejYWfyeMykJ106f1tYhu vyJcSQwZcvOiEPeby2hMWhV3GMauKDoIKtoWu/4PUXf/3cUN72bvEv3us0bunsXLpICO W+X4QGfkLuz8onQa6DRPGZLpkBq49KbjeVr86tJNbfBnQtLHA7tvuy+8HAZ64c11oVDz HmwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708966156; x=1709570956; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9RSIg5MfPMyLdHeCWQZgIMl/x6MtwhIPf52e94miu3U=; b=OjRPrl+CYlKU8x2dAB45FURzql9qpRYsSLn1TYDY/H6o5abEZZY223jYImwoj1Fu02 jiLcJSsvLSI+wDuhUJY6JC8X5vA+46quWv824T7f8OajA7UCmBOQb+swOsBmrIz1MCBc VMLpEeo0eUuODzvaz2tmi6zAe2W/rh8hxvSXXv39in37W7fIYruxjgceHTlifwqQmAFp LIPKXjYdN24MeFP7Tw85zXqQXD5J5+OvlzwXu162sygeSlTGG3oolcm7YeWNYfi4K5Nd JwDWBf00tyhj8JZjaJrohUkftKLaBXlOmFtQUcv/sVd29DiEYKb6GxiD+1UoISrfNt3m XmIg== X-Gm-Message-State: AOJu0YzeM/MavgB6Gh/ZYALyPW+PZON7ihvfZUSFs5uD3odeMGbYXGgu LiqC8RnNhZm8fcjUBuNpJvFKfPRMLqKaQtm5KMoThlDdGQt/MO9Q2J6AqncmdOVOG5SJEagcasY o X-Received: by 2002:a5d:4a06:0:b0:33d:3ff4:60b8 with SMTP id m6-20020a5d4a06000000b0033d3ff460b8mr6330135wrq.18.1708966156580; Mon, 26 Feb 2024 08:49:16 -0800 (PST) Received: from m1x-phil.lan ([176.187.223.153]) by smtp.gmail.com with ESMTPSA id m17-20020adff391000000b0033da1c4c29csm8766052wro.91.2024.02.26.08.49.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 26 Feb 2024 08:49:16 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , "Edgar E . Iglesias" , Anton Johansson , Mark Cave-Ayland , Peter Maydell , Zhao Liu , Eduardo Habkost , Marcel Apfelbaum , Igor Mammedov , Richard Henderson , Ani Sinha , Bernhard Beschow , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , "Michael S. Tsirkin" , Laszlo Ersek , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 0/5] hw/i386/q35: Decouple virtual SMI# lines and wire them to ICH9 chipset Date: Mon, 26 Feb 2024 17:49:07 +0100 Message-ID: <20240226164913.94077-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Hi, This is an experimental series to reduce calls to the cpu_interrupt() API from generic HW/. I'm trying to use the ICH9 chipset from a non-x86 machine. Without this experiment, we can not because cpu_interrupt() is target specific. Here the interrupt is decoupled using the QDev GPIO API. Even if the SMI# line is left unconnected, the device is still usable by a guest. Based-on: <20240226111416.39217-1-philmd@linaro.org> Philippe Mathieu-Daudé (5): target/i386/cpu: Expose SMI# IRQ line via QDev hw/i386/piix: Set CPU SMI# interrupt using QDev GPIO API hw/ahci/ich9_tco: Set CPU SMI# interrupt using QDev GPIO API hw/i386/q35: Wire virtual SMI# lines to ICH9 chipset hw/isa: Build ich9_lpc.c once include/hw/acpi/ich9.h | 1 + include/hw/acpi/ich9_tco.h | 4 ++-- include/hw/i386/pc.h | 2 -- include/hw/isa/ich9_lpc.h | 12 ++++++++++++ include/hw/southbridge/ich9.h | 1 + target/i386/cpu-internal.h | 1 + hw/acpi/ich9.c | 3 ++- hw/acpi/ich9_tco.c | 13 ++++++++++--- hw/i386/pc.c | 9 --------- hw/i386/pc_piix.c | 4 ++-- hw/i386/pc_q35.c | 26 ++++++++++++++++++++++++++ hw/isa/ich9_lpc.c | 15 ++++----------- hw/southbridge/ich9.c | 1 + target/i386/cpu-sysemu.c | 11 +++++++++++ target/i386/cpu.c | 2 ++ hw/isa/meson.build | 3 +-- 16 files changed, 76 insertions(+), 32 deletions(-)