From patchwork Thu Feb 8 18:12:37 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: 770860 Delivered-To: patch@linaro.org Received: by 2002:adf:9dca:0:b0:33b:4db1:f5b3 with SMTP id q10csp464686wre; Thu, 8 Feb 2024 10:14:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7tjm9rWE+nt3CjD4kFvCkIgl6IEr54rODjorBGDVL4Ug9SpB+/aR353N6rSV75m+9JVTG X-Received: by 2002:ac8:7445:0:b0:42b:ef45:dae2 with SMTP id h5-20020ac87445000000b0042bef45dae2mr8864932qtr.57.1707416057303; Thu, 08 Feb 2024 10:14:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707416057; cv=none; d=google.com; s=arc-20160816; b=U5iEX6X1cvB+3yakI5ZR+vZ7l3yyICQUxgO2siMyWHG5t9gcxnpVBLt1Gir/BfbGpx 6BZp0i7b476nby5Dlh3Oj2kvMU1iObV+mnfRygDMZvq4pIVhQfnpZBvE7FCeeZ3ychRx z0lifcZZpewP+TT2yVZXY62LwVOlYgM+Ga/1yKDMcWQgQ7ZA4+YLTJ2oMzsXXJdn0xJA mpaJ8Gl0+cwedco3bbBJgMfsUJAa8oG46F0wP6EBXgLhAs5NWF7xT7qUQhXCEvQZuFQ3 XuAU7EvmSIVwFwn0uKwcgud8Bfdb6QA6PgfpH0WKI8ptuVCVX32WqrAh3ZX0objm6CcU pFdQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/LcvVs02z5wCqQ7/8i6+yu1iXa6S9Xb47UoWtCZNINM=; fh=6fuirHJ4j9ESNJqihDodf4pmh72nbntMLt6Tdr4cqTQ=; b=U3iI+NLukBP5nH9SVJzyFZ3Nyya7ePGD/uOFwoEX5DlBKw0AJDFCqB+IStzAMHve6n 2Iz0/sjnM7GrjU3RhKfIIa10m+xAUQid6VRXM92tgtHlQXaDB9Hx/3DoOypHlA0VLMkA OzRm7WzZKeGrCQg6WD37D9CLO5Ybk/6MceWhR5vBJZHwmSPpVOhs+0P7+oeXQIOtmh/v jatoOKx1d2X0pS3w2r9PzyDZFe23QHEm3Acfebu8FL4LhTXMqkZDexBYQjKe1435MWmk kUEgXfBLU3YDgZokynOstGOrkx1vVp2CDa3C736DErlmdFA9yCrKGWZUh/3iDMqyTJ/0 WyrQ==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kLChST3M; 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 X-Forwarded-Encrypted: i=1; AJvYcCUX37DxT4RO50YtuIZV63twMqZqyWvBxWIjuLVtTKe0fF5YofvEpSCcoaQpZWnm1+F+44irnD2vWGaIvlJW7Trk Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g11-20020ac85d4b000000b0042c1accc565si594465qtx.51.2024.02.08.10.14.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Feb 2024 10:14:17 -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=kLChST3M; 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 1rY8tk-0004gS-CH; Thu, 08 Feb 2024 13:13:20 -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 1rY8tg-0004P7-KJ for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:16 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY8te-0006mP-FV for qemu-devel@nongnu.org; Thu, 08 Feb 2024 13:13:16 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a3bbad234feso12490666b.0 for ; Thu, 08 Feb 2024 10:13:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707415993; x=1708020793; 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=/LcvVs02z5wCqQ7/8i6+yu1iXa6S9Xb47UoWtCZNINM=; b=kLChST3MpqAINYSWIKQ7SvZsfDAj4eCpLU11rm+axmFfvUj7LaHPCR4t/qmeAjWGrq mBOB9jsrAcSGK6OsZXaiqPewx0VjnuxewG/OI9vyn2MCwA3s8PeiKNdouphtuxd28kON 1sD5+5YepU0/e2ovZbQcB5zRayxRxEBcGTgXsPCRls/3TOwYZSRDBV2/mNRIXSx8rhjz qh9HHkv/acwSNwjQm2nx4HOIWAGwb9MAFu5f7yIpIcba6EpTvPwLqXvzGI06KWFqLTc8 x+g+Y7oIt9A+Im4769VpNx5dJ8hkJD5pixXB+bsTcNkENJiCmWkTSLCWZ+e6pt3bSj4X 7XAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707415993; x=1708020793; 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=/LcvVs02z5wCqQ7/8i6+yu1iXa6S9Xb47UoWtCZNINM=; b=mlUTLnp4YWSBBeEkTpcGOs78dLfCh2JRrmqKRpVJ1nEu4tgllHmnldT4fSXmFhZW2G j+QQRK8KPbu20s/tXnV56mvSOssZBS/E2jBltCuwS4e8bKjjWXNSI+BUyC2+bqE3z+Xe MzVsBCL5BJ3PGj9KPo0YIezIG6spRYGaMgdJoumAUyylX5/654RZC3418KQ8mqJAroyx 3S1s8cpDw5guvsZBv3EOBZlZG4rHmkXMWzRxiEtQL3tyZjnSXcp5EdK88v6x7rB0Ntrd zMa+FMqKyG6um2NhEt8IzK5ip87iFJfN1PyDppNmLhaEIyJP0y/SPqy/2gtxAV9Sr0iS oVWg== X-Gm-Message-State: AOJu0YzwXkLOpU7ZBLOTvHsw0Ce5eVlgQQzLOC+RIAWMttlN+BOrBq+c kNZSxSTAnmbz61m39XG0iWL6z7SwGWiidEp3E71dU0Hgu6RITiAXocEXzZtoAK7TRRZ6PTFVnZl /Sco= X-Received: by 2002:a17:906:35db:b0:a37:5bf7:f64a with SMTP id p27-20020a17090635db00b00a375bf7f64amr86361ejb.41.1707415993010; Thu, 08 Feb 2024 10:13:13 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUZfWjveanJQ5aK1sWpJZqar0gAVGSp61K9g/bixFm0BOrX7dgH5vTaB5OvNGW+/SnuYXSKAt6OUtxnBup2L2Rjq3Z0Akmmd526UHBN1ZC4i46OOstrEDooU4Cm+WmoI5FHAk8cMrg/qWOcctApmm28cbxVfMUPxqYFIiUvaa5v7Lzw1ZyeeoE0Zpbi5OV8bqeoJFuKmqlkC3f22Q9I3McCVYr04T0PwmSfcP9YQOyCGRV9VskMzRoT6is3d9fi5ktgcv7p4J1gpUEv2IuJzk3+/djLw1+/SglqTQ06alvFjIAG7zQ8aIReGY9o31bIvyrKYUHCcVtu4/Sr7o/XV6zFN5GhlPaHtStglkU/0ei44duEijInvEoeHqkJbwDHeSaC Received: from m1x-phil.lan ([176.187.218.105]) by smtp.gmail.com with ESMTPSA id cu12-20020a170906ba8c00b00a397c2ab4a5sm297011ejd.120.2024.02.08.10.13.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Feb 2024 10:13:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Zhao Liu , Paolo Bonzini , qemu-block@nongnu.org, John Snow , qemu-ppc@nongnu.org, Eduardo Habkost , Richard Henderson , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH v3 04/11] hw/i386/pc_q35: Realize LPC PCI function before accessing it Date: Thu, 8 Feb 2024 19:12:37 +0100 Message-ID: <20240208181245.96617-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240208181245.96617-1-philmd@linaro.org> References: <20240208181245.96617-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 7ca3f465e0..f67e5a55df 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -250,11 +250,11 @@ static void pc_q35_init(MachineState *machine) TYPE_ICH9_LPC_DEVICE); qdev_prop_set_bit(DEVICE(lpc), "smm-enabled", x86_machine_is_smm_enabled(x86ms)); + pci_realize_and_unref(lpc, host_bus, &error_fatal); lpc_dev = DEVICE(lpc); for (i = 0; i < IOAPIC_NUM_PINS; i++) { qdev_connect_gpio_out_named(lpc_dev, ICH9_GPIO_GSI, i, x86ms->gsi[i]); } - pci_realize_and_unref(lpc, host_bus, &error_fatal); rtc_state = ISA_DEVICE(object_resolve_path_component(OBJECT(lpc), "rtc"));