From patchwork Wed Mar 31 06:25:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 1460342 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=201602 header.b=UqTcmuHI; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F9GYh1YFTz9sVq for ; Wed, 31 Mar 2021 17:26:48 +1100 (AEDT) Received: from localhost ([::1]:38896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRUJS-0004zv-5u for incoming@patchwork.ozlabs.org; Wed, 31 Mar 2021 02:26:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIJ-0004Xm-SO; Wed, 31 Mar 2021 02:25:36 -0400 Received: from bilbo.ozlabs.org ([2401:3900:2:1::2]:43475 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIF-0000ot-Vk; Wed, 31 Mar 2021 02:25:35 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4F9GX64yQqz9sVq; Wed, 31 Mar 2021 17:25:26 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1617171926; bh=+xII9Tn5VdditCA3Ix6IXV2ua4b9i7tHzfjOHeULzJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UqTcmuHIRwAlzmfHwN5iOtfLNGIxBYUdVTRaDx6AGKheC+C5oYWrhyMzopbmQZ3EN Jwy4ywUSrf6AibfbgcTvEvH4CODaHG36LykymjercDHLlsi/jeTK7qs7W8nN7vvBQ6 WQ6X9zuj7cng160X+vew9uReHkpGDhNd1W7VtjHY= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Subject: [PULL 1/5] hw/ppc: e500: Add missing #address-cells and #size-cells in the eTSEC node Date: Wed, 31 Mar 2021 17:25:20 +1100 Message-Id: <20210331062524.335749-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210331062524.335749-1-david@gibson.dropbear.id.au> References: <20210331062524.335749-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Received-SPF: pass client-ip=2401:3900:2:1::2; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: Bin Meng , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng Per devicetree spec v0.3 [1] chapter 2.3.5: The #address-cells and #size-cells properties are not inherited from ancestors in the devicetree. They shall be explicitly defined. If missing, a client program should assume a default value of 2 for #address-cells, and a value of 1 for #size-cells. These properties are currently missing, causing the property of the queue-group subnode to be incorrectly parsed using default values. [1] https://github.com/devicetree-org/devicetree-specification/releases/download/v0.3/devicetree-specification-v0.3.pdf Fixes: fdfb7f2cdb2d ("e500: Add support for eTSEC in device tree") Signed-off-by: Bin Meng Message-Id: <20210311081608.66891-1-bmeng.cn@gmail.com> Signed-off-by: David Gibson --- hw/ppc/e500.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 1d94485ac8..79467ac512 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -237,6 +237,8 @@ static int create_devtree_etsec(SysBusDevice *sbdev, PlatformDevtreeData *data) qemu_fdt_setprop_string(fdt, node, "model", "eTSEC"); qemu_fdt_setprop(fdt, node, "local-mac-address", etsec->conf.macaddr.a, 6); qemu_fdt_setprop_cells(fdt, node, "fixed-link", 0, 1, 1000, 0, 0); + qemu_fdt_setprop_cells(fdt, node, "#size-cells", 1); + qemu_fdt_setprop_cells(fdt, node, "#address-cells", 1); qemu_fdt_add_subnode(fdt, group); qemu_fdt_setprop_cells(fdt, group, "reg", mmio0, 0x1000); From patchwork Wed Mar 31 06:25:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 1460343 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=201602 header.b=eHK/Efqh; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F9Gc95kB1z9sVq for ; Wed, 31 Mar 2021 17:28:56 +1100 (AEDT) Received: from localhost ([::1]:43688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRULW-00073a-Ah for incoming@patchwork.ozlabs.org; Wed, 31 Mar 2021 02:28:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIJ-0004Xl-Q9; Wed, 31 Mar 2021 02:25:36 -0400 Received: from ozlabs.org ([203.11.71.1]:54609) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIG-0000ov-4b; Wed, 31 Mar 2021 02:25:35 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4F9GX667VZz9sWT; Wed, 31 Mar 2021 17:25:26 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1617171926; bh=IAXTeCAYq9UAhT4FZCaUQxfKJxQcGMr2ZL37dSw0zEk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eHK/EfqhEBKjCuKDJ5cCbAwZ4DP+kkfxhZAifmA+Y+iYVI/ZzbVZsLOAXbpfO1Vt2 bhb2yr841VlSJHqNZNb1EBo8VgwfQgNoo6kJ7Bx2a+6vj8CByGkmn2E7KPp/199HFL mr2slqlVgltRVisNegW+DZKxhLVUvuaOgJwMuU4E= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Subject: [PULL 2/5] target/ppc/kvm: Cache timebase frequency Date: Wed, 31 Mar 2021 17:25:21 +1100 Message-Id: <20210331062524.335749-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210331062524.335749-1-david@gibson.dropbear.id.au> References: <20210331062524.335749-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Received-SPF: pass client-ip=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Greg Kurz Each vCPU core exposes its timebase frequency in the DT. When running under KVM, this means parsing /proc/cpuinfo in order to get the timebase frequency of the host CPU. The parsing appears to slow down the boot quite a bit with higher number of cores: # of cores seconds spent in spapr_dt_cpus() 8 0.550122 16 1.342375 32 2.850316 64 5.922505 96 9.109224 128 12.245504 256 24.957236 384 37.389113 The timebase frequency of the host CPU is identical for all cores and it is an invariant for the VM lifetime. Cache it instead of doing the same expensive parsing again and again. Rename kvmppc_get_tbfreq() to kvmppc_get_tbfreq_procfs() and rename the 'retval' variable to make it clear it is used as fallback only. Come up with a new version of kvmppc_get_tbfreq() that calls kvmppc_get_tbfreq_procfs() only once and keep the value in a static. Zero is certainly not a valid value for the timebase frequency. Treat atoi() returning zero as another parsing error and return the fallback value instead. This allows kvmppc_get_tbfreq() to use zero as an indicator that kvmppc_get_tbfreq_procfs() hasn't been called yet. With this patch applied: 384 0.518382 Signed-off-by: Greg Kurz Message-Id: <161600382766.1780699.6787739229984093959.stgit@bahia.lan> Signed-off-by: David Gibson --- target/ppc/kvm.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 298c1f882c..104a308abb 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -1815,24 +1815,37 @@ static int read_cpuinfo(const char *field, char *value, int len) return ret; } -uint32_t kvmppc_get_tbfreq(void) +static uint32_t kvmppc_get_tbfreq_procfs(void) { char line[512]; char *ns; - uint32_t retval = NANOSECONDS_PER_SECOND; + uint32_t tbfreq_fallback = NANOSECONDS_PER_SECOND; + uint32_t tbfreq_procfs; if (read_cpuinfo("timebase", line, sizeof(line))) { - return retval; + return tbfreq_fallback; } ns = strchr(line, ':'); if (!ns) { - return retval; + return tbfreq_fallback; } - ns++; + tbfreq_procfs = atoi(++ns); + + /* 0 is certainly not acceptable by the guest, return fallback value */ + return tbfreq_procfs ? tbfreq_procfs : tbfreq_fallback; +} + +uint32_t kvmppc_get_tbfreq(void) +{ + static uint32_t cached_tbfreq; + + if (!cached_tbfreq) { + cached_tbfreq = kvmppc_get_tbfreq_procfs(); + } - return atoi(ns); + return cached_tbfreq; } bool kvmppc_get_host_serial(char **value) From patchwork Wed Mar 31 06:25:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 1460345 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=201602 header.b=E2F52+tw; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F9Gfg4FNcz9sVq for ; Wed, 31 Mar 2021 17:31:07 +1100 (AEDT) Received: from localhost ([::1]:46778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRUNd-0008JE-ID for incoming@patchwork.ozlabs.org; Wed, 31 Mar 2021 02:31:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIL-0004Zd-3h; Wed, 31 Mar 2021 02:25:37 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:57469 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUII-0000oy-61; Wed, 31 Mar 2021 02:25:36 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4F9GX709tlz9sWX; Wed, 31 Mar 2021 17:25:26 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1617171927; bh=ZbUZUTlF8jf5aE4OwXCN/W/eDeVgxYnFh4FTht1TnKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E2F52+tw5QHSo6d7PtrnTG33Izz85LheGxTw8m/480BKEhFFwUZFO12VIZ7RBaBzX oJBhkA+tthbXrT60ElkGT5Yr3e0J7/1Rdr8LeYw+POiUajmM5ZBP2CI283GA4p9Ck3 zENlyuAj1jvFOSrSQ9HuI3KOfHqOVvAb6Ydv4bU8= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Subject: [PULL 3/5] spapr: Assert DIMM unplug state in spapr_memory_unplug() Date: Wed, 31 Mar 2021 17:25:22 +1100 Message-Id: <20210331062524.335749-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210331062524.335749-1-david@gibson.dropbear.id.au> References: <20210331062524.335749-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Received-SPF: pass client-ip=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: Daniel Henrique Barboza , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Greg Kurz spapr_memory_unplug() is the last step of the hot unplug sequence. It is indirectly called by: spapr_lmb_release() hotplug_handler_unplug() and spapr_lmb_release() already buys us that DIMM unplug state is present : it gets restored with spapr_recover_pending_dimm_state() if missing. g_assert() that spapr_pending_dimm_unplugs_find() cannot return NULL in spapr_memory_unplug() to make this clear and silence Coverity. Fixes: Coverity CID 1450767 Signed-off-by: Greg Kurz Message-Id: <161562021166.948373.15092876234470478331.stgit@bahia.lan> Reviewed-by: Daniel Henrique Barboza Signed-off-by: David Gibson --- hw/ppc/spapr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index d56418ca29..73a06df3b1 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3660,6 +3660,9 @@ static void spapr_memory_unplug(HotplugHandler *hotplug_dev, DeviceState *dev) SpaprMachineState *spapr = SPAPR_MACHINE(hotplug_dev); SpaprDimmState *ds = spapr_pending_dimm_unplugs_find(spapr, PC_DIMM(dev)); + /* We really shouldn't get this far without anything to unplug */ + g_assert(ds); + pc_dimm_unplug(PC_DIMM(dev), MACHINE(hotplug_dev)); qdev_unrealize(dev); spapr_pending_dimm_unplugs_remove(spapr, ds); From patchwork Wed Mar 31 06:25:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 1460341 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=201602 header.b=mhPaDrqJ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F9GYX6HDvz9sVq for ; Wed, 31 Mar 2021 17:26:40 +1100 (AEDT) Received: from localhost ([::1]:38142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRUJK-0004ey-Qp for incoming@patchwork.ozlabs.org; Wed, 31 Mar 2021 02:26:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIL-0004ZS-0d; Wed, 31 Mar 2021 02:25:37 -0400 Received: from bilbo.ozlabs.org ([2401:3900:2:1::2]:56393 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIG-0000p2-5h; Wed, 31 Mar 2021 02:25:36 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4F9GX71Dtsz9sWd; Wed, 31 Mar 2021 17:25:26 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1617171927; bh=frdXBfskgd8jnykC7Qw1E4cZMMmjNwvV6d/c8E8/1NQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mhPaDrqJh/i1HUzxdpgYm7mqV9qetgONOvF8d+u/u6o/oh5ZDS/RHk2KUtXLtb/DU IA+1tG6BvpD0DBYYTjstVbtlWNgw81nHcOqhvYGKdcAZolo11oqz1gIjgaz3WEQydG 0YA5v323RXYW9RQShQqztpGYe/TLcF96RVYskGvY= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Subject: [PULL 4/5] spapr: Fix typo in the patb_entry comment Date: Wed, 31 Mar 2021 17:25:23 +1100 Message-Id: <20210331062524.335749-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210331062524.335749-1-david@gibson.dropbear.id.au> References: <20210331062524.335749-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Received-SPF: pass client-ip=2401:3900:2:1::2; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: Alexey Kardashevskiy , Daniel Henrique Barboza , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alexey Kardashevskiy There is no H_REGISTER_PROCESS_TABLE, it is H_REGISTER_PROC_TBL handler for which is still called h_register_process_table() though. Signed-off-by: Alexey Kardashevskiy Message-Id: <20210225032335.64245-1-aik@ozlabs.ru> Reviewed-by: Daniel Henrique Barboza Signed-off-by: David Gibson --- include/hw/ppc/spapr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 47cebaf3ac..bf7cab7a2c 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -168,7 +168,7 @@ struct SpaprMachineState { SpaprResizeHpt resize_hpt; void *htab; uint32_t htab_shift; - uint64_t patb_entry; /* Process tbl registed in H_REGISTER_PROCESS_TABLE */ + uint64_t patb_entry; /* Process tbl registed in H_REGISTER_PROC_TBL */ SpaprPendingHpt *pending_hpt; /* in-progress resize */ hwaddr rma_size; From patchwork Wed Mar 31 06:25:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 1460347 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=201602 header.b=E0TpAACt; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F9GmG6x6Lz9sW4 for ; Wed, 31 Mar 2021 17:35:58 +1100 (AEDT) Received: from localhost ([::1]:57064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRUSL-0004Gu-1Y for incoming@patchwork.ozlabs.org; Wed, 31 Mar 2021 02:35:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIO-0004cl-3L; Wed, 31 Mar 2021 02:25:40 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:50643) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRUIM-0000tF-B5; Wed, 31 Mar 2021 02:25:39 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4F9GX726ygz9sWk; Wed, 31 Mar 2021 17:25:27 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1617171927; bh=0kiOf+g2tFsDfVG8GlftgnZyqsTTnUDCv93HiqL9+k0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E0TpAACthjehmHt6dBgc26napsE8ySNwszxPeFBocmBzk87gQjvLBe9lIeZ+uPHID Esq+kERPodExxgEUNjdPY4vIcV+lFohgObL8xtrnZptk7T1el0BaiuKJDJUmC8Pwog zD9U13dMEPwjCAar+2HmzYy5u1n6iUUryC86aA10= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Subject: [PULL 5/5] hw/net: fsl_etsec: Tx padding length should exclude CRC Date: Wed, 31 Mar 2021 17:25:24 +1100 Message-Id: <20210331062524.335749-6-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210331062524.335749-1-david@gibson.dropbear.id.au> References: <20210331062524.335749-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Received-SPF: pass client-ip=2401:3900:2:1::2; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: Bin Meng , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng As the comment of tx_padding_and_crc() says: "Never add CRC in QEMU", min_frame_len should excluce CRC, so it should be 60 instead of 64. Signed-off-by: Bin Meng Message-Id: <20210316081505.72898-1-bmeng.cn@gmail.com> Signed-off-by: David Gibson --- hw/net/fsl_etsec/rings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/fsl_etsec/rings.c b/hw/net/fsl_etsec/rings.c index d6be0d7d18..8f08446415 100644 --- a/hw/net/fsl_etsec/rings.c +++ b/hw/net/fsl_etsec/rings.c @@ -259,7 +259,7 @@ static void process_tx_bd(eTSEC *etsec, || etsec->regs[MACCFG2].value & MACCFG2_PADCRC) { /* Padding and CRC (Padding implies CRC) */ - tx_padding_and_crc(etsec, 64); + tx_padding_and_crc(etsec, 60); } else if (etsec->first_bd.flags & BD_TX_TC || etsec->regs[MACCFG2].value & MACCFG2_CRC_EN) {