From patchwork Thu Jan 14 18:06:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 12020647 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E46DDC433E0 for ; Thu, 14 Jan 2021 18:54:08 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7A3AC23B1F for ; Thu, 14 Jan 2021 18:54:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A3AC23B1F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l07l1-0007rx-H4 for qemu-devel@archiver.kernel.org; Thu, 14 Jan 2021 13:54:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0718-0001py-HJ; Thu, 14 Jan 2021 13:06:42 -0500 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]:32779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0716-0004zD-Hl; Thu, 14 Jan 2021 13:06:42 -0500 Received: by mail-qt1-x834.google.com with SMTP id c14so4187404qtn.0; Thu, 14 Jan 2021 10:06:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S0lgIP/ecxTOZFqlmmkF4x/uUpqQHFc9Bq5tMLixPXU=; b=sWbNYu6s5h2wTY7q2OVgyOiiY2c0G9t+WHb3NDr7Y3+IX4nseKmQSo6zD8kvW8aBjd njxgCzs2/xyf9P1nhs71tIjnLPQ5fYC0j7I20IQZNt3B+S5HPoNXnTLBTWAK1+jw3yl5 w49olg/RPKDZAYjTknn1SBGoCmaR/nv85JN2dSrmyjUQ72q9nLyK/Dzu7SVWaxFddW0w VQPbGpRrc8/FiEgzNhQpCFsXI5WZ99mEmpqjJVuq03ttUIkxjz0iruTcU5veuOelcF6Y aynuGY9q+1nFwhuCHRPvY5dkRcMH+7w5XmAkBuQlz+jOXGDWWoU6qFupS3cMDRCze2eR Achw== 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=S0lgIP/ecxTOZFqlmmkF4x/uUpqQHFc9Bq5tMLixPXU=; b=VvQVQvG1ogdKg/Pa4HdOcBtRaa2S8TAtULSoAuy9PS3aUkiUFL1nmMQm8EajEEyJa3 wTlgefvXN87olzxUkVQt4+DTPIlmSwUw3sxMct39CwOMBMTHXslIKbfyOF0JZoQFYfmM EzpA5riYoQ372dXBykyZtmwDnEcdLyhPOf8rTAOx8zkAHF/m9I3OaLuwfLhpWzHEBKtr ONzStp0IbtdH0zAMnGw+mgEJhWlFR25DknoA8bOO0T9kwUYhUW1MOuLVjAR5YFImAKho kIC6OAAyFotGJ0PHaroMpuVqXQ5Ns6pQTGJBH5LdyBn9i94e50zNRFWSx6ExeITzYvHj 8qUA== X-Gm-Message-State: AOAM530DnJBOYiI2Opt1QD0wFxFa9W4B4J1WR+WlHcCUfDCka+3shu+N reCPRCrz/fOpZnOsDUX5LBJHZ1tPlvXfGA== X-Google-Smtp-Source: ABdhPJyO4/TVyrXsNCYfsUUSmsgNHjE7Ft6V17f41YYdIc0JQPbjF3S1FdqbCdhfbRc1GMNaPohpWg== X-Received: by 2002:ac8:6b46:: with SMTP id x6mr7998933qts.104.1610647599231; Thu, 14 Jan 2021 10:06:39 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:b984:ff01:270:b51c:24a5]) by smtp.gmail.com with ESMTPSA id a1sm3448129qkn.104.2021.01.14.10.06.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 10:06:38 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH v1 1/7] spapr.h: fix trailing whitespace in phb_placement Date: Thu, 14 Jan 2021 15:06:22 -0300 Message-Id: <20210114180628.1675603-2-danielhb413@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210114180628.1675603-1-danielhb413@gmail.com> References: <20210114180628.1675603-1-danielhb413@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::834; envelope-from=danielhb413@gmail.com; helo=mail-qt1-x834.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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: Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This whitespace was messing with lots of diffs if you happen to use an editor that eliminates trailing whitespaces on file save. Signed-off-by: Daniel Henrique Barboza --- 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 1cc19575f5..4d37c2a93b 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -145,7 +145,7 @@ struct SpaprMachineClass { bool pre_6_0_memory_unplug; bool (*phb_placement)(SpaprMachineState *spapr, uint32_t index, - uint64_t *buid, hwaddr *pio, + uint64_t *buid, hwaddr *pio, hwaddr *mmio32, hwaddr *mmio64, unsigned n_dma, uint32_t *liobns, hwaddr *nv2gpa, hwaddr *nv2atsd, Error **errp); From patchwork Thu Jan 14 18:06:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 12020655 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B9C0C433DB for ; Thu, 14 Jan 2021 18:56:05 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 24A1023B31 for ; Thu, 14 Jan 2021 18:56:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24A1023B31 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l07mu-0001DW-58 for qemu-devel@archiver.kernel.org; Thu, 14 Jan 2021 13:56:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l071B-0001ri-NI; Thu, 14 Jan 2021 13:06:45 -0500 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]:37031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0718-00050A-RP; Thu, 14 Jan 2021 13:06:45 -0500 Received: by mail-qk1-x732.google.com with SMTP id h4so9144310qkk.4; Thu, 14 Jan 2021 10:06:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qA+hTawZuCB29ODtiQTgs7aKtUv1YETVYNC1B0Au/Es=; b=pJBpihp54MNQGs5BhssgzqKN+CsuNzaLtGDvWRRgAGzNgE1V/fZTVg87wjkMj2l520 IRxJucRpl/eGZD7edJ1RTtO2EuYlq2qCIZTIJMZ65R8SU3jPBHDy6ZlCiJQVhiUmGvvy 2d1egU+x5UGtUfU+H4hVB7aG6RiEhDQqhoU6DUhjoXj6AVEuomL87SLFAzvyOeWXv5lb tGMQolm/FvI1ovPyRSAUUQ1VykjLYZEV6OF3mH2hh1Gr50UXpJU/14X9vHDhcPxlWT7z GCyz/S9/Gydgg9ZiG6hZ9fzrmfDmwJXkaQnYjTIzjTTRlRTzj5JvQOTYxzKd/eEWvbWA mXAg== 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=qA+hTawZuCB29ODtiQTgs7aKtUv1YETVYNC1B0Au/Es=; b=JkfJ4Vw3kCWtdqWGLIOmetHPVHb8C95orzlByQQROgHajUkuOunagLF9joNTf6cd4Q aR3g965hFgLgRiiZ9lPflk8gmr/gvjnEaPDprjiffmjC8ypMxvQYzK8Ztqbw6gaPt9YT X0cWN8AIGJwoLqVknve9AAJhenDWItdP/Do6FUwhIpCQw5uYNwNrWHiigFma9Ktd/nJV +xc6BNfbS+eGwdlKns7tadftdYXAIEPxeHKvFebX4FZFPaXFCMcFNTLyqUwjLpSkfwfQ rFSFav7Uoo3Qvr/3qYWXtXGbZ5H3aG95XMqpEtBHlZhKaP1e5A5gBGFEsuhSapweQbBh wsag== X-Gm-Message-State: AOAM533PKLUJ/tt0lF9K+id33CEAy5RF8QitCp11toI6VraFIIhPix9l gloi7flHSpPDpCtFMgz/SPy6uOb5V3c88Q== X-Google-Smtp-Source: ABdhPJz5PXpXGbpXy+nuQfeeQGxX4FrnpQsaJAZQiwGAnvZOnRNd9l/cyUwMGZHhXr7Vgask1VE0hQ== X-Received: by 2002:a05:620a:21d3:: with SMTP id h19mr8178040qka.341.1610647601359; Thu, 14 Jan 2021 10:06:41 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:b984:ff01:270:b51c:24a5]) by smtp.gmail.com with ESMTPSA id a1sm3448129qkn.104.2021.01.14.10.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 10:06:40 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH v1 2/7] spapr_hcall.c: make do_client_architecture_support static Date: Thu, 14 Jan 2021 15:06:23 -0300 Message-Id: <20210114180628.1675603-3-danielhb413@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210114180628.1675603-1-danielhb413@gmail.com> References: <20210114180628.1675603-1-danielhb413@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::732; envelope-from=danielhb413@gmail.com; helo=mail-qk1-x732.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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: Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The function is called only inside spapr_hcall.c. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_hcall.c | 1 + include/hw/ppc/spapr.h | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index e5dfc1ba7a..7b5cd3553c 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1632,6 +1632,7 @@ static uint32_t cas_check_pvr(PowerPCCPU *cpu, uint32_t max_compat, return best_compat; } +static target_ulong do_client_architecture_support(PowerPCCPU *cpu, SpaprMachineState *spapr, target_ulong vec, diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 4d37c2a93b..a2d1fb21c6 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -583,11 +583,6 @@ void spapr_register_hypercall(target_ulong opcode, spapr_hcall_fn fn); target_ulong spapr_hypercall(PowerPCCPU *cpu, target_ulong opcode, target_ulong *args); -target_ulong do_client_architecture_support(PowerPCCPU *cpu, - SpaprMachineState *spapr, - target_ulong addr, - target_ulong fdt_bufsize); - /* Virtual Processor Area structure constants */ #define VPA_MIN_SIZE 640 #define VPA_SIZE_OFFSET 0x4 From patchwork Thu Jan 14 18:06:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 12020567 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FB11C433E0 for ; Thu, 14 Jan 2021 18:14:26 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A12B423A50 for ; Thu, 14 Jan 2021 18:14:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A12B423A50 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l078a-0000je-23 for qemu-devel@archiver.kernel.org; Thu, 14 Jan 2021 13:14:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l071F-0001uW-Rd; Thu, 14 Jan 2021 13:06:49 -0500 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:36230) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l071B-00050U-3x; Thu, 14 Jan 2021 13:06:48 -0500 Received: by mail-qt1-x82d.google.com with SMTP id z20so4174410qtq.3; Thu, 14 Jan 2021 10:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Url9CQwejlSNVB8CBstuu6birLm2MnGqdFIb3oPOLow=; b=R9KkAeMSds0g9S7laCkAojnJqh3XtL0k9gtLlYVRWehi8VQfQCvVFzWEpkjm2hKlqM IHPT5HnkcIBfw54IrqmlOzdDXS8IFgXEl4cJeybdmpuV2iAsPBTUWJ5BZeN8B8r5AlEj 6R82KoJUouRrQW2/HkARKUBD33MKgROXTzGGFNFQdf9ESF/Yuj/fJsxZvjiMtuAl90je WDvvKBovaXyRJ0Q/A+ymGH00x0qqPYMwY8tl5I5mq30mYOV4zQ41vOnl2gthF5hFdWIG GZLg/4XU9jJwPm+xriwC22DqTHD8h+6s3a+pI5h9caqrOKDfhtCvWBCQ/H4qljMrCvYk xbRw== 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=Url9CQwejlSNVB8CBstuu6birLm2MnGqdFIb3oPOLow=; b=saro+wEqdFdEdSJN8OQCNAXwtO3JWccIlxxKp2n70Q3fGzqKLgugPCpH8pBDfYpsVp cFt1788lKmgzBYJse8n4eSPwOYblToeRtx9WpXlDyGXhi6jcfz5UGCsIea10NnD4oOj3 Ks9R4b1CMpgo2gTH0QeSSs9yNQfzX7y/1IqsUoFxkmfETOA001LwOyX7I5iPdEtVkOTI 9QyMOf/yT/c41vFzUTNGf37X4akAV/J/Cy0TRZbHdg6JmjVKNJ7Z384VfYEJq7vbtlKI SENiLvN0EvUXasr3i4pn+OXaONoBC0JT8tHh2g+ByhFCw9iBqdz1NmkjL0z8Lj+Tca5L q8Fw== X-Gm-Message-State: AOAM530e0aa1DE+a/BQzJQHquMASTZouY7y8yOvQweYkOjbfbjR5Do9Q KJAdBr+nO1W3Nrp2SkrXzmdc4s9NYYY8GQ== X-Google-Smtp-Source: ABdhPJylv6JhfEX4uUThu//Q5/yaHPFIXNKQ6TG9gwRl+TCtVV9UutB7raEevaiqDTD27/YN9PugHg== X-Received: by 2002:ac8:71c7:: with SMTP id i7mr7887937qtp.47.1610647603193; Thu, 14 Jan 2021 10:06:43 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:b984:ff01:270:b51c:24a5]) by smtp.gmail.com with ESMTPSA id a1sm3448129qkn.104.2021.01.14.10.06.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 10:06:42 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH v1 3/7] spapr_rtas.c: fix identation in rtas_ibm_nmi_interlock() string Date: Thu, 14 Jan 2021 15:06:24 -0300 Message-Id: <20210114180628.1675603-4-danielhb413@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210114180628.1675603-1-danielhb413@gmail.com> References: <20210114180628.1675603-1-danielhb413@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::82d; envelope-from=danielhb413@gmail.com; helo=mail-qt1-x82d.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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: Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_rtas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 513c7a8435..d014684d60 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -463,7 +463,8 @@ static void rtas_ibm_nmi_interlock(PowerPCCPU *cpu, if (spapr->fwnmi_machine_check_addr == -1) { qemu_log_mask(LOG_GUEST_ERROR, -"FWNMI: ibm,nmi-interlock RTAS called with FWNMI not registered.\n"); + "FWNMI: ibm,nmi-interlock RTAS called with " + "FWNMI not registered.\n"); /* NMI register not called */ rtas_st(rets, 0, RTAS_OUT_PARAM_ERROR); From patchwork Thu Jan 14 18:06:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 12020569 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6AA9C433DB for ; Thu, 14 Jan 2021 18:16:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5B20623A34 for ; Thu, 14 Jan 2021 18:16:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B20623A34 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l07A9-0001aM-ED for qemu-devel@archiver.kernel.org; Thu, 14 Jan 2021 13:16:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l071I-0001zK-DB; Thu, 14 Jan 2021 13:06:52 -0500 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:41257) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l071C-00051Q-Ad; Thu, 14 Jan 2021 13:06:52 -0500 Received: by mail-qt1-x832.google.com with SMTP id j26so4155245qtq.8; Thu, 14 Jan 2021 10:06:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zLIaL25dnVyYmxGQEimqdfQHBpzSSRoEUn6YuIhvtro=; b=NdRqgN0XlF8OLwfRmsLOqXQgmD1BcM12exGIiI4EROap8O2gs7/58i6IvnkiHCQswo Hf4DrslRKyrXxOKogmlPWyOZiS+99wAj9eF5wCUsKxWVQ/a/a10rIqD6VZu/DmaOJlu8 urQratPt/zQQnfhddKOtxcfu5Ex+UeXWPc6CWAHTDAhg7ZBxFE/na11vzn1rWraEYEIk RavGi1fWt9qMzSDlqUSZ1ChdFenrKFmk7CCUPatwzXNdN8uLOiYdo3XGrAQZ5gSUQNE9 0q+iiCvUba4VHVWYKFm6vcV8PePdXZiGAwrEFwQnLvwEJqSZyMTf6A4DOozQw2kjw2bj qwEw== 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=zLIaL25dnVyYmxGQEimqdfQHBpzSSRoEUn6YuIhvtro=; b=bBvXUhPPX3S3jI/sC8ylKrKPE9O49Rw0dXMQbinNvS3ccJH2PdDwz+Ur5+JTnGz+vr ykcq7FORa2gkIMOEM4a6VDuCr4SfdW8Ng9WuTNG/JMKT6MJ+khzSe7spFiE+wICmxXhv HrzWkI3WiyZB3qkN2Sext96kAJV5qPBiMMWaoqPjZNG4ikRH/cnTLJGB5mLcHZ/1mD9w gqv2YxR0buq7iuO47OOWUAo/BfOOUsnBr/EvaXs2BkBU1UW9xWYKLAf6tu5SVDzdmkTI 0og1PVS9xrlC5fMQDow/jY47OTIWEDYmU0dYxYqrUP1/RIrhqK3D8YFND9W3HfWVHmQG 15ow== X-Gm-Message-State: AOAM530bAR14c0456L2ULtYhwC/0mT/x3pHg+jXx/pnq4dGnUjEMOnY4 kkja3qoiIhiG96E8Moasi5WAgZz3ahEOyQ== X-Google-Smtp-Source: ABdhPJxP607UprFwwTwPsXR9pdksWGRk5xI18zWyo8VuIfXZAVSgrAL6ZRdT7DBuYts6M7vDN7Rd/g== X-Received: by 2002:aed:3b96:: with SMTP id r22mr8144046qte.0.1610647605020; Thu, 14 Jan 2021 10:06:45 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:b984:ff01:270:b51c:24a5]) by smtp.gmail.com with ESMTPSA id a1sm3448129qkn.104.2021.01.14.10.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 10:06:44 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH v1 4/7] spapr_rtas.c: fix identation of rtas_ibm_suspend_me() args Date: Thu, 14 Jan 2021 15:06:25 -0300 Message-Id: <20210114180628.1675603-5-danielhb413@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210114180628.1675603-1-danielhb413@gmail.com> References: <20210114180628.1675603-1-danielhb413@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=danielhb413@gmail.com; helo=mail-qt1-x832.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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: Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_rtas.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index d014684d60..fbefd5d3cb 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -219,9 +219,9 @@ static void rtas_stop_self(PowerPCCPU *cpu, SpaprMachineState *spapr, } static void rtas_ibm_suspend_me(PowerPCCPU *cpu, SpaprMachineState *spapr, - uint32_t token, uint32_t nargs, - target_ulong args, - uint32_t nret, target_ulong rets) + uint32_t token, uint32_t nargs, + target_ulong args, + uint32_t nret, target_ulong rets) { CPUState *cs; From patchwork Thu Jan 14 18:06:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 12020573 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 501AFC433DB for ; Thu, 14 Jan 2021 18:18:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EE0B923A50 for ; Thu, 14 Jan 2021 18:18:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE0B923A50 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l07Cl-0004cf-3S for qemu-devel@archiver.kernel.org; Thu, 14 Jan 2021 13:18:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l071H-0001ws-Fu; Thu, 14 Jan 2021 13:06:51 -0500 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]:35424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l071E-00051h-U0; Thu, 14 Jan 2021 13:06:51 -0500 Received: by mail-qt1-x82b.google.com with SMTP id b9so4183068qtr.2; Thu, 14 Jan 2021 10:06:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7QBtqcNg7aG0gJ0K9jeHZaycMU0I9AIukcktQjr9V6s=; b=WIW2kTvedhfznMB+XvneXOUJR7P0FoDV4f+V+RsXr5b2bRPNhutiQP/Li5a0aA+zzu X5c6iRx9+aKQfQ9uYpy3G9mG0YKPyzFG60N8Db4KfRn9p2EbnvRXCIH25eiIeoKF0xQS JKG5nWovj7SZ89MHvs1Yr19bqj8bSIYPfju+/UDRSRlHPkClXQV5vqxVW93IxRzWMBhB EU5tZMB77KSg5LUyveDi4D4+dHbWujfXq5b+PatNqDD7fxxJen7hSNIoEBPokqiBWeez dIHKyKvMY+zTTrX2qzHMizGfGmDQKKlX/8xATW0X8RP8ub+2fp4t0aJEvghdvUP6ho0b eJYA== 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=7QBtqcNg7aG0gJ0K9jeHZaycMU0I9AIukcktQjr9V6s=; b=NU5O/YUtHSlrBEoGYW4iwwJNJV2D5PLtagftxphOxfGSit+oxmCl9LoBghhFbjcWnp HEs1pqtobKwDB7D7pALZVafnhr/wRmzALVEHfNo0/o9Nz3JyX9Hs1l44hY7tY/Yys71M +fSmGOGvIptWf8iWnWkGfIox+5AkuTdpjFhlZTL9H/TOFN6nhBOyJS0a4hPhvxGJ90ji R/8bgff41XoyXpyqAXJmhM2lg77dcdNHNA0grhMFo843xJjT8TicOl04RttkSo0ZhLiK 7i78vimDxEo2z5kE8wufi4vQIaQQh4YYNRHUq0CXG+XWelrh7qas7jFTpUC6Iuxwn0uW DgbA== X-Gm-Message-State: AOAM530H1fB/5YLIDVqcoPKO7zk8Clc2HQjh3MX9OonRkrLddahHyDf0 NBaKyYHrJib3YsgZHlbCe5DSWOoNrPKdaA== X-Google-Smtp-Source: ABdhPJz/ifny92NVOEYCk3S1kXUhSIlTDxNfBSSQLFu/xy3jmyBJ2/7weuGzgpnEMviHnafKfLl4NA== X-Received: by 2002:ac8:24ee:: with SMTP id t43mr8162730qtt.215.1610647607022; Thu, 14 Jan 2021 10:06:47 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:b984:ff01:270:b51c:24a5]) by smtp.gmail.com with ESMTPSA id a1sm3448129qkn.104.2021.01.14.10.06.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 10:06:46 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH v1 5/7] spapr_cpu_core.c: use g_auto* in spapr_create_vcpu() Date: Thu, 14 Jan 2021 15:06:26 -0300 Message-Id: <20210114180628.1675603-6-danielhb413@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210114180628.1675603-1-danielhb413@gmail.com> References: <20210114180628.1675603-1-danielhb413@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::82b; envelope-from=danielhb413@gmail.com; helo=mail-qt1-x82b.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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: Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Use g_autoptr() with Object and g_autofree with the string to avoid the need of a cleanup path. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_cpu_core.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 2f7dc3c23d..4f316a6f9d 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -277,8 +277,8 @@ static PowerPCCPU *spapr_create_vcpu(SpaprCpuCore *sc, int i, Error **errp) { SpaprCpuCoreClass *scc = SPAPR_CPU_CORE_GET_CLASS(sc); CPUCore *cc = CPU_CORE(sc); - Object *obj; - char *id; + g_autoptr(Object) obj = NULL; + g_autofree char *id = NULL; CPUState *cs; PowerPCCPU *cpu; @@ -293,23 +293,17 @@ static PowerPCCPU *spapr_create_vcpu(SpaprCpuCore *sc, int i, Error **errp) cs->start_powered_off = true; cs->cpu_index = cc->core_id + i; if (!spapr_set_vcpu_id(cpu, cs->cpu_index, errp)) { - goto err; + return NULL; } cpu->node_id = sc->node_id; id = g_strdup_printf("thread[%d]", i); object_property_add_child(OBJECT(sc), id, obj); - g_free(id); cpu->machine_data = g_new0(SpaprCpuState, 1); - object_unref(obj); return cpu; - -err: - object_unref(obj); - return NULL; } static void spapr_cpu_core_realize(DeviceState *dev, Error **errp) From patchwork Thu Jan 14 18:06:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 12020603 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D37CC433E0 for ; Thu, 14 Jan 2021 18:22:26 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BD50123A50 for ; Thu, 14 Jan 2021 18:22:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD50123A50 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l07GK-0000e6-Ni for qemu-devel@archiver.kernel.org; Thu, 14 Jan 2021 13:22:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l071J-000205-42; Thu, 14 Jan 2021 13:06:53 -0500 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]:38806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l071G-00051z-U4; Thu, 14 Jan 2021 13:06:52 -0500 Received: by mail-qt1-x82a.google.com with SMTP id y15so4173210qtv.5; Thu, 14 Jan 2021 10:06:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AhALz65QmAR7whbzZIT7Pqx8o2PXiHjpaEKq6JAc76M=; b=d9umtiB+BpuYqFdENGxfGiFKuhUQ/+MEJVo37pbvYLtvu7NraFn1giI6y9onR9PZQj ZgkB2qGuFgjvoX8czwLCmuj1J4JvVtu8HS8/tFt5UmxPoHlsz6ckAt+PjT559VA7gKXw qiiVKAKeSQjFlvg6l1sI+nhEcnFbD0pOc2bsuubrUho3x8Wmd6gUBxlv8T1VOgixE7Qn CRb3XQp0rxhnUe3D3/2YPRHZGXvK9IJO+uJlSsTTLL8Q0aqf+j+pDwjCS4odNDcoRhws Uh0HL1EDNHzdWe7U7yFNn+MWAFNKffuQJT4CFwTTjvkVtcjUg7s0St05mFJIeLbjZ4Vm PBWQ== 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=AhALz65QmAR7whbzZIT7Pqx8o2PXiHjpaEKq6JAc76M=; b=Y3dWUN7UN+lmIAC2wh6pHjkhV+X8EJeaChPUOO5cvq+fBPD1UM5nA8C138XjzhC2dW jS1Y2RF1DWdSeknesWjAbtnFuMi+DJ9TOrhcRYHv2kpG9Gg/X2XxpU0Bu0UrOOXo77AJ AngJuwC8L/1GOjrIPHx7rrFmo38WUlfhtdCZMrfJuVdI3bnEs0rQPaQgzdGPhW+YYCcF 0pjzCLEmWDelZ9wsHYUp3n2GU1Bj9FGnR355xFeZL7mldatzBG+Pt0fCiguBmb2nZCyL MdT4i/7OIPtygToQsWv28PbRQbzmuvX+yVpwZhs7nX+Rp7H15LUT/J5W7W4W9f/Ni0aX oJSQ== X-Gm-Message-State: AOAM532wP0kjw8aAxFBITG4nkfsDOorSw/KlEkCictQmt5s5r3pBXalm pW5lZf9hkwsmncBjUEe1jb4zo38KZzcW1g== X-Google-Smtp-Source: ABdhPJybdICHWJWaA0VLeJ8pdU0wpzh1xBKvaxGYIX4GWficmokPiNOLnTnsZCpX/CsRD1Cl7DP+IQ== X-Received: by 2002:ac8:70d4:: with SMTP id g20mr8138616qtp.198.1610647609064; Thu, 14 Jan 2021 10:06:49 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:b984:ff01:270:b51c:24a5]) by smtp.gmail.com with ESMTPSA id a1sm3448129qkn.104.2021.01.14.10.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 10:06:48 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH v1 6/7] spapr.c: introduce spapr_core_unplug_possible() Date: Thu, 14 Jan 2021 15:06:27 -0300 Message-Id: <20210114180628.1675603-7-danielhb413@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210114180628.1675603-1-danielhb413@gmail.com> References: <20210114180628.1675603-1-danielhb413@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::82a; envelope-from=danielhb413@gmail.com; helo=mail-qt1-x82a.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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: Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Next patch is going to add more conditions to allow a CPU core hotunplug. Let's put it into a separated function to avoid crowding the body of spapr_core_unplug_request(). Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 2c403b574e..a2f01c21aa 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3706,22 +3706,35 @@ static void spapr_core_unplug(HotplugHandler *hotplug_dev, DeviceState *dev) qdev_unrealize(dev); } -static -void spapr_core_unplug_request(HotplugHandler *hotplug_dev, DeviceState *dev, - Error **errp) +static int spapr_core_unplug_possible(HotplugHandler *hotplug_dev, CPUCore *cc, + Error **errp) { - SpaprMachineState *spapr = SPAPR_MACHINE(OBJECT(hotplug_dev)); int index; - SpaprDrc *drc; - CPUCore *cc = CPU_CORE(dev); if (!spapr_find_cpu_slot(MACHINE(hotplug_dev), cc->core_id, &index)) { error_setg(errp, "Unable to find CPU core with core-id: %d", cc->core_id); - return; + return -1; } + if (index == 0) { error_setg(errp, "Boot CPU core may not be unplugged"); + return -1; + } + + return 0; +} + +static +void spapr_core_unplug_request(HotplugHandler *hotplug_dev, DeviceState *dev, + Error **errp) +{ + ERRP_GUARD(); + SpaprMachineState *spapr = SPAPR_MACHINE(OBJECT(hotplug_dev)); + SpaprDrc *drc; + CPUCore *cc = CPU_CORE(dev); + + if (spapr_core_unplug_possible(hotplug_dev, cc, errp) < 0) { return; } From patchwork Thu Jan 14 18:06:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 12020575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8679C433DB for ; Thu, 14 Jan 2021 18:19:19 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6D6E923B55 for ; Thu, 14 Jan 2021 18:19:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D6E923B55 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l07DK-0005Uq-F3 for qemu-devel@archiver.kernel.org; Thu, 14 Jan 2021 13:19:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l071K-00024j-J7; Thu, 14 Jan 2021 13:06:54 -0500 Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]:37274) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l071I-000530-ID; Thu, 14 Jan 2021 13:06:54 -0500 Received: by mail-qt1-x829.google.com with SMTP id v3so1889831qtw.4; Thu, 14 Jan 2021 10:06:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VDLy9yZJvgziL6d8soe8VMasuJQ37LuaHX+qxMTvNSA=; b=MjAmb0OtUZjHDBgW5I8B0s9hNv7J47D5pj/llHIMMMwr0edJVLo7dzlF5YJPWmJXui AKsPIRegGzI1qUxP7oqK3x37UfPaRlLlc0jNPXXKGtCl8pwu49jcvJNsltj8PIAvwwN2 EWBvcMxTbAF4NKFmnDAPQMTliHZBGJRMoqlLFyms3SBQvZRGIZLuPhtcQh2dt74dfC/6 ivjjtO7SVmXgl64+XIhOPRG5E8ReL7olqtb7sd7qIw7nM2q5izQOm8D8Cl3XGmVI/gmD czlPBLWiMCDNvhixir7CPHVP6VwJL9J/AFgvC2em59WfI0sP5spsRlDlCkOl7VqvBFhX kfBQ== 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=VDLy9yZJvgziL6d8soe8VMasuJQ37LuaHX+qxMTvNSA=; b=hQ0fMFvB6XGOny8G9bKUTHqb1clC7OXmtGL8RnPB4rKi38Rn8c6SZglUONGIU6fAOz 9nppMFEisXG8vAXpJrcthW1F58VWJbLJCYnxGDcGlSaxzrWu+PCdwNxpT/JGGaOThC4M GpHva1h1duWUAeg2R9AL/yFvX4oAnxmy1HLcfq9DHe/ch08IvGKfi4HvF/hgW2OMM1/F bYsDAEnoSo72rG/zzgXvx++lL3qs1YquHti9C3/wY/7Yvtwk2w1Y1K4FvQmlXVNRKc2w KozOcDfE63TxbW5i0tU5GqfUmjC9uQttJ6h7cERyFwFsjKkm56SDKfrEG+HOC+q0jVEB 2MPA== X-Gm-Message-State: AOAM5312KJeV4aR3igq4LEAcEikjB1PTriXfNUfPFc5BvxKo9++kxqlb A2Eg2dBTS+Q1zbd4WDWDHDravneLBaNYGw== X-Google-Smtp-Source: ABdhPJzPCdVD2+X8kO6RzrsOuXXD/nGpG9vLstpSq0pLW196GwrNb/R6Rf5AO87HfAAVp/vzE76aHw== X-Received: by 2002:ac8:6987:: with SMTP id o7mr7960371qtq.295.1610647611120; Thu, 14 Jan 2021 10:06:51 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:b984:ff01:270:b51c:24a5]) by smtp.gmail.com with ESMTPSA id a1sm3448129qkn.104.2021.01.14.10.06.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 10:06:50 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH v1 7/7] spapr.c: consider CPU core online state before allowing unplug Date: Thu, 14 Jan 2021 15:06:28 -0300 Message-Id: <20210114180628.1675603-8-danielhb413@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210114180628.1675603-1-danielhb413@gmail.com> References: <20210114180628.1675603-1-danielhb413@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::829; envelope-from=danielhb413@gmail.com; helo=mail-qt1-x829.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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: Xujun Ma , Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The only restriction we have when unplugging CPUs is to forbid unplug of the boot cpu core. spapr_core_unplug_possible() does not contemplate the possibility of some cores being offlined by the guest, meaning that we're rolling the dice regarding on whether we're unplugging the last online CPU core the guest has. If we hit the jackpot, we're going to detach the core DRC and pulse the hotplug IRQ, but the guest OS will refuse to release the CPU. Our spapr_core_unplug() DRC release callback will never be called and the CPU core object will keep existing in QEMU. No error message will be sent to the user, but the CPU core wasn't unplugged from the guest. If the guest OS onlines the CPU core again we won't be able to hotunplug it either. 'dmesg' inside the guest will report a failed attempt to offline an unknown CPU: [ 923.003994] pseries-hotplug-cpu: Failed to offline CPU , rc: -16 This is the result of stopping the DRC state transition in the middle in the first failed attempt. We can avoid this, and potentially other bad things from happening, if we avoid to attempt the unplug altogether in this scenario. Let's check for the online/offline state of the CPU cores in the guest before allowing the hotunplug, and forbid removing a CPU core if it's the last one online in the guest. Reported-by: Xujun Ma Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1911414 Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index a2f01c21aa..d269dcd102 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3709,9 +3709,16 @@ static void spapr_core_unplug(HotplugHandler *hotplug_dev, DeviceState *dev) static int spapr_core_unplug_possible(HotplugHandler *hotplug_dev, CPUCore *cc, Error **errp) { + CPUArchId *core_slot; + SpaprCpuCore *core; + PowerPCCPU *cpu; + CPUState *cs; + bool last_cpu_online = true; int index; - if (!spapr_find_cpu_slot(MACHINE(hotplug_dev), cc->core_id, &index)) { + core_slot = spapr_find_cpu_slot(MACHINE(hotplug_dev), cc->core_id, + &index); + if (!core_slot) { error_setg(errp, "Unable to find CPU core with core-id: %d", cc->core_id); return -1; @@ -3722,6 +3729,36 @@ static int spapr_core_unplug_possible(HotplugHandler *hotplug_dev, CPUCore *cc, return -1; } + /* Allow for any non-boot CPU core to be unplugged if already offline */ + core = SPAPR_CPU_CORE(core_slot->cpu); + cs = CPU(core->threads[0]); + if (cs->halted) { + return 0; + } + + /* + * Do not allow core unplug if it's the last core online. + */ + cpu = POWERPC_CPU(cs); + CPU_FOREACH(cs) { + PowerPCCPU *c = POWERPC_CPU(cs); + + if (c == cpu) { + continue; + } + + if (!cs->halted) { + last_cpu_online = false; + break; + } + } + + if (last_cpu_online) { + error_setg(errp, "Unable to unplug CPU core with core-id %d: it is " + "the only CPU core online in the guest", cc->core_id); + return -1; + } + return 0; }