From patchwork Sat Jun 19 17:26:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 463884 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp1022647jao; Sat, 19 Jun 2021 10:36:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6OsacGZF0DxczfXZsvVn6NKGk5jUNr6XDUdDZEjdvGNn3uxNZwiiqD5uCY3+ZpZr/XqUG X-Received: by 2002:ab0:2381:: with SMTP id b1mr16704006uan.93.1624124177475; Sat, 19 Jun 2021 10:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624124177; cv=none; d=google.com; s=arc-20160816; b=LVnaMR56dU7ZOlnJoIBeTtkVH61e8uFwGmUcR7nxviCM1EaQs/EmVdEhuar9L33H0P 1erfdCjPJ6koqfa/NhXVom/yFKPvrtuBhxLWTR81PeWV94Hc2e4DsXXmGVAwYyPPjIV1 wvTLecE7lkMd1oB0AWb1w8nkm/75u8hgOauYgDnzEU5o6O5eWRavJLRhxLlEV+KAQ48v 41ouElo3Zr5cOO99FArxK3DkyV8pxh21XqvfOBpiXp7CLCAQnz5+JTtvGDfRHhOE1COe Om+YXKJWlV3rgi8+TM0AHHBHi89adjV8hzDUydQN64NodYIkHWbEJ0+806XevadtbLiL 319A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=nul6SfodGAZA6iOTrqG5uPKt97OG3sa3GBVpUMgyEwA=; b=NqQF9qEJEyvN1dE04d6+m4wHmK64NKizozwq7hJZaHdRkDHM+nTvCrDx65inmD4KLO rTmT9Un/brH/uGXsKwpkSgMdu3X/2HPWppT9iMuQudHkKzwq7hitMuOsk1KcIUQ1kbOF eCw6OXgWRLtelhtekrC93O3JjFx6kuu74TOMtL1OsEJhW6zXtgUAG0TuKnHTX/u3FQbF JfaNCzP4y6gJNl9tfpl965PWbporQi6BH4lyUqOH5HBEH1Jx4bJUgldaNevcMx6OIN1n oa73wkBBEWU6RHOb3UP+v/B4s3PgHdT5DS8WJcqDENeeVabQCXxjjP1iXMeweTA3Zh8s yIsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QBqKAfWm; 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=fail (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 k6si1433799uan.197.2021.06.19.10.36.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Jun 2021 10:36:17 -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=fail header.i=@linaro.org header.s=google header.b=QBqKAfWm; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luetE-000487-Sk for patch@linaro.org; Sat, 19 Jun 2021 13:36:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luejt-0003Um-30 for qemu-devel@nongnu.org; Sat, 19 Jun 2021 13:26:37 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:44999) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luejr-0003bS-8a for qemu-devel@nongnu.org; Sat, 19 Jun 2021 13:26:36 -0400 Received: by mail-pf1-x42a.google.com with SMTP id u18so4931102pfk.11 for ; Sat, 19 Jun 2021 10:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nul6SfodGAZA6iOTrqG5uPKt97OG3sa3GBVpUMgyEwA=; b=QBqKAfWmtq15UTEQsdVlXNWKVu5I3YnyLWFhOSwx7r1lKqcja/2hGoRpcXvBNswWfE OVem8XWpkgcUKVg5mvzCwUZ/11YuKvnZXOJeqcAicKUtGefuccyP3E3Ddtf5yt1WlocG fAUQvbdmZKEwTpk/SrOE5ciLBeIPZl0dFuTirKYI1lgZ3mdxOi42glCtnOyYrmsAsXBz w/PqLATjjKak0Wfsggjlo8if0LuGo2n/v+z1/ePB1Zj0oU+V30eqfdrfEeKzukqPcfRt 8roQvMW4zCDRQqPUoC/AZGKTXhT/wRoDid+stY1D7s883paRauNZnLqr7gWs81Z6WMPE J7KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nul6SfodGAZA6iOTrqG5uPKt97OG3sa3GBVpUMgyEwA=; b=sdHJm/Et6aYg/zA6Y7DvhUNYZCiQcdjijSLIqh8imPZR4V9VVjWhXk5qBn5xUFrcGq gEpVJYKazB+/6yzIqc/JgRx+xkObmZWJidTY3cEMoFuBeU1eNGkH/2faCXkmwTG/9v1f jBG4P5fer4R0fzJvg0xpYQSaYcrFkHiglRkv9HsyB8bjhqsQbl77ESivxT+YiLoaGpCB F/C5+8wwOuLLbHA3ggwvpGomCcg7f5Vzipywp9Rs8hTUOMzwt49jz3MOXSM041BgBi3M 6d6mSVtEts1bbv+0qmOD2JKmKaR2DllSQUY3NRwaLbRJ6eS9PYQ7MJMESz4GaWd7sY1W 62Gg== X-Gm-Message-State: AOAM531hGMrhWWgDsWcrvJ3eWorHbvCkAZsKxBHjSIe6kqe8BsvVlbq6 M6gjEKmWV9N1030oEoQZdX5fQz2eTLce6g== X-Received: by 2002:a62:5444:0:b029:2e9:c69d:dc64 with SMTP id i65-20020a6254440000b02902e9c69ddc64mr11045534pfb.32.1624123594036; Sat, 19 Jun 2021 10:26:34 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id co18sm2084241pjb.37.2021.06.19.10.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jun 2021 10:26:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 10/15] hw/pci-host/q35: Improve blackhole_ops Date: Sat, 19 Jun 2021 10:26:21 -0700 Message-Id: <20210619172626.875885-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210619172626.875885-1-richard.henderson@linaro.org> References: <20210619172626.875885-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, pbonzini@redhat.com, mark.cave-ayland@ilande.co.uk, f4bug@amsat.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There is nothing about the blackhole that requires 4 byte operations. Decrease the min size to 1, increase the max size to 8. Drop duplicate endianness spec. Signed-off-by: Richard Henderson --- hw/pci-host/q35.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 2eb729dff5..133be67e4f 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -268,7 +268,7 @@ static const TypeInfo q35_host_info = { static uint64_t blackhole_read(void *ptr, hwaddr reg, unsigned size) { - return 0xffffffff; + return UINT64_MAX; } static void blackhole_write(void *opaque, hwaddr addr, uint64_t val, @@ -282,10 +282,9 @@ static const MemoryRegionOps blackhole_ops = { .write = blackhole_write, .endianness = DEVICE_NATIVE_ENDIAN, .valid.min_access_size = 1, - .valid.max_access_size = 4, - .impl.min_access_size = 4, - .impl.max_access_size = 4, - .endianness = DEVICE_LITTLE_ENDIAN, + .valid.max_access_size = 8, + .impl.min_access_size = 1, + .impl.max_access_size = 8, }; /* PCIe MMCFG */