From patchwork Tue Mar 12 08:22:26 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: 779683 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907187wrt; Tue, 12 Mar 2024 01:24:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWcdFxLdvzknJGSrhijHjsB6apnFkiUNpgbvRHVYGRjgTjxQnVv6QAgdkZFPQSL6DxcTRxq3KgROMx/DpUpjBxy X-Google-Smtp-Source: AGHT+IGPiItBYv2GX5DhQxnC/ZFxw3owSemsFgvA1OfSWAhJqesIYEumOBDsnhQKojfzQ6A9wZNo X-Received: by 2002:a37:c40c:0:b0:788:29d5:a8d0 with SMTP id d12-20020a37c40c000000b0078829d5a8d0mr10350259qki.64.1710231882129; Tue, 12 Mar 2024 01:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231882; cv=none; d=google.com; s=arc-20160816; b=B1JANy08uBGvXFhkLdbiXrf9a4ECSTcKm0k81qCVWHCmgDzZUc+vVtPjv8z89yBE+z lT8t1XyNrNgiuuvYjssl2Mjd7CPRowm3nYiJ2cRuZgXV3QZ9e6IVS1un4jmX0/WOmHnk kqkzBIo7BlLgpexopYGdKj3V8xlEsBHEYec4QE1rABzmtxXEq11ZM42c0gRmYbcsknU/ /xsEvkmrcHc8T4+HBfZCdjNPjJla+bFxPsPuz5Aly3e5ueVGJK3ekBx4C0ap2uFfgk4m BiyUbG5bR1fyXON+1amtVtqZYxHVFPpwytfsO/CW6U6doIJTZe/SJIovxmMXyAfIf/0t yb8w== 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=Y7t8ToQvoKJ38Eour/5JL7+zSxhmxaS/0ISJ7lI4Kdc=; fh=NTM106xp9GzLlBALp3IT/uSuxxxBUWWKHgQsGAgxoIk=; b=FctvB3/qxp9bDWVcpGqTd5cA3ng2iCNLh974KQGtmxBGyAxnM8fCR9BzAYyAyC05Po sOgQ44YLmuY8Jb/xixV5T8xtU6d04wtIPPhynwW8cGC5GQTx8D2gVVSp4VO9zlokkXFl BLJJNNQyK2zMxsXnjeedM0A3pb9itZjSGcGPq5wtxPX2rJZoIbqrzfbk7pjQ/OVlwIUn 02h44wTs4Lj3jS0iDz6nSjBVFG1ShMKadL72lW2lK1dvAAMLGZMLkZXIyBFceOE2kDnM Cb2VOZCgFQ08m5O59jVhjj7bxQQQgmdozg3yH9SUeUEXX2WeWjmn229WwwF2IBQ0aeeZ gtKw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QL0r5xmq; 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 vv20-20020a05620a563400b0078812fe97cfsi6893034qkn.409.2024.03.12.01.24.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:24:42 -0700 (PDT) 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=QL0r5xmq; 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 1rjxPT-0005Tt-Tg; Tue, 12 Mar 2024 04:22:55 -0400 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 1rjxPR-0005Sq-Kl for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:22:53 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxPO-000172-WC for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:22:53 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-41329b6286bso10538135e9.0 for ; Tue, 12 Mar 2024 01:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231769; x=1710836569; 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=Y7t8ToQvoKJ38Eour/5JL7+zSxhmxaS/0ISJ7lI4Kdc=; b=QL0r5xmqh3146A1Ybqwsgpaz0Z/RI85sU7uuwNECqQlwCNcw7GXaIx7dpeipi3FznM ir/oGuKq6k7M20nowBjqHTg7XbawV5jXbj73/hTJMHvSaEOdLsUbo0bOGq4QsYLnMkhj BSOHEdy9k+pfNhDXsqf4+M7jJmHhONxtza1wFuS/nHeE0cpOSx8tzKFbO2KGZXbDH1zL iipvTPOBkgF5jv93E/Z+Sd7StUG7rlCPO16OfE/9ruDfft4I+15nrp1EQuhAZEGdBkw9 sIkgWLOq8qEMHGx6TTJRNveHFr5Zp+9uS8mMsbs3TnaqblHaV9m9zgXSgvKGMXXG4NzM h4yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231769; x=1710836569; 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=Y7t8ToQvoKJ38Eour/5JL7+zSxhmxaS/0ISJ7lI4Kdc=; b=T67xoitdJOKO2pqlLcRV29PM2eoe2Ux00K4S2/uAGQfTFv3N9iqnVPI3PigrRlBAlJ L91CuctdARiv9G7Si9pTV/4d1ISmwcKEF+dFDa9iWlqpCVg/NP4cKEEs+PI9ZlKPkXDg DGQFWGtHOITn8pZizo1JfqJqpzkDVirK14LMKTkyVlRd1pPm7hjeYfCVqobO9YXz6tb7 ZveojEEkglmps6aPGSliG3xSEObrjYzFbvPOrsQchJpWTT4rc14JEHAx6XoNYTjFZGQ/ 0C6q9DuwgG132c8ufpvZNFemKgpMDbtTGXR9H4mu1M8R9xwPXkKYf997PzTA+TlXQ/4s crmQ== X-Gm-Message-State: AOJu0Ywtj0Xb7q7jz0e1rsRH2t7mRktkeChRwhsswW6oYfh/O12nMIB5 UKiYjvifDcgD0VGzKiP/FfFjOY+RDSyPcwlSr4LBifB9fjMLtX0fXErnEZCGtaMbGRXwESlDcPj 1 X-Received: by 2002:adf:f48c:0:b0:33d:ca56:a61f with SMTP id l12-20020adff48c000000b0033dca56a61fmr6912288wro.49.1710231769187; Tue, 12 Mar 2024 01:22:49 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id n2-20020a5d4002000000b0033de2f2a88dsm8320603wrp.103.2024.03.12.01.22.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:22:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, BALATON Zoltan , Markus Armbruster , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , John Snow Subject: [PULL 01/13] hw/ide/ahci: Rename ahci_internal.h to ahci-internal.h Date: Tue, 12 Mar 2024 09:22:26 +0100 Message-ID: <20240312082239.69696-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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 From: BALATON Zoltan Other headers now use dash instead of underscore. Rename ahci_internal.h accordingly for consistency. Signed-off-by: BALATON Zoltan Reviewed-by: Markus Armbruster Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240227131310.C24EB4E6005@zero.eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/{ahci_internal.h => ahci-internal.h} | 0 hw/ide/ahci.c | 2 +- hw/ide/ich.c | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename hw/ide/{ahci_internal.h => ahci-internal.h} (100%) diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci-internal.h similarity index 100% rename from hw/ide/ahci_internal.h rename to hw/ide/ahci-internal.h diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index b8123bc73d..bfefad2965 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -37,7 +37,7 @@ #include "hw/ide/pci.h" #include "hw/ide/ahci-pci.h" #include "hw/ide/ahci-sysbus.h" -#include "ahci_internal.h" +#include "ahci-internal.h" #include "ide-internal.h" #include "trace.h" diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 3ea793d790..9b909c87f3 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -70,7 +70,7 @@ #include "sysemu/dma.h" #include "hw/ide/pci.h" #include "hw/ide/ahci-pci.h" -#include "ahci_internal.h" +#include "ahci-internal.h" #define ICH9_MSI_CAP_OFFSET 0x80 #define ICH9_SATA_CAP_OFFSET 0xA8 From patchwork Tue Mar 12 08:22:27 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: 779686 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907191wrt; Tue, 12 Mar 2024 01:24:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUmtamWaFMB6V4CJCR/kZdKUd6PGloDUzBrSjRi3ZfBAc75p4xRt6AAG5bM74AX4Dqeyos3ShW8u0go5sF1+bOT X-Google-Smtp-Source: AGHT+IFVmnUWeCUAfoHKhMWDlc6+fv3xY8E6u4cCdWOjQ3QndoaKQVRoETM/iH5bdgjb5nyKj0iM X-Received: by 2002:a05:620a:31a2:b0:788:5f38:e87d with SMTP id bi34-20020a05620a31a200b007885f38e87dmr14094095qkb.0.1710231882302; Tue, 12 Mar 2024 01:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231882; cv=none; d=google.com; s=arc-20160816; b=yQWpBFObiuzGctdv0Zz0pHZwfIfNTS0Z79IjMMXEjlI094UP1YSSARkQaPsgaFpZC1 cIdY5SL+Kl9Tc0Onl1mraXKFwDyKVS5AvUSeVMcOspBOnsVadik2LqisMF59HNNbFsUE dzfPZBskVMTwnMq/sRWjYxdzVmzOOopfPSFGId9k0HnsX1pB54E9enWehcV4HEcCq8vq UVP+bPeyoBpcckixyeJA/PfsUgfcc5qfN2uG7jmf7IJU3tXwqqgLIkdz3pCUjqvohaHd f7RH+cYby/k7TXsVXPipmZbaTmx35rQboa++3rTGWl9Rq9opj4/vPA5BkrRsSdYmS95N bB4Q== 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=SQcWJI75CPaIFG8vmumDb+g+fNolR8s7hw2KDmVIUrw=; fh=4yelxtC2g/aYhv8y3X/XqTp4Lw+2nmQUlgWKuVcam4Y=; b=f0q/TCC2+OGBBeyrXI7/OhNQ21+x0ejsBrUggyN7hMu9uD6SjUxMTAJ0Coy11WxxKK KOihvwPq4I764r/jbhITX/qI+xtNAyMUt3wAU23dO6i0MIKLHVP3ktrFCBrt9bSqs6Vx jtR8AKOFHkCc9ySQX9TDw+0yy7FqrWdA0I/0RjiEJZl9YaK/6y6CSpAvUXV5NwGdOsQt a0V9OqjhPUstP90ag1dFTRXVrwEzIBVMkim6y2TvqQKbgkXSoDlUyL9xAVKeLNY2FWRG s1VRw4rxw8a4y//+37wbOjzT7IQ+hyIEQT6tHv01pj71IWp1MNOHz1FvzA4xTeCdTyxx ipeg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M3Pg9GYY; 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 s1-20020a05620a030100b00788371ee81csi7038115qkm.25.2024.03.12.01.24.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:24:42 -0700 (PDT) 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=M3Pg9GYY; 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 1rjxPc-0005Y0-O8; Tue, 12 Mar 2024 04:23:04 -0400 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 1rjxPb-0005X5-0y for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:03 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxPV-000180-Oy for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:02 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4131b1f8c91so25233775e9.3 for ; Tue, 12 Mar 2024 01:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231775; x=1710836575; 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=SQcWJI75CPaIFG8vmumDb+g+fNolR8s7hw2KDmVIUrw=; b=M3Pg9GYY5zeHZIfB2JOqZw0cgsCYptnE8nXtlz6qMVNfS18uiuxKxK2+S3uE+vhRT2 DbV9axU6dJmyqFVD7TWaRn+0pVNTcs+3NEMVLKMWv5KOv4YcLtatlnPqd4Y8oSk4PJB6 y9yG8YmIKJFOgyYFhwgywaUWTqHdTylDS0pdlIf7ZAO3R9gVNltik4cv9H9NBRTYU0Xa XFQkIuuwh9zCEN0O2F7+kd4KaQlsJEQmP6sA/GlRQimOnXFOqGtK4e/YtmB34+nmDKgI pSAURIi6fCX5Y+Vf1AVofqS9Rc4hODCt/yx/O7aWEH9bjRVjiTgM0xoyYvwu2Gle9zhb Pb3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231775; x=1710836575; 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=SQcWJI75CPaIFG8vmumDb+g+fNolR8s7hw2KDmVIUrw=; b=NSanGSRNN3I9rA55lz0WGwR1RXx9pfrnIev2IACa6H9D1xt4b5tCARQCfxd20NdNJk 7K8UdOFgEtk2HMMpWP5/00f7KqDsErnEB+8OtMO7x4qdUY+cFh+sXKERz/1JCMW79OGz 8zM5ZmI3IXCIm/6MgOHCEJDqdQOjvAIrw4kcix1CZLlWEKCx2QLSc39Hp/rU645Bx+p4 6hrViKyq+rjy9hwmV7UaeEkxUGmQxpVHKeeLBwwZh9+ud5OU+Rs5KrAOLiz2qpMVRhBG kv8J5fNhxlQUwLIxFhw398gcL1irfsmTmptZkModHSihJOLCaFS8qgTAxZcC86n0F/eE 3r6A== X-Gm-Message-State: AOJu0YypcIa2GJqf+kLcbIQL93eYZBXQgjtK7oatPFt7+kaigQCm5xo6 c7sPMU2LdP6aqvHKEzDQtSm/Zju+X99tqHrv6LViyJ6HeHo/W3DnlayEBQUM+Y1j4RcAuNueQue V X-Received: by 2002:a05:600c:4e8e:b0:413:1d7b:1cc4 with SMTP id f14-20020a05600c4e8e00b004131d7b1cc4mr6251516wmq.0.1710231775582; Tue, 12 Mar 2024 01:22:55 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id c17-20020a056000105100b0033e767cac6csm8415301wrx.115.2024.03.12.01.22.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:22:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Vladimir Sementsov-Ogievskiy , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PULL 02/13] hw/pci: add some convenient trace-events for pcie and shpc hotplug Date: Tue, 12 Mar 2024 09:22:27 +0100 Message-ID: <20240312082239.69696-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 From: Vladimir Sementsov-Ogievskiy Add trace-events that may help to debug problems with hotplugging. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240301154146.761531-2-vsementsov@yandex-team.ru> Signed-off-by: Philippe Mathieu-Daudé --- hw/pci/pcie.c | 56 +++++++++++++++++++++++++++++++++++++++++++++ hw/pci/shpc.c | 46 +++++++++++++++++++++++++++++++++++++ hw/pci/trace-events | 6 +++++ 3 files changed, 108 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 6db0cf69cd..f56079acf5 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -28,6 +28,7 @@ #include "hw/pci/pcie_regs.h" #include "hw/pci/pcie_port.h" #include "qemu/range.h" +#include "trace.h" //#define DEBUG_PCIE #ifdef DEBUG_PCIE @@ -45,6 +46,23 @@ static bool pcie_sltctl_powered_off(uint16_t sltctl) && (sltctl & PCI_EXP_SLTCTL_PIC) == PCI_EXP_SLTCTL_PWR_IND_OFF; } +static const char *pcie_led_state_to_str(uint16_t value) +{ + switch (value) { + case PCI_EXP_SLTCTL_PWR_IND_ON: + case PCI_EXP_SLTCTL_ATTN_IND_ON: + return "on"; + case PCI_EXP_SLTCTL_PWR_IND_BLINK: + case PCI_EXP_SLTCTL_ATTN_IND_BLINK: + return "blink"; + case PCI_EXP_SLTCTL_PWR_IND_OFF: + case PCI_EXP_SLTCTL_ATTN_IND_OFF: + return "off"; + default: + return "invalid"; + } +} + /*************************************************************************** * pci express capability helper functions */ @@ -735,6 +753,28 @@ void pcie_cap_slot_get(PCIDevice *dev, uint16_t *slt_ctl, uint16_t *slt_sta) *slt_sta = pci_get_word(exp_cap + PCI_EXP_SLTSTA); } +static void find_child_fn(PCIBus *bus, PCIDevice *dev, void *opaque) +{ + PCIDevice **child = opaque; + + if (!*child) { + *child = dev; + } +} + +/* + * Returns the plugged device or first function of multifunction plugged device + */ +static PCIDevice *pcie_cap_slot_find_child(PCIDevice *dev) +{ + PCIBus *sec_bus = pci_bridge_get_sec_bus(PCI_BRIDGE(dev)); + PCIDevice *child = NULL; + + pci_for_each_device(sec_bus, pci_bus_num(sec_bus), find_child_fn, &child); + + return child; +} + void pcie_cap_slot_write_config(PCIDevice *dev, uint16_t old_slt_ctl, uint16_t old_slt_sta, uint32_t addr, uint32_t val, int len) @@ -779,6 +819,22 @@ void pcie_cap_slot_write_config(PCIDevice *dev, sltsta); } + if (trace_event_get_state_backends(TRACE_PCIE_CAP_SLOT_WRITE_CONFIG)) { + DeviceState *parent = DEVICE(dev); + DeviceState *child = DEVICE(pcie_cap_slot_find_child(dev)); + + trace_pcie_cap_slot_write_config( + parent->canonical_path, + child ? child->canonical_path : "no-child", + (sltsta & PCI_EXP_SLTSTA_PDS) ? "present" : "not present", + pcie_led_state_to_str(old_slt_ctl & PCI_EXP_SLTCTL_PIC), + pcie_led_state_to_str(val & PCI_EXP_SLTCTL_PIC), + pcie_led_state_to_str(old_slt_ctl & PCI_EXP_SLTCTL_AIC), + pcie_led_state_to_str(val & PCI_EXP_SLTCTL_AIC), + (old_slt_ctl & PCI_EXP_SLTCTL_PWR_OFF) ? "off" : "on", + (val & PCI_EXP_SLTCTL_PWR_OFF) ? "off" : "on"); + } + /* * If the slot is populated, power indicator is off and power * controller is off, it is safe to detach the devices. diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c index d2a5eea69e..aac6f2d034 100644 --- a/hw/pci/shpc.c +++ b/hw/pci/shpc.c @@ -8,6 +8,7 @@ #include "hw/pci/pci.h" #include "hw/pci/pci_bus.h" #include "hw/pci/msi.h" +#include "trace.h" /* TODO: model power only and disabled slot states. */ /* TODO: handle SERR and wakeups */ @@ -123,6 +124,34 @@ #define SHPC_PCI_TO_IDX(pci_slot) ((pci_slot) - 1) #define SHPC_IDX_TO_PHYSICAL(slot) ((slot) + 1) +static const char *shpc_led_state_to_str(uint8_t value) +{ + switch (value) { + case SHPC_LED_ON: + return "on"; + case SHPC_LED_BLINK: + return "blink"; + case SHPC_LED_OFF: + return "off"; + default: + return "invalid"; + } +} + +static const char *shpc_slot_state_to_str(uint8_t value) +{ + switch (value) { + case SHPC_STATE_PWRONLY: + return "power-only"; + case SHPC_STATE_ENABLED: + return "enabled"; + case SHPC_STATE_DISABLED: + return "disabled"; + default: + return "invalid"; + } +} + static uint8_t shpc_get_status(SHPCDevice *shpc, int slot, uint16_t msk) { uint8_t *status = shpc->config + SHPC_SLOT_STATUS(slot); @@ -302,6 +331,23 @@ static void shpc_slot_command(PCIDevice *d, uint8_t target, shpc_set_status(shpc, slot, state, SHPC_SLOT_STATE_MASK); } + if (trace_event_get_state_backends(TRACE_SHPC_SLOT_COMMAND)) { + DeviceState *parent = DEVICE(d); + int pci_slot = SHPC_IDX_TO_PCI(slot); + DeviceState *child = + DEVICE(shpc->sec_bus->devices[PCI_DEVFN(pci_slot, 0)]); + + trace_shpc_slot_command( + parent->canonical_path, pci_slot, + child ? child->canonical_path : "no-child", + shpc_led_state_to_str(old_power), + shpc_led_state_to_str(power), + shpc_led_state_to_str(old_attn), + shpc_led_state_to_str(attn), + shpc_slot_state_to_str(old_state), + shpc_slot_state_to_str(state)); + } + if (!shpc_slot_is_off(old_state, old_power, old_attn) && shpc_slot_is_off(state, power, attn)) { diff --git a/hw/pci/trace-events b/hw/pci/trace-events index 42430869ce..19643aa8c6 100644 --- a/hw/pci/trace-events +++ b/hw/pci/trace-events @@ -16,3 +16,9 @@ msix_write_config(char *name, bool enabled, bool masked) "dev %s enabled %d mask sriov_register_vfs(const char *name, int slot, int function, int num_vfs) "%s %02x:%x: creating %d vf devs" sriov_unregister_vfs(const char *name, int slot, int function, int num_vfs) "%s %02x:%x: Unregistering %d vf devs" sriov_config_write(const char *name, int slot, int fun, uint32_t offset, uint32_t val, uint32_t len) "%s %02x:%x: sriov offset 0x%x val 0x%x len %d" + +# pcie.c +pcie_cap_slot_write_config(const char *parent, const char *child, const char *pds, const char *old_pic, const char *new_pic, const char *old_aic, const char *new_aic, const char *old_power, const char *new_power) "%s > %s: pds: %s, pic: %s->%s, aic: %s->%s, power: %s->%s" + +# shpc.c +shpc_slot_command(const char *parent, int pci_slot, const char *child, const char *old_pic, const char *new_pic, const char *old_aic, const char *new_aic, const char *old_state, const char *new_state) "%s[%d] > %s: pic: %s->%s, aic: %s->%s, state: %s->%s" From patchwork Tue Mar 12 08:22:28 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: 779685 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907190wrt; Tue, 12 Mar 2024 01:24:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV35C7RSmwYQOds8BQqWs18K6eaNacRPL6coAY77FBNY+yBV7dqhDUq5OTJtAE1YZyLPficPLV1V4Tvel5X7enT X-Google-Smtp-Source: AGHT+IHevRer8UE9bQex9iZNvYaWwC4KIEy+ZufDffTKIzl8uimtDMHOOYaXZwqjrLPGM4LRkzp3 X-Received: by 2002:a05:620a:5685:b0:787:ced9:5f12 with SMTP id wg5-20020a05620a568500b00787ced95f12mr12988340qkn.31.1710231882373; Tue, 12 Mar 2024 01:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231882; cv=none; d=google.com; s=arc-20160816; b=ZQ0rlLdrWGisf1tGHW5OPUDxuktgF81j4/TYBoMe8t9Fs6SzcVlWohyYkDJ4GCVCgH NCkSPzsON83ZvjJbX0r+Z89g+iOiZhtaptiheKIWOtoeZHfJDg4weoWA6g9qZmfAgK8Q TYO1mcbEid5IR2919qKV4NxYbpOVfnyUWN7l0n8Wks9IuQ0TVTJfcFo9BnddYVKOhPdO 1pPzbKWoYOwiGf40v/XCvL4ja8DnsYCo8ClgHwgZfqtRK46NCSz0K1cORMdDZTGYlIQk LzlHrcmO/hD6CrjbbaxstkBqj2uExF2SkhBxLms0a2Qpz5dAU98+gG8AZ0tIJdfV1dn9 UpCA== 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=eC/1sv6Wv+c7ut+0cdVRZlJFS7IBk+vo2wQm3zp+8ts=; fh=jSjyPi1YrBSheIfAl6qjiYK981p/5I5Qo0SXi6Ukgl0=; b=yj/0G5mOJtvwRfNZMQQXWXOt+WRQW4mkCUtFHn0Mo2xAAUgp/XkRzUtgZiI/qm78vI r19jhq+v2V7P8uDKLL15R5xGwExZq4B9danNG/KmfOTXKDgqZi1McKtjHq66FEumvnER ABM+vcK2YBRXey9FSKdqI6yeY+7cZvUyolRJSI0UYq/K5eo5TaG4bcYfGj7M6grWDOvX FwC2VCTiws8KjGE+WVPDl506eDwIWW8HMF1AcaAhQ52gyWwxb4U8R+79bWm9BjT1BGUL UX+2qYJv2+7Hu6iQvy3RgvZwkyMQhqxwF+MZa9iI0oy9yLU/fTbAh3fQPZVBN5neWXAo zR/Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fd1fc1iq; 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 ye8-20020a05620a3b8800b007885da5fa46si6707413qkn.363.2024.03.12.01.24.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:24:42 -0700 (PDT) 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=Fd1fc1iq; 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 1rjxPj-0005gA-37; Tue, 12 Mar 2024 04:23:11 -0400 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 1rjxPf-0005bO-8o for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:07 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxPb-00018b-QS for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:06 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-512b3b04995so4133116e87.3 for ; Tue, 12 Mar 2024 01:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231782; x=1710836582; 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=eC/1sv6Wv+c7ut+0cdVRZlJFS7IBk+vo2wQm3zp+8ts=; b=Fd1fc1iq/M+GU7EAm8sZ0C+YlMZ4hfOLoC+TBCHc0XXVliSk2MMvXiGhrvkIr7jWeJ U3hTRGc3aNZasSo+eWZXHL0AjxCxegy959CbkM/XeZn7RZyEvhrhffLQnSXQjNX0wQ3r GbAMJQa4HWQhGu+PinoRzPWtEa2RRGNHMKkk+aDDuWb+2pgHB/6ccbUQzVbkIA15Q422 XrZpMt/MZyUrOKqTXwtT6TqHaWTpSK/0JhZrloTus8M5DU+mYAXowU7J5+m6kACLZ5M7 9HiQGNM4CTBv50mGBm0mFaqR2NCPIkQO+rd8T8xW+BxQOE+XkCmYDMXp2FFXIRe2uqiz ApFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231782; x=1710836582; 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=eC/1sv6Wv+c7ut+0cdVRZlJFS7IBk+vo2wQm3zp+8ts=; b=BnYpLat65GnSVwxPsRyDnA8q+jRlnXWnmRaJfY0abpV8H7lo5Kl0pK6IkaogUiJmJP ySm7ohYosnFle6So4cRomlwMm+zoBW7gDFyI8DHJ7ix1LjdjVD2bvu7XExm13mdUhULh qU0iDrEdBGk21+7UMNCabKDJG+r9pp24LeF4B9H60zAUI36owX5kZdXBm8wIG/wkeS7k LZbkdixfLB4P07t+wYZGKz6GQMc6VhfUHQ+YrrVkzoyIxslwLmxkAuKcckBho9zId6oH NAtuQMt69+WUxoaKoAa4kVjPAL/fQX4Im2MXwijk+g4cB8SlKspWXMRBjoEPrV4x46pK zYSA== X-Gm-Message-State: AOJu0YyOngGmL8kr5jcgVZo/m56ygWMzOQwDTOnJ7znWCRwaDw1dZELF 3aS8z8VcSAgjQvAVM9WrE90kQ8AZzrLmuonm3PPqpRrOrNFXgo6zRg8kZdj6dijuwkDdTw4tk3S h X-Received: by 2002:a19:5f5a:0:b0:513:ee3:65bd with SMTP id a26-20020a195f5a000000b005130ee365bdmr4962829lfj.35.1710231781536; Tue, 12 Mar 2024 01:23:01 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id r4-20020a05600c35c400b004130c1dc29csm11664395wmq.22.2024.03.12.01.23.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:23:01 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, BALATON Zoltan , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 03/13] hw/ppc/sam460ex: Support short options for adding drives Date: Tue, 12 Mar 2024 09:22:28 +0100 Message-ID: <20240312082239.69696-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=philmd@linaro.org; helo=mail-lf1-x133.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 From: BALATON Zoltan Having to use -drive if=none,... and -device ide-[cd,hd] is inconvenient. Add support for shorter convenience options such as -cdrom and -drive media=disk. Also adjust two nearby comments for code style. Signed-off-by: BALATON Zoltan Message-ID: <20240305225721.E9A404E6005@zero.eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/sam460ex.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 7e34b6c5e0..d42b677898 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -33,6 +33,7 @@ #include "hw/char/serial.h" #include "hw/i2c/ppc4xx_i2c.h" #include "hw/i2c/smbus_eeprom.h" +#include "hw/ide/pci.h" #include "hw/usb/hcd-ehci.h" #include "hw/ppc/fdt.h" #include "hw/qdev-properties.h" @@ -449,15 +450,27 @@ static void sam460ex_init(MachineState *machine) /* PCI devices */ pci_create_simple(pci_bus, PCI_DEVFN(6, 0), "sm501"); - /* SoC has a single SATA port but we don't emulate that yet + /* + * SoC has a single SATA port but we don't emulate that * However, firmware and usual clients have driver for SiI311x - * so add one for convenience by default */ + * PCI SATA card so add one for convenience by default + */ if (defaults_enabled()) { - pci_create_simple(pci_bus, -1, "sii3112"); + PCIIDEState *s = PCI_IDE(pci_create_simple(pci_bus, -1, "sii3112")); + DriveInfo *di; + + di = drive_get_by_index(IF_IDE, 0); + if (di) { + ide_bus_create_drive(&s->bus[0], 0, di); + } + /* Use index 2 only if 1 does not exist, this allows -cdrom */ + di = drive_get_by_index(IF_IDE, 1) ?: drive_get_by_index(IF_IDE, 2); + if (di) { + ide_bus_create_drive(&s->bus[1], 0, di); + } } - /* SoC has 4 UARTs - * but board has only one wired and two are present in fdt */ + /* SoC has 4 UARTs but board has only one wired and two described in fdt */ if (serial_hd(0) != NULL) { serial_mm_init(get_system_memory(), 0x4ef600300, 0, qdev_get_gpio_in(uic[1], 1), @@ -531,6 +544,7 @@ static void sam460ex_machine_init(MachineClass *mc) { mc->desc = "aCube Sam460ex"; mc->init = sam460ex_init; + mc->block_default_type = IF_IDE; mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("460exb"); mc->default_ram_size = 512 * MiB; mc->default_ram_id = "ppc4xx.sdram"; From patchwork Tue Mar 12 08:22:29 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: 779687 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907198wrt; Tue, 12 Mar 2024 01:24:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWMbbgElWz8SySLcuzgS+3bbLpHkIxA7s/2HMLGR9llgC+YLj71uXe10dZXZENDqsj7SnKBtHKYhh+RXXz2Kw5C X-Google-Smtp-Source: AGHT+IF1LqPVbwUilJDJC2QEK7WPhPb6jImpoiTbjT13nQTzJkExRYopeMMpfKxhkmLtlxHwbnAE X-Received: by 2002:ac8:5a56:0:b0:42e:b2e9:36eb with SMTP id o22-20020ac85a56000000b0042eb2e936ebmr1364391qta.28.1710231883051; Tue, 12 Mar 2024 01:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231883; cv=none; d=google.com; s=arc-20160816; b=zv2GzMevl79RCoyaLp5dXca7wW0APiJgWx3aJQ1tWIrvHYttsVbsIVGajEByEAQ906 CTZI+kFmMSX2hrYNUqon9bM5jRNIfVd6liSHi1gCliYD0n1frBiM9p2Sv5zF6z0xRNsu On1kbtux9j5srZlC5VY14bDNx0EoIhH+HKJF1H4jCs8F6P7c6mrEbFvsbY2dnhxBFo+g 5Qfxysss3/75PrpzlXEraDxDx+caXcnI6y5yKHAWfovtrDTpX653oqV8QUsCTW/paAhU AKekAS220ZwVelJYNskB9GsHSQkKgrTxmglRjFC6mKJld5D+j42L4Jqrfz1/gm2agFs6 apWA== 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=3FG8zZPJK1bf6KOQDF42ZpXKRx0qaQ0s6JgBLKqquGU=; fh=vEmE4oYPjq0Kq96ZSCF5EjpQJOmKbFMIRTpeGjgHc0I=; b=D8ceIq31Gug5y5u642MvTmCZPDR5zHRci9KjMnxpvK+c0pNDuiWGZmU5TFztgwu7LB KCX/UVCP2N4jlkApGBEqgVyOg6qrLCheMDFBu4315IpaBxnkqglX1ELwHhP9wUo/5rWh h9fFUyQLuazypW7fgp4YnnlQfDBMLI1tc4m9Ezyj2JM7XRcSaUClgdNnI9yGf3MIO21c jmFTYLuQ2C+epp4QRmFTEVBApo3MMsU0n44rT+7mID7Fqsa4vXFNDZ2w1Kz5jpotXO2l cvOOe637470GVGBSCAo9mZsNuLdfuBw/V/WsFtoyXLfXetJ22FpaT2wlKDWn5lZt5UfD oDPQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A1j1qLwu; 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 w11-20020ac87e8b000000b0042efb9e64dbsi7079770qtj.222.2024.03.12.01.24.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:24:43 -0700 (PDT) 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=A1j1qLwu; 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 1rjxPm-0005l1-Uy; Tue, 12 Mar 2024 04:23:14 -0400 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 1rjxPk-0005jl-Pv for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:12 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxPi-00019f-1U for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:12 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4131b1f8c91so25234835e9.3 for ; Tue, 12 Mar 2024 01:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231788; x=1710836588; 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=3FG8zZPJK1bf6KOQDF42ZpXKRx0qaQ0s6JgBLKqquGU=; b=A1j1qLwuGMRGbtGfo7okEOBKDikyI0zeXLTiJTSJXo2ywBZt7setZb5E4Ugpjg9kd+ u+cR6Q+oF78noG0Ed6WBQAT69FWkNPfKBFnIy1yrlfJ4WUfDGhfaLOA39xNNhxCQEG7w RjXAWUeC+XQL1/to/OQ9Hp3xhpyBlNvMmPQCqNUw5hmrN8oOuhSdpDCay7gz+Ep8JsOO 4PvviiFS3EesELq474IqOkclVZ/JAt+PBd/fq3i2hbw7aWieH0mPg/ezhCVtnWRkB9DP ZgdN5stDM3VOGphko+5dF48wg2Cd6pfX11y4tsd3CkRAiuMi7HpVUoww3RxSjbWealXz 1/rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231788; x=1710836588; 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=3FG8zZPJK1bf6KOQDF42ZpXKRx0qaQ0s6JgBLKqquGU=; b=Xa18ty/nSOhEDddG6LB9R1zArU+4+XwxaBnppwkMonxutrMQE7bEdrdLcNOH6wtlW8 pbBbKY4C27DE1jaQTxzJLVeo6t78Ae4BzMwq2YcqTkDoH6VjnJG8jj7Y1Vh9yYP3R33R hLvp0i6bC8/Rafl3/XDIsPY3VCJPQ4ejq2nmhX6LD3zIzP2yBHan1CGOykWinFfL7aLi rSoUESDF4DQ31MT7OMQ2quYS7/6kGhAqHR8cxxK0Y788LiPbfzpAwc756rgq8EsHBljG /GTjWhWZsRXc2/yT73m8MMugQHxsk0ZwW8sEnw2hpFp9jiYoz9WFHucqD/tPYOJXzSwz nDmA== X-Gm-Message-State: AOJu0Yy4U5K49I+vZaVn4DxcmxsRp92ctI090k4XoTsbnY0pMshccfCl opsAa0ec17RWI9WGefeZKV64/vdgeYBTD4pLrd4iTXY49Js/RH10CQ7aDEVVr90E+aF+yzL0rMF f X-Received: by 2002:a05:600c:3513:b0:413:1741:289f with SMTP id h19-20020a05600c351300b004131741289fmr7491099wmq.5.1710231787739; Tue, 12 Mar 2024 01:23:07 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id t10-20020a05600c450a00b004131388d948sm16112266wmo.0.2024.03.12.01.23.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:23:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Zhao Liu , Paul Burton , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PULL 04/13] hw/core/loader-fit: Fix missing ERRP_GUARD() for error_prepend() Date: Tue, 12 Mar 2024 09:22:29 +0100 Message-ID: <20240312082239.69696-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_append_hint(), because that doesn't work with &error_fatal. * ERRP_GUARD() lifts these restrictions. * * To use ERRP_GUARD(), add it right at the beginning of the function. * @errp can then be used without worrying about the argument being * NULL or &error_fatal. ERRP_GUARD() could avoid the case when @errp is &error_fatal, the user can't see this additional information, because exit() happens in error_setg earlier than information is added [1]. In hw/core/loader-fit.c, there are 2 functions passing @errp to error_prepend() without ERRP_GUARD(): - fit_load_kernel() - fit_load_fdt() Their @errp parameters are both the pointers of the local @err virable in load_fit(). Though they don't cause the issue like [1] said, to follow the requirement of @errp, add missing ERRP_GUARD() at their beginning. [1]: Issue description in the commit message of commit ae7c80a7bd73 ("error: New macro ERRP_GUARD()"). Cc: Paul Burton Cc: Aleksandar Rikalo Signed-off-by: Zhao Liu Message-ID: <20240311033822.3142585-15-zhao1.liu@linux.intel.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/core/loader-fit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit.c index b7c7b3ba94..9f20007dbb 100644 --- a/hw/core/loader-fit.c +++ b/hw/core/loader-fit.c @@ -120,6 +120,7 @@ static int fit_load_kernel(const struct fit_loader *ldr, const void *itb, int cfg, void *opaque, hwaddr *pend, Error **errp) { + ERRP_GUARD(); const char *name; const void *data; const void *load_data; @@ -178,6 +179,7 @@ static int fit_load_fdt(const struct fit_loader *ldr, const void *itb, int cfg, void *opaque, const void *match_data, hwaddr kernel_end, Error **errp) { + ERRP_GUARD(); Error *err = NULL; const char *name; const void *data; From patchwork Tue Mar 12 08:22:30 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: 779682 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907182wrt; Tue, 12 Mar 2024 01:24:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW2WzUettVku34XFLUhhkm8hz+5HCIAtAShqHDuq4H9ZDB5sEklFtYoL9jtfTGsAa8pbPMgHYa6SSwMCc8bHOPL X-Google-Smtp-Source: AGHT+IFsT562DINu9Wgov4rWGjRze4ecr5rkZyQARQfWxZSXS7XdY+e+3qnJ0i9JuMZTPeV6PsZx X-Received: by 2002:ae9:e71a:0:b0:788:2ada:3a3d with SMTP id m26-20020ae9e71a000000b007882ada3a3dmr10047604qka.24.1710231881518; Tue, 12 Mar 2024 01:24:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231881; cv=none; d=google.com; s=arc-20160816; b=FYEJvfa1lhPkM3mGqfhGf7jGQfGEzE3wmkJsA/m/Vbptrpjv1h8+waS9PX9mXeWcuF 8tPWgyv06EnUPXX7clTHWBPte7Y9jMGxW0zMUrA1iSysxnaEHNNf5dQfm6BgIyN7LvAx d+IoOC2amO6b3KktRdgvn3bOk21uSiCCf4GbUTdtTjVJZsl/kkeDDBcPDhdHhDpGyM4K pNUI5yjfSJnZe1AFfG465KE9yHAPXuTAl7CIKnNzc4lvL+u+RheCDGUCzZGSSmke9U/M 7HFnPOpeETFMxEz6jpATH1i6Usu00XXRUBCS3PSpBc8AXOYTNQaV9msV1q8/2Jre9Dhy QcgA== 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=QyCNdGxEUzn56uZqvjtKqW1lxcPgF0npDxgJEUvvre8=; fh=eN7O9qhkcriBTbyGVqvh/9NyyVNCKBqO0pgESnCudac=; b=n5B8OBHmcjMXFVzt/hdn326MAj3di9e6cbqJHkJzPe4TXZmX/sDrhVYOvQ6JolOYHv nuIxo8g4Hs2hppzPjgAEXJmEh8vXvZA182tY7YEoxGkiFG5uy0p2Ny9UYBf//8gnt1GL YNAwzO/niVU4SuYsUWQg7bbzetAMzP4QanXNx2JCq7oUZC5osragWO68RLJ9U9MelEMw rjOpNVr3I8UTttdvWQCirMBGqP7kDNeWo1jaNr9iF22Cyea3kng/c91iF5hn2Prd+zhH Y3QSCyOLSFhD4Wp1AX9TC/+mOiY7XcJ9NcYbe4OVBZiMc9CkHSF9O1zs8n0pbfrKHHrd PU8g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lesFdg4H; 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 dz5-20020a05620a2b8500b00788371eff95si7687411qkb.730.2024.03.12.01.24.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:24:41 -0700 (PDT) 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=lesFdg4H; 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 1rjxPw-0005ne-9j; Tue, 12 Mar 2024 04:23:24 -0400 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 1rjxPt-0005mI-7O for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:21 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxPp-0001AW-Ci for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:19 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33ddd1624beso3095375f8f.1 for ; Tue, 12 Mar 2024 01:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231794; x=1710836594; 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=QyCNdGxEUzn56uZqvjtKqW1lxcPgF0npDxgJEUvvre8=; b=lesFdg4HTUSflfoAzyWIKAOpzPkDoogKt6NUsFGz/EQjOpVxrG6XxgfCDPR4H/Lm3T 7xO+/UjqxJ/79LtMN8or/470jknfzLB0KlpoJ0O9Ny1zd7nWd56p+rJ7jG6aHWE88Kdb V4uHpXRjyyKHcY+1FEviUnbUKFPbxDznjfBaT/n3hQ14I9AvHmgWHXL6rg4L5kViiaqn QN4Saxe+Jb2/cNqBwtp/LzmKEtfNBYX8zpR/OTiGLh5EwpPQayI+9hkaPEdQw+c5uJzM kHlxasfAnpBqJaPIDD8Gv2VV+6OPOneiyqu9uTQ974IUlJkDEw79GxoT5rjKxhYXbr21 gqlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231794; x=1710836594; 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=QyCNdGxEUzn56uZqvjtKqW1lxcPgF0npDxgJEUvvre8=; b=gPB0KS+5S0hemXnfp7NYDrv9bLJatP2aUFfipEscoCjE4UofBVBO9uEjXvFtXOE/5M Im3r7XvjrKaXszfdF/dEI1otq44IZKBDl9YdVnBlkloDb/Q7a7h/LGf8JEtZv8kBKDjc h8rFm6ht7Yu5qU3fksDn4hRi1RYEire0kxkk4ElA+kwLr2kZSj/ojY69adv0OzpU+9bD fwk3ALaCqZQe2/UA/FnMuD1Y/0ZQj4VRLvEyKQHyD3rHMISb8tsildqi2gCG5a58SsSN k3hDZyONniiHmQc/qRhm7ETn9f54XVPOWMKXlLLyEBw4qxe4UXLfgY597OGKrHPbn81V MPHw== X-Gm-Message-State: AOJu0YxcfBUbtlpUMVoSi/l69pQqLVNRemcjIEkEn2XSY22T88pEjhp1 DlR7VyFFY+CWmZpvsvHAnpCfkb4T9qpD8royvkhVJvdFGq31RKjKm7SOoyUzW2zfod93kMfR47m U X-Received: by 2002:adf:a15a:0:b0:33e:9ce8:407a with SMTP id r26-20020adfa15a000000b0033e9ce8407amr3030528wrr.13.1710231794245; Tue, 12 Mar 2024 01:23:14 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id c13-20020adfe74d000000b0033cf4e47496sm8443384wrn.51.2024.03.12.01.23.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:23:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Zhao Liu , Paolo Bonzini , Eduardo Habkost , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= Subject: [PULL 05/13] hw/core/qdev-properties-system: Fix missing ERRP_GUARD() for error_prepend() Date: Tue, 12 Mar 2024 09:22:30 +0100 Message-ID: <20240312082239.69696-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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 From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_append_hint(), because that doesn't work with &error_fatal. * ERRP_GUARD() lifts these restrictions. * * To use ERRP_GUARD(), add it right at the beginning of the function. * @errp can then be used without worrying about the argument being * NULL or &error_fatal. ERRP_GUARD() could avoid the case when @errp is &error_fatal, the user can't see this additional information, because exit() happens in error_setg earlier than information is added [1]. The set_chr() passes @errp to error_prepend() without ERRP_GUARD(). As a PropertyInfo.set method, there are too many possible callers to check the impact of this defect; it may or may not be harmless. Thus it is necessary to protect @errp with ERRP_GUARD(). To avoid the issue like [1] said, add missing ERRP_GUARD() at the beginning of this function. [1]: Issue description in the commit message of commit ae7c80a7bd73 ("error: New macro ERRP_GUARD()"). Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Signed-off-by: Zhao Liu Reviewed-by: Markus Armbruster Message-ID: <20240311033822.3142585-16-zhao1.liu@linux.intel.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties-system.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index b45e90edb2..00c968f4f5 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -242,6 +242,7 @@ static void get_chr(Object *obj, Visitor *v, const char *name, void *opaque, static void set_chr(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { + ERRP_GUARD(); Property *prop = opaque; CharBackend *be = object_field_prop_ptr(obj, prop); Chardev *s; From patchwork Tue Mar 12 08:22:31 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: 779691 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907563wrt; Tue, 12 Mar 2024 01:26:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXOo/SPUHon5Lda7LXjNdt8EoOUg54jR3mtkbXpQPLTVCtnUomWzZ/fjhgey9BUpuxuHkYYkPbziNN5TjmDgddD X-Google-Smtp-Source: AGHT+IHw/y0XHtzgrBBCqpww7pVBKXFrOBc3xN9cYy28YxG1AZBuxl6P5hgJS8Mnz4ecyzcP3Vxd X-Received: by 2002:a05:622a:19a4:b0:42f:2998:4eea with SMTP id u36-20020a05622a19a400b0042f29984eeamr12742438qtc.21.1710231966359; Tue, 12 Mar 2024 01:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231966; cv=none; d=google.com; s=arc-20160816; b=h7Rp7v8WNN4LKNWXt972W/sgAhBWU2oBWEHtGcvHlmdkGEo5DHWPKqSBHaY9rBcWZY Tu6VlZw/W61HMfUQ3jsblW6GmH47lL75qzg6dmN9cQ/4eucgyrR+h0CLl0NScv6tRoCU WBh8OpaZYnpbuqAxK8nudtIWlGHk0Jmx9fQQFHiFpdpX5l35hUF46u3fP7KuieAZO4hZ trlnWDD9q4jtoA+oBWgaaou5ficef9fy6wLtwAtukK4WTH2nDB1S4cv4rPysTK094/Tz aWt53ZcQ54uqRg5a0x3MUV9jTT75GZvzZAHGzLxv2ENa/IQM2l2UzPMUaOIfhTlW4QIn ABhg== 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=29XjHGwit3vYXMB9dG4vvP3w+ZRgmYEAu29xmgeR40E=; fh=HY5pWZMkKdGYi5ykDWiurjSG5ijDNBoz1USnl5iXY5k=; b=z7PwLXvP3EMWCyhybm79MXf1WSJmqODrLNBxr6uLgf/G+HtoGNZw9EA7Kvnt557ynt HyEvM0csw2Aub3cpXyfJ/ivo8tMKGRS6pA+Wa7iSeIasL1NUGRvgh/rifIzNL7yB2rpF pj9T9iPzGaL+KmTvBMb/tUzhF033Kii2HYI3BuxM4noYw85dFlKvShU+CPp3y+dIrDEL zznkbPUX/oOkgzWaIYR9wjEaHYPRnzjP/k1dRU56lwbNOVbx/BaCYKKWZHEK49JKLQ3O GkP8/75drtXBcTzDaXgcLpzOUvhZb1/yilcyw96qaYU0OwIGKHpM69G0ZrIZC00WQZnZ TlYA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AX4t/Vah"; 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 r1-20020a05622a034100b0042e7e274203si7083115qtw.21.2024.03.12.01.26.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:26:06 -0700 (PDT) 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="AX4t/Vah"; 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 1rjxQ1-0005sn-Hb; Tue, 12 Mar 2024 04:23:29 -0400 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 1rjxPy-0005rj-He for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:26 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxPv-0001BM-RZ for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:26 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4131b1f8c91so25236155e9.3 for ; Tue, 12 Mar 2024 01:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231801; x=1710836601; 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=29XjHGwit3vYXMB9dG4vvP3w+ZRgmYEAu29xmgeR40E=; b=AX4t/VahYZcM87BIA5LZ0LFDZ899y3UkP1QNKUqZRGY1b0s10GoKAdJXtJMeJY7KHz 7drWnOAcSx1IthKJR2u9JZ+UCE4gIqgiD2E4jza07NjkiTqD5KMQpUyOn70tlJhotcwf /jWuvbra6vCETc3LeA9Szgc9yIYqWelcQ/gL9gCNCpoCpP6hfJiL2VRQRVj2oVqzRpMu GTQtjuQoF5aedpn7+ip3Zi9TSNYHoCRW+YFUp3+j3f2CkiGFy+dR0YYg9ASxLjaHvHOH gdDgOvC7vZj+Gkb75n2UwgoyTclB7wqU2XSUIzKqnVASViZzlhbFImVMWXLtYFBDTgW+ Uw+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231801; x=1710836601; 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=29XjHGwit3vYXMB9dG4vvP3w+ZRgmYEAu29xmgeR40E=; b=noD13LpemdhPA/IQhQmRPHwNf4OJMn9E6lIczPnCO+NDfmnIxQ931ZL4GyAcTGLsuf 9K9UEQ4kqFRbCJdfI+X9IL85HXEgMYN58lndvCm8xEDvdclmhP7INnT0wMmRdx01HK7Q MJHGr+GVYsydtEyJoKVITveQNsiiga2rAxB9/F83wLqbJeqRtQp5rjrGNzA9oHJg4vPN ChOY6dTE7Y8Nup7XWjsDSQua5B7JoJ4w2zv29/5hb3g675I1MqrOK5W7/qdXkY9mLy+g WTtnmNp1Sdi62zxKsnGTsFSLkM1oupReX3d5a4NxljRAC3jyyG+sdP8uMsa6X/q8XaJI ngBg== X-Gm-Message-State: AOJu0Yw6JA1oaBrm568HHtUtqjNfhSxFNjXgrB1Qo8y9pK343r2XeJwj FfUZIZawavEyi79r6EWTPldLpxEXR0TMpP5rNN7zEjn03pCWK+h5Vv7pwjseVIz5A0tNNAWDXQE b X-Received: by 2002:a05:600c:5190:b0:413:27d0:44ff with SMTP id fa16-20020a05600c519000b0041327d044ffmr4080264wmb.8.1710231801005; Tue, 12 Mar 2024 01:23:21 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id a7-20020a05600c348700b0041330d49604sm2480108wmq.45.2024.03.12.01.23.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:23:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Zhao Liu , Juan Quintela , Manos Pitsidianakis , Michael Galaxy , Steve Sistare , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 06/13] hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend() Date: Tue, 12 Mar 2024 09:22:31 +0100 Message-ID: <20240312082239.69696-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_append_hint(), because that doesn't work with &error_fatal. * ERRP_GUARD() lifts these restrictions. * * To use ERRP_GUARD(), add it right at the beginning of the function. * @errp can then be used without worrying about the argument being * NULL or &error_fatal. ERRP_GUARD() could avoid the case when @errp is &error_fatal, the user can't see this additional information, because exit() happens in error_setg earlier than information is added [1]. The ivshmem_common_realize() passes @errp to error_prepend(), and as a DeviceClass.realize method, there are too many possible callers to check the impact of this defect; it may or may not be harmless. Thus it is necessary to protect @errp with ERRP_GUARD(). To avoid the issue like [1] said, add missing ERRP_GUARD() at the beginning of this function. [1]: Issue description in the commit message of commit ae7c80a7bd73 ("error: New macro ERRP_GUARD()"). Cc: Juan Quintela Cc: Manos Pitsidianakis Cc: Michael Galaxy Cc: Steve Sistare Signed-off-by: Zhao Liu Message-ID: <20240311033822.3142585-17-zhao1.liu@linux.intel.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index a2fd0bc365..de49d1b8a8 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -832,6 +832,7 @@ static void ivshmem_write_config(PCIDevice *pdev, uint32_t address, static void ivshmem_common_realize(PCIDevice *dev, Error **errp) { + ERRP_GUARD(); IVShmemState *s = IVSHMEM_COMMON(dev); Error *err = NULL; uint8_t *pci_conf; From patchwork Tue Mar 12 08:22:32 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: 779690 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907410wrt; Tue, 12 Mar 2024 01:25:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVPQc/eEqEg2ta5+EkfBAen6xI+lY2ch1nPbQajQsbv714NZ9xxd5fxyxHVkFR2hwl7qBi07tVkhNBb0Zr0SiW5 X-Google-Smtp-Source: AGHT+IFpzO6aul+EDOk+mkqe2SV/1wV857tLTbYRt0s08GcXEJobn2PUAjWChjFrWWKQ3RjmsvBb X-Received: by 2002:ac8:5f49:0:b0:42e:f031:f2a0 with SMTP id y9-20020ac85f49000000b0042ef031f2a0mr10648558qta.14.1710231931841; Tue, 12 Mar 2024 01:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231931; cv=none; d=google.com; s=arc-20160816; b=L9DM+/kgFOE0A9NT5bmFRl+cjEyXKpA7Yeyqe2RSVsDr6nMJZ+pRibqwfMdp3j8SH6 rJqxl7NUWjKxmQLEMCkHramdvDLtdbrrxrQSz06CjURcVD5VIf4Urj7Gh5f5LFU85Vz4 bDuijiPEXFztT0G51TlOMQA/QnPNrpWzNIzl6s6K8rWESaPCbRZJ9tZslURVuKqhCZKz Za5T8n1Lb4zZx/QiHyoHpCYRZHVefSEPUjwmxtgVDF7kK1quiRVgQJ41+byi/9WMcVql NzhxVDuBUT8IPrPuA1TpjQnlFwxr7c++BdP1oBIFpHuiRv12oOvpxk2k5TFub3MRTYzR 1Nvw== 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=Eq8dPdS4O29YZHMSjUomBAXNnVOWg/nPlLYlOBRYYnw=; fh=/OjMTd8ii5kKJ/oyG1ORwNy4xKO7ElcessVTlN1EkRg=; b=nLoH/tBIcNJDR02oPfWNEVLATLa2NZdNyHMOrQ2MwyGN7Ta6GsbKjGHSj1zR7ShXKN d7xhNST9a21yyF+fxPbJy6lopyyVlV1qL7Ofz+PkgJbrUgHBdAm8C8Vf0RvXTANt29y4 tCz3d/PvH7/q/u+PQk6yHfXX3B0Yf8ra3D5iiO+kWa2tpD4VCpyx0SN/fxIPSuXWxeQL wF7iEOq4EGHTZY9PoBpIPI6qJ7pdmLfIgF6IbpDzcTjWmxM2LKiGZXy7DccTYsaiCdeR IOmGW3tlvdzH66yu58t3Vp267PkiOxgxoTsqdK2iBHuIrV4I3BWqjhdOHxS1CcDfozv4 nhNQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TcVF8q6C; 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 u2-20020ac858c2000000b0042f3074099esi7249759qta.495.2024.03.12.01.25.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:25:31 -0700 (PDT) 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=TcVF8q6C; 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 1rjxQ6-000668-5H; Tue, 12 Mar 2024 04:23:34 -0400 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 1rjxQ4-00062O-1V for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:32 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxQ1-0001CV-4x for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:31 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-33e8b957a89so1580176f8f.0 for ; Tue, 12 Mar 2024 01:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231807; x=1710836607; 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=Eq8dPdS4O29YZHMSjUomBAXNnVOWg/nPlLYlOBRYYnw=; b=TcVF8q6CVfURTxPJpFVhmfBYNF3AcQyeUARzttJCWT6au5QoD2EK4TnbjV0DAz4o17 V2eVZZwVvivJNj2qn8Fut3l8cG35tFybALy4IgnxM+i5j9cmcaThLrikdrx5u/bGFEsP dfnIak911LM0Ygi8aU2nXkIfD/fB6pepAczg6oFsMmypp2mrwT8ujsd4w+T+qm7kt4ze u7U/ZdsL03pUFhL0Vk8Gfq/wsN8/GzUmvjqk9jeS76n5n8gZDrbWpuBmDcs1++JKZJt6 WhoNMP+TaIWlpIXSRl0y6UL4cFjW7rE1WrKvpldJd+5PP1PFjGpt8/OEf0r+GTBsvZOq gt9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231807; x=1710836607; 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=Eq8dPdS4O29YZHMSjUomBAXNnVOWg/nPlLYlOBRYYnw=; b=UiHK63kFY00iiB4Jl1N8ztOdIbqtDA9p/9A4lwSTnsRFijLiEw9CAlh0Y/hTlLhtQ2 yBFlD7wNRhYyNAQPzBHOZmU5sRolLCC4UVgmPb61EWzMEOz5GFckpWOX04ZKjrAdymil ikA9xmgDMS+mwfnJJL1EUZWtJNmTMHRH4HprUmaxGycbp0kmOreb2SyQTiInADtVSdI0 q0NVAKmK44Hispf8qKtvraM2y5w4wODNQwnwK8TqBSHwA1ckL0fCg67lWAannUs3ZdKp x1jH0gpeFUsRqxMybleAPzMjcMHcI958ViO3CYhaVUi/Ec3lKJnOtk6tkM1PeJEidO68 NdAg== X-Gm-Message-State: AOJu0YxeiThGYuco1Sfb85RtPWreD8a/Jq+mCaSpLtKaKY2tGYGkwbbO tpy3VesdQljrZvO9iOWwwzOYs4w1CdGs/n3kybzSiqNTTl0uOEeCt0DYuWAAaWDQj1ujWyYUGlp A X-Received: by 2002:a5d:5505:0:b0:33d:277d:a2c7 with SMTP id b5-20020a5d5505000000b0033d277da2c7mr5082955wrv.16.1710231807243; Tue, 12 Mar 2024 01:23:27 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id bx33-20020a5d5b21000000b0033e93e00f68sm5279431wrb.61.2024.03.12.01.23.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:23:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Mark Cave-Ayland , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Artyom Tarasenko Subject: [PULL 07/13] sun4u: remap ebus BAR0 to use unassigned_io_ops instead of alias to PCI IO space Date: Tue, 12 Mar 2024 09:22:32 +0100 Message-ID: <20240312082239.69696-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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 From: Mark Cave-Ayland During kernel startup OpenBSD accesses addresses mapped by BAR0 of the ebus device but at offsets where no IO devices exist. Before commit 4aa07e8649 ("hw/sparc64/ebus: Access memory regions via pci_address_space_io()") BAR0 was mapped to legacy IO space which allows accesses to unmapped devices to succeed, but afterwards these accesses to unmapped PCI IO space cause a memory fault which prevents OpenBSD from booting. Since no devices are mapped at the addresses accessed by OpenBSD, change ebus BAR0 from a PCI IO space alias to an IO memory region using unassigned_io_ops which allows these accesses to succeed and so allows OpenBSD to boot once again. Fixes: 4aa07e8649 ("hw/sparc64/ebus: Access memory regions via pci_address_space_io()") Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240311064345.2531197-1-mark.cave-ayland@ilande.co.uk> Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc64/sun4u.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index eda9b58a21..cff6d5abaf 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -360,8 +360,13 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp) pci_dev->config[0x09] = 0x00; // programming i/f pci_dev->config[0x0D] = 0x0a; // latency_timer - memory_region_init_alias(&s->bar0, OBJECT(s), "bar0", - pci_address_space_io(pci_dev), 0, 0x1000000); + /* + * BAR0 is accessed by OpenBSD but not for ebus device access: allow any + * memory access to this region to succeed which allows the OpenBSD kernel + * to boot. + */ + memory_region_init_io(&s->bar0, OBJECT(s), &unassigned_io_ops, s, + "bar0", 0x1000000); pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->bar0); memory_region_init_alias(&s->bar1, OBJECT(s), "bar1", pci_address_space_io(pci_dev), 0, 0x8000); From patchwork Tue Mar 12 08:22:33 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: 779689 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907409wrt; Tue, 12 Mar 2024 01:25:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVHSnplnOCrfeH82yTaR9sktopPo6jdm3g6g2HEmOIZ6a4759iN2nu1xT9dMoHR259VbLSMsSb8T7S0DGwOMF4P X-Google-Smtp-Source: AGHT+IEUt6qKmbajaoYk8iL8qrCXyuCM2eAOb6K+e744lZPAqMizi09Ptu+ShP15cNmFnmkuG6m8 X-Received: by 2002:a05:622a:1c5:b0:42e:e050:18f4 with SMTP id t5-20020a05622a01c500b0042ee05018f4mr12396082qtw.40.1710231931767; Tue, 12 Mar 2024 01:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231931; cv=none; d=google.com; s=arc-20160816; b=pNo02h5xvS3TBu6iKUVBdJCKB1xQpxFfcYOqH6PpYfJTM3aGVPQBSVsKueOJ1wcSme eLV6R6ScxWMApV3yKzeq42F4LwQy2upUW0+w+XMwwoIE2eaB/+MyVmKVCbdn05sbxw3G oUqLftmWAsq65oGBcja35EmxzWi640zIk+47V+mK+4OZi4Ph+4uNrQ4NsKUH0Qf7IJOt 2LRrv76wVDeh0tB3MTqDbvTgUwAZsOGcuYvRPcplE8SkKZCGvzjlN8qKwRKbqiuMGDni Gz+ILxI29YVQrqX7JusNmsqjSumLDBdenlSvnU2JjLB+c18+THf98fgl934Axjn7dBMW zb/A== 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=uETsEUNOz0/4CrmmYx0I6id+tmI4uW8xOvgnA3mXRG0=; fh=3zgKXu2sN2CZPleBiXLItgthsCBz7aKq46Ued4acRbE=; b=apX4KYH97fKKSKZHm13+Ej0Rf9MSmy3ifWTLUncmDQ526Hhfd5Wz2jLMg81WpRz3zz Km1MWgkqSWv2j7bdi46+xO+zJjJx/xNy+n/l+NJ0DMQSTMMe45jKEcvjr1prQSZQSetK XJXvlUc/bBSNh49R4KqR3JjJdWGMnBNJ1639T/xHLODQburiEVBmtrP4D55L/ez2RKmN XQs5H/c1XFbshePcY28YNy7WXRP3UYHfPwKnRgS7fz6OJzd4bKZk28S/HceMFE4JWLcj D+qOveqaoHpuOeCvoZAL7U1C0cyGwJJiWOm+6c4cEuek9kpHPFOtYU0yOww9n6p4HbuN +Tlw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KjQcJPKF; 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 y4-20020a05622a004400b0042eeadd5089si7299835qtw.323.2024.03.12.01.25.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:25:31 -0700 (PDT) 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=KjQcJPKF; 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 1rjxQA-0006L7-RB; Tue, 12 Mar 2024 04:23:38 -0400 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 1rjxQ9-0006I2-Dl for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:37 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxQ7-0001Df-5v for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:37 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4132a5b38fbso9387955e9.0 for ; Tue, 12 Mar 2024 01:23:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231813; x=1710836613; 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=uETsEUNOz0/4CrmmYx0I6id+tmI4uW8xOvgnA3mXRG0=; b=KjQcJPKFeRixgTaUntEcbKHzxuPYGelnIEoVcdyWOa1yZSoFlGRfze3FsDcCVWo0KL 6Uy51D/odDLH1I9mK+wuLHSDf2y8IUDX47GUhF2/5FDf8u9fxerUM5EM8kj23sGf35IC cL0zZ9AVO4X9gGwKBF0ICUzjsZ2xpnMI9cGN6GSaiU9NG/FR2ifVnuIJT76KqXYkOBws Hr0+xaiAZbayC0CQLn3d46uKNgRTUCGGve+Xf4z0ooPGk5foKzwUqTNEsxKls8FGCQ5j VJ1XSHoUkttiUErv4uSBo5wa6bL2BvOGSXY5m8biPMXh044bi4Fw6zMLDPFJOLKRuD+U EyAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231813; x=1710836613; 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=uETsEUNOz0/4CrmmYx0I6id+tmI4uW8xOvgnA3mXRG0=; b=NyuDGtIOh8jOSw76HTZwUtp0geFbjc6u61Hbf4zTv7dDIGdc4ASmclr6xuBDY4h6se O7a1pJnFcCHa/NgdtjhDSxrN4cXq7l0vg7swBEjRrtd+vRfQsaXfW5YQtP6PHT3ZK3ei IYnWA+2Z/1j31D/Oj2z+7r8m0sIDVsAVUOtqfZS3lLd24D9MU4872jINNWcAuJ4gaVoa nB5Y8e6Bb/BYgjiA5cnix0hg2Rood08m8i34OgRi1qNL2Bql6Rg0PDC/Wyn6/9IXdg6d 1E9Weo0Alw/Tog51xcA08VEDStq2XUkx12aGzotPeLM7aIZtn47VJEW8uHUeS+bTqik/ 5gjQ== X-Gm-Message-State: AOJu0Yzz8VHo7zMXCxoD4FzQyd96Uga1FAgcMod5hUUKi757VPd/Aewt SnM4WU5z/k9QNs4pU0IGHdTVVPUhN5bGhXl/LGancSHqD1DgSxtUD1XyQbi5h7sH/1+V6BtJKHh K X-Received: by 2002:a05:600c:6a1a:b0:413:1285:6e40 with SMTP id jj26-20020a05600c6a1a00b0041312856e40mr6633849wmb.20.1710231813577; Tue, 12 Mar 2024 01:23:33 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id t13-20020a05600c198d00b00412b0e51ef9sm11854370wmq.31.2024.03.12.01.23.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:23:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Zhao Liu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang Subject: [PULL 08/13] hw/core: Cleanup unused included headers in cpu-common.c Date: Tue, 12 Mar 2024 09:22:33 +0100 Message-ID: <20240312082239.69696-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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 From: Zhao Liu Remove unused headers in cpu-common.c: * qemu/notify.h * exec/cpu-common.h * qemu/error-report.h * qemu/qemu-print.h Tested by "./configure" and then "make". Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240311075621.3224684-2-zhao1.liu@linux.intel.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/core/cpu-common.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 0108fb11db..4bd9c70a83 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -22,14 +22,10 @@ #include "qapi/error.h" #include "hw/core/cpu.h" #include "sysemu/hw_accel.h" -#include "qemu/notify.h" #include "qemu/log.h" #include "qemu/main-loop.h" #include "exec/log.h" -#include "exec/cpu-common.h" #include "exec/gdbstub.h" -#include "qemu/error-report.h" -#include "qemu/qemu-print.h" #include "sysemu/tcg.h" #include "hw/boards.h" #include "hw/qdev-properties.h" From patchwork Tue Mar 12 08:22:34 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: 779684 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907192wrt; Tue, 12 Mar 2024 01:24:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW4CrKv9JAkW9lSVotQPvmRt07ZPtZbAuwvzPaDuwDoMSqsks1ovDGhwwkDFTbiEh7VnD/vXugX0e6UlMkbKiFK X-Google-Smtp-Source: AGHT+IHiPUvUU0wupcxSTqMrtOmuiP5XiYO8uu5hn167aOKVUW0MUJ/jICagOu3tc/b9fpnZ0Ynh X-Received: by 2002:a05:622a:55:b0:42e:f733:669d with SMTP id y21-20020a05622a005500b0042ef733669dmr11718971qtw.58.1710231882460; Tue, 12 Mar 2024 01:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231882; cv=none; d=google.com; s=arc-20160816; b=tcBg9AXPciZ/E7LuF0TawM1YnaVy59sjGPqMoWdarlIvipxRB5aVWDk3mk16XODaU4 hXInP0PjJ3slfnjxi7I1cTkwwmRWHeWaOKDZ4wfTqgjTq9aM+NzlIYAsXJxGOjLmUGwq xx2VnyCjVf/BKN/ny2yCW5k432kMJqy6lHq0+48jNwkO+PseWBTSUMAHYFEjp74jrsSW GvCA5Ba6hNHRBqcfVA7pFSNacN7EowedIonJ9EOwBF6DGTSJBuFvWQA/R2c1tlRAlBpA ir3Gv+4JaJJk2stpuwsTkWJVpwLRLX+x7EzuodE6eNor3kwFPycWS6Mu+G1rM/oJGxRn dUeg== 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=kBwjgCbKhXeLtpORHnsvbw0J9Mzl7MSsZnlOxv2Y6SQ=; fh=3zgKXu2sN2CZPleBiXLItgthsCBz7aKq46Ued4acRbE=; b=o4beA/Q9aWICeoN4GcMc2Wc07k6EOohzoDuM2ylmXlvV00qLcOUzaXe1oofy5CL0u+ TzMD1o0IeMWDN4E7IjFLRcNikxI99yxFBDKx3DxnJc0Y+dOD5ut5gZSHOQ6o41kbgnm+ FFvmsLhjJz1B5w+DGxgzSC82XyW2yXqAAKyl7mBv+iCFwbQcUWkDznH6/I7HioaF3qxO 4B7J5XleX3KM32iV/0/6C5TOOl/kluYDP9Y9sBDps6W+tgcwxTUJPlXdKOsgWw1QWPTI 34cjoIovmeKriAVl++HdD6Bd66NSzEh3CVfqUm5KGtK/F1JVkSG/SXMLRy0/6DOH/1Jn PRdA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fSs6qo0G; 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 u12-20020a05622a14cc00b0042eb487594csi7295804qtx.174.2024.03.12.01.24.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:24:42 -0700 (PDT) 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=fSs6qo0G; 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 1rjxQc-0006sk-8x; Tue, 12 Mar 2024 04:24:08 -0400 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 1rjxQH-0006fe-8m for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:47 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxQE-0001EV-4U for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:45 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-41342849a15so1418175e9.3 for ; Tue, 12 Mar 2024 01:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231820; x=1710836620; 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=kBwjgCbKhXeLtpORHnsvbw0J9Mzl7MSsZnlOxv2Y6SQ=; b=fSs6qo0GFAkMGB2bmquhsIJCIKlQ/JxQuCNk2gDul700mC6BlkRhybHda4s4OUUpj2 xCN3jsP7xefOko3NNUcO09csX8dQuGxbUBS5Ih4swfRV+oktVTIygn/2I6KnCwgxJy9P Xj/CotK5P2lSMpE17ycZ1NA9K1tB4dqEQbkEHweXuVJWr0rX1Zwvx+mfX/+7ulJ7KJMp wG/ZcUhxIrrAG5AaxF4FxHDXODrCyuDYxdMkhKlSxvgDEHHex+4X7z0zAXDmP2me/8sg F54CHTPtDwPsazrGG2m4QrVtsDccCrAH7MvTXQJZxlabDZzrmbqfg+IBpwW30hv4A9c5 vPhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231820; x=1710836620; 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=kBwjgCbKhXeLtpORHnsvbw0J9Mzl7MSsZnlOxv2Y6SQ=; b=ltRRbpdrT6PnIROK+XKtIDJzLUE3EFdGZ+Gyzgl58pCg0F1fRKVqTYYefYdrWl8fm/ CI205AcqKFcCX824YEnw+9xuOtJVF2RnOlKWQiKOyixt8tyfFRE2iutlQw4/LeqfEqiq nA+CSIHGBiFTe9W3VwmtVWxhvuW0iErxKEc26T9XtIXVkWud+1eFXeRMBdelB33U8FdI km4qQvDpOlmDsS2tAdo7ZxhN7btyQrh6m4kvPr6g/MnpSDDMSv9xwLniqyuyVlHNE2w/ gGiLuMyqxSQiAMwEQc4t6w/61vuIId4H+xhZwFuwFBE72rCR9m5xrMPrSK+pOOCBc+L1 jvsw== X-Gm-Message-State: AOJu0YxNCkabSyP3lTxHjQwYUXf2BgwoGtCI3uIdPIiS0EivqSU7oKf4 twyHygBp3OE1KMnbjbb7DWAEOAyj5/ENIytKXEKaOw8KKnea+J3EoIw8C4ifsFIuTuNqy1ZsHYR V X-Received: by 2002:a05:600c:5253:b0:413:166e:ad51 with SMTP id fc19-20020a05600c525300b00413166ead51mr6524890wmb.2.1710231819983; Tue, 12 Mar 2024 01:23:39 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id ea13-20020a05600c674d00b004132ae838absm5185974wmb.43.2024.03.12.01.23.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:23:39 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Zhao Liu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang Subject: [PULL 09/13] hw/core: Cleanup unused included header in machine-qmp-cmds.c Date: Tue, 12 Mar 2024 09:22:34 +0100 Message-ID: <20240312082239.69696-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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 From: Zhao Liu Remove unused header (qemu/main-loop.h) in machine-qmp-cmds.c. Tested by "./configure" and then "make". Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240311075621.3224684-3-zhao1.liu@linux.intel.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/core/machine-qmp-cmds.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 3860a50c3b..4b72009cd3 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -19,7 +19,6 @@ #include "qapi/qmp/qobject.h" #include "qapi/qobject-input-visitor.h" #include "qapi/type-helpers.h" -#include "qemu/main-loop.h" #include "qemu/uuid.h" #include "qom/qom-qobject.h" #include "sysemu/hostmem.h" From patchwork Tue Mar 12 08:22:35 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: 779688 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907243wrt; Tue, 12 Mar 2024 01:24:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwCrhJfSOXQDwxELV7pmHoeQZEfEOL57Dnh9llZkTF9GZ1IG/Lvq36KHT1QybPqHlzxk32dBGVzCXkIgGJ29cd X-Google-Smtp-Source: AGHT+IFGZn079bhUWicE3P1XKurjBgfwshC57BNseubszVRjzSJJDzm66am5K0A6L5sCV1ZcLKVY X-Received: by 2002:ac8:5d93:0:b0:42e:e3d6:799d with SMTP id d19-20020ac85d93000000b0042ee3d6799dmr11687620qtx.18.1710231894278; Tue, 12 Mar 2024 01:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231894; cv=none; d=google.com; s=arc-20160816; b=wd/9zG1youXuBd/+MaEXiBt6obQCRQ8yc7WR84f8HKNaZRkjJKwgjB4rqBJ4+f/J07 91aJf5t6Ud/tnC/R6sNGAJzrJZ0KH1jLDETrLbj89xNsNoz62TCNGrkTaxUglLvAAmMR cmXHW6ZwsYCcttg8BRLARBF/FmXaMZ8udh5LVMHUY0z8+t4fl+A+Bk9bBNQaHzHL0jya eEA8s34OvlL7+J25KRkh4VNCRTG1ZsmkOaeU/aXoETu7IpAD6480nTZ4dpELvMw0Fr94 AWSlHg3NGL7dXCHWa/5vsH8azdD7ZC9/VL4QXSZmnsf7bhYSABGP0A0Ty2HdF4CT+coI Amqw== 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=5JAXlhORARNjQs7nWpFZ95k476OBclGaSf7/Vye9/fo=; fh=3zgKXu2sN2CZPleBiXLItgthsCBz7aKq46Ued4acRbE=; b=UVTeEMZWNfi3AEVHU6sHcOOsublz0JDwZqZqlD6fFhsAZcOsqLo9ze+jR37y1PZGft wcbIndhToeG8puYMSX1AT1W9M+cVFSqAWUpnGdcicpD8aDzQTQVgZycTybpp881/Q9jO A/cCLXgsyShBA/B5aew/mEAJnek6lrN6oWzca7R3PU164FTuf1HpXpNsXjd0/bWKTWFR hxUjfAxvG/x9LMf6cYOJt+Jh19K9p6tgcgKWPizRnG6jpE116amIU4UgOfhK5k3pUs5Q tbp65bWXXkbn+4BTeG5XG1WaIuNGV5Ca6A8JcJe11ggKDp4fKmr/WuqloPUpb0g7A3Ni OC3g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ju4fWBiw; 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 g13-20020ac8480d000000b0042f4b709bf0si2695471qtq.65.2024.03.12.01.24.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:24:54 -0700 (PDT) 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=ju4fWBiw; 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 1rjxQx-0007ko-Az; Tue, 12 Mar 2024 04:24:27 -0400 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 1rjxQN-0006jY-NL for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:53 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxQK-0001FF-Fc for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:51 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-33e99b62e01so1297923f8f.0 for ; Tue, 12 Mar 2024 01:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231826; x=1710836626; 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=5JAXlhORARNjQs7nWpFZ95k476OBclGaSf7/Vye9/fo=; b=ju4fWBiwBCwdTJKt2t3qyXgaZuu2mXQl3zlgrIu3YujM3iU/2DI//l0ti3zOOEF70B jyt+55k2avdI3ryJ9hKaH2z4GsKlP6qyy/2lGI8zjWJp8B3BOHP4H3fldetCIKSVM5LK Vben6YEWfTJkRRXHaZoUM7wPgWMK5Cz8IAhkaRlVsGGiT1wsptefj51YO1g/wUXanPEV HKSTo4C+iokfn2CUF1IqNtUav9HAsXFw9YZ6p1ru4bL/g9jR+iMGjr7taiTqb9wk3Xkw JYNy8d+t0D1DLch8pvo2FOhTquuJRJ8UItfpWz7umFuTJXk1/U8w6BWzCHRKYcO+KSoQ PeCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231826; x=1710836626; 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=5JAXlhORARNjQs7nWpFZ95k476OBclGaSf7/Vye9/fo=; b=EgZM0opZCa/1hkPPpq1DmFdBuzUHLFZSKjpYYfjmhnIlx1NC+esckZArAiEXsDjPIq T4yk5oXdJxFdcokSOV8Yv7EhrAowUgLaWee259Zlu6sh1RgotZ0YmCVItBprkcbP8B5w bpWs7oVlwD5gbO5704y417na+s3SDVlUEM8Ym0ghIzK4SQ0+AJlwfuIpjjJbvkKeOjPY ktOdR7d4hw8ZW25Oo2q1nMkWaGG707o1GaS3rNunn6rlpTO7ppDvcnG1PQbmSbKQFZGX TAPMKWvm41SVPMTz+vccqnzwsK4fwHkTqPfhumJbfvgIkQJNXFmyqedSzmB9Mj4JrSqp wErw== X-Gm-Message-State: AOJu0YwB8K8tNadq1zpbFHtM6T4MhyeLyqui4r73wEedKsyFaZSZFaVK ZM9XleH8CDxkVTAYkIlSUivydeRnfcWyeUfBcc2d3BHSX2aLsQYI92YhqoNAhlNFabk9/DUCkhN d X-Received: by 2002:a5d:4650:0:b0:33e:3efc:ff93 with SMTP id j16-20020a5d4650000000b0033e3efcff93mr845742wrs.1.1710231826455; Tue, 12 Mar 2024 01:23:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id bk5-20020a0560001d8500b0033e699fc6b4sm8505455wrb.69.2024.03.12.01.23.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:23:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Zhao Liu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang Subject: [PULL 10/13] hw/core: Cleanup unused included headers in numa.c Date: Tue, 12 Mar 2024 09:22:35 +0100 Message-ID: <20240312082239.69696-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 From: Zhao Liu Remove unused header in numa.c: * qemu/bitmap.h * migration/vmstate.h Note: Though parse_numa_hmat_lb() has the variable named "bitmap_copy", it doesn't use the normal bitmap ops so that it's safe to exclude qemu/bitmap.h header. Tested by "./configure" and then "make". Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240311075621.3224684-4-zhao1.liu@linux.intel.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/core/numa.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/core/numa.c b/hw/core/numa.c index f08956ddb0..81d2124349 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -28,7 +28,6 @@ #include "sysemu/numa.h" #include "exec/cpu-common.h" #include "exec/ramlist.h" -#include "qemu/bitmap.h" #include "qemu/error-report.h" #include "qapi/error.h" #include "qapi/opts-visitor.h" @@ -36,7 +35,6 @@ #include "sysemu/qtest.h" #include "hw/core/cpu.h" #include "hw/mem/pc-dimm.h" -#include "migration/vmstate.h" #include "hw/boards.h" #include "hw/mem/memory-device.h" #include "qemu/option.h" From patchwork Tue Mar 12 08:22:36 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: 779693 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907654wrt; Tue, 12 Mar 2024 01:26:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUiokw85piY18+RD4Uvs37b52i9N0I++oLZCBAzPHCE9YoA43eRGF7VjDJdxc+ATTGQNwQoLWckRHbU7r3xO4hY X-Google-Smtp-Source: AGHT+IHkoW7tO3x+SauJpXVbjeRr5aL/PzM+8M0v56EyotDjDNmd3LCzGvmno2iH8qfqVfvz2Hc2 X-Received: by 2002:a05:620a:29cb:b0:788:7502:1c7a with SMTP id s11-20020a05620a29cb00b0078875021c7amr4341159qkp.37.1710231985580; Tue, 12 Mar 2024 01:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231985; cv=none; d=google.com; s=arc-20160816; b=R2S/7AqMKNEWapoa95qqHSUDBvw6sqgv7WFHe3bnsxNuMb5pfhebYfPaPRnWawWAPU k0VHb6f44hhtDwoU5lt3YvjYRNU+FtKRRpo+hVrfEfrZ6Iqgyugc9b9N8LaJHzQ+l1Jw wuyi0vHafsxZ0GP3YIqmbTCPwSFNmLW6cFPCP54DGso3q5gpYWgyr+S71B4BqyA5xhXd Whqkwzfj9LfNCc4XOmreJqyYzDy6OeZk1u02kP3310cGymsSi7pj9sWUjFezjS43u6dL WtLWaADeFAOSTfLX+l7MFq1938/LW6sbQ+76nr1yBbwmFoyowdXbKDMfvkYY2RhZYZ1x LIBA== 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=1hGuUQy57ryIxbN/Y0vAq6Y8p4QXBEpEzJDzKEkwyAk=; fh=sug2JQMezNVTCeX5naO3IPYw6UKrky8737mdLupT5oc=; b=rwi59CTvISYpwWtghSbHCE7MDI8U9ZE8NuoFfwawbF2284PRD0HT2vXmXzU0BR2tFN s2Pcvh9wvxBh0dCq4NiGRefWQ1WmHF2Gs5E3ern0OS4OmH3lFmpqDvKBzRgCDFUZaG1S UO0NAwmI8iD/gHcEYb8+n+Ved/20csbRxbbE8XH0Sd7G88a1vH9dCL4ANLtBqTuCpaf3 SosMlxbs7PXa8pgc2r/7DafIDPpbJ0Q9kdU56VOmsc3gXK5RT0vMs3Wfayu2O/jkAs/0 LUaYhZKL2xCnS/KA/lT87vWUqxno3kDH2bRCPtYWKCCs13vB2KjPSfgSDmCAyrJBISna ihRw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BjhUfDYt; 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 i2-20020a05620a0a0200b007885b76eaa2si6881582qka.709.2024.03.12.01.26.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:26:25 -0700 (PDT) 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=BjhUfDYt; 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 1rjxQu-0007Y6-NO; Tue, 12 Mar 2024 04:24:24 -0400 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 1rjxQV-0006oh-7D for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:24:01 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxQQ-0001He-Pb for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:23:59 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-33e9623c3a8so1457697f8f.0 for ; Tue, 12 Mar 2024 01:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231833; x=1710836633; 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=1hGuUQy57ryIxbN/Y0vAq6Y8p4QXBEpEzJDzKEkwyAk=; b=BjhUfDYtP7lU9fIAfCfByQAH5b1W3x9xippxG0OloPwnHydP7D3h8dNXNCwkumBQIA GK+/yzRL+/BMRMCha8Hg983kFaEI0Rdhr13Rl1xnnaxXNBma0ovpoYMIFBBYRN5jANwO ggKldzRnsetCXYVXgccocK2D77ihKhCUWVDPBG5wyW8vVoA8l1Qg6AmjGo+YOeL2X24/ J+eUT+oad4nUccNoJ2xeO6Mh33Ircg/9vqjUYwVktOOmdNrh3onPVRQVBVHkfUE/RSre HYtGQ0U7xe98GyHFqp/iDgBJCAHTR3Hf86q0UA9mBw3bFZCfChCIMyeDY9KCwhyVFRdf Nojg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231833; x=1710836633; 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=1hGuUQy57ryIxbN/Y0vAq6Y8p4QXBEpEzJDzKEkwyAk=; b=MqU8nJsHjOiHgjlifeaLPPlmU0XO0lLTZGurmjirEpaLGf/t5PSjH5GMSqml3K0aDL FMVfJf+IYGeyvhoK+bWxl8G//D40oH7E69P6xF0cHXSUjAkETVhc2KSChsYHnBDys2Qf v22Ac3oLZphfS7r3I599eG+l8Yv17xShRHYuwfoaECUvA5xBR0VfEIzlm5+CL/82jzp0 X2toi+rdz2jl13suONHe/gilYucOWym+4VBR8RtM/RLjc6P2SB6WvIhkQa38xpC6YWob RzLEJXwTDdUyNjqkWSshJrnmAQSvzbuuSOKqok1B64M4Wo9m4fTYXX/NjwQ3wN6PoxgR titQ== X-Gm-Message-State: AOJu0YwdbMTzuMsjH4ohJCDCpwWiKnt7UoGzE5NRV7FRwIh5GgYtD033 fmsNCh+9AolrtEU1CNhP+ZfpJa7rnjRgggxr4gHt7Q965y02s9Tb1qGh1cjlK775sraGnFSlTTf 3 X-Received: by 2002:a5d:4bc3:0:b0:33e:6064:a3f with SMTP id l3-20020a5d4bc3000000b0033e60640a3fmr2170152wrt.29.1710231832915; Tue, 12 Mar 2024 01:23:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id bu29-20020a056000079d00b0033e87564720sm7586064wrb.92.2024.03.12.01.23.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:23:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Dmitriy Sharikhin , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Paolo Bonzini Subject: [PULL 11/13] hw/gpio: introduce pcf8574 driver Date: Tue, 12 Mar 2024 09:22:36 +0100 Message-ID: <20240312082239.69696-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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 From: Dmitriy Sharikhin NXP PCF8574 and compatible ICs are simple I2C GPIO expanders. PCF8574 incorporates quasi-bidirectional IO, and simple communication protocol, when IO read is I2C byte read, and IO write is I2C byte write. User can think of it as open-drain port, when line high state is input and line low state is output. Signed-off-by: Dmitrii Sharikhin Reviewed-by: Philippe Mathieu-Daudé Message-ID: Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 6 ++ include/hw/gpio/pcf8574.h | 15 ++++ hw/gpio/pcf8574.c | 162 ++++++++++++++++++++++++++++++++++++++ hw/gpio/Kconfig | 4 + hw/gpio/meson.build | 1 + 5 files changed, 188 insertions(+) create mode 100644 include/hw/gpio/pcf8574.h create mode 100644 hw/gpio/pcf8574.c diff --git a/MAINTAINERS b/MAINTAINERS index 4d96f855de..72c23e3682 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2503,6 +2503,12 @@ S: Maintained F: hw/i2c/i2c_mux_pca954x.c F: include/hw/i2c/i2c_mux_pca954x.h +pcf8574 +M: Dmitrii Sharikhin +S: Maintained +F: hw/gpio/pcf8574.c +F: include/gpio/pcf8574.h + Generic Loader M: Alistair Francis S: Maintained diff --git a/include/hw/gpio/pcf8574.h b/include/hw/gpio/pcf8574.h new file mode 100644 index 0000000000..3291d7dbbc --- /dev/null +++ b/include/hw/gpio/pcf8574.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* + * NXP PCF8574 8-port I2C GPIO expansion chip. + * + * Copyright (c) 2024 KNS Group (YADRO). + * Written by Dmitrii Sharikhin + */ + +#ifndef _HW_GPIO_PCF8574 +#define _HW_GPIO_PCF8574 + +#define TYPE_PCF8574 "pcf8574" + +#endif /* _HW_GPIO_PCF8574 */ diff --git a/hw/gpio/pcf8574.c b/hw/gpio/pcf8574.c new file mode 100644 index 0000000000..d37909e2ad --- /dev/null +++ b/hw/gpio/pcf8574.c @@ -0,0 +1,162 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* + * NXP PCF8574 8-port I2C GPIO expansion chip. + * Copyright (c) 2024 KNS Group (YADRO). + * Written by Dmitrii Sharikhin + */ + +#include "qemu/osdep.h" +#include "hw/i2c/i2c.h" +#include "hw/gpio/pcf8574.h" +#include "hw/irq.h" +#include "migration/vmstate.h" +#include "qemu/log.h" +#include "qemu/module.h" +#include "qom/object.h" + +/* + * PCF8574 and compatible chips incorporate quasi-bidirectional + * IO. Electrically it means that device sustain pull-up to line + * unless IO port is configured as output _and_ driven low. + * + * IO access is implemented as simple I2C single-byte read + * or write operation. So, to configure line to input user write 1 + * to corresponding bit. To configure line to output and drive it low + * user write 0 to corresponding bit. + * + * In essence, user can think of quasi-bidirectional IO as + * open-drain line, except presence of builtin rising edge acceleration + * embedded in PCF8574 IC + * + * PCF8574 has interrupt request line, which is being pulled down when + * port line state differs from last read. Port read operation clears + * state and INT line returns to high state via pullup. + */ + +OBJECT_DECLARE_SIMPLE_TYPE(PCF8574State, PCF8574) + +#define PORTS_COUNT (8) + +struct PCF8574State { + I2CSlave parent_obj; + uint8_t lastrq; /* Last requested state. If changed - assert irq */ + uint8_t input; /* external electrical line state */ + uint8_t output; /* Pull-up (1) or drive low (0) on bit */ + qemu_irq handler[PORTS_COUNT]; + qemu_irq intrq; /* External irq request */ +}; + +static void pcf8574_reset(DeviceState *dev) +{ + PCF8574State *s = PCF8574(dev); + s->lastrq = MAKE_64BIT_MASK(0, PORTS_COUNT); + s->input = MAKE_64BIT_MASK(0, PORTS_COUNT); + s->output = MAKE_64BIT_MASK(0, PORTS_COUNT); +} + +static inline uint8_t pcf8574_line_state(PCF8574State *s) +{ + /* we driving line low or external circuit does that */ + return s->input & s->output; +} + +static uint8_t pcf8574_rx(I2CSlave *i2c) +{ + PCF8574State *s = PCF8574(i2c); + uint8_t linestate = pcf8574_line_state(s); + if (s->lastrq != linestate) { + s->lastrq = linestate; + if (s->intrq) { + qemu_set_irq(s->intrq, 1); + } + } + return linestate; +} + +static int pcf8574_tx(I2CSlave *i2c, uint8_t data) +{ + PCF8574State *s = PCF8574(i2c); + uint8_t prev; + uint8_t diff; + uint8_t actual; + int line = 0; + + prev = pcf8574_line_state(s); + s->output = data; + actual = pcf8574_line_state(s); + + for (diff = (actual ^ prev); diff; diff &= ~(1 << line)) { + line = ctz32(diff); + if (s->handler[line]) { + qemu_set_irq(s->handler[line], (actual >> line) & 1); + } + } + + if (s->intrq) { + qemu_set_irq(s->intrq, actual == s->lastrq); + } + + return 0; +} + +static const VMStateDescription vmstate_pcf8574 = { + .name = "pcf8574", + .version_id = 0, + .minimum_version_id = 0, + .fields = (VMStateField[]) { + VMSTATE_I2C_SLAVE(parent_obj, PCF8574State), + VMSTATE_UINT8(lastrq, PCF8574State), + VMSTATE_UINT8(input, PCF8574State), + VMSTATE_UINT8(output, PCF8574State), + VMSTATE_END_OF_LIST() + } +}; + +static void pcf8574_gpio_set(void *opaque, int line, int level) +{ + PCF8574State *s = (PCF8574State *) opaque; + assert(line >= 0 && line < ARRAY_SIZE(s->handler)); + + if (level) { + s->input |= (1 << line); + } else { + s->input &= ~(1 << line); + } + + if (pcf8574_line_state(s) != s->lastrq && s->intrq) { + qemu_set_irq(s->intrq, 0); + } +} + +static void pcf8574_realize(DeviceState *dev, Error **errp) +{ + PCF8574State *s = PCF8574(dev); + + qdev_init_gpio_in(dev, pcf8574_gpio_set, ARRAY_SIZE(s->handler)); + qdev_init_gpio_out(dev, s->handler, ARRAY_SIZE(s->handler)); + qdev_init_gpio_out_named(dev, &s->intrq, "nINT", 1); +} + +static void pcf8574_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + I2CSlaveClass *k = I2C_SLAVE_CLASS(klass); + + k->recv = pcf8574_rx; + k->send = pcf8574_tx; + dc->realize = pcf8574_realize; + dc->reset = pcf8574_reset; + dc->vmsd = &vmstate_pcf8574; +} + +static const TypeInfo pcf8574_infos[] = { + { + .name = TYPE_PCF8574, + .parent = TYPE_I2C_SLAVE, + .instance_size = sizeof(PCF8574State), + .class_init = pcf8574_class_init, + } +}; + +DEFINE_TYPES(pcf8574_infos); diff --git a/hw/gpio/Kconfig b/hw/gpio/Kconfig index 712940b8e0..19c97cc823 100644 --- a/hw/gpio/Kconfig +++ b/hw/gpio/Kconfig @@ -19,3 +19,7 @@ config SIFIVE_GPIO config STM32L4X5_GPIO bool + +config PCF8574 + bool + depends on I2C diff --git a/hw/gpio/meson.build b/hw/gpio/meson.build index 3454b503ae..791e93a97b 100644 --- a/hw/gpio/meson.build +++ b/hw/gpio/meson.build @@ -16,3 +16,4 @@ system_ss.add(when: 'CONFIG_RASPI', if_true: files( system_ss.add(when: 'CONFIG_STM32L4X5_SOC', if_true: files('stm32l4x5_gpio.c')) system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_gpio.c')) system_ss.add(when: 'CONFIG_SIFIVE_GPIO', if_true: files('sifive_gpio.c')) +system_ss.add(when: 'CONFIG_PCF8574', if_true: files('pcf8574.c')) From patchwork Tue Mar 12 08:22: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: 779694 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1907656wrt; Tue, 12 Mar 2024 01:26:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVvP+kt9PCiOjY6Vy3iWMo/CHc9JlJZRfKT+mtZvg9GiKvEaaglpdXEFdEFXHsUtmPuYdW04cfASNoRNTNeB3rP X-Google-Smtp-Source: AGHT+IFb0TyDdMQ2yDM/z1FnfQL8TMGUvGObiiu1Dr2Yr7EYdhxV0k2j9DN+3iF0s+TuxvxiFOIz X-Received: by 2002:ac8:590a:0:b0:42f:591d:e1c9 with SMTP id 10-20020ac8590a000000b0042f591de1c9mr1030147qty.57.1710231985998; Tue, 12 Mar 2024 01:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710231985; cv=none; d=google.com; s=arc-20160816; b=hHuEWWnW2ppkX95KxwSkHRsFOzoWJXJHGj+uUJYJP+WDeSxLailTZOzoghcyknA55A 6NCDIsJ7tbesGSUUUZf1m9MN+ZdbpjdH11rSAP7nuiDBxogdfrOrftRoOmImlItDoXAx doQysAPQrZ52/0aJplFUcqg6q5oo7BzeijKglmAxTBV19adBIzetDMYRJ3VMBKTfSdwx rzghVXM1POJKXjeIpyzk5i1k3rXFxpwm9x4jS9Msx3ehSN/VOl9TYbHkbQkjGepUk8aZ CVVvXoIxUtCTc4TZK87YmojSsc2X8BFm1KlbfQeklli2R05ECeWN/sA7KaNuHL7OewA8 zvCw== 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=6MhT9qADAUndB9gfklgv3b9HSVnHfN7uCmsIepMqwLg=; fh=cBDZFAaENvh8HtlE/AgXig3/HS5PGuYHF0qT0AF5tzU=; b=eHY0v11KKSfJ5Sphv6n5cleOndHf6PsiJELIvl4ojLqrxcl/uaRGLvjqNP9s2HRtPr 3mNYilei6VZcCi3uEhcxQlVKArXeKNTPCws287ndICWj7GgvI3rn3S9LbxKxqmFjh+l6 U1wNApuoWRy+4xsUP9OGi+uD/3jpNCi3pLH+X0PTN6qOq1V3JoOOIwCveURr8XS0cAKB 0ADbX4iW6gmzTaHRg6bp+8Mw+gy2qbkTJ6XFd6ow4Lboc/DfE83XHBbJ/IZ4V5AHvP8U cmtMTHmmB8RwHaFHSvsJZHJIyGkMTdLLEDH1f3VGNQoA06Y0HlhUyxGmvgzAJxh9maaC 9esw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xWL/6C/B"; 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 v6-20020a05622a144600b0042ef8934be4si7557514qtx.339.2024.03.12.01.26.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 01:26:25 -0700 (PDT) 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="xWL/6C/B"; 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 1rjxQv-0007ZT-8X; Tue, 12 Mar 2024 04:24:25 -0400 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 1rjxQb-0006xF-1b for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:24:08 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjxQX-0001Iy-Os for qemu-devel@nongnu.org; Tue, 12 Mar 2024 04:24:04 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-51344bebe2fso3943224e87.2 for ; Tue, 12 Mar 2024 01:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710231839; x=1710836639; 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=6MhT9qADAUndB9gfklgv3b9HSVnHfN7uCmsIepMqwLg=; b=xWL/6C/BEhhR51C6D4BIFCZ9he3dZhe3h8yGjAGuPxPUynaUstIjNGhv3hfM8WHMUr IpbDVflnh/lI4PFxfYZU/he+8bdUBvD73vaVLh5IodJ7TY/9dfloteeu8sIVgfk4d0t4 XogbT/MWRl16O9NXDorttmePUj9RV1xsKVWPSsbNCAClCvbTDYmBE8rPVj8lUBg5kZIn 6DaVzbTaZTDAubClBWVxE7QTrD9gjqKu6WOid3UV/ZAwbcHOP+9YDtIv0QyNLEY+8NEX TigUGhlb6D04q+t5fA2n+DLe5Z+CeoUhVf6+z1S/Mm5qllXInkRPPCw0+qR3Z25Du7r4 v1YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710231839; x=1710836639; 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=6MhT9qADAUndB9gfklgv3b9HSVnHfN7uCmsIepMqwLg=; b=cjrlnKiXSlcwPi6waP3ZU18JxsQMffMdBOc/Dq+CzLO7QWk3AlstSyrTg12OyiBlcd yNsg0MT+wbEMkd43By/C4iY/x8CvXWq/Z+UOLD15UKKVlwx4ycPXiPjbVIP9zQwLOhOD 8QgzzzLQhhygNxvDMFqFHf2mDtHWn35EK79Lig3n8/YniXNf5AcgC6sVMKLLcj1C9AZb wCz/4ZueVESers9GgxIfXfgveN+agxhUq2puXw+H59Ho/v833U1VOY9+YoSd2O/UwFZ2 Sq26TivOEclqr3836xAs6xQPJbukfLh/DhAmSLeQ04XyDzj2vLaszsMVUoOh2t0k/0co A3Mg== X-Gm-Message-State: AOJu0YyDjXGJcwIF0EIXlJUfwKjtcgsa9FHc6o6P4LCiqb6HcS9lHLLK JcRwcRbZGauZpfeZy0HeeevFS61uL+PZzaABjrtWGBcpPSvtn1YnHyJ4Rfmx8Mw5Z7bZNHA03mO N X-Received: by 2002:ac2:42c8:0:b0:512:d78e:90fa with SMTP id n8-20020ac242c8000000b00512d78e90famr5379719lfl.15.1710231839612; Tue, 12 Mar 2024 01:23:59 -0700 (PDT) Received: from m1x-phil.lan ([176.187.206.139]) by smtp.gmail.com with ESMTPSA id l5-20020a056000022500b0033e712b1d9bsm8482375wrz.77.2024.03.12.01.23.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Mar 2024 01:23:59 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Thomas Huth Subject: [PULL 12/13] meson.build: Always require an objc compiler on macos hosts Date: Tue, 12 Mar 2024 09:22:37 +0100 Message-ID: <20240312082239.69696-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240312082239.69696-1-philmd@linaro.org> References: <20240312082239.69696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=philmd@linaro.org; helo=mail-lf1-x12e.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 From: Peter Maydell We currently only insist that an ObjectiveC compiler is present on macos hosts if we're building the Cocoa UI. However, since then we've added some other parts of QEMU which are also written in ObjC: the coreaudio audio backend, and the vmnet net backend. This means that if you try to configure QEMU on macos with --disable-cocoa the build will fail: ../meson.build:3741:13: ERROR: No host machine compiler for 'audio/coreaudio.m' Since in practice any macos host will have an ObjC compiler available, rather than trying to gate the compiler detection on an increasingly complicated list of every bit of QEMU that uses ObjC, just require it unconditionally on macos hosts. Resolves https://gitlab.com/qemu-project/qemu/-/issues/2138 Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-ID: <20240311133334.3991537-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f9dbe7634e..e3fab8ce9f 100644 --- a/meson.build +++ b/meson.build @@ -66,7 +66,7 @@ if host_os == 'windows' and add_languages('cpp', required: false, native: false) cxx = meson.get_compiler('cpp') endif if host_os == 'darwin' and \ - add_languages('objc', required: get_option('cocoa'), native: false) + add_languages('objc', required: true, native: false) all_languages += ['objc'] objc = meson.get_compiler('objc') endif