From patchwork Mon May 24 02:52:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275345 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 C7028C47080 for ; Mon, 24 May 2021 02:55:36 +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 38EBB61155 for ; Mon, 24 May 2021 02:55:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38EBB61155 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0kh-00009U-76 for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 22:55:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0ib-0005wB-Bl for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:25 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:29237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0iZ-00038N-Eh for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/QwLLB0Kaia/J/WEMKs9C6Wy5Xa42UKhstHQDFA3rtg=; b=mhIzhjJsk+7DItVtH3uL2XD94ba+Lt5CtV+pQkJAcKaZo6z0hoTTGLmeFgBM3HXEzvaekt dBVKE9XfDxwpM/ZJG6FwNvx5UPAzkMkE3SapaI9+8BkzllFL2ZClSTQJoF2jOhby3HQM7n R4TAc2SG/qcox8OD+VjE/GtyK1Msqbc= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2108.outbound.protection.outlook.com [104.47.18.108]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-8-285q12pzM5mDz3c9sANwgg-1; Mon, 24 May 2021 04:53:18 +0200 X-MC-Unique: 285q12pzM5mDz3c9sANwgg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a6RxgWhs0VK+oQ7I8YDJs9kXlgbE2w3OBJKV7UFjbiXBddcxRuXb3T6YpqARyS9lLVZHG3P/rFpzto1+abZgGNl6FQcj6J/9O13ZwyxKQFI7tzbD702AfiAqbSv27ivVZsg8ULD/SOoSFMRlKpre5fp030pPy+1HU+xzKzpgSLVDeqkR1S74KYsBZUe/W/vu6m/iej0CYP9Pz7VA+iuDdSIRzndrrGtPC8QAkfpV/20KmjV9iP0f/tCFaR2qfSx8UDq1z5EnksHycJa4tfZ9/6FY2s7P9psgId9N8R/nawkpoHGLwDIVcuP1CJUQvuQsz3gRANSRYuCdKJETSp71kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hL2jRf10zhBriL7cWAHxs8XLHju9Dym76wLzcOAoOxc=; b=GDlRbFoVFEcsyzKWRToQCjOV+MTp86o3LTz7Xi62RqQ2l0uCHTT29P8ewYBZE2cjx/bddt/1Liolkw8PLJYtoCnP+88eY7dsP9MLrgC+aHddbA6FliKJjU7zkFYO7sBISQGCkKueq+JVHEOdb6HgFrBisA0TznRJ6fEvDcKOHt6rQD/d1QxztR+wSBssN15f+H8W8GhRCFkxgiawazPoDAEf5BqwbqIzlI4c9yjzn+M8LzEjDsgv5dEtg8xjApRW/bKmxFgp9I435E5gSU4Hxc4vPNWFnim+3J2EDVxgRPy0YN7y9yO59p3DS9EHrNj9nfLgsrWWfjJYoExVfgIHsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:15 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:15 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 01/14] target/s390x: meson: add target_user_arch Date: Mon, 24 May 2021 10:52:43 +0800 Message-ID: <20210524025256.22252-1-acho@suse.com> X-Mailer: git-send-email 2.31.1 X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a6938243-2760-4fe8-826e-08d91e5f13d5 X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mtEmCrvBrlYBjtboFqaYE6U2949dqWgilCvBJ+xkL0/AwSGxMbytDyULk8JCLV1eyCium8cEgMCkT/BLdZ4yLiLEfHLMVCrOtSmsTyzn7DpEviNQMZSUPW+dXG32gBlxUFQkZRPisEqKyk9NSTtMWXdga1qUp1O59q7npFqJSlc/9BstElHtyXsDTiudtNdp/6Wl1Bi6t0BoKXd6TlmePXXPuk5aqtq1yDP/nbLtVL6oA25LvQ77KlNZLfifRYTPlQnd7mRBaspZLWiY+IULJnNsnFKj1yRiA4cBheHIR7EcvR1TXu76K4VdbcW2q1qzmrqfzlfvEii3jHYYRbE8doU7gr5ZcbTX3zlzTdVEpogM8NUI0nO5M+rOD8UkFTMApDEXR0urj+vzXuC88ikx7VT11RRJgr2Putclmsp+8eq76SUIFw0dqKZeztigwmvjkPvxe1XyHX69oNg3kp5Co5AzJh7pzF5zsxtdcAArGot2SzF7PwG479P3UPebeqevHgi7AKSxyTcy0qYRNjxJdXGIdK6GqKNpLZY1yCsA2NQojGC6sja5mEq0U+zYBAbCk2tJp1LeRI0btYeR94ZGRoDCTRXba52ZU+Fgosusfn01QSShmzthXgsiFXXSx1GYrV7GXvIsqNhL0/CXHPbd/J0w8CDpWFHkR0ck9fj0i2w6aDXje5pWrNTpPenPLIlO X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(376002)(39860400002)(136003)(366004)(346002)(16526019)(4744005)(6506007)(1076003)(2906002)(956004)(26005)(6512007)(7416002)(6666004)(4326008)(107886003)(66556008)(5660300002)(6486002)(2616005)(83380400001)(186003)(38100700002)(316002)(36756003)(66476007)(478600001)(52116002)(8936002)(66946007)(8676002)(38350700002)(86362001)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: nLass7CREryGdCSLulqqeqMYLOmi1k2pbZVQYu5TGrGlcle2C0OXu8vq0ImbcA/G078AyyQ+5AW5BD1sM4OBvyDZoM9Y1VwfroWGVpCHXDEhcDj8Rxe9N92+KGYVI+fvWaWtLY2zkvgZFmjpmF392ItBFJLfqOyeVuWZ82x5/WEhRRD6HsZEb61Ko87pBdZ/VGWhP5ABvIFZR6Kt/hLgeBqb07+TxmvfIyNe0XhWwwJKIW3a7GxEWqdFtKN9Ccizqf1gfb2FV3byRwnsO1maS4m75VYoQukLQPAvnprqeuCvIzGvI3GBu4FudTXW8slP07RktdB4/25JNT2+1NWWw47mLLtH5cPc9wbvHMq5a/TvFvYepjgnk3jqVL3P/2Yv9JuJOgxn7C8fm4PhouLLudUb2mPEvis5+vr9Bz1osHKNmH0AEv8PM58MkC1//hKOF3C+G8roMTyxHnd7nGZu6Q3CmNuml+AKzbQYLwE8dqbd1/OnQurel+LyTjNaUIWcwz8rKq4h9CPaCS25ML7hM85+XBTUKjmfqo3aemvtxXcNcMRisQpvy8oGVS7MdWDiu+pD/Ct3ewEkQ9YOle02tDgNBXbt8M5gts6RsYM5y0hmthq9h2nqOlLYI41CsreKbZBSssoRHXE0ZY0ifROHQG4rUJX1qSb6BJzvY7Ccq5JdZxPKAKvwv4ix7SgsQi9dbddWCrsZ9bq4U+X5f3sQEbpUtzw0l0Oii4pAWVbVZMScaMSfiwxoDnFhuWLnl8MGSdAregReZOdF5kOgEdboE8+OL1BdOdP40AKp5U+u3te5qbrobyugbYUpis7yAB/29kcVWY+QRUddEYWWv6YYQ8ugwtv5yhNlAlH7nmJKmItnVUMKnIyyZQRRAS/Slc7Zn3BLq73nRssyWrasY34KViUwWWsV+b1jJpcn+b1D1Va+w8qW96WgIU8LV6sDnVphVLyA9tEflH7/ekfUVRNg4GutsJr8SdorFYam9E0Lt0mOqtuht0LO96La7TAHQOzEkoVIKk6M2h2t0tA0G0Cwsr+w5uzA/+aQqf8iczFfG+/ljwu2/6EPPbElKVTMO1kGClcSwoZSxmMLyX3BkruSRiRZiob4/98lonxuXm00xvtDuVpPtRoCRDqLiMq92Ql8xft7LvHIlfgkgB5XaM+mESw3/Zp//FblBZ0pLfjsH8u85OShQlqU0IY2HtDp9rWQVMgQqgkAd9pOnVNVVHzexffmPO1q3fDLarfYWntuoRCnShecC1d1Uuw6qjz9sSmLN1jMj5eSDbFTRDWtjEU08imoCR5YOo6BpxNxaUbO/rtH61qB/XVVkoRK0b0GzoBw X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6938243-2760-4fe8-826e-08d91e5f13d5 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:15.6629 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7bWK33hBGPxlRth4tAXtPxGVBj+aM1U5RFLxE4pcM4HcODsmdYvpqkc1yLgRJ+7/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.111.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) BAYES_40=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" the lack of target_user_arch makes it hard to fully leverage the build system in order to separate user code from sysemu code. Provide it, so that we can avoid the proliferation of #ifdef in target code. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Acked-by: Cornelia Huck --- target/s390x/meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/s390x/meson.build b/target/s390x/meson.build index c42eadb7d2..1219f64112 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -58,5 +58,8 @@ if host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgs if_true: declare_dependency(link_args: ['-Wl,--s390-pgste'])) endif +s390x_user_ss = ss.source_set() + target_arch += {'s390x': s390x_ss} target_softmmu_arch += {'s390x': s390x_softmmu_ss} +target_user_arch += {'s390x': s390x_user_ss} From patchwork Mon May 24 02:52:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275347 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 51CF9C47080 for ; Mon, 24 May 2021 02:55:39 +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 AD4A461159 for ; Mon, 24 May 2021 02:55:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD4A461159 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0kj-0000Wi-BD for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 22:55:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0ic-0005wK-MN for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:26 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:41052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0ia-00039v-3u for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YmOZSUwIhnMobNX5EDeqaLlop1MmvM2ok1mFmyd4h7s=; b=kUDoXPTt+bv90v1qbCiAjwYD5tGafvePazk0IbvlMzTYXZ0EfoPKGNEKzcJfp98nzMiD0n UUcXapCpE7Y5LHf3o6nRs19b/gCRlHdIrFaEDov70gIAKK6hiOuDClG62oEIGMCRFxWfy4 25nEoKCyiXBpB9u0OH+YrAkh9eTirlg= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2104.outbound.protection.outlook.com [104.47.18.104]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-10-xyNX8xa9Mpifk1QgI7ddkA-1; Mon, 24 May 2021 04:53:21 +0200 X-MC-Unique: xyNX8xa9Mpifk1QgI7ddkA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B7/GUhC9W1OD6Q7QstaiWHQUhYvUZXhMrtilG26RJopEdm1Mp6ISNDdlTgVOAtS4liiA8ygAxIVfEbjgZ+EYeCtfqrDRK8PTGj0eb5hbpbSEPNYgeZ+p+grpboMh0fEqrKHTDIjiDJlhXVf6M+Rh3IxaU90RZSQRvlxFxlABXcD7TbA38EqMjZNGSP8/5tg/TWOYjBoNEzwfMBFXVC89c2tlmYv2L+r055rb9gelt2y0hndL81fjU/P/2MlVEVeo2bkEoBQbaOWv5Um0yk5Fhou8jzPVBWrbCaeBe+NCXXwEVzsFTq2Jo4UEcEyQTzSid1zmx5O2EtFhqJIAfH1r2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S73584gVxynOWszGy/7OP6jpAOlecCEzjDI7NA0VWoU=; b=lBspNepwdx2Xr9FheEbTSJdzj9orelAQx61lSRbYCD7NSyZ5DxB9mdC5WpT42QGdPIbcNq37HBF8QxncrwQzK5QGQCzssl939Pz1UF60RDcaSZfJfSwnpUs/+aLwuYpJekYoB+G0JiwnZyDTkZMQvhpEiUojIfRojknUnsUrVE3sjfy8g10O/+OzwzYk1nEY/GvV4eCocFWdJ5DXYwq98YbJTqPN3C31Urv7/znySpWNBua/FUupHjz7ZMMyrRgZA4VXGfYcDVHk+mn1INKUBLNLI9kw6EaSHZF2yFeZ86UO92hPs6exnw0qt5kFV21GMurj5ljve59xvh6uhu3sJw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:20 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:20 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 02/14] hw/s390x: rename tod-qemu.c to tod-tcg.c Date: Mon, 24 May 2021 10:52:44 +0800 Message-ID: <20210524025256.22252-2-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7ed32746-0ab0-4a7d-f787-08d91e5f1674 X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1227; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eDfxHcoE2LOYsu44hZYaxvvDhY6IfTgbevbCJW+g1oAUSSYYXmw2K+Pw6xbSGZI7VQs6TsAyErGDQE2C7scVATonRF3Njw7h80cGVqhDhfwBctWSe9qZbWyv9XpY3zvuV+QkHAx8cqeelnvqeXCbD0exvCt0e0HWXWnQ0dsei2nf6zipInUGZpZCSjCpI00DpQ3ld5o263ixg0b+Jmbs2bFl4FTDew9PreX7mKJjT84BmRLReOjDqRGbqAsljf5ONsAfFmHB1VtOh9nO3rhMjR5qpanfSsV+6gHJpyGi4gBihzvA0DnCpHQHNXsKw5+Q3zc1s3R1o+QPhsRAGJ6gABgxzm9ZcWGCmXLlOe5FEmAtPI03Ee6Cfi5u6qRNhZSqB74x1RkW90+KuHKzodaawGYyFk/ExvlEN0D9u4WXRSUxyvLw49rdSVzQPUFoy6LIm/rq8FXxBnPQRkXmRd8H1/BWy3T5eUNVB1tg2QbnZROn/XqLG1voXycyVxK9FOZtN8je4pbT5QXk/9KBVustCNgecdt9vi22w7N1ljNk91ThM8XHQHTJP/RcUN8BgRxb6cGbaEzDpkEa5tnlL6ZiSBmXPI3+5ZDtxLWVan3CdInnEuTJjXcCSf9e4483VJvCUBVVSMnK7+C9+Ih0LfR4VwEjN4Ittr4+Mjlk2ylvQdgLif9tiKGfzISlB+LV2cK/ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(376002)(39860400002)(136003)(366004)(346002)(16526019)(4744005)(6506007)(1076003)(2906002)(956004)(26005)(6512007)(7416002)(6666004)(4326008)(107886003)(66556008)(5660300002)(6486002)(2616005)(83380400001)(186003)(38100700002)(316002)(36756003)(66476007)(478600001)(52116002)(8936002)(66946007)(8676002)(38350700002)(86362001)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: AdXjME8Ap01t6moWPRsTjOSkYObOOdx5POkYWnqxIBus/N6OWC2EgaN4f/wTdiiLx3A0fFOtF29RCOVmhDM3zgI7w5S/3XyqleI1xzaYczWkxDYQ/Qi7NAUFWugikodTImI2RR/HYdiSHNxt8xKz1IRj8m87JgQvgD/ZBLuZ2cZfYicWRmP/u4sH4HtWDapOORG08VI2+u1sxT0TAdFNMH5o698VBNoWDkcQ1WlP8GaekRAbYM57EqQHoWDVZf5yQU9erXI4zZ+Dj1Yzct7h5Z2EVwnNeIQxAHMPGymx4A9MJ43osfirzDhCfVfXkb3N+H17m9fL2gohzK/AuoSxEdDCL670AP9wiJrTdnDpap3FYzmQBFwFa+B3aqeva/fdulMYbTgbGckkXXI/KKlQRTxVtROO8ptBjnQYdQxC+zNSSSuy/tpSiaOd2EtbHIrzrZThgh4OW0q7w6n1xXNJkFMycXd2Zzx8qpR8NJ/6uv8NbfYYfDRfpoI75v+WZMzw59EaIbMKXHrZITP1GHnAhZ4uXDyAYeElMYGem8LDRSuAKH8XGl/xXzjbhT3Plo/1qdPr8m9YTdkxFYQB6Xf9XjYqyqE11PRX7DeEJrxRLoNiGx35mf1BGmIi/4bYWQ7jFspDuAvNbx3hsYRdqWDqTkiCXHkTfm+LkfUfBePYDA6Yxl1i1vblT0F1lEVGmz3P/swGClmSb22cq4bpmFCPaWnLK63x43aOOldDVI8+rpeyMtfDfzrTniQNnO2e9/yq5xlFruUpDSeKTQvC/om9y+QVscPxnNWAWXoFy7zkN31tE09vyAoHMkZ8yCpCdEE9TpnDa/1GCs5F73Ylvk3+MiaLSytvTWopyVWk7uMC2TfOm/D27ZXBzbNIkzeNukX0dPai5tWG4ldYy0Ybz/BhHFTK2dyqihCRWXLQK3Z7Q1HXvgcWzkyWqUDbnyE9uFNHDnKXkE1HVQA28628neMvHVKR4+m0QvBfuiOrQ4K0ABDuH7vrrFmWZoVV+5OsKTObR80Y/fxIxt1Vx7M51UZHVDQ/LpCHr4jz1AOj3mFaQeIEsogo0dvbIwLI4EM0lQZg2vXIy6CNLAybDd5DUkNX9+P3AiSYK9J7Q/1fB1N5ja6Net/u5/OfoJNBz7kvSd59S9VYORyvZWp7YIC+cI3hTqlT91kT5b2abVuhoK7Cq6S4EXsCJ4WxtmzNv5IkaGdeLKSHCkDz5dRuiZLGv9n96ePpTA96AlybCCVwx0QRc7sbPckiddLGu5slOErC5K1OYcaW+SlNGw0PWNmd2R6ZU/PX3IN7vOLisSr6XCFlUPBPU2SGHEGd2Mtc6wysMB67 X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ed32746-0ab0-4a7d-f787-08d91e5f1674 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:20.0874 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BSCVHvm93fe48HMOpxcQoczzwsaGwCymCM4mBQWADZq0ArYj7qePMTGkcVB0uBvO X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.111.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" we stop short of renaming the actual qom object though, so type remains TYPE_QEMU_S390_TOD, ie "s390-tod-qemu". Signed-off-by: Claudio Fontana Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen --- hw/s390x/meson.build | 2 +- hw/s390x/{tod-qemu.c => tod-tcg.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename hw/s390x/{tod-qemu.c => tod-tcg.c} (100%) diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build index 327e9c93af..02e81a9467 100644 --- a/hw/s390x/meson.build +++ b/hw/s390x/meson.build @@ -16,7 +16,7 @@ s390x_ss.add(files( 'sclp.c', 'sclpcpu.c', 'sclpquiesce.c', - 'tod-qemu.c', + 'tod-tcg.c', 'tod.c', )) s390x_ss.add(when: 'CONFIG_KVM', if_true: files( diff --git a/hw/s390x/tod-qemu.c b/hw/s390x/tod-tcg.c similarity index 100% rename from hw/s390x/tod-qemu.c rename to hw/s390x/tod-tcg.c From patchwork Mon May 24 02:52:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275361 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 92A37C47080 for ; Mon, 24 May 2021 02:58:09 +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 1A66061155 for ; Mon, 24 May 2021 02:58:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A66061155 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0nA-00069d-4k for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 22:58:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0if-0005z5-5Y for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:29 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:37775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0id-0003CW-Fy for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FAVfYLRq3F4kMP0C02+1jQLmtix57Ju0LPuUXAiE6KU=; b=Z2RFkaO+3CU+VbkO8ALbK4LLycdD9+HrZRH39VzGUwAWy+KAKZD5/o62crD+x2zQ6bPath ExoD5b2EaKCyGj+Wz3V3WhyW96G0CVpAXzUurT1v40kV2jafXNoknyOCfbTDUSamNL566f WYWXUz9nezZa1rd6Vr5EJhLQKSPHwyQ= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2107.outbound.protection.outlook.com [104.47.18.107]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-12-sNOdL56zPWecBPZ3U67Vjg-1; Mon, 24 May 2021 04:53:25 +0200 X-MC-Unique: sNOdL56zPWecBPZ3U67Vjg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M1T8zcjzuiRZSA4n0Szxf1xBtjGzyZx91KgFyWvbUuiWayoKHpbpGgl9G0OQdLgUcR2dXSI2pg7dr5X3BJm0FEbqpwL6gc+1w27JJQR6yCA4QkwjUQmUVFHrMW9JyBin9aXGs/ZXikldK/yhh9v64Tz517LGpiQoAHy5N9sOReB54JVu/C8+kNfb4MCZUKcne9cwiondafccRNoU18J/BKqSe3jSlrCo8YgeDl2eXhATrAO5yLQmbgehaISxAVa6D6uxEvB6mf4ZMYypJ0Ja8Yplf2/7CsP0Q2YmnieGNAQvPxI7JuAwfkxO3dVP7/xnMD3Vf5q49wZdII+D35x+0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CW1peA5e4u8a/E2lfiWRmnQKrVc0coSa4HuIq5bDKs8=; b=lv4gq0KUd2edxBCJNpgnOQf1DugXknVmzCK/9/d7UiUpreaRDu1akhmzbjOfX0yDgmtR9fP/GO0DaNc6Khi0cZ9Tf1Ti+D1QaJeQLnmOnmNp3qkyE/rxSFCgo28RfsWcgzi665LXQnWCOR5xsRqL7tO60ESW1q7JCeGeRCt/L+7BD6n2ut0Ju70N1qCIqn3756Zxf8Zh2ZIxXj4bUWI2laoVD/IESgdIMS7qqlAWRR2RJeB4eilu5vjIaiGIBI0oEPtw5ktdvXqtuvkiVjI6pJ8SHq+q9ySanaGMaAX0fG2Na/c1/B9PMIYmedaUT4K5pJ/U8lnwt4k8Tksza7jeFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:24 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:24 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 03/14] hw/s390x: only build tod-tcg from the CONFIG_TCG build Date: Mon, 24 May 2021 10:52:45 +0800 Message-ID: <20210524025256.22252-3-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1fe7798b-81d6-4741-41b6-08d91e5f18d0 X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2150; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TP2wiO2MjcnjNNtal8B9TThyiNTA5Tpjw0SUVb5yY7huzweAwOxm9kNodDI63uoyHoaQTiToGRi0jOMIcxxIzYW7ipw8D47W/PGTyXpjquEyWopvokmeoAeNijY0fVz1pIEsiOSCsb0jnIMIP1a2mHX5xrijNKSV6Zp/gSOiJvESauV0scTJrjNI7kaqDdJ1exDdi9mohbED+7ELQObvAgGZ6XzPwLoIR3QmJ2XpJ7cazhyGMriEMoR+J3/mM6bQmUlAXdzojocnGsqMy+fa4KJF8Kl4Px3ie16MQW9Zg/GqZXdFkehbZeA72s7vQQBG13tp5DwbCQyZL3fV7A14fC+EvYHmvnw8co4PX42E9t2MVsBDS+qVeGGlDILxB/FCQtlig2vyveO7uZJdBq2IrsL3LzREzCvjqgyF+n3mrU+mi6V04BLRuJJjXhWa3M57JYNSMZdZ+C/zBnD2Na5CAOGk+6kXL4Flr3NHBVA6boyUzbGJmXJdSKWCxoz2QrlrjKk4GtN+IL1Ju5X7ajMSxGQDscZhDrh5EP0DPzCjvwCi1cJ65LaOB+NYigwg5rdnJP/PFK6iG94xjdjapYhJZvsyfNE4ltRAjVZ31jty2yaaC01n6/3iXSaVBesKSLqVDnDZsMF1l7DkDjWqFquk6Lqdto+DigQpT6Pp+DZTDszZEfSWXh67HNBj0TR8zllt X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(376002)(39860400002)(136003)(366004)(346002)(16526019)(6506007)(1076003)(2906002)(956004)(26005)(6512007)(7416002)(6666004)(4326008)(107886003)(66556008)(5660300002)(6486002)(2616005)(83380400001)(186003)(38100700002)(316002)(36756003)(66476007)(478600001)(52116002)(8936002)(66946007)(8676002)(38350700002)(86362001)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qz3pFVNJxV6D8dMWlhB7NzWaocplLJzk16++ypbp/DvH+iHnLTYvVNstNLqBcNB7Kce1G+2ecN+Nu7vM91+frSILtR8nYDf3+ZHInkber9oc1DORGKozeTocvd0snGg+WPDlLTQpSYFiZti1qXVffonz/IfDZUpbm+ZlW9ud9Xh5+uEhE4M8m4hDLL3tN3mL4t991zo0o/RmufeA1InN7ncYRnKmXbkk1+gC3tLJPju9vryW6xTugxA8ZviMilKlK9pkJ4V6dGO9EsMMO6P7Qu/P8JrJ7Yr4cBsC3csDQhD4czqEGIoL0wIZsWpnP1ofb6evriHVFf1AgP6Mme5dtaKpmNk6OHpxNJBQ5FzEzJ8z4Vv5f96qSIEu0AHALrrI05s/D1OeHMrWXKXZGGGtjeZCJ8b+JvR+OlvIUPXi3RSQ0vxyMvEB8bfpp6mSYmIzuA59UgaHpGRYNrBHXyOluKTvr0rixqK0+m4TkryCQ+Wct8YV6s/2TX/OQ94+1RmmzcxyOlHXwSviRJhVyJUOhN03BihxdhBeFJDd6934qG5YM67resi7dzJ1nKycoM/imA/RWJecYSKowRbLAuLVfK0+dEqhrgOUcwydNYpW6z+P1nCGhnTHkmKE7ilKak3MIoAaWzhiZp4fnr/YihZ3C+YuEeob4PnYfjEmjnWPatGpLYEWy48ZgkEzarwgnrW+MDxDykasbA2L9QkJvrva717D1TlR4P+NdRyyEmLES7qPkR8oUqMvLCN1yIUJ6hRxpQ12hMBLoiP0vr9uCQTIh/BECcwfYX+jZJEnJxTCbTSmIBjH//j7+BPnzh/cc8lC7Gw9BzUNuwD0biJ6N9RGmyrkQGvZkTsxx42yaPASE/YUPe/3sQdKHdAQRlsZTeXeR8jBkBHZMjZB0WewkJEQgzdMUQKtyahnMHnhflp3JGVyM4JSp77eOasG/v6lxGH4ceTdeNqZwwvfeW/nC4lEcXKJ4ygUcoT2lxsq1/G2bQmyMk+z84NLZDYGkBPWND3x3QnSPNnGWb2U8Tn8gO+W78jtSlUdr2bO1/wmfpyBPlENdS4qMCu0movXLE4mCMJl8jqWWwjlozm83L65xYY1XicdLRSADLt97mWllXK5qBnJ1LK9qr5X6QKEfvVa+h1J1BRh0/goB0gfRndKGInD0DqLj74uKnI2dRC8zRho67v/kPPEI3p1NTp3/KAk/P75CT6B5+q1iDzgCB9cUNf1rM2caitnJlliqb7QU/fawYf+LAqVJkSqWuRq3LttSx4YNdTGv10olYBNSd/8AMf3r1NRiq6L4A7Hl+X1tjmBcY/HqENWWrkpNILqr2Qi16S9 X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1fe7798b-81d6-4741-41b6-08d91e5f18d0 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:24.0271 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rmZFZod7QilltlhrFyHxrJsvoFPYJD6KOhCFLAxoBdNRt98rtv04NKlrx5GjCqRl X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.111.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" this will allow in later patches to remove unneeded stubs in target/s390x. Signed-off-by: Claudio Fontana Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen --- hw/s390x/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build index 02e81a9467..28484256ec 100644 --- a/hw/s390x/meson.build +++ b/hw/s390x/meson.build @@ -16,7 +16,6 @@ s390x_ss.add(files( 'sclp.c', 'sclpcpu.c', 'sclpquiesce.c', - 'tod-tcg.c', 'tod.c', )) s390x_ss.add(when: 'CONFIG_KVM', if_true: files( @@ -25,6 +24,9 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 's390-stattrib-kvm.c', 'pv.c', )) +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'tod-tcg.c', +)) s390x_ss.add(when: 'CONFIG_S390_CCW_VIRTIO', if_true: files('s390-virtio-ccw.c')) s390x_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('3270-ccw.c')) s390x_ss.add(when: 'CONFIG_VFIO', if_true: files('s390-pci-vfio.c')) From patchwork Mon May 24 02:52:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275349 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 413E2C47082 for ; Mon, 24 May 2021 02:55: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 C0FB261159 for ; Mon, 24 May 2021 02:55:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0FB261159 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0ko-0000oJ-Q6 for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 22:55:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0il-00067X-Q3 for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:35 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:48589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0ih-0003Es-SM for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lWYfYaBeLKoTPKygg7GlP3YGrQYWI9Ileyh4z480xTM=; b=Ia2U1EEuQEP91K5+GnCzhiMtr/8SBBskLGzi5d4sDcCF8P0kimPSZjTkHJbK2bGQB8cAs3 QejsHUfb8UUy0w0pGTEqsVIvr7WywfQrN4v/6F8WiQBeXCY2AWgF2Hm2/TDbj3l4Zj/Lgr XH4WmUhRokKDm0m02jKmNQ6Qli6niSU= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2105.outbound.protection.outlook.com [104.47.18.105]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-14-SGA1OXu4NIqe0k57o-wRKA-1; Mon, 24 May 2021 04:53:29 +0200 X-MC-Unique: SGA1OXu4NIqe0k57o-wRKA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D0MDwp9nxTWWJPeT3yhU5X0BIHbN8MPiLJf0ohd3nYV5tgFhHWlGMBeQJihO6nGvkgbCT/2Spv1aEAQi3AcRKkswD63VltgdwVIjg4Q8CN9sJrcYEvd6CBo+pAzc5nJq87Kz/fgURMdTEMsd0LTGFZ9xb6i1r0FkfpBXUoOHpXt1tkRS9YQ9PteiWtxp5M5E2LjoxZMK4SntSBKUCuT9Lryq3ti/jl17W1U0JVkk/R0UsBMrb+UzD+Ut6Jy4Sdn5rPUyRJiWvjj3oaildFuH4Ba/GNTZIQ/wh72RP3bZ9un0hm3COYS6W40XHvuctE6XLbbQyLy13SxY39fwz2EcAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Nq0qpyMJJ69Q/fNyz77BCzdupii77fc+pM9vLjT7r5k=; b=mhylBJbD29rIEUyCY+BaaVv2jBELFrG9D82ZfYBwWiaFzQ0BJWzeDtH8g1Ju3+0EjKD4r5iKGzVYsP8YrmSKrhWRF3/FXCnLGjJUwA04QvPMzDiB1hjvXTrMFGYxZDos1ewQjMlO+48MjxRijgjiccuaqNTJCxXFuFNRS/g5oXxdnZ46JAHoCsHBa3Dmr4SFM6wUbUjyMYIy04EarK0xvbM0otoPv+tGO33OJRZKEawPPGsyH206C0OILrGAXqmjk2dk/7Pnkyk1JnZqbNeUW73LCqtBczqpSJTsbzucPDkeUxFAX/0YkE6QHQSeJpQ0TNe51Adyk0HQqy8v7rpkSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:28 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:28 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 04/14] hw/s390x: tod: make explicit checks for accelerators when initializing Date: Mon, 24 May 2021 10:52:46 +0800 Message-ID: <20210524025256.22252-4-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1cc6865-95c6-4a9c-024f-08d91e5f1b57 X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 10PuO+dOUFnj2kNU4PtBUU9+Q3Rq/441XcqHX/SuQ0i7boxsGIdx47qAJQ8IINZM+mGBdqByxe+nDj6ID4Il5m5h7YXyvQ7Q2dv7e4MSoFNsvAjcWr2K1UxWHK7rWg5AuzOnX90MMb5gGcGnG365ZsLA4Qc0ihi5SUJsQIz4CG/Y7XeQRw0fhrzGtrU4TzojCCGq/2m1IhFdmSD5fhUdaeIzkiRRYEqkHCJAYyumIxjb2QTz6+1c1dhlTAbRMEqsteOHIFEqNPcguJA+7AWOlFteO7p1f6UwrtR8O9A6HyvQkwKuT0cLITjY0VaHs/eVUfZb1xlrFZQ42EzL9RJxTjxJqHt34Z3JK1kwirivA1iNqlxXT10R5vw25u0uIk9OxmzO0St2NlCkVIgnXDZgisZEjuIQ8U/MuauXOn0fYxOSye+pS5wm52gYB6YSSiJATCNooO8z+gVfXNuFgqsXBdb5TVLXhsvKVi9VnWgWZDnokSFYwXN/bO5g+6KYZJP1oKWtFrtgXTeRKHWZHNhWy9aYcAIBptmL7x5aEkeAL5UrWQ48x5V5y2vyH0BLKEn7qVTLQedMLiEWrf8gNSt+RiX9GdBW8o0BoMkcc2te2rddHZHq30RdSeB6ii1xwCD5iJ5RxvTt5e56Xu9g6fPaOsr40ic5gtsTfZjD8tjDzCPK0bp72Xk97DfRBJ0rpTYG X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(376002)(39860400002)(136003)(366004)(346002)(16526019)(6506007)(1076003)(2906002)(956004)(26005)(6512007)(7416002)(6666004)(4326008)(107886003)(66556008)(5660300002)(6486002)(2616005)(83380400001)(186003)(38100700002)(316002)(36756003)(66476007)(478600001)(52116002)(8936002)(66946007)(8676002)(38350700002)(86362001)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: tNQ6XFgNzLq4fsDfqPhoKv55JWnmD8XCBwn2PV2/ohYq4krMzqf4vB8V3ppGRHPKlp8f4JslTLyp30VvwgxTT2205a8ghh5NR4G4YF0O21FFPjJ1B7oiPv0Wd19Xv/hFmJ7Er4jxQyM4j4by1adpezw0/nJ95RzezSr3YCtnZThdYxnqu3/0YU/pLFqbzrmV+rzhctcgSUyo8ognBoPbSBHH7CJLDhMdCzSzwXibxZpWSTyNosVXkFDx7bVEN7pRdFARiqpe1hSWpyj1uwM6X4vA2WhOctA7rANznm8BDWitsrzWh3Lr5BHSKwNg/HZfG3DdcEYr3YHDbM7kh4tbDRKYNXEB/uE8y1d9h8jH41Y36ynRblCD5QllBgsxnGiZb0c9lVdBTzDOoBYYrVH5ikvJzVh7XAs+mS3mLC6El6NMTPQmCuU5NhiIOzqYRR70E8Ze0TdLzEqxd2AAjH31H4Vq5kqRkSd+asqFWaMHytN6ls3gl1N7GuxbqehJPbtDQZLNHZOMWwfhVrMW01vM/jIe8uI89NWDvlP4DiCFoJI7f1wrrB/hEleucQDasDAxkifzldRWnjlgdNg7WFeWfLh69QxpcBHUUguHqK26wpwaPQXb41ZaEhPZOtbL34qEvgZMQUvYIwkMgjOa30ssjLbDtOfGNA/PJXnxcUI7/W0RP6mf2Epnxw702pywWcJl5synJ1velTbQnxoIw1yFIE0+WinN37PgQSDb5W7XnAVQvpfksJ0bo2Q0+gJOK+6zeavxXHzY7K4c0gdRJ3l/dqX6RzSTHHhk0vPgc6T+G955yG+r2f2sFYf3201aJ62LjU1fJxViNLsZ6PnPGULxOEtDNsPxUY6PKvVc3t9N/cExEe22OG+oRo4aEFIU3QuKhzLtavt3B5D0saPaeiXbYyKOv/S3DO0mQ3gI1YeJhHABUWjFyQ8WkFniWkSR8E13mrKV0juWK8SXHaf/Dqbnws3k8oqKm9Fhwn21X3aanVBsFCQJDcTnHCfewM63J/5e/6tovqS6DkmJ0KqCQJSfbEsnoTQCA4THaL3GX3AyXAbtpOK6I+/xEeGLcB6f7jYzYtqHDzsxnGoiRE+mvNcc2hvJzvwaLR8rsd0G34UuySBsdsIN9UFaQSkyoeMVBOfQaCbJAVLx4lVCGOI9Y96jOutvFZo/ribx5NT3U2Rkys56th5/6qk6cCdPY55rxoV/ijq+6+dGnDOugPHI1CEoaWpmZ28E3mp6/BkeQIJHvPgEgDEry8D6k1p1we7u1UmP0eGrikvS8XMa7sFYyufFuduLHfTN4JAvmoEXCZaMyIw1vrTkX7pAk8a/pOIWYsk1 X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1cc6865-95c6-4a9c-024f-08d91e5f1b57 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:28.2557 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +JqANtw7BlcG/Te2LBg7usz2c+7QDvOoQYXqsbe0fS1bXXQbur2h2JxS3CII42Db X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.111.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" replace general "else" with specific checks for each possible accelerator. Handle qtest as a NOP, and error out for an unknown accelerator used in combination with tod. Signed-off-by: Claudio Fontana Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen --- hw/s390x/tod.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/s390x/tod.c b/hw/s390x/tod.c index 3c2979175e..fd5a36bf24 100644 --- a/hw/s390x/tod.c +++ b/hw/s390x/tod.c @@ -14,6 +14,8 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "sysemu/kvm.h" +#include "sysemu/tcg.h" +#include "sysemu/qtest.h" #include "migration/qemu-file-types.h" #include "migration/register.h" @@ -23,8 +25,13 @@ void s390_init_tod(void) if (kvm_enabled()) { obj = object_new(TYPE_KVM_S390_TOD); - } else { + } else if (tcg_enabled()) { obj = object_new(TYPE_QEMU_S390_TOD); + } else if (qtest_enabled()) { + return; + } else { + error_report("current accelerator not handled in s390_init_tod!"); + abort(); } object_property_add_child(qdev_get_machine(), TYPE_S390_TOD, obj); object_unref(obj); From patchwork Mon May 24 02:52:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275351 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 6E8DCC47080 for ; Mon, 24 May 2021 02:55:45 +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 E6F4B61159 for ; Mon, 24 May 2021 02:55:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6F4B61159 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0kp-0000vn-RU for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 22:55:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0in-0006CI-MO for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:37 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:47800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0il-0003HQ-Sv for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UNalFBGc/Ht3m+gzxWylAiTO0PpEUInkVckaX9RBybA=; b=OoxMyZTCSt+k88ssSemtPb3xAm4eDsZ48X7Y3T3ejWRZ1DhrILd/zdJWAk5+B1ai8lTkE5 zbGX/vdvVBlygMt1qM0vsicbPm2MC5aFPVXtx/aeWOiQEr94MYjbUdMlSyX7noxYL1Gihm vNFlYxuHuqG4Rb09D5NN4I+HuF+vUUk= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2105.outbound.protection.outlook.com [104.47.18.105]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-29-QNgd2WMVPcGix6DS3VnCxg-1; Mon, 24 May 2021 04:53:33 +0200 X-MC-Unique: QNgd2WMVPcGix6DS3VnCxg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BmVDP3BdZmhj8cUM5jFe6o0tD1K2ak3ZCEbFcrkxLeTKCjFuxWQgCUtHDM0q2NC/XTgk8AGqn9pd1IjC1QLbsoknqb+bJrp+w0+vWDa5AtBSVLIOWKefopuoIOLEOPzwkb/Eu3O/BOPZXnkUNSgjRmR9iNt1rXvwyqyEW6fHXrKZ3qkveJ99s4fXJGCqTOt5xgcgYByE+oThaJyXB9cMF35LeI4gDolROy9Noa7ik50HiS3H0oA2FNbQjsSuxWr6Zx5La0ulHHX9b2NKJkcBtoHM5KJdIHqw+ktlg9dV3AKIy0WxH0mjA/DGeMH2NO2iuy1AsM2oi9eKkhedGBqLsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zLP5tI/BTR0VxI1/EsUoQNXvO5qiNu4tUO2V9wNzp+o=; b=bM1/1AxfnIokSy1xR5Xy7yzafVBV+jBTemxueaww3S/BF26IPOdVj9RR/8+ANy+Ko687YBsrgCiuSDL2yuwKkorxFdlMdbxYrB1+xIWzLfIxZhpHtI/Ly6kmeNgElWElCh5FruAZHfEkIw2KvK/Whlw0aEHp3FLZQzQJ68J2qnbFFrqLNlVJ22biiJ7suoZMNHRNqKZJh43l7R/clLww6IZbE1AMsoAHJpAAJlrAmzHd61TOVoqfTUOMyVFosOgBgo5mK2xrUVuWuVOodnnKBTpGKGN2AQTIbZbGT2tFVuTijKFNADKEEo/RBx8ARl0P4rxtXKDuuPY1q2NQKOm2lg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:32 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:32 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 05/14] target/s390x: remove tcg-stub.c Date: Mon, 24 May 2021 10:52:47 +0800 Message-ID: <20210524025256.22252-5-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4a880322-8bb2-4b5b-82ed-08d91e5f1dce X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EaAJn9K+bZ3d/0mRmYCUPXQ4oT7juvLI6Cn4J+Tuhrv1HOxPXTkrEWRSpixCx6aslPMykuSouorw8wK/KYnM+t4hpbwyQpERtDMq2k9O07nA4lw0ltgSoBHjCjJDC0NSPTEm3WbFJAWQTkHuWUgHTYSlxPy+OlhZ9tjW6gNdIrmpmNWVzeUS9PdE+1Gx1BkityW5AxIr6DAduuDEFUoYHGgkG3Ahz4T7DxD20Da+J3OJlyecEJiW+Ms82j9g0Eg1UQQqcgDVZWXAXTKRLon7Ki4N1B5s3YB+FsdmNxWVEAQdbH3ECj1569Jil5KNQe6E0jCFM3GbjFPIidgFFmK9ezuZiGxQFB2LUR4+krqdjP8pC+BNUZJlviXI99WyvXS6IMAgP3zCTKt+XvBGjwjaeqy6uuYE8IzFdkXysKi2MQ1qc5JqYSs2W+JRbD/l5tsP2XJQa9Id9nEIhoAg/0lj4LJHKmMJBHX1zUehL2RFCnruXOHzCpztuzQZQQkKVZxDNw4Sq7igJSRXQXVGiYYxArTW8DrPmitdpKqxo8IyJTR+9ynQMf1+QF+rS6ce+G8GLj8a2dDcsdKx5W+fmUB5yqkDB5ymuFl1hXaAfd4onAJEj/ET5cXWUKvJdzrpt/+akq8Z4O2Gj6NXPAmWuVh9U5OaPh2VmwCWZfitp2TpOI+/CR0iHgQRbQB1Mvoc3xPP X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(376002)(39860400002)(136003)(366004)(346002)(16526019)(6506007)(1076003)(2906002)(956004)(26005)(6512007)(7416002)(6666004)(4326008)(107886003)(66556008)(5660300002)(6486002)(2616005)(83380400001)(186003)(38100700002)(316002)(36756003)(66476007)(478600001)(52116002)(8936002)(66946007)(8676002)(38350700002)(86362001)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: NKLvYDuhFb/WWX3B3GJod+8AeZJwH8CoXmuBlMxlGMboRqR9uF7nHXIk13hEMaiCfLWpQK1IpbNvy+GxgYEZgIDBbJhEAPGWYPLlsXgwuNjPbH0nM/rLHFYBba3dDrPNnzqJ9Qu13Y+WkkBlo5PDmVRZE8zF3Ch5Xl0Cf5S+Uy5GE5D21H46MKHMNJS06vqKRWcpj9KrVJ0HUiqxlQSqF/Emn3cMW/B4uHwxCFnwUt/HLJmEHfTWx92GYLTsJKTJjiCMpmARD32GAXtc/pTpdqc10xTjacW5I4iLOfaCRb02Pp8JmwTafAhZkppgaLfuZeohax33BWEXmPoGw8i5avLDnVw1hXDp0KDouazWdhwKkz2sTSCtnXnQwuV5HksNk/c8M7jmX+0lpg30i9vqADSJfRgNZJLJ6gK8WOBh71QumTRw1FCc8lbvzslYtb2dgua6H7TVNc8dTHMk1ozUu3xQyFHCpL6xRlvgsQwhzyxZ8LvOABmRgh1NbagCtmJo5/oS7RdHzzkhG0JzrsoF9w4v0C/2j8gi+e2Jmr75fV56SeGww0sirJNidJOd+1fHCI9uanIrttaXSeBFKcuVSyYldiKmu6TCo2+xswgG5rxyb/Sh5zgS5i6Kq6Wx+Iu00HRxr6RGlfzdt03r5NK9AP4JmM4Qmbj2b9b3U9r7YtuaWR+07mpvPd/0SnXHfrypaOaWhVjnoaXY3kuVhrdsLCeG7Tc1SiUM0cgSpXNGi7vGCYlAFxAhUIQ011uo66Qak4zaMqJ3TlsIl7B9Ccz+I+CG6kjKpgdsAOwjjTgz7Zn1faHP6hmiLfVf9TUutzILgwvRwm3m5HMo7stEwDGsHOYaEW5sKN70wPHByE3uKNvwrhNUcCo+bRpcYnZ4p+V0jJ32x3cj+hmNXHhqjkTd005OTt8qguzvXGjl4IxEmR4ZSD6P4zPA3Yuy2SBtxp9qnsLqFCRfQc/HEGA6TefN7+g2FANpkXfG0+Ztb3Ap9uVNpTOcwpJUY3Im64Dh9VlEyGY4+fRZcV9/pszIisBXMAO82pj1aQCjVxoE3/JLpXcqaPp6RSaoZmVFlu+YYW4WuCMLinz7iQcAcnvpaKwWKmwHKQnd7snCfwdCqMemZhVWH8xQ5r2XeoS2A0A7Vd4/9eC4i6+PN1fsn0nkZoPCRJ7R3u0uwcJjLfvODQGIBpF0tFOtz02kCjxHCo9GdjNO+M7jXuwG16dPLiWtcWpYLOdG1wMUUcXsbqSRj8R6yZAeMaVL/AVpWiQfM92njHtFpstcHBkl4KQI6qDAr1Q5IdjH+N8Rp2eY90Gt4s3VO/XqG6q6XfX0kSzHXwUda8XN X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a880322-8bb2-4b5b-82ed-08d91e5f1dce X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:32.3483 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /BXLfYzd2lcQrovJ+l0UMrnJUSkVxDU8pz6dje4dT5GbPkhmuR9xfamwDL4xsVFI X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.109.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" now that we protect all calls to the tcg-specific functions with if (tcg_enabled()), we do not need the TCG stub anymore. Signed-off-by: Claudio Fontana Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen --- target/s390x/meson.build | 2 +- target/s390x/tcg-stub.c | 30 ------------------------------ 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 target/s390x/tcg-stub.c diff --git a/target/s390x/meson.build b/target/s390x/meson.build index 1219f64112..a5e1ded93f 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -21,7 +21,7 @@ s390x_ss.add(when: 'CONFIG_TCG', if_true: files( 'vec_helper.c', 'vec_int_helper.c', 'vec_string_helper.c', -), if_false: files('tcg-stub.c')) +)) s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) diff --git a/target/s390x/tcg-stub.c b/target/s390x/tcg-stub.c deleted file mode 100644 index d22c898802..0000000000 --- a/target/s390x/tcg-stub.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * QEMU TCG support -- s390x specific function stubs. - * - * Copyright (C) 2018 Red Hat Inc - * - * Authors: - * David Hildenbrand - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - */ - -#include "qemu/osdep.h" -#include "qemu-common.h" -#include "cpu.h" -#include "tcg_s390x.h" - -void tcg_s390_tod_updated(CPUState *cs, run_on_cpu_data opaque) -{ -} -void QEMU_NORETURN tcg_s390_program_interrupt(CPUS390XState *env, - uint32_t code, uintptr_t ra) -{ - g_assert_not_reached(); -} -void QEMU_NORETURN tcg_s390_data_exception(CPUS390XState *env, uint32_t dxc, - uintptr_t ra) -{ - g_assert_not_reached(); -} From patchwork Mon May 24 02:52:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275363 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 CEB91C47080 for ; Mon, 24 May 2021 02:58:27 +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 1AC5161159 for ; Mon, 24 May 2021 02:58:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1AC5161159 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0nS-0006XJ-9K for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 22:58:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0iw-0006T4-5t for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:47 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:42028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0iq-0003KU-EL for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l3r41pGxuymTgMoNgf1HkqY9CsBmgcX0l6406Z3zihI=; b=fYWfN7R81Bxbe39IRBZP+1B82RfU9LGvQQ4zLMRQZOO0dQyx9ww+vy/KCoYoDVdJDN1lFV wVr6rsv2ar3rq9fgIxEK/jhKlVREU9Fn7Hren5uFz7i06EWFOk1+e73Ljk35n1WjDG7EVK rog0h+tWqOro10QLj/QH8MOpUjmhc8Y= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2108.outbound.protection.outlook.com [104.47.18.108]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-20-pEjetMvHPUOfU2TgAmSprQ-1; Mon, 24 May 2021 04:53:37 +0200 X-MC-Unique: pEjetMvHPUOfU2TgAmSprQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dV5dwNcUDxTMAxlPoHJ/KG1PSfuHzEKIRxu9ZNz2FUfU3luqAB3K2N14+WqAepaYZ7blrLwDzKzXICcileJv5GWcaqMNjxM6nuJGYSpxDTFhjSnwBu4hlwxg9VJuO1jI0eVBA9XgcxS5/NkLlWnQBPQ6lTw8JFuaUJCRKMHu/MyYSzbNcrGL+3Zq6A36hyzC/B3VbPA4ISs7HL+tcsMP7U+R1s36T2b2IcsgH5rZXZe9G/pJwcEe61GUyrPkA+BmXu2ZX7giSOPEh9M3rnqoBMxmnI9ixSeoRw522b6FwPQj8rjypRb6z/YoQqvnseLycKK51CS/z2oG/e7B3l0vjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SNBit8a3v2wYcrkIdZ0fRF++EFhiRP2j1aSTJDT/3rw=; b=FuHBWS1lslsUOok90itwF7EWml/YRkC6knq7YycujlN9ygWS+zluZI3ScHxc9nryzMXxCgjb+yp8HfIPBsfOetiDUWiIshEsdINwiepxOBCKoAZ/ilNCQUMZJn7UXVv5p7vxyCAIajtK/AfFzEzVnkpIdr16J7NOTrx5gBdZCqLM1+2v0SMdmRlnOgiRpeaLk1Ixp8brYy+L8P+QHFp44fmPVWEEg4yUrFHlz4zTF/Eby6J5Qqa4Ps8vDorxcELvewBUsxCPTBYITcfqSZuCNBoZih+iN9Izj7fsINYExq+3VD25HFowjJz/RbSn69mQJHOLv4q042sm0QLb/q1u+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:36 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:36 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 06/14] target/s390x: start moving TCG-only code to tcg/ Date: Mon, 24 May 2021 10:52:48 +0800 Message-ID: <20210524025256.22252-6-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8a3ea9b-40d6-488d-0d21-08d91e5f2039 X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: giMveyAF9BX73gpdbMpA8lSIfvQEs6KVQ56HPkTFVgg+qhCFv/emnAPg9HrGglABbmAt3UNTItvYXxSsuy0+WC5HkchUq+aJf1dxXtQ9ypcN4iIadHkRxoMXG+i9/fkxJybghfI/HJEcSpAcoUdMx4I+2O1KGXJy+vxbrJ7RXASX7CQ1HDYW7o5SSy5ePvCvDQg0SzhWZhMUgr2/tifIZCxAEbeWMEMVz0Us7E3wKm/D/b43WOzX4Ic7Nrikj2u2pdr2bDe29DBD+Lf19qF7d4k0mt+mrFtEMl4Zz69w9ldNS+U5hRcUXSjdp/gvdGWQwBYNCzxxDn8v8S1awWkw94AIJfI2wOHfUycU4yjVQqaYptU/fgOLQ9JuKvGZItHPams84TlpKeGD5imdF/Ip0z24K4nm94mrCvMawfkyZ8g8Wj4sin3YD+DUb7Jykhs1DVVUJuaHM9UQVVpBS4npKO41L9W6BTjNJ5cUeG2qFCq4r938fe1eMq9/cgvbVjqMG5X8e+wyvipJ+ECwkEHst6qmr0OiWtqMvK2061e+aJ4nHEr14J/pHikPB4J62I1gMBaoCY9VUGQfULcI2yDl/j/JNq0rg6hA5RjRhRWp5uWoqXouK9d/ZniGZzaV3PbMhS+j1eeze6J0Op28tDkZJiOezpPP+n+JQLxl9YN+qMyS5OiT3MsgqWHDARbyB4vK X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(346002)(136003)(376002)(396003)(39860400002)(36756003)(316002)(66476007)(38100700002)(8676002)(38350700002)(86362001)(52116002)(478600001)(66946007)(8936002)(1076003)(2906002)(956004)(26005)(6512007)(30864003)(16526019)(6506007)(186003)(83380400001)(2616005)(6666004)(4326008)(7416002)(5660300002)(6486002)(107886003)(66556008)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: FRrbpSz4kERMT0MvqR3o4tJmQFx7GqfGy7WfY4LqA3lvMba8HkPVWCIrbXokTXEn0gRx46K6DT6qoiqUEHCtYwwF8zm96fsTNwL0nEyZlpg87SeTt0wgw6FIGzXqvDJzXOm7qAcVm1+hjV7SLZndZUkJRD8pNW14KoaXUAo2lGJvH3vq6JNGVmik9OpX8Nne1whrSxmKCuZt5KcRINg4/OWwX13e6e0ux50ZzhrEGUepLrG/Vt+njHbKJlhouFmqgIyForsUKYzTyQlKHq6KlzlrtaaDe7z8XwyreRr3rSg1JcweejZ4bqIrBhtasxbvue+tW9vdOFtt5HL39mPjRMWhS0ex7xOYwILiw4f8BAtbU3I1yYsfQntXw0OZmgTv97XqnWjhgzbmH7s/groCZuRoWM/PBlkumLGnpxVybywKKv4Aab7aqJfSPvi/QN3pvT/hOjEoJvHbl/LCtdRubr8konxPQffYcf2CDp4w3GOTh9wRngxsf2RCLZNO+cerQc+FIrMbEnd1bZcicEqI+HAnYrxbXJ4VNZnRsM+8uIYk5F6xZl0kB0pd4DAUe6yfYuy4kk5Sse5ySC2pzn5a8OwhO1YTlXqEubU6O1Ga8bs6jpsXvZIcXTqHQcR5NJH92GN1h4qwnejWfySASj6TzF9v9MbcMHJjLfoIFOOWLKuNOhifvbKh+ZWB2nSK93r5Qa+4rSRCf1315p+wD+3OrQssXK8OODq90dBPWNqcuoiNLpaldY8OVd8BAupHtKZhTiBarN+mZ26JVwG6FixOfZWnY2zGB9ot47niTNzFYAqop9/LOYBOkOmGtsp9H5m5u4pNB3YucVE6/vo90Q2a938BlHYFM+db4fKEvaq8hWPB5HkNYw/L7CO/kGjTwoSSupTz/bbxhoZqSoBDkE0Yp5qmHGXW072cwRMAE3+BLxBmtlXD5WJtYtSN7Oq4iRsTK9mc6wjo2dnantzj0l/PjzHg4bsTSZReTIVqVLcBZO+SXEfXasGQLh7B0PjqaC61kNb2kP3BAKUr9q528XBwUJOT7g/14dza/ald0yz77nLgWO1EgFkZm/dDlfYPiMLQBAME1ZsJw7A2v9Y2SxsPOGUIU+0E/k2nYP3UPzhjbenzP5VN2sKuAKqxO2UM9iPVHjuX+vsI/HJMKmbEhxrNE8f0mnIRXEv8kya0cGS9dZ4EJHxZonyQXSmgNDoRrC4xm3OICOO3N7LBR/uS97WJKsgKGp2O8rq/783vHALgbcLEFg2YxnZ/2st9lCn+p9C6QRKTkL2WCU4YzX3tDaUIJAOxmqs2lM9zdecS/k/Y/xrGc4cLs0Dq5AhYmRMcbEZQ X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8a3ea9b-40d6-488d-0d21-08d91e5f2039 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:36.2591 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jyhmh34vFAXOjbSPI4L9ZnyZxAUWUbSlPE5mmBMoaQjhVBPP9bq61zJJN+ir+PJt X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.111.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" move everything related to translate, as well as HELPER code in tcg/ mmu_helper.c stays put for now, as it contains both TCG and KVM code. The internal.h file is renamed to s390x-internal.h, because of the risk of collision with other files with the same name. Signed-off-by: Claudio Fontana Acked-by: David Hildenbrand Signed-off-by: Cho, Yu-Chen Acked-by: Cornelia Huck --- hw/s390x/tod-tcg.c | 2 +- include/hw/s390x/tod.h | 2 +- target/s390x/arch_dump.c | 2 +- target/s390x/cpu.c | 2 +- target/s390x/cpu_models.c | 2 +- target/s390x/diag.c | 2 +- target/s390x/gdbstub.c | 2 +- target/s390x/helper.c | 2 +- target/s390x/interrupt.c | 4 ++-- target/s390x/ioinst.c | 2 +- target/s390x/kvm.c | 2 +- target/s390x/machine.c | 4 ++-- target/s390x/meson.build | 17 ++--------------- target/s390x/mmu_helper.c | 2 +- target/s390x/{internal.h => s390x-internal.h} | 6 ++++++ target/s390x/sigp.c | 2 +- target/s390x/{ => tcg}/cc_helper.c | 2 +- target/s390x/{ => tcg}/crypto_helper.c | 2 +- target/s390x/{ => tcg}/excp_helper.c | 2 +- target/s390x/{ => tcg}/fpu_helper.c | 2 +- target/s390x/{ => tcg}/insn-data.def | 0 target/s390x/{ => tcg}/insn-format.def | 0 target/s390x/{ => tcg}/int_helper.c | 2 +- target/s390x/{ => tcg}/mem_helper.c | 2 +- target/s390x/tcg/meson.build | 14 ++++++++++++++ target/s390x/{ => tcg}/misc_helper.c | 2 +- target/s390x/{ => tcg}/s390-tod.h | 0 target/s390x/{ => tcg}/tcg_s390x.h | 0 target/s390x/{ => tcg}/translate.c | 2 +- target/s390x/{ => tcg}/translate_vx.c.inc | 0 target/s390x/{ => tcg}/vec.h | 0 target/s390x/{ => tcg}/vec_fpu_helper.c | 2 +- target/s390x/{ => tcg}/vec_helper.c | 2 +- target/s390x/{ => tcg}/vec_int_helper.c | 0 target/s390x/{ => tcg}/vec_string_helper.c | 2 +- 35 files changed, 49 insertions(+), 42 deletions(-) rename target/s390x/{internal.h => s390x-internal.h} (98%) rename target/s390x/{ => tcg}/cc_helper.c (99%) rename target/s390x/{ => tcg}/crypto_helper.c (98%) rename target/s390x/{ => tcg}/excp_helper.c (99%) rename target/s390x/{ => tcg}/fpu_helper.c (99%) rename target/s390x/{ => tcg}/insn-data.def (100%) rename target/s390x/{ => tcg}/insn-format.def (100%) rename target/s390x/{ => tcg}/int_helper.c (99%) rename target/s390x/{ => tcg}/mem_helper.c (99%) create mode 100644 target/s390x/tcg/meson.build rename target/s390x/{ => tcg}/misc_helper.c (99%) rename target/s390x/{ => tcg}/s390-tod.h (100%) rename target/s390x/{ => tcg}/tcg_s390x.h (100%) rename target/s390x/{ => tcg}/translate.c (99%) rename target/s390x/{ => tcg}/translate_vx.c.inc (100%) rename target/s390x/{ => tcg}/vec.h (100%) rename target/s390x/{ => tcg}/vec_fpu_helper.c (99%) rename target/s390x/{ => tcg}/vec_helper.c (99%) rename target/s390x/{ => tcg}/vec_int_helper.c (100%) rename target/s390x/{ => tcg}/vec_string_helper.c (99%) diff --git a/hw/s390x/tod-tcg.c b/hw/s390x/tod-tcg.c index e91b9590f5..4b3e65050a 100644 --- a/hw/s390x/tod-tcg.c +++ b/hw/s390x/tod-tcg.c @@ -16,7 +16,7 @@ #include "qemu/cutils.h" #include "qemu/module.h" #include "cpu.h" -#include "tcg_s390x.h" +#include "tcg/tcg_s390x.h" static void qemu_s390_tod_get(const S390TODState *td, S390TOD *tod, Error **errp) diff --git a/include/hw/s390x/tod.h b/include/hw/s390x/tod.h index ff3195a4bf..0935e85089 100644 --- a/include/hw/s390x/tod.h +++ b/include/hw/s390x/tod.h @@ -12,7 +12,7 @@ #define HW_S390_TOD_H #include "hw/qdev-core.h" -#include "target/s390x/s390-tod.h" +#include "tcg/s390-tod.h" #include "qom/object.h" typedef struct S390TOD { diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c index cc1330876b..08daf93ae1 100644 --- a/target/s390x/arch_dump.c +++ b/target/s390x/arch_dump.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "elf.h" #include "sysemu/dump.h" diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 64455cf309..533b251b7e 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -23,7 +23,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 050dcf2d42..4ff8cba7e5 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" diff --git a/target/s390x/diag.c b/target/s390x/diag.c index d620cd4bd4..c17a2498a7 100644 --- a/target/s390x/diag.c +++ b/target/s390x/diag.c @@ -14,7 +14,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "hw/watchdog/wdt_diag288.h" #include "sysemu/cpus.h" #include "hw/s390x/ipl.h" diff --git a/target/s390x/gdbstub.c b/target/s390x/gdbstub.c index d6fce5ff1e..1dbe2973f4 100644 --- a/target/s390x/gdbstub.c +++ b/target/s390x/gdbstub.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/exec-all.h" #include "exec/gdbstub.h" #include "qemu/bitops.h" diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 7678994feb..2254873cef 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/gdbstub.h" #include "qemu/timer.h" #include "qemu/qemu-print.h" diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c index 9b4d08f2be..734f0c62de 100644 --- a/target/s390x/interrupt.c +++ b/target/s390x/interrupt.c @@ -10,12 +10,12 @@ #include "qemu/osdep.h" #include "cpu.h" #include "kvm_s390x.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/exec-all.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" #include "hw/s390x/ioinst.h" -#include "tcg_s390x.h" +#include "tcg/tcg_s390x.h" #if !defined(CONFIG_USER_ONLY) #include "hw/s390x/s390_flic.h" #endif diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index 1ee11522e1..4eb0a7a9f8 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "hw/s390x/ioinst.h" #include "trace.h" #include "hw/s390x/s390-pci-bus.h" diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index 4fb3bbfef5..2a22cc69f6 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -26,7 +26,7 @@ #include "qemu-common.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "sysemu/kvm_int.h" #include "qemu/cutils.h" diff --git a/target/s390x/machine.c b/target/s390x/machine.c index 5b4e82f1ab..81a8a7ff99 100644 --- a/target/s390x/machine.c +++ b/target/s390x/machine.c @@ -16,10 +16,10 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "migration/vmstate.h" -#include "tcg_s390x.h" +#include "tcg/tcg_s390x.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" diff --git a/target/s390x/meson.build b/target/s390x/meson.build index a5e1ded93f..60d7f1b908 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -8,21 +8,6 @@ s390x_ss.add(files( 'interrupt.c', )) -s390x_ss.add(when: 'CONFIG_TCG', if_true: files( - 'cc_helper.c', - 'crypto_helper.c', - 'excp_helper.c', - 'fpu_helper.c', - 'int_helper.c', - 'mem_helper.c', - 'misc_helper.c', - 'translate.c', - 'vec_fpu_helper.c', - 'vec_helper.c', - 'vec_int_helper.c', - 'vec_string_helper.c', -)) - s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) gen_features = executable('gen-features', 'gen-features.c', native: true, @@ -60,6 +45,8 @@ endif s390x_user_ss = ss.source_set() +subdir('tcg') + target_arch += {'s390x': s390x_ss} target_softmmu_arch += {'s390x': s390x_softmmu_ss} target_user_arch += {'s390x': s390x_user_ss} diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index d492b23a17..52fdd86c63 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -19,7 +19,7 @@ #include "qemu/error-report.h" #include "exec/address-spaces.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" diff --git a/target/s390x/internal.h b/target/s390x/s390x-internal.h similarity index 98% rename from target/s390x/internal.h rename to target/s390x/s390x-internal.h index 11515bb617..171ecd59fb 100644 --- a/target/s390x/internal.h +++ b/target/s390x/s390x-internal.h @@ -244,6 +244,12 @@ void load_psw(CPUS390XState *env, uint64_t mask, uint64_t addr); #ifndef CONFIG_USER_ONLY unsigned int s390_cpu_halt(S390CPU *cpu); void s390_cpu_unhalt(S390CPU *cpu); +void s390_cpu_init_sysemu(Object *obj); +bool s390_cpu_realize_sysemu(DeviceState *dev, Error **errp); +void s390_cpu_finalize(Object *obj); +void s390_cpu_class_init_sysemu(CPUClass *cc); +void s390_cpu_machine_reset_cb(void *opaque); + #else static inline unsigned int s390_cpu_halt(S390CPU *cpu) { diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c index c604f17710..320dddbae2 100644 --- a/target/s390x/sigp.c +++ b/target/s390x/sigp.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "sysemu/hw_accel.h" #include "sysemu/runstate.h" #include "exec/address-spaces.h" diff --git a/target/s390x/cc_helper.c b/target/s390x/tcg/cc_helper.c similarity index 99% rename from target/s390x/cc_helper.c rename to target/s390x/tcg/cc_helper.c index e7039d0d18..f0663f7a3e 100644 --- a/target/s390x/cc_helper.c +++ b/target/s390x/tcg/cc_helper.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" diff --git a/target/s390x/crypto_helper.c b/target/s390x/tcg/crypto_helper.c similarity index 98% rename from target/s390x/crypto_helper.c rename to target/s390x/tcg/crypto_helper.c index ff3fbc3950..138d9e7ad9 100644 --- a/target/s390x/crypto_helper.c +++ b/target/s390x/tcg/crypto_helper.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" -#include "internal.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" diff --git a/target/s390x/excp_helper.c b/target/s390x/tcg/excp_helper.c similarity index 99% rename from target/s390x/excp_helper.c rename to target/s390x/tcg/excp_helper.c index 20625c2c8f..b675536aec 100644 --- a/target/s390x/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/helper-proto.h" #include "qemu/timer.h" #include "exec/exec-all.h" diff --git a/target/s390x/fpu_helper.c b/target/s390x/tcg/fpu_helper.c similarity index 99% rename from target/s390x/fpu_helper.c rename to target/s390x/tcg/fpu_helper.c index f155bc048c..bc89ef7cc8 100644 --- a/target/s390x/fpu_helper.c +++ b/target/s390x/tcg/fpu_helper.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/exec-all.h" #include "exec/cpu_ldst.h" diff --git a/target/s390x/insn-data.def b/target/s390x/tcg/insn-data.def similarity index 100% rename from target/s390x/insn-data.def rename to target/s390x/tcg/insn-data.def diff --git a/target/s390x/insn-format.def b/target/s390x/tcg/insn-format.def similarity index 100% rename from target/s390x/insn-format.def rename to target/s390x/tcg/insn-format.def diff --git a/target/s390x/int_helper.c b/target/s390x/tcg/int_helper.c similarity index 99% rename from target/s390x/int_helper.c rename to target/s390x/tcg/int_helper.c index 658507dd6d..954542388a 100644 --- a/target/s390x/int_helper.c +++ b/target/s390x/tcg/int_helper.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/exec-all.h" #include "qemu/host-utils.h" diff --git a/target/s390x/mem_helper.c b/target/s390x/tcg/mem_helper.c similarity index 99% rename from target/s390x/mem_helper.c rename to target/s390x/tcg/mem_helper.c index f6a7d29273..9bae13ecf0 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" diff --git a/target/s390x/tcg/meson.build b/target/s390x/tcg/meson.build new file mode 100644 index 0000000000..ee4e8fec77 --- /dev/null +++ b/target/s390x/tcg/meson.build @@ -0,0 +1,14 @@ +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'cc_helper.c', + 'crypto_helper.c', + 'excp_helper.c', + 'fpu_helper.c', + 'int_helper.c', + 'mem_helper.c', + 'misc_helper.c', + 'translate.c', + 'vec_fpu_helper.c', + 'vec_helper.c', + 'vec_int_helper.c', + 'vec_string_helper.c', +)) diff --git a/target/s390x/misc_helper.c b/target/s390x/tcg/misc_helper.c similarity index 99% rename from target/s390x/misc_helper.c rename to target/s390x/tcg/misc_helper.c index 7ea90d414a..33e6999e15 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -22,7 +22,7 @@ #include "qemu/cutils.h" #include "qemu/main-loop.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/memory.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h" diff --git a/target/s390x/s390-tod.h b/target/s390x/tcg/s390-tod.h similarity index 100% rename from target/s390x/s390-tod.h rename to target/s390x/tcg/s390-tod.h diff --git a/target/s390x/tcg_s390x.h b/target/s390x/tcg/tcg_s390x.h similarity index 100% rename from target/s390x/tcg_s390x.h rename to target/s390x/tcg/tcg_s390x.h diff --git a/target/s390x/translate.c b/target/s390x/tcg/translate.c similarity index 99% rename from target/s390x/translate.c rename to target/s390x/tcg/translate.c index 4f953ddfba..ac236888a0 100644 --- a/target/s390x/translate.c +++ b/target/s390x/tcg/translate.c @@ -30,7 +30,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "disas/disas.h" #include "exec/exec-all.h" #include "tcg/tcg-op.h" diff --git a/target/s390x/translate_vx.c.inc b/target/s390x/tcg/translate_vx.c.inc similarity index 100% rename from target/s390x/translate_vx.c.inc rename to target/s390x/tcg/translate_vx.c.inc diff --git a/target/s390x/vec.h b/target/s390x/tcg/vec.h similarity index 100% rename from target/s390x/vec.h rename to target/s390x/tcg/vec.h diff --git a/target/s390x/vec_fpu_helper.c b/target/s390x/tcg/vec_fpu_helper.c similarity index 99% rename from target/s390x/vec_fpu_helper.c rename to target/s390x/tcg/vec_fpu_helper.c index c1564e819b..850fac721e 100644 --- a/target/s390x/vec_fpu_helper.c +++ b/target/s390x/tcg/vec_fpu_helper.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "vec.h" #include "tcg_s390x.h" #include "tcg/tcg-gvec-desc.h" diff --git a/target/s390x/vec_helper.c b/target/s390x/tcg/vec_helper.c similarity index 99% rename from target/s390x/vec_helper.c rename to target/s390x/tcg/vec_helper.c index 986e7cc825..ddd0a8be5b 100644 --- a/target/s390x/vec_helper.c +++ b/target/s390x/tcg/vec_helper.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "vec.h" #include "tcg/tcg.h" #include "tcg/tcg-gvec-desc.h" diff --git a/target/s390x/vec_int_helper.c b/target/s390x/tcg/vec_int_helper.c similarity index 100% rename from target/s390x/vec_int_helper.c rename to target/s390x/tcg/vec_int_helper.c diff --git a/target/s390x/vec_string_helper.c b/target/s390x/tcg/vec_string_helper.c similarity index 99% rename from target/s390x/vec_string_helper.c rename to target/s390x/tcg/vec_string_helper.c index c516c0ceeb..ac315eb095 100644 --- a/target/s390x/vec_string_helper.c +++ b/target/s390x/tcg/vec_string_helper.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "vec.h" #include "tcg/tcg.h" #include "tcg/tcg-gvec-desc.h" From patchwork Mon May 24 02:52:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275367 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 2EFF2C47082 for ; Mon, 24 May 2021 02:59:03 +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 9077F61155 for ; Mon, 24 May 2021 02:59:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9077F61155 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0o1-0008AS-Ll for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 22:59:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0j0-0006WD-LR for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:51 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:56130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0iu-0003MT-QD for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SswzpMQT/9AuMIKB+1GdJaSqIZYOQQYZAHrxpDOf9M4=; b=hqgvKrX/QqZr6LpfAaEKMK5SGAMcc5ZjM0qD+rTIRGMXwLk+zxrHyf/kE4zrFznzpfXzoN gypEr/TbRp8mX0jGzwAuOCCTLNVMmBwONeup19lps+kWQ84jKXTsIGNG4OriPQhgC4Kgv/ xiOLZym8gkXm4wBviiB2qGIQ2Eo7FtM= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2110.outbound.protection.outlook.com [104.47.18.110]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-18-NlWqTJMYOz6TiQtnQMUjjg-1; Mon, 24 May 2021 04:53:42 +0200 X-MC-Unique: NlWqTJMYOz6TiQtnQMUjjg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DzlyZCX1Y8vC0fq7uFtbm5UyVYF6cDtLq8KtK9MHyFieMTlXh1RvaPLL2NpnevJUZVqnOnHWLbQAEaZUzv2Pq9KpJwjAdCTtvP5ACA3ckXbtmhgWoweW1cihn6JiBj6QYRfIuohS/fzbxnZ/rM9Z1WDov+D9WPrX5WgiRoEg351BQqZSWXQRULe5hlkdfUuo+HFgww6LQY8jODGs/dynQ00mcVXGvcSDPmi9BJS1syiAqOc+T3COa8bk41x+2xWR8ELebn1GFJp2NBJfUAZujdAF9nh5wJ+aTw1Ppd2KvY/p3fEgWGdiniCGDy5nThr3QOSdpMGpyzGTFkLAinrn1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JfSM2Gi8fcqMrhRLBH0rPBIeRqyrQp3nuB/vvdvWSAc=; b=UYS/fR37f+/c5tm5ciMqd/i0XJVt+DpCMnpKzMD0s7Lk8VJkvf49S6B3f4d9E1z2zVKAK/KfQeMIjIpmS5Pqst1EAk108aUl8w6BzahFygO/MkJO72MYZ5J1ElUlDV/ViKTiUACWEEF8Q7rsJzstpAz5V0zOZ6iFF64CqDkoPfhmWIIQHkY536Tj1W4Oajl32tbXU6NADdhpp43eIpM3Dsm9oWrGZrfRTjdYwWB6g5PCNddhD98V9vzJfHGuDYCjcrWcFB3QyoBIbP8yGkaXkPx+y7UfP6qtu0f62gq5uzSHF1eEHbnepOJD8cIXLBUlo6s3KalWsaVHEahRDloBWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:40 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:40 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 07/14] target/s390x: move sysemu-only code out to cpu-sysemu.c Date: Mon, 24 May 2021 10:52:49 +0800 Message-ID: <20210524025256.22252-7-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d7980321-32ac-44e2-2936-08d91e5f22ba X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:454; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RKgaxy12eRFqkIrJEVvyf8YFvSrcl97PHymcXNAhnQQJ9rdbJohz5g+Fc2V9Px3zlEjdU5DN37NHoaBuDyhW58sKTL0FA/cOBHzvSz6UigvrqjmLMCpnbc8d8fLWneW6fdI8Z9iBjOU1LAxrM7Nf5raTJkVGLXs6J1YQPGBbKXiSuqzXK6BYVC8mBX+vUgqKtf19Dw1RzviSdHq5lCgpcFJUUh7X6DKqYm492FpklKzu5Cy5mVCoy8sitp9eCOBJVzdksop8oQVH+6D6F+oldM8iG0DCd4HQxO1J6LJ9LS7+z734NgkKVbs1B6BC8LEygLNDxbW6t2F3+EiU4TegJjoNfRrj2QW8qJocrhEc098AEvFsf37ytTknIdfS9e8Ug9F+54rMLPwLQI+ThipnhKMr1OjRW3JMxKVaB/v2Fk7zXXoMggtsd8jG7qpYCPiWqJhxp9LD1e9Z0wWAmAFm3hfmJgzQYzd1/FSPimdi7xnwIwl1F4LdnTZJn2TrDZ9r+8iOwIh+KqEQhbU2A6Ml9fuIIoZ49S5pIwjXuH8mP6XFSy9ZTqRSbTUOMmiPHhfirIcYz7h7hxRNwVXBYck7ztgWjmzj1g7CaLMQEpb+A+x5pdW2vs3q1DJjyS2qaVHOt8uegm2I1O8/QlcCUhek9ARUQpQ+qvv3tpyDsCqZWTbDh/8g8kzqE9ku+ACXhtXt+coSn3f48OlXkcXbqsxQ3n689VtBrOPyoGJWSIWpRL8TIgWzRtPV4IVRBeMhKuExJqFPUeeSmUPmRocKIl40KRe8gChl/oWEYRp/LGI4y/i2+mzSUHhkByO6vX0fcIPw5fQoJ1mqaO7AkBbxSB13qA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(346002)(136003)(376002)(396003)(39860400002)(36756003)(316002)(66476007)(38100700002)(8676002)(38350700002)(86362001)(52116002)(478600001)(66946007)(8936002)(1076003)(2906002)(956004)(26005)(6512007)(30864003)(16526019)(6506007)(186003)(83380400001)(2616005)(6666004)(4326008)(7416002)(5660300002)(6486002)(107886003)(66556008)(69590400013)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qbsjUAr64EqgTXwbWyrvULgtY9ByqhgGWsdYtQYqgKAJzPgk/ENQbbiDhaCEnC9nx428hLVQQ8S0fq2HX5Rj0aUS9f6iUtMvg2L7xbATVAkVCIJ3/CtBqijYIEOT8wuRGoYs6CopArdYJyZp2jwt//xopGDxqnR2qN6+cUloFfD8X+K9G1EULV7wYiN6V77EUOvwxZItqRb242VE3DYnHOFCEHe01/qdS4CMJqurUpuIMZSnvHPkITS2ZQ33NqMoCecKZHIJ6AFvs5kNMA+pgXJLt7YD0TXelwbHAIWEVAE0cPlVFwl4o+WmpfugjwtC0XUfhoe02G7qV6qhsleGRsQsolLSeXcWPtGfKy0vNl4E2MWI9bafh9INXTTkRkci3HN+0F8kdfRDS4FoGbsWRfvyVsAYgP9/RYJrPomEdiIjOMYq4Ibua/l9VSOXVBxtf0JooxpxSxPxcvK13hHMnc4V8MKelh0bbHMmWGSA8eafNG6CViTN0/JK51HDnhLtZLqqkVYQ6Z0kFdsqWg7WX1/kJkP35SUDQ9bmQCYB9GO5HyPQe2bKNIb1lRUdRFk3vPSMwRM93EiKzwR/qmZuJS8nQIjtAH6ax03GrgP2hS8ID65SwiuUgsrl99Y55J5XWfepeiNLRzWzVEizps1zs54bfHCJfzpMqr3u0giNcLXpRNelmHKCpYwWcg0ASbAcl99eFLTB4PfdBUj8eoNEND2ENq3+M/gvVagF8HK246MB85VBwowRGW3BZJeigodfdXYVx6AUXYlyjvu7gChPCQiesU0+C3ldITDeoP9Ftbg5jyB96DFrNegu4i60Zy3IVGpNMKKJScQVt5hdfHhKfhPLbsqQGWYt4yFZpe3b7n0mdwmCicqvP7XeGt8n/uKQihPnFEiAv7i3Mdp15hnf05EVrI7TShPhuxfhQtLLgKNKUrT4dZTAuHf08W4SKvudP0dagn4ujKtPuErVjToCKoJgP6y9uSX7KSl1u7LhfLG0vI5Qyiomc6zfkQmBz6Xe3u0mmbgltrH5T5BtspPYupZRCBjFA7LjKKahoP1zuHOa0dyMCIT9Ti3DeF13qiq9iMZkdt3wdIPIZ6sMtESU4dZfpaGDojKlC0cmei0xUaqUSpuDFYCKendLdjlJv5QWYLejBc0b2MrVu4WLzO7gXVczqex12fonKsbtxSL1oZBV8vCStZJU7sz3dpaOPrKx8y3Et69y4/24vXDbOj7OhwbcJyUgExfLkJLeT90yjTABsrL0NvAfm4leMg3ix8z6YqeWkV+kf3LkPGYh60jWVdZiN3fm5DAIX+cfL2HqFHxCWBQ0jsenYGeK5oB+gOby X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7980321-32ac-44e2-2936-08d91e5f22ba X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:40.6615 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7awY5r+5u9NytK7quU763wnM9QPgP2h8Wb/urOiZ6YConD3tdoSTQAd+fE5fE+p0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.111.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen --- target/s390x/cpu-sysemu.c | 304 ++++++++++++++++++++++++++++++++++++++ target/s390x/cpu.c | 282 ++--------------------------------- target/s390x/meson.build | 1 + target/s390x/trace-events | 2 +- 4 files changed, 318 insertions(+), 271 deletions(-) create mode 100644 target/s390x/cpu-sysemu.c diff --git a/target/s390x/cpu-sysemu.c b/target/s390x/cpu-sysemu.c new file mode 100644 index 0000000000..6081b7ef32 --- /dev/null +++ b/target/s390x/cpu-sysemu.c @@ -0,0 +1,304 @@ +/* + * QEMU S/390 CPU - System Emulation-only code + * + * Copyright (c) 2009 Ulrich Hecht + * Copyright (c) 2011 Alexander Graf + * Copyright (c) 2012 SUSE LINUX Products GmbH + * Copyright (c) 2012 IBM Corp. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "cpu.h" +#include "s390x-internal.h" +#include "kvm_s390x.h" +#include "sysemu/kvm.h" +#include "sysemu/reset.h" +#include "qemu/timer.h" +#include "trace.h" +#include "qapi/qapi-visit-run-state.h" +#include "sysemu/hw_accel.h" + +#include "hw/s390x/pv.h" +#include "hw/boards.h" +#include "sysemu/arch_init.h" +#include "sysemu/sysemu.h" +#include "sysemu/tcg.h" + +/* S390CPUClass::load_normal() */ +static void s390_cpu_load_normal(CPUState *s) +{ + S390CPU *cpu = S390_CPU(s); + uint64_t spsw; + + if (!s390_is_pv()) { + spsw = ldq_phys(s->as, 0); + cpu->env.psw.mask = spsw & PSW_MASK_SHORT_CTRL; + /* + * Invert short psw indication, so SIE will report a specification + * exception if it was not set. + */ + cpu->env.psw.mask ^= PSW_MASK_SHORTPSW; + cpu->env.psw.addr = spsw & PSW_MASK_SHORT_ADDR; + } else { + /* + * Firmware requires us to set the load state before we set + * the cpu to operating on protected guests. + */ + s390_cpu_set_state(S390_CPU_STATE_LOAD, cpu); + } + s390_cpu_set_state(S390_CPU_STATE_OPERATING, cpu); +} + +void s390_cpu_machine_reset_cb(void *opaque) +{ + S390CPU *cpu = opaque; + + run_on_cpu(CPU(cpu), s390_do_cpu_full_reset, RUN_ON_CPU_NULL); +} + +static GuestPanicInformation *s390_cpu_get_crash_info(CPUState *cs) +{ + GuestPanicInformation *panic_info; + S390CPU *cpu = S390_CPU(cs); + + cpu_synchronize_state(cs); + panic_info = g_malloc0(sizeof(GuestPanicInformation)); + + panic_info->type = GUEST_PANIC_INFORMATION_TYPE_S390; + panic_info->u.s390.core = cpu->env.core_id; + panic_info->u.s390.psw_mask = cpu->env.psw.mask; + panic_info->u.s390.psw_addr = cpu->env.psw.addr; + panic_info->u.s390.reason = cpu->env.crash_reason; + + return panic_info; +} + +static void s390_cpu_get_crash_info_qom(Object *obj, Visitor *v, + const char *name, void *opaque, + Error **errp) +{ + CPUState *cs = CPU(obj); + GuestPanicInformation *panic_info; + + if (!cs->crash_occurred) { + error_setg(errp, "No crash occurred"); + return; + } + + panic_info = s390_cpu_get_crash_info(cs); + + visit_type_GuestPanicInformation(v, "crash-information", &panic_info, + errp); + qapi_free_GuestPanicInformation(panic_info); +} + +void s390_cpu_init_sysemu(Object *obj) +{ + CPUState *cs = CPU(obj); + S390CPU *cpu = S390_CPU(obj); + + cs->start_powered_off = true; + object_property_add(obj, "crash-information", "GuestPanicInformation", + s390_cpu_get_crash_info_qom, NULL, NULL, NULL); + cpu->env.tod_timer = + timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_tod_timer, cpu); + cpu->env.cpu_timer = + timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_cpu_timer, cpu); + s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu); +} + +bool s390_cpu_realize_sysemu(DeviceState *dev, Error **errp) +{ + S390CPU *cpu = S390_CPU(dev); + MachineState *ms = MACHINE(qdev_get_machine()); + unsigned int max_cpus = ms->smp.max_cpus; + + if (cpu->env.core_id >= max_cpus) { + error_setg(errp, "Unable to add CPU with core-id: %" PRIu32 + ", maximum core-id: %d", cpu->env.core_id, + max_cpus - 1); + return false; + } + + if (cpu_exists(cpu->env.core_id)) { + error_setg(errp, "Unable to add CPU with core-id: %" PRIu32 + ", it already exists", cpu->env.core_id); + return false; + } + + /* sync cs->cpu_index and env->core_id. The latter is needed for TCG. */ + CPU(cpu)->cpu_index = cpu->env.core_id; + return true; +} + +void s390_cpu_finalize(Object *obj) +{ + S390CPU *cpu = S390_CPU(obj); + + timer_free(cpu->env.tod_timer); + timer_free(cpu->env.cpu_timer); + + qemu_unregister_reset(s390_cpu_machine_reset_cb, cpu); + g_free(cpu->irqstate); +} + +void s390_cpu_class_init_sysemu(CPUClass *cc) +{ + S390CPUClass *scc = S390_CPU_CLASS(cc); + + scc->load_normal = s390_cpu_load_normal; + cc->get_phys_page_debug = s390_cpu_get_phys_page_debug; + cc->vmsd = &vmstate_s390_cpu; + cc->get_crash_info = s390_cpu_get_crash_info; + cc->write_elf64_note = s390_cpu_write_elf64_note; +} + +static bool disabled_wait(CPUState *cpu) +{ + return cpu->halted && !(S390_CPU(cpu)->env.psw.mask & + (PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK)); +} + +static unsigned s390_count_running_cpus(void) +{ + CPUState *cpu; + int nr_running = 0; + + CPU_FOREACH(cpu) { + uint8_t state = S390_CPU(cpu)->env.cpu_state; + if (state == S390_CPU_STATE_OPERATING || + state == S390_CPU_STATE_LOAD) { + if (!disabled_wait(cpu)) { + nr_running++; + } + } + } + + return nr_running; +} + +unsigned int s390_cpu_halt(S390CPU *cpu) +{ + CPUState *cs = CPU(cpu); + trace_cpu_halt(cs->cpu_index); + + if (!cs->halted) { + cs->halted = 1; + cs->exception_index = EXCP_HLT; + } + + return s390_count_running_cpus(); +} + +void s390_cpu_unhalt(S390CPU *cpu) +{ + CPUState *cs = CPU(cpu); + trace_cpu_unhalt(cs->cpu_index); + + if (cs->halted) { + cs->halted = 0; + cs->exception_index = -1; + } +} + +unsigned int s390_cpu_set_state(uint8_t cpu_state, S390CPU *cpu) + { + trace_cpu_set_state(CPU(cpu)->cpu_index, cpu_state); + + switch (cpu_state) { + case S390_CPU_STATE_STOPPED: + case S390_CPU_STATE_CHECK_STOP: + /* halt the cpu for common infrastructure */ + s390_cpu_halt(cpu); + break; + case S390_CPU_STATE_OPERATING: + case S390_CPU_STATE_LOAD: + /* + * Starting a CPU with a PSW WAIT bit set: + * KVM: handles this internally and triggers another WAIT exit. + * TCG: will actually try to continue to run. Don't unhalt, will + * be done when the CPU actually has work (an interrupt). + */ + if (!tcg_enabled() || !(cpu->env.psw.mask & PSW_MASK_WAIT)) { + s390_cpu_unhalt(cpu); + } + break; + default: + error_report("Requested CPU state is not a valid S390 CPU state: %u", + cpu_state); + exit(1); + } + if (kvm_enabled() && cpu->env.cpu_state != cpu_state) { + kvm_s390_set_cpu_state(cpu, cpu_state); + } + cpu->env.cpu_state = cpu_state; + + return s390_count_running_cpus(); +} + +int s390_set_memory_limit(uint64_t new_limit, uint64_t *hw_limit) +{ + if (kvm_enabled()) { + return kvm_s390_set_mem_limit(new_limit, hw_limit); + } + return 0; +} + +void s390_set_max_pagesize(uint64_t pagesize, Error **errp) +{ + if (kvm_enabled()) { + kvm_s390_set_max_pagesize(pagesize, errp); + } +} + +void s390_cmma_reset(void) +{ + if (kvm_enabled()) { + kvm_s390_cmma_reset(); + } +} + +int s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch_id, + int vq, bool assign) +{ + if (kvm_enabled()) { + return kvm_s390_assign_subch_ioeventfd(notifier, sch_id, vq, assign); + } else { + return 0; + } +} + +void s390_crypto_reset(void) +{ + if (kvm_enabled()) { + kvm_s390_crypto_reset(); + } +} + +void s390_enable_css_support(S390CPU *cpu) +{ + if (kvm_enabled()) { + kvm_s390_enable_css_support(cpu); + } +} + +void s390_do_cpu_set_diag318(CPUState *cs, run_on_cpu_data arg) +{ + if (kvm_enabled()) { + kvm_s390_set_diag318(cs, arg.host_ulong); + } +} diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 533b251b7e..59efe48bcd 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -27,21 +27,11 @@ #include "kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" -#include "qemu/timer.h" -#include "qemu/error-report.h" #include "qemu/module.h" #include "trace.h" -#include "qapi/visitor.h" #include "qapi/qapi-types-machine.h" -#include "qapi/qapi-visit-run-state.h" #include "sysemu/hw_accel.h" #include "hw/qdev-properties.h" -#ifndef CONFIG_USER_ONLY -#include "hw/s390x/pv.h" -#include "hw/boards.h" -#include "sysemu/arch_init.h" -#include "sysemu/tcg.h" -#endif #include "fpu/softfloat-helpers.h" #include "disas/capstone.h" @@ -72,33 +62,6 @@ static bool s390_cpu_has_work(CPUState *cs) return s390_cpu_has_int(cpu); } -#if !defined(CONFIG_USER_ONLY) -/* S390CPUClass::load_normal() */ -static void s390_cpu_load_normal(CPUState *s) -{ - S390CPU *cpu = S390_CPU(s); - uint64_t spsw; - - if (!s390_is_pv()) { - spsw = ldq_phys(s->as, 0); - cpu->env.psw.mask = spsw & PSW_MASK_SHORT_CTRL; - /* - * Invert short psw indication, so SIE will report a specification - * exception if it was not set. - */ - cpu->env.psw.mask ^= PSW_MASK_SHORTPSW; - cpu->env.psw.addr = spsw & PSW_MASK_SHORT_ADDR; - } else { - /* - * Firmware requires us to set the load state before we set - * the cpu to operating on protected guests. - */ - s390_cpu_set_state(S390_CPU_STATE_LOAD, cpu); - } - s390_cpu_set_state(S390_CPU_STATE_OPERATING, cpu); -} -#endif - /* S390CPUClass::reset() */ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) { @@ -169,15 +132,6 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) } } -#if !defined(CONFIG_USER_ONLY) -static void s390_cpu_machine_reset_cb(void *opaque) -{ - S390CPU *cpu = opaque; - - run_on_cpu(CPU(cpu), s390_do_cpu_full_reset, RUN_ON_CPU_NULL); -} -#endif - static void s390_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) { info->mach = bfd_mach_s390_64; @@ -191,9 +145,6 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp) { CPUState *cs = CPU(dev); S390CPUClass *scc = S390_CPU_GET_CLASS(dev); -#if !defined(CONFIG_USER_ONLY) - S390CPU *cpu = S390_CPU(dev); -#endif Error *err = NULL; /* the model has to be realized before qemu_init_vcpu() due to kvm */ @@ -203,23 +154,9 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp) } #if !defined(CONFIG_USER_ONLY) - MachineState *ms = MACHINE(qdev_get_machine()); - unsigned int max_cpus = ms->smp.max_cpus; - if (cpu->env.core_id >= max_cpus) { - error_setg(&err, "Unable to add CPU with core-id: %" PRIu32 - ", maximum core-id: %d", cpu->env.core_id, - max_cpus - 1); - goto out; - } - - if (cpu_exists(cpu->env.core_id)) { - error_setg(&err, "Unable to add CPU with core-id: %" PRIu32 - ", it already exists", cpu->env.core_id); + if (!s390_cpu_realize_sysemu(dev, &err)) { goto out; } - - /* sync cs->cpu_index and env->core_id. The latter is needed for TCG. */ - cs->cpu_index = cpu->env.core_id; #endif cpu_exec_realizefn(cs, &err); @@ -228,7 +165,7 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp) } #if !defined(CONFIG_USER_ONLY) - qemu_register_reset(s390_cpu_machine_reset_cb, cpu); + qemu_register_reset(s390_cpu_machine_reset_cb, S390_CPU(dev)); #endif s390_cpu_gdb_init(cs); qemu_init_vcpu(cs); @@ -250,44 +187,6 @@ out: error_propagate(errp, err); } -#if !defined(CONFIG_USER_ONLY) -static GuestPanicInformation *s390_cpu_get_crash_info(CPUState *cs) -{ - GuestPanicInformation *panic_info; - S390CPU *cpu = S390_CPU(cs); - - cpu_synchronize_state(cs); - panic_info = g_malloc0(sizeof(GuestPanicInformation)); - - panic_info->type = GUEST_PANIC_INFORMATION_TYPE_S390; - panic_info->u.s390.core = cpu->env.core_id; - panic_info->u.s390.psw_mask = cpu->env.psw.mask; - panic_info->u.s390.psw_addr = cpu->env.psw.addr; - panic_info->u.s390.reason = cpu->env.crash_reason; - - return panic_info; -} - -static void s390_cpu_get_crash_info_qom(Object *obj, Visitor *v, - const char *name, void *opaque, - Error **errp) -{ - CPUState *cs = CPU(obj); - GuestPanicInformation *panic_info; - - if (!cs->crash_occurred) { - error_setg(errp, "No crash occurred"); - return; - } - - panic_info = s390_cpu_get_crash_info(cs); - - visit_type_GuestPanicInformation(v, "crash-information", &panic_info, - errp); - qapi_free_GuestPanicInformation(panic_info); -} -#endif - static void s390_cpu_initfn(Object *obj) { CPUState *cs = CPU(obj); @@ -295,169 +194,12 @@ static void s390_cpu_initfn(Object *obj) cpu_set_cpustate_pointers(cpu); cs->exception_index = EXCP_HLT; -#if !defined(CONFIG_USER_ONLY) - cs->start_powered_off = true; - object_property_add(obj, "crash-information", "GuestPanicInformation", - s390_cpu_get_crash_info_qom, NULL, NULL, NULL); - cpu->env.tod_timer = - timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_tod_timer, cpu); - cpu->env.cpu_timer = - timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_cpu_timer, cpu); - s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu); -#endif -} -static void s390_cpu_finalize(Object *obj) -{ #if !defined(CONFIG_USER_ONLY) - S390CPU *cpu = S390_CPU(obj); - - timer_free(cpu->env.tod_timer); - timer_free(cpu->env.cpu_timer); - - qemu_unregister_reset(s390_cpu_machine_reset_cb, cpu); - g_free(cpu->irqstate); + s390_cpu_init_sysemu(obj); #endif } -#if !defined(CONFIG_USER_ONLY) -static bool disabled_wait(CPUState *cpu) -{ - return cpu->halted && !(S390_CPU(cpu)->env.psw.mask & - (PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK)); -} - -static unsigned s390_count_running_cpus(void) -{ - CPUState *cpu; - int nr_running = 0; - - CPU_FOREACH(cpu) { - uint8_t state = S390_CPU(cpu)->env.cpu_state; - if (state == S390_CPU_STATE_OPERATING || - state == S390_CPU_STATE_LOAD) { - if (!disabled_wait(cpu)) { - nr_running++; - } - } - } - - return nr_running; -} - -unsigned int s390_cpu_halt(S390CPU *cpu) -{ - CPUState *cs = CPU(cpu); - trace_cpu_halt(cs->cpu_index); - - if (!cs->halted) { - cs->halted = 1; - cs->exception_index = EXCP_HLT; - } - - return s390_count_running_cpus(); -} - -void s390_cpu_unhalt(S390CPU *cpu) -{ - CPUState *cs = CPU(cpu); - trace_cpu_unhalt(cs->cpu_index); - - if (cs->halted) { - cs->halted = 0; - cs->exception_index = -1; - } -} - -unsigned int s390_cpu_set_state(uint8_t cpu_state, S390CPU *cpu) - { - trace_cpu_set_state(CPU(cpu)->cpu_index, cpu_state); - - switch (cpu_state) { - case S390_CPU_STATE_STOPPED: - case S390_CPU_STATE_CHECK_STOP: - /* halt the cpu for common infrastructure */ - s390_cpu_halt(cpu); - break; - case S390_CPU_STATE_OPERATING: - case S390_CPU_STATE_LOAD: - /* - * Starting a CPU with a PSW WAIT bit set: - * KVM: handles this internally and triggers another WAIT exit. - * TCG: will actually try to continue to run. Don't unhalt, will - * be done when the CPU actually has work (an interrupt). - */ - if (!tcg_enabled() || !(cpu->env.psw.mask & PSW_MASK_WAIT)) { - s390_cpu_unhalt(cpu); - } - break; - default: - error_report("Requested CPU state is not a valid S390 CPU state: %u", - cpu_state); - exit(1); - } - if (kvm_enabled() && cpu->env.cpu_state != cpu_state) { - kvm_s390_set_cpu_state(cpu, cpu_state); - } - cpu->env.cpu_state = cpu_state; - - return s390_count_running_cpus(); -} - -int s390_set_memory_limit(uint64_t new_limit, uint64_t *hw_limit) -{ - if (kvm_enabled()) { - return kvm_s390_set_mem_limit(new_limit, hw_limit); - } - return 0; -} - -void s390_set_max_pagesize(uint64_t pagesize, Error **errp) -{ - if (kvm_enabled()) { - kvm_s390_set_max_pagesize(pagesize, errp); - } -} - -void s390_cmma_reset(void) -{ - if (kvm_enabled()) { - kvm_s390_cmma_reset(); - } -} - -int s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch_id, - int vq, bool assign) -{ - if (kvm_enabled()) { - return kvm_s390_assign_subch_ioeventfd(notifier, sch_id, vq, assign); - } else { - return 0; - } -} - -void s390_crypto_reset(void) -{ - if (kvm_enabled()) { - kvm_s390_crypto_reset(); - } -} - -void s390_enable_css_support(S390CPU *cpu) -{ - if (kvm_enabled()) { - kvm_s390_enable_css_support(cpu); - } -} - -void s390_do_cpu_set_diag318(CPUState *cs, run_on_cpu_data arg) -{ - if (kvm_enabled()) { - kvm_s390_set_diag318(cs, arg.host_ulong); - } -} -#endif - static gchar *s390_gdb_arch_name(CPUState *cs) { return g_strdup("s390:64-bit"); @@ -504,9 +246,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) dc->user_creatable = true; device_class_set_parent_reset(dc, s390_cpu_reset_full, &scc->parent_reset); -#if !defined(CONFIG_USER_ONLY) - scc->load_normal = s390_cpu_load_normal; -#endif + scc->reset = s390_cpu_reset; cc->class_by_name = s390_cpu_class_by_name, cc->has_work = s390_cpu_has_work; @@ -514,17 +254,15 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) cc->set_pc = s390_cpu_set_pc; cc->gdb_read_register = s390_cpu_gdb_read_register; cc->gdb_write_register = s390_cpu_gdb_write_register; -#ifndef CONFIG_USER_ONLY - cc->get_phys_page_debug = s390_cpu_get_phys_page_debug; - cc->vmsd = &vmstate_s390_cpu; - cc->get_crash_info = s390_cpu_get_crash_info; - cc->write_elf64_note = s390_cpu_write_elf64_note; -#endif cc->disas_set_info = s390_cpu_disas_set_info; cc->gdb_num_core_regs = S390_NUM_CORE_REGS; cc->gdb_core_xml_file = "s390x-core64.xml"; cc->gdb_arch_name = s390_gdb_arch_name; +#ifndef CONFIG_USER_ONLY + s390_cpu_class_init_sysemu(cc); +#endif /* CONFIG_USER_ONLY */ + s390_cpu_model_class_register_props(oc); #ifdef CONFIG_TCG @@ -538,7 +276,11 @@ static const TypeInfo s390_cpu_type_info = { .instance_size = sizeof(S390CPU), .instance_align = __alignof__(S390CPU), .instance_init = s390_cpu_initfn, + +#ifndef CONFIG_USER_ONLY .instance_finalize = s390_cpu_finalize, +#endif /* !CONFIG_USER_ONLY */ + .abstract = true, .class_size = sizeof(S390CPUClass), .class_init = s390_cpu_class_init, diff --git a/target/s390x/meson.build b/target/s390x/meson.build index 60d7f1b908..a73bae3dc5 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -28,6 +28,7 @@ s390x_softmmu_ss.add(files( 'machine.c', 'mmu_helper.c', 'sigp.c', + 'cpu-sysemu.c', )) # Newer kernels on s390 check for an S390_PGSTE program header and diff --git a/target/s390x/trace-events b/target/s390x/trace-events index fda1ee8220..e6c5fc1d03 100644 --- a/target/s390x/trace-events +++ b/target/s390x/trace-events @@ -16,7 +16,7 @@ kvm_clear_cmma(int rc) "CMMA: clearing with result code %d" kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s" kvm_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d" -# cpu.c +# cpu-sysemu.c cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8 cpu_halt(int cpu_index) "halting cpu %d" cpu_unhalt(int cpu_index) "unhalting cpu %d" From patchwork Mon May 24 02:52:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275365 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 E4906C47082 for ; Mon, 24 May 2021 02:58:36 +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 64E0661159 for ; Mon, 24 May 2021 02:58:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64E0661159 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0nZ-0006bX-OL for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 22:58:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0j3-0006Zu-L9 for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:54 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:49462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0iz-0003Os-M9 for qemu-devel@nongnu.org; Sun, 23 May 2021 22:53:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IIqbyE3cN9VSLbZjqwwam/7dDf8pi7hjzYb0LaBboTE=; b=l63OyezV9Oa5JZyfPQ3wxputGbw7ccbEtK/9tF5WH/gDDoLPz6xXyjIwAogryWGaaJdHHQ H+dt29qSE5eQEGoODCqjB0i9hJUTsAxrYYEK/KdZHC702Koi9AtfpznuDq9dQj/ds8FyQu 4qV2kHR0b/9/Z7AdEjm0j8b7bux7OmI= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2106.outbound.protection.outlook.com [104.47.18.106]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-26--Vbr5nPsPN2THjr8gtpfsg-1; Mon, 24 May 2021 04:53:46 +0200 X-MC-Unique: -Vbr5nPsPN2THjr8gtpfsg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=np0FnI1EF/9Eoh7VvvyZ4ZBixNRlt2VMqQQ1tOzBnNLI0NWrJV5Kx667cUBm3AD/K27HANQl5FfDkokC+wyfb9O4bGn8hfZY/QOpanoX83tQBZD87VhBW8jGWosfDOli2DUS+QQ8VzfYM4K2fzI/WuKryWZT9xSetcgyXQncmSbhlZoDYg656xXnQuEkVn3AnsT2JJbMO3idDqnH51jaUFGR1Wje02xgtwSFUErIJbp20WaE48wjsKTAUX9FDLYJ9d9lwWFum/MxlyiTfJSk9X9R1VuFyRQggBaiTDOZWEBuryc3KeOZQaxR/Dmgx1LASsMUsjW0wM1A/l5qcxIcXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qVITeNNGvP6m0f1orkIHCSiSezam90I1Nnw3LOtpqiM=; b=SIoCuLh2yR12GCSHA0qV6wLUlpMp8l9IosN3m/IY5lzLpORTvu5QAGw8c6ZtiSQMPz1WZF9V3sYEUp6IDiQcqIXWvhBfRK3QwPeXo0cfzTLxNjMsNrzmAdEKAfA33gj8wVGmtCMFJ34DnrrfGvj4UI2SQl559boW/wVsTZP+ylG4RPndE+R8aFkmeBhOWtdM2Kb9nOBXMXZU77FsaAlBPAnCN0V6XA8sGAjguoRoQtO71UPhy2BZsQLhwQEOOqyGd6L795X1SpvWEzn1nBHZsrn2q90xr357PLtxlT8k6FVHqC3Z/JJDA7X0xe+qh3bEqTC5IBXOHjLp0PnxzFphcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:45 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:45 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 08/14] target/s390x: split cpu-dump from helper.c Date: Mon, 24 May 2021 10:52:50 +0800 Message-ID: <20210524025256.22252-8-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 52973af4-6310-4001-1035-08d91e5f254a X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6g07NtlY2G1YoJ2IIktIxGM1BN3XwRsTPZ8hoyyhWdLngoi6uIEDtCUK2SWchjUdICZmjyqxdjZi+v/2oJkXc5WZXxQC9PpTAR+Uzik4vV4lrz1OnsdQ8bZtkQIgLeLVLJCisZPnEWc2nIpuH5nadg9urzAphGIT+/x0YGD8iLcOVfzBrPZBJqIlWcbk+Cc+Km1r5NP5TDYHiR7Ob4SryXwxL1Gxku+Rx1VWwuyfYdlLl2fPNEch+dN3wikLYsVv09Fpd0XeE2UXScM2OUOmKV4VZ+nFXtE6WVBvi0DRwPvO12NBS/77mCdutFmgS2PBUV9X4COxCYiF5Wi2fU954wOOz+lFoXqzm75Dw3MZEJlUH1dZF9bp/Q34YSrKvjIhjsqtrQKF+7D2/GQPwo8f1MaOj90c3NOssmiDDHVlmpVl3e63ydXvIfFrft3Blp7tPVYXT3yFXDUEZBrROvG6smfhcqqQXSZSieLUJIrV6izd6EDPF64MDm/W6BTGhN/YN/R8yzFiXDTqugnEWd1YMY0tqIvHjQc62G1aRLegBTT1J9B7xgtaRxLFkUrzXbyhB3i2ZqJhsEIcjEtWfCvr21W6GvGaDEgPLFz3gtLNj3QWIYPwd/cWZydyOL17HHU2LY1+je5dqo+velHZJ3rxdtG8P/igPzcH/+IcbnxSyz30UlRTK61ardVqqLfsaboUbiQk9zgCqBcHRLQfT6FDh1sv+Xie61mHvEifBIQqoH2yoy9IcXXHuX074sJ/lh/W6n8Z+87pvdafk0vGPIlRR+XNIxboT8grzl+ZnYHrvrbZ1M8sBuF0EdhaV2W0+CnNv/K6LCTeEBIKYzcmKxBlTw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(346002)(136003)(376002)(396003)(39860400002)(36756003)(316002)(66476007)(38100700002)(8676002)(38350700002)(86362001)(52116002)(478600001)(66946007)(8936002)(1076003)(2906002)(956004)(26005)(6512007)(16526019)(6506007)(186003)(83380400001)(2616005)(6666004)(4326008)(7416002)(5660300002)(6486002)(107886003)(66556008)(69590400013)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Kchx6CeaxLqCKqjnkAA9OzgrIWgV/hUNAEkRrsJ2zYgoCpe20h2oTMFhFpvS72W0knTcLoYmzcSBCnazFcWizS0nGdUFEsXfXp0l9hs7EdFxUCRvvZ5s5NiH9TiPNnV2YPsVmf0db/vG7YJrCSOtJsd2XXo7mMhzEfr/Rx9gl8ws128hpOaVUzRzGNKxUdOMtcKoIrQQFyCI5+uppvbqK6Dxhov/nmHxVRcJForAF+Zv68NxeHF/KdHQK/fXgDQGY3UDgegukGpBfl7/6ntZbfm34+ltgamzuUW+TytWqbTVqPLI9cmwT2Fq9Daj52xZsGt+rsJozrjvAxN2wa53in7bTHY77efl28xyGf8rMYhbDf0EhCH8t6f6bnCH3Z0lLHS9FR97HdNOQaK9ylU8pgGP8izMSC0vZd89O25DQ33G1+bjwmZamDQ4XWkiTbMZ483KU5D/HuYhGp4LuQ6zqB9Y61A7tT1TwivFJ1ATpvpTcqbHbaVNm90NWDKI7ySG+zPd7DzHsB/m0Q9QoTluNe+QQrM40+GnD8/g4+tti5U0FTL4nwxMxeAuCvAW4XVQPv97/sUKzwKTFG7YwrGluq+RENI3M6ymO8glL8nmh8l68UBxZ1oM8N73tbNILGsu1t5KvYGCe7oWwyOXD48bWJ5JnGv4RVBNZWajXneAR2kmrHJZvagipbQAmvoHXSbJTOK5szhdjN41b9y884CsJBEiQ7asCsELyCJkrGolcEiTtf3t6PjwaKBIw0DMp+fmFLXgtNcx5R7cH8uLr1+JsCrZHExAErVPaQVTol7qG1PejTt6TuiDWWCwaTIAhHTcGVfLAnWdRS8F1eaRF4tkufM14wkW0HgvaJUQgpJEuzE80UjeSKWgGtgYJS2DHuAjRwn+jj1QOSlxY3FQKJzDNHjcRuK9ik1+kalDTDOnfF6tPeFtytZB4I1SnPWEYIfQNyPGSAO1FDf2UmaDJldQB+vJ19s+rLbky6pVO3MAJ6a9Z1txb/ZdG/W52ZPcQxiHv6imab/GnGwqwVg7TH5UR5xYYCQcQ9FeThYz9aln82pbEHWwdfPY0yNxJYqpL7GmAlxbhw8Op8xQ4CxpDkM6Z6paif2v34U/l3+VlAcI+WFs+kyIj5B25egJscDunXNG3txCLIhGCcGyGgTJwkqGs+UjmNWyUei+5OvWz3BHlmzXMIK20UG8PDUg9V1cqdxnLg6P1eNf7EHBN3AjvoN66NMZU+ShcXnPCvKROk5P4BDnpRIWhiAK9/71IivoMu+V29gZb//LB7dq5csgU0xRnT4KMFqpmbM5UHfTSgrE620l4C7O5BJwulAjvqub9MdY X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52973af4-6310-4001-1035-08d91e5f254a X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:44.9920 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QJ2CeNQqKcrNPMsb+bgHFx0zzfYUH19Txr1Z6eS8n7DZ1cqbCcSqjUSxv/EziXUW X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.111.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Acked-by: Cornelia Huck --- target/s390x/cpu-dump.c | 131 +++++++++++++++++++++++++++++++++++++++ target/s390x/helper.c | 107 -------------------------------- target/s390x/meson.build | 1 + 3 files changed, 132 insertions(+), 107 deletions(-) create mode 100644 target/s390x/cpu-dump.c diff --git a/target/s390x/cpu-dump.c b/target/s390x/cpu-dump.c new file mode 100644 index 0000000000..4170dec01a --- /dev/null +++ b/target/s390x/cpu-dump.c @@ -0,0 +1,131 @@ +/* + * S/390 CPU dump to FILE + * + * Copyright (c) 2009 Ulrich Hecht + * Copyright (c) 2011 Alexander Graf + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + */ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "s390x-internal.h" +#include "qemu/qemu-print.h" + +void s390_cpu_dump_state(CPUState *cs, FILE *f, int flags) +{ + S390CPU *cpu = S390_CPU(cs); + CPUS390XState *env = &cpu->env; + int i; + + if (env->cc_op > 3) { + qemu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %15s\n", + env->psw.mask, env->psw.addr, cc_name(env->cc_op)); + } else { + qemu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %02x\n", + env->psw.mask, env->psw.addr, env->cc_op); + } + + for (i = 0; i < 16; i++) { + qemu_fprintf(f, "R%02d=%016" PRIx64, i, env->regs[i]); + if ((i % 4) == 3) { + qemu_fprintf(f, "\n"); + } else { + qemu_fprintf(f, " "); + } + } + + if (flags & CPU_DUMP_FPU) { + if (s390_has_feat(S390_FEAT_VECTOR)) { + for (i = 0; i < 32; i++) { + qemu_fprintf(f, "V%02d=%016" PRIx64 "%016" PRIx64 "%c", + i, env->vregs[i][0], env->vregs[i][1], + i % 2 ? '\n' : ' '); + } + } else { + for (i = 0; i < 16; i++) { + qemu_fprintf(f, "F%02d=%016" PRIx64 "%c", + i, *get_freg(env, i), + (i % 4) == 3 ? '\n' : ' '); + } + } + } + +#ifndef CONFIG_USER_ONLY + for (i = 0; i < 16; i++) { + qemu_fprintf(f, "C%02d=%016" PRIx64, i, env->cregs[i]); + if ((i % 4) == 3) { + qemu_fprintf(f, "\n"); + } else { + qemu_fprintf(f, " "); + } + } +#endif + +#ifdef DEBUG_INLINE_BRANCHES + for (i = 0; i < CC_OP_MAX; i++) { + qemu_fprintf(f, " %15s = %10ld\t%10ld\n", cc_name(i), + inline_branch_miss[i], inline_branch_hit[i]); + } +#endif + + qemu_fprintf(f, "\n"); +} + +const char *cc_name(enum cc_op cc_op) +{ + static const char * const cc_names[] = { + [CC_OP_CONST0] = "CC_OP_CONST0", + [CC_OP_CONST1] = "CC_OP_CONST1", + [CC_OP_CONST2] = "CC_OP_CONST2", + [CC_OP_CONST3] = "CC_OP_CONST3", + [CC_OP_DYNAMIC] = "CC_OP_DYNAMIC", + [CC_OP_STATIC] = "CC_OP_STATIC", + [CC_OP_NZ] = "CC_OP_NZ", + [CC_OP_ADDU] = "CC_OP_ADDU", + [CC_OP_SUBU] = "CC_OP_SUBU", + [CC_OP_LTGT_32] = "CC_OP_LTGT_32", + [CC_OP_LTGT_64] = "CC_OP_LTGT_64", + [CC_OP_LTUGTU_32] = "CC_OP_LTUGTU_32", + [CC_OP_LTUGTU_64] = "CC_OP_LTUGTU_64", + [CC_OP_LTGT0_32] = "CC_OP_LTGT0_32", + [CC_OP_LTGT0_64] = "CC_OP_LTGT0_64", + [CC_OP_ADD_64] = "CC_OP_ADD_64", + [CC_OP_SUB_64] = "CC_OP_SUB_64", + [CC_OP_ABS_64] = "CC_OP_ABS_64", + [CC_OP_NABS_64] = "CC_OP_NABS_64", + [CC_OP_ADD_32] = "CC_OP_ADD_32", + [CC_OP_SUB_32] = "CC_OP_SUB_32", + [CC_OP_ABS_32] = "CC_OP_ABS_32", + [CC_OP_NABS_32] = "CC_OP_NABS_32", + [CC_OP_COMP_32] = "CC_OP_COMP_32", + [CC_OP_COMP_64] = "CC_OP_COMP_64", + [CC_OP_TM_32] = "CC_OP_TM_32", + [CC_OP_TM_64] = "CC_OP_TM_64", + [CC_OP_NZ_F32] = "CC_OP_NZ_F32", + [CC_OP_NZ_F64] = "CC_OP_NZ_F64", + [CC_OP_NZ_F128] = "CC_OP_NZ_F128", + [CC_OP_ICM] = "CC_OP_ICM", + [CC_OP_SLA_32] = "CC_OP_SLA_32", + [CC_OP_SLA_64] = "CC_OP_SLA_64", + [CC_OP_FLOGR] = "CC_OP_FLOGR", + [CC_OP_LCBB] = "CC_OP_LCBB", + [CC_OP_VC] = "CC_OP_VC", + [CC_OP_MULS_32] = "CC_OP_MULS_32", + [CC_OP_MULS_64] = "CC_OP_MULS_64", + }; + + return cc_names[cc_op]; +} diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 2254873cef..41ccc83d11 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -23,7 +23,6 @@ #include "s390x-internal.h" #include "exec/gdbstub.h" #include "qemu/timer.h" -#include "qemu/qemu-print.h" #include "hw/s390x/ioinst.h" #include "hw/s390x/pv.h" #include "sysemu/hw_accel.h" @@ -324,109 +323,3 @@ int s390_store_adtl_status(S390CPU *cpu, hwaddr addr, hwaddr len) return 0; } #endif /* CONFIG_USER_ONLY */ - -void s390_cpu_dump_state(CPUState *cs, FILE *f, int flags) -{ - S390CPU *cpu = S390_CPU(cs); - CPUS390XState *env = &cpu->env; - int i; - - if (env->cc_op > 3) { - qemu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %15s\n", - env->psw.mask, env->psw.addr, cc_name(env->cc_op)); - } else { - qemu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %02x\n", - env->psw.mask, env->psw.addr, env->cc_op); - } - - for (i = 0; i < 16; i++) { - qemu_fprintf(f, "R%02d=%016" PRIx64, i, env->regs[i]); - if ((i % 4) == 3) { - qemu_fprintf(f, "\n"); - } else { - qemu_fprintf(f, " "); - } - } - - if (flags & CPU_DUMP_FPU) { - if (s390_has_feat(S390_FEAT_VECTOR)) { - for (i = 0; i < 32; i++) { - qemu_fprintf(f, "V%02d=%016" PRIx64 "%016" PRIx64 "%c", - i, env->vregs[i][0], env->vregs[i][1], - i % 2 ? '\n' : ' '); - } - } else { - for (i = 0; i < 16; i++) { - qemu_fprintf(f, "F%02d=%016" PRIx64 "%c", - i, *get_freg(env, i), - (i % 4) == 3 ? '\n' : ' '); - } - } - } - -#ifndef CONFIG_USER_ONLY - for (i = 0; i < 16; i++) { - qemu_fprintf(f, "C%02d=%016" PRIx64, i, env->cregs[i]); - if ((i % 4) == 3) { - qemu_fprintf(f, "\n"); - } else { - qemu_fprintf(f, " "); - } - } -#endif - -#ifdef DEBUG_INLINE_BRANCHES - for (i = 0; i < CC_OP_MAX; i++) { - qemu_fprintf(f, " %15s = %10ld\t%10ld\n", cc_name(i), - inline_branch_miss[i], inline_branch_hit[i]); - } -#endif - - qemu_fprintf(f, "\n"); -} - -const char *cc_name(enum cc_op cc_op) -{ - static const char * const cc_names[] = { - [CC_OP_CONST0] = "CC_OP_CONST0", - [CC_OP_CONST1] = "CC_OP_CONST1", - [CC_OP_CONST2] = "CC_OP_CONST2", - [CC_OP_CONST3] = "CC_OP_CONST3", - [CC_OP_DYNAMIC] = "CC_OP_DYNAMIC", - [CC_OP_STATIC] = "CC_OP_STATIC", - [CC_OP_NZ] = "CC_OP_NZ", - [CC_OP_ADDU] = "CC_OP_ADDU", - [CC_OP_SUBU] = "CC_OP_SUBU", - [CC_OP_LTGT_32] = "CC_OP_LTGT_32", - [CC_OP_LTGT_64] = "CC_OP_LTGT_64", - [CC_OP_LTUGTU_32] = "CC_OP_LTUGTU_32", - [CC_OP_LTUGTU_64] = "CC_OP_LTUGTU_64", - [CC_OP_LTGT0_32] = "CC_OP_LTGT0_32", - [CC_OP_LTGT0_64] = "CC_OP_LTGT0_64", - [CC_OP_ADD_64] = "CC_OP_ADD_64", - [CC_OP_SUB_64] = "CC_OP_SUB_64", - [CC_OP_ABS_64] = "CC_OP_ABS_64", - [CC_OP_NABS_64] = "CC_OP_NABS_64", - [CC_OP_ADD_32] = "CC_OP_ADD_32", - [CC_OP_SUB_32] = "CC_OP_SUB_32", - [CC_OP_ABS_32] = "CC_OP_ABS_32", - [CC_OP_NABS_32] = "CC_OP_NABS_32", - [CC_OP_COMP_32] = "CC_OP_COMP_32", - [CC_OP_COMP_64] = "CC_OP_COMP_64", - [CC_OP_TM_32] = "CC_OP_TM_32", - [CC_OP_TM_64] = "CC_OP_TM_64", - [CC_OP_NZ_F32] = "CC_OP_NZ_F32", - [CC_OP_NZ_F64] = "CC_OP_NZ_F64", - [CC_OP_NZ_F128] = "CC_OP_NZ_F128", - [CC_OP_ICM] = "CC_OP_ICM", - [CC_OP_SLA_32] = "CC_OP_SLA_32", - [CC_OP_SLA_64] = "CC_OP_SLA_64", - [CC_OP_FLOGR] = "CC_OP_FLOGR", - [CC_OP_LCBB] = "CC_OP_LCBB", - [CC_OP_VC] = "CC_OP_VC", - [CC_OP_MULS_32] = "CC_OP_MULS_32", - [CC_OP_MULS_64] = "CC_OP_MULS_64", - }; - - return cc_names[cc_op]; -} diff --git a/target/s390x/meson.build b/target/s390x/meson.build index a73bae3dc5..6e1aa3b0cd 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -6,6 +6,7 @@ s390x_ss.add(files( 'gdbstub.c', 'helper.c', 'interrupt.c', + 'cpu-dump.c', )) s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) From patchwork Mon May 24 02:52:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275371 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 AC4E8C47082 for ; Mon, 24 May 2021 03:01:01 +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 0F5E761155 for ; Mon, 24 May 2021 03:01:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F5E761155 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0pv-0003qr-W5 for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 23:01:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jH-0007B0-7s for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:07 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:54414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jD-0003R1-EF for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ojl4L+neJju8F31zLKjE734m6XCGtWoKO97CeXlhHkk=; b=ERC0IYJUvG2KoxgyDdjsFUudHp1koQ3J2mm56zsXbrVvOoykUK6cVeWWle8MgFuY7OZ0Jy uT0F9ElHBNQoqLjOGDniOfrpGe/4BVVVM9WM45/LjPpZnNLTAj9p/H5L2EljYMHikHwgkn 95Nqed/+ph0BbRI+kEuMLr7YejZKW00= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2106.outbound.protection.outlook.com [104.47.18.106]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-24-IaLGb6pCPh6L_Gieomrkbw-1; Mon, 24 May 2021 04:53:50 +0200 X-MC-Unique: IaLGb6pCPh6L_Gieomrkbw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N6L4LibyEflcs3tXocFMBNvCgGjzEyos6mKxq1xjjNiDcG7rE/jtgwskm7dD2wpdewmAFiWdojWdUiRDLlMaxCn+h5+tX2uYI2rg/+7zNu+7+iiPAQMN2aXegYf5ZrQq0J/1CMvMuFXMQqNtL8bczGh2X5lVNfaJnd3DIsT1APOmQQsTNDN6d/+PiA9ztw4HTvdmwO//1uqiOUqfBiII/LOqI2juIT4Gm3Y/N9rrAMgedX9Wj0OT8dcW+VpWJVQ9dIIyT3J7SSmb3VvK4JOm2pZX4KD/Fqc8PTDnqqvQP3un2on6e+AZNC25vMwrRIy15k4ORuC7/qI5oN3QTintsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bsXs6Mn9krNLEBDhHvAyQjyXRaPYRa5Ic+7+KVu6TK0=; b=KqTzWb1SRsSuYl8KMCPR7iFZnoYgNvlbA7FzcjdKVpj1raaZYTMDWGX5AHHNhytoXyO54DSyTjD0OiJqAhBjUiIfYWcxn2J/SR9eqt/xMf1WzrvWff5yjWQCsKrTsnRRTMD5CysQSTt0/KKjCKIvGyCgXTTDMBAhE8r/zJPhuGwzm8VWcymRpt4Itic9suN+Z837m/WKfAqZHkTNLCQvq3/STe7wFMtnUfkkat0tcCvqPkI+0ZWUlqHvgqiXnWu9pu3++eVopNnhUQS5jACcLeU+ceCVFHbT6ZbzfVD8zOXU6cqsfsh17RUq+0iTSee9HghurqE2GWc0hEZAu9BwVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:49 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:49 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 09/14] target/s390x: make helper.c sysemu-only Date: Mon, 24 May 2021 10:52:51 +0800 Message-ID: <20210524025256.22252-9-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c3e4a3a-1302-40db-d362-08d91e5f27e9 X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1148; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RmHDJ5h1kjqLFOMfsz3n5SiWsR21foz4D5XjbPA23Hf/NYeRGUCt9JKhVeG4Af9uwmbbugfdTG+V8cDrj8Y6Hix0691mr7kSc+j12NEHsEEcSdBAdHqP+hklEB9nxHlw9AdsTw4DWL/yRZ4LzZ3mBHK5IJro0z2bGIdIsfC2iHyoR8SxPJBUqd6ewFUYdPxX5eizt6HWqm/R8AiqbiREEclX/XvGp0aOJltTpJN8Y1mQXdSpCiZQa1GCHlOFW1jnRiRUbAdab1J2scbrJgKyzEjYXsHWkvdz0YTiz4BgFkSawOVKLKIzRpQ3pBiE0J1H4geO+J/CNrzrOzApqB9K70fqnTh8ebwHUjUt/F0TgNHtfiZatmg3mKTL7Dty1vx0ZZA4epNvoHaeeKJjpPoAxgXkWCBL9rlwbWSjoScicg5hTRPrt0/xQdss4B7FrQMwRYXRUBjKfVn1DOAPtc0u1UBZP5PWqkyUahBOxzB3GunUyhIC5tgLcssUXDYWOJMsyj7qiwR+UJ9cSUPBrKDDbDWEqJ8DBU60dFtOt8LEFkJZG5pJ8m7yPE5GEf/EeS0ez3KBTvvb4HzPKHHKiTTkbf9M7sPvCvRh6T0f4SwOOcmjTdEreM0QOVQiwGXE/HHmypq0qKOr4EqHeOUDeIg7JCdlIGKh9huuXY0uT//FjM+cxl1RRdyh0Anrh0oA1+K4 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(346002)(136003)(376002)(396003)(39860400002)(36756003)(316002)(66476007)(38100700002)(8676002)(38350700002)(86362001)(52116002)(478600001)(66946007)(8936002)(1076003)(2906002)(956004)(26005)(6512007)(16526019)(6506007)(186003)(83380400001)(2616005)(6666004)(4326008)(7416002)(5660300002)(6486002)(107886003)(66556008)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: FvqeVnztWKCj15Nv3+ka+VFQ9F9Ys+Odde1oGI0WMuYsESwA6pfG0V13ZsSt5HQog6JWm0VkpXeug1YV1L+vwhP8jUGBa+sLtAB1Z20gVqVNTXxCmvZwJF6/41J3fZGM6O62jGNaznYDfvkweKVh/ZPCvBEQAJpa2M60clxtodJtm+zkNM33mjdaXPdYcLWXwn8qaoorsgy0TOsgNnJH+WxZ/ui0+ydN+oGil00GCDVgS80k3PodApju/uZDcbmqkjFZReY0lgK++sP9INPw3AhVQ0BmvuUbQnJbp6B/+zt1inVrwCqizAhfA7YIyfgJN/Sp9jQJHdw9T0gQ3EN0tvKqfRx7bphaR++w7xUu6GuWbeLlihLHYSZFRZNovYE9tRDB2ngGJPI6aFoiKq0mKk+ZZhsTjjrytVazdy5SwXPfOWwmFf9mGHDETg9oj2KdROL9yFBh/zdTaj1A4H4CV4gNFMMkh8/c3mPBYkdnp2ycCTvzE8ijdYsKiZ6MizSmfJFeDXT6RZ9TvK3CIlYJcUoJReaFVqC/PSB5fk6thv4MIQSTxhCfZNlDBfRCuzEdfg+mLW5bpdLmrBpO7j4p9H5PSSAgp9O5mxLH9Z7JkwCIKZPERWS3bIMwaawYwH6mebpx/jCKb+X9s6hr1vGYE2affABVseMiROpfutmQBEKNhEt3+toiChZilgXMmQHeiUUG2CP6diGZSYbAxmDnC+4EzvmJ0N1WtJFiWlA7LaQzjDGjzyD3oHxx9HHT8j/lYMUcaxznxes9qzbh89ih5xkmQserWgGewWIRRfEvmv3bfduqqRdaP9aFMTHWDEtx86gAmDAUICVUFfrePldcJZP8mvjBTqK6Du/P6ZRM6350xcbf1AFrS95KjNMpgJxWygXmteJYJ+AtlnPbB6yC1CZiczBnM9XjXaZiiOQz+tpi71TBJmX+KBdweoT5JuZN2eyfI+pwXPspkVnwFWuSVkjedWzfnLEMvf4FhSSbH3oA1tDULFfXiCjLgwgV/V/kIrzzzNB8seirilbved28S8tzSFy0az1nD6JuL/nNF2YTH/Y9HMuuuVwoHRRiZmawiwaQlN13435BUQ0lQdp3T8I7Ih63CGFILZCVzHMbgnSwqAbiSm7jxQ2cWmmgp82OOHmHIKI26lJT9oOa233JxiegsJjXNcNnUqO+FqAYnnqOFAg08wiMwAF+DFX1ytqvx5uXrxaD66cI2R8jyaAXsr/qSi7btiiOFKENcyfkpDt7+dSwmuRRb4bw78KDmEMCAxDebEP+HktzkTGnLepI1RrFyKO1yWi4wIegrQXrrTsiPSymWMQ3DsqtOCN3TwPn X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c3e4a3a-1302-40db-d362-08d91e5f27e9 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:49.1676 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WdObPAYyTgy/l5667bo0MCdbONRyBwltECdFwC2de6gk3qriLjES5vCH3RvLvuxR X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.111.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Now that we have moved cpu-dump functionality out of helper.c, we can make the module sysemu-only. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Acked-by: Cornelia Huck --- target/s390x/helper.c | 4 ---- target/s390x/meson.build | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 41ccc83d11..f246bec353 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -27,11 +27,8 @@ #include "hw/s390x/pv.h" #include "sysemu/hw_accel.h" #include "sysemu/runstate.h" -#ifndef CONFIG_USER_ONLY #include "sysemu/tcg.h" -#endif -#ifndef CONFIG_USER_ONLY void s390x_tod_timer(void *opaque) { cpu_inject_clock_comparator((S390CPU *) opaque); @@ -322,4 +319,3 @@ int s390_store_adtl_status(S390CPU *cpu, hwaddr addr, hwaddr len) cpu_physical_memory_unmap(sa, len, 1, len); return 0; } -#endif /* CONFIG_USER_ONLY */ diff --git a/target/s390x/meson.build b/target/s390x/meson.build index 6e1aa3b0cd..bbcaede384 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -4,7 +4,6 @@ s390x_ss.add(files( 'cpu_features.c', 'cpu_models.c', 'gdbstub.c', - 'helper.c', 'interrupt.c', 'cpu-dump.c', )) @@ -23,6 +22,7 @@ s390x_ss.add(gen_features_h) s390x_softmmu_ss = ss.source_set() s390x_softmmu_ss.add(files( + 'helper.c', 'arch_dump.c', 'diag.c', 'ioinst.c', From patchwork Mon May 24 02:52:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275375 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 EAE35C47080 for ; Mon, 24 May 2021 03:02: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 712B460720 for ; Mon, 24 May 2021 03:02:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 712B460720 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0qy-0005at-HR for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 23:02:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jC-0006qm-6q for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:02 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:31506) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0j7-0003U8-8N for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fzbkg690dkCOikJCLOaHbr0U5s9Wb53xAk+ckmOce+c=; b=Cy/o6Km+BImmgULY0i0gDw72+tSKcExMus1e9UFuovdFX+Jz4zlRWDULa5isHRDieEsniU 7unbe/r2264O+IcfpA0W0T0Qy3+PEtaxUsn368ZYKk7h7RzohEyaocOl2k+JJTc+JYJBm6 zJFfJz/mSbVqzW/AeEfqXbVnygryTK0= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2111.outbound.protection.outlook.com [104.47.18.111]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-39-_QBC8zpQMwmmbixbuniTOw-1; Mon, 24 May 2021 04:53:54 +0200 X-MC-Unique: _QBC8zpQMwmmbixbuniTOw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DZflUj24px2tZZUR+L1ai5eQ1Q6jJXNNkiLfq9auC0uozJoAj+PMioORI7jRYkWrRalO6LJsHoD/vsyuw1DwQ8s7oqfMGRUP7UEvyxjI66cRfahkmFr11mXh5fEjcTBchnWU+TtUXVi+GIJPzCuICt0pHDh/X4wwVxt/XaxuWw3+fB0EG0oC/xumN654wZJsdopz8wZ/WFyivezgJHxNZfZVLz+vflCqY/8w5FDSMx2DYwDSojcXjApVG+wtP6CTajsTRJ3CHEVJe07SGzYa+Pysw7TEHIvaiCosp95dTFnZNzSS0L6IyQh+IA5UOWduSnmJr1N6SJtNxfeEaGaXHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=znd18hKlQ68bGgc9PoKO8PlkjrpRpyXis4DJZeKfBx8=; b=X4QCbkHtDwMWYqxgv8e2wG9er+dmW7XYKOeS0MERJZZ4jVYx4JayY5Vc6XO8pf6KNJpOTgqCSG6c8YgFZIo9OPWRcCIrI4HqMqPn+Wt2doehx1wt1RCS7MZ4kIGe12t3bP9HQrsfgQrGlXnDc2OlvCqGKp9+1FEL10w1RFZQWs5ZZ9UtfAh6K+tmTgsK/sX2iBajsyIYbacA0oL1DfcMn6ddpDvKxFoNZ/b1+aiP3S5aQ6Xna7+fP0ncyHWvP1rvrVsVX780yIGGaIq8ezXCYa6IgRGdYRk6klt2Mpo+vFb0+cWAtJ0OJ8H1Nu0PVq3YOsBddugyGH7We1TTfWhW5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:53 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:53 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 10/14] target/s390x: use kvm_enabled() to wrap call to kvm_s390_get_hpage_1m Date: Mon, 24 May 2021 10:52:52 +0800 Message-ID: <20210524025256.22252-10-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fd8648fd-e158-4653-0870-08d91e5f2a3d X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2276; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ThpuOpNvIeKUzXBXcRVtN8b+efB6VKlYtVy2ckS4uzMl2YSck8bSq0tu91W7PHj6oHSc7Q+bhA4iMtzWAYvoC78rvvlLFTS9Eq3DJD44hASTQxy9fg4HUPauvZPzjtW6MTPgdS26xgcOImO0DlAB4cjihQbnIS6Js1WPTCCVvk4fWZNOzb7f3faJCLIoWW2tqXmCifWWAZZRMsBmMOVWg9YNPPIkZSnTBvYSr3W9JCQO4lstVwKb9FR7Q318iJrqIwvFUPZ0087b7++1GOftn4uRX1eneKBzj9Fb7NCeb8i3lw56/6osXvRqgyMybkCPwhZ/YOxqNZ8APPFSRV6vm/VzKLKOoo9wRzzBHvw3TxH/37TOkuMccfAAdplZ3q7ZYbC0UFfXCa2pXtvtYeK5xq9OxEQaHxgU16dosPeJ3G8DZ574NT8UC33nroDKlFxRnQ5ndpSUJZdStvV0tTwYgrEXOscn7fnjJ/6IyT+MQeawpeYyiuSUQWwVpEyzXm5h18j/bRlXxIMdZabc3svyX/M7sHLHDMLGpSNdag5SAQwmh99LrIGU8uRZDYo9jebfD2yrij3j9l/tvdiYcVg1wCaOSYcUN6mPkR78glz/xrktg+kA16UnW0Aju+iyu1+Xf6PcNYTGho4177AAhu2ffVkO33QJakUFlSUmNUvxGCswowergUrhspsHLXN8ynxX X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(346002)(136003)(376002)(396003)(39860400002)(36756003)(316002)(66476007)(38100700002)(8676002)(38350700002)(86362001)(52116002)(478600001)(66946007)(8936002)(1076003)(2906002)(956004)(26005)(6512007)(4744005)(16526019)(6506007)(186003)(83380400001)(2616005)(6666004)(4326008)(7416002)(5660300002)(6486002)(107886003)(66556008)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: THYB4Jp/Cd5U3+/9UVGC3B7GnejStqRtyaHIJPsTlfRgnSiiPfdyLHKBLgnRha22X95spIy/WgEf1FmqwQLcsDGb7KyB1M5twvArY0Km/tXcJdEHaMxt/Xr2WkPHgUURnl9EXsocc76OANxNrGjhgrlXjaOItpvFU+1GiRLGP3hXDt9qT8FRnQTylwhedTYWa0MCpXfnTZayobOlpQA4zPmqyEKHIaBqSQIRskX9euRd22GATvjxCqEPjtkfOrbWgYvf9+oPgtTpXji2ZxnqF75aFySdxOoNBw5rGiEPG2Bhd6YCpbPDez2J6BmxQ96JgpMzyE34kmIqtnEFG33MHjSQmkQD4q8jrA55n5uu4miv7ZuUeHAUs6L9H0q0mipNGtjBiF2FBHPo9ZKLmeAZRY5IEqoOYDVZEzdHHn3ayL294BsdYMgAgXVHyrHiq24auOyGh+F4OfQrEkt0f1g3xe2r1PjIsvf25U71MSMQMrgRuhDiJlzWM9Z/eroHHcmTZ16pEmVaK3dfG1pTaztF7KSiCRlF0uwF2lHr6PHJc2O+BjuA3GZxgaCc2H61pqN4qLKkMuLf6eTEPhVmojqeeylMqLU05GM9j1XUK7iN/qhu01gH/ZReZQhCuqlZoxzCPo/I1QAxRD4zqCmokoxGZo1A72Szq3AI8pM8/YzgW+fRmyqGjq7dCqfh5rL0d5fpo8Asd4+z4yxkXWI4aTMlVPKmmkz0yrt42mrFTQpIU1h9ENwrcF5uZUYBUntzKaCQYnKpQU4U1kbPyiXeHgIhPBR06OHtlQvGZcQ0o5h4Nr/eHxgC34lbQ1mwKRPzaVHe7VMGnOf2yHDsY8voV5YyfXY6NKyJbwawMlwcdV7CweZl6IDXAErr74Q+hC19M4p7b4j/aFKAfSMUhMC8SBmo7DJ54OETQA/zc6QNicrj57xKYAtMZfEXy8skyUJ0ATDP1QjOahmvCUvmmrRntvB8JxYWac/kM2KwOSeJQOsW0Y74DO4SrVqBimG2cYMLFgOaZP5iahVMo0eVw1VVw3q4ZfmqKiHoJ76FiD1CeICHqDOXqUqBm1OlOlyofsm3TxClM1wWwIqcP9KBYMfLpZprMtMCjfD4ymDOH15pw1SMFuF/kJXjcj2kgHjHXS2hSSvdRnInokenUmhfPv12yj2qic7dDWX/l92i5dTpd1qULdD5omFpEyG6IdNPhMGrtRxc3JaHoJJ24Er1zQ6gFohAx1SPO2J7xFCJkSAyCQdVp9rcl/i3RLhOd7uu9vMzxUe7y0GbifCgrONbhbPmBC3guw1gMEzioiBSt6BPnD/gMqS34Lj1+dmS0sMGaoz1Jchu X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd8648fd-e158-4653-0870-08d91e5f2a3d X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:53.2523 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NuaNjHmRiAcKv54AML/zjQten3+Jweavs/bkqxlNIesxeH+9KB8Bd7Su5Oihp3Yv X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.109.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" this will allow to remove the kvm stubs. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen --- target/s390x/diag.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/s390x/diag.c b/target/s390x/diag.c index c17a2498a7..8405f69df0 100644 --- a/target/s390x/diag.c +++ b/target/s390x/diag.c @@ -20,6 +20,7 @@ #include "hw/s390x/ipl.h" #include "hw/s390x/s390-virtio-ccw.h" #include "hw/s390x/pv.h" +#include "sysemu/kvm.h" #include "kvm_s390x.h" int handle_diag_288(CPUS390XState *env, uint64_t r1, uint64_t r3) @@ -168,7 +169,7 @@ out: return; } - if (kvm_s390_get_hpage_1m()) { + if (kvm_enabled() && kvm_s390_get_hpage_1m()) { error_report("Protected VMs can currently not be backed with " "huge pages"); env->regs[r1 + 1] = DIAG_308_RC_INVAL_FOR_PV; From patchwork Mon May 24 02:52:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275369 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 8E576C47080 for ; Mon, 24 May 2021 03:00:53 +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 D151061159 for ; Mon, 24 May 2021 03:00:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D151061159 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0pn-0003Kt-Pn for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 23:00:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jN-0007a0-Ir for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:13 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:55103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jK-0003VR-Ly for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=76b8Wqy6Zml+C01NGUHz1nC9/DYmMhOCnRk/jxZzevA=; b=F2TJCOHneMpi4ZToOL/N1crrVEKJAGqGOvOpafhfATjymaPMDt5UfsjCzDcF9IbHgYkdh0 nt3n6dCK3Ni1ZW2woNLFB99AafA1V8J7XJKScX/0IYzWGqy0XeGk+O7TxCjOSJKBFZ1SAe bOsbgOSQl+mGf8WLPXcAJRPB8NJ78Bs= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2112.outbound.protection.outlook.com [104.47.18.112]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-30-KcmUPtLWPmOJ2QVDbOP9rw-1; Mon, 24 May 2021 04:53:58 +0200 X-MC-Unique: KcmUPtLWPmOJ2QVDbOP9rw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eCpPj2mKeggJYRElhrUdEVtuCDE6kfZw2SEt1JVEjBOD4jhD85FZ6pBVZyOe8KPox9iXgPmHZLRNQN81F8wMCROc7X5+8JCUuNKSUIdH/QrxvapLppSzooDjzgeG6eSgBipxInVH1eWc3wjai+Jjs8NV8yd62Gu5hyzYVlow7xPXVDLtTQPuL/R3DvS9J7P2Rm5aCp1e9E/h8/DlVzqyguycNbdG2nLB5Tc0xWVBUEyGU5VH0Kg3lQmgtl81Efbs70VZqfMemu+WiP0EPcSxtULkDeeoxywK4G9RFBqv6acj3SNik+HIkxrFQeNk+tPN8P2wRvoX5ySYcfmw4RGopw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qqggl0VRmi388Te4TqDKqGG0BgjdcmaeFMrbkNgwbeo=; b=EbaU41Tq/geA0hKNU0sd/2UI8UUizNRh+/LsEBsDctQHme/o76siGRU6riQk0MUD0+l/00n1bicQUogzVjgrgYhYoGWSuhA6rS2efOnMnP6K3uEXJCr7rJgq7Nh+pbQAq4EhfzYEtJYkxKbiL0jnGzGF4DHAQDAyjYvJXgj/pqoXiLpzvO54oCwz1lpjuwqqJqL1WGA35i2vqK1Gc0QI32mbK1jIwvGgYilX2tZhP/2HOu/gKL1GX3WMfzlzfWlo+D+F0oZAYZNlXdhUEuJV9X1i5iO9o7iIL8qNDH75OsrJrQ0Eamgcu8VwRw0HKaZXiNIvZTZJkhP8PSmZf5w7ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:53:57 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:53:57 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 11/14] target/s390x: remove kvm-stub.c Date: Mon, 24 May 2021 10:52:53 +0800 Message-ID: <20210524025256.22252-11-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4b34ced6-6ae4-4fbd-d013-08d91e5f2c9d X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3383; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ensamxm/HoC7VNFZga/l3EulffK9ewoW2j885dnQof476kyFfMG+qeC1c6obl4C2Gb+lhJdbCAp3hJbcd4ZckgIZtRFDTHD86Ax5R7i/VEk1AVXRKAK+Kwp/tliT1Nfs0N6aVvYcsoS/Fi23xdNwPfA7gNeKTBrjI3Ix5Tuq9lgnBnLPFIaYwbpFefrX85hKiDNUlBhkIVh0qJXi+skGF1OJAhwe850yNn9N4SY5ERyakNb4gOGv98gZ3NRPEkCx64CVEZyCtJ/r27kjzwqqRHfRR+ox70czS2TX0FnwziE4gWkWsbtAAMMGTVw8glcLYhI/Hmwj6EaeWqPmqewa59Ud42uhJjRbEgjJPUwxLDWbwIWwsLiRIUgg1JwniI9Ti/vNGQwqRyOLwH5cfLORNemiicJWbbw0fCdOPo318jgsQG+U934Rk22X5OiaNNGA05Ppn0MefK5kWyoYRrJE9Q+a0Bq5kIYdlfDzjjxj4lB83xs/hFnMwbN1ltxbaD+EjlmbY7b1+2nyTpzQr6zpY9d9/fBvRAmWl/hOuzzHAATtEliKy5RWJ9hBIAWAGUBzoa5yleeiNKVnMFZv7yZ8boKufxh+KUaESSZW0VKC2n5pfepSQCY8fJhw2raGvZ3gSQ/D/dS0Z4M5DQZYWir8+XE127Z9oJh2VXx4ZSeBmspCg/41Qvwg9tH+AFuzSOL6 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(346002)(136003)(376002)(396003)(39860400002)(36756003)(316002)(66476007)(38100700002)(8676002)(38350700002)(86362001)(52116002)(478600001)(66946007)(8936002)(1076003)(2906002)(956004)(26005)(6512007)(16526019)(6506007)(186003)(83380400001)(2616005)(4326008)(7416002)(5660300002)(6486002)(107886003)(66556008)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 1+lrDHIPrOmPzoB7ZCh8Tk8i0Q462koQH6rrzhRy+Mnh9KtUpkFSQI8YYHc8mN9k3FE3i/mBTQhU7Y8ud/LD84gw21CL+bMks78bCf4Fa+RQI1OF4rMkYo1xj91/Zre878hV+mjOKmTYh688IaElCaWHrwvHTO4dqrkVfGr/s4Wrj/qk8kz8dvmXhUCnQmE2PftA6Xcln2BdQ4Yt9T7HP/HZDqxgq4DWq1rN7vhtF7WK+VyEZ0lwptTBnyBtVMlC2aLvBL5sBt3FKpQsskcHiY7BWa4nQ2zyCghC6l/XiaNfA5Uz+jjLD1oQhUaB1P4TYg0+loTtUuA7uuqghMiM6D7qpMjDcE2v0ROhy/EE4BHwcdm48Uagy4Ho0KIQFhNjIxYVld76ylP3O+ZJ8IMrahdwllKHUPl3l1qohoZA8T9a2ITbj8BkALElmn1zmaYkRNE3BvjEzGN/XsOsUgNhwTpbHFP/XcZEeVnTzI+Azl5wVLHAejKFEBbA0122yjGViKRMas7SGZwB5CmKvMBh4+Da7GM8nv/0BzAZ6wQiJtNYjfSqbG8WeYuFR4lYFwnQ0e7E4pXvWyyCbLNBFmla5AWz0TMncX40WxmFSBEywxOZs7DzZI+t+3k//ET1QLqvhxin6uv42w9+4bbx/Y+qRaXamXe5ysdA9Elw3Q7pVeHnRjOmEOPTpmO4eKgbJLtHUYGyp4NRALWuiTyyc7BHUGwtIvCVhPl3O/EQGUUn5ooDAoJmXxk9fuXmmZQFE4PVTSd1zEvOkiRXU5swnEmrMbJ78RUmunqPbDyKq2iJKy1Lx6lYs6M4sgXTLUUrp++kVvT4/qi6Wa5j1FMBCC8QwsHXDA8X5MiTjF9bvTj566+3kvsiFG0AgsbrR09oxtD+RWclFyU8flVR6meBmdV9F6313p9QtiaGlFuKNtTl+q0P/gJMZGMcCNa3OGgWx7hxdH/hOsPJhru8VON6rMxVcZhuVqQS3WtFfALN7//NCgUfoX3kH8zYc25CTq6izNddAosgcypBJGpBpFcOi4tyuJE43XgJaqAtfzpBMmFIhl60Rnwmo3/7pqKyOcLbwGDNcWhkCTwb3uIz7lVz8aLmuQFBb2SdB3dU9JajHbnRgql8hRIKTInUUgmiWWzBcswvEXaiHFSDSn6JeW4eVYMJepcql+8Iv0BeepQozKjLqqnibADny2DSEyTahWQQGRWJM8+f32/r6LHyEMLGArUeuzFYKbhOHrzc3Zp6EhrhqE2gsjy1dKL+kSydPUQV+zh0JEqlwHu6xP0XLtkKSVwgPPchpDSeF5Llhzy/SRtraoLkzH6X8Hqu7m0hadcrZrVB X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b34ced6-6ae4-4fbd-d013-08d91e5f2c9d X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:53:57.0461 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Iy6f/yMV4hiTVwPwYJoVeiAICjjPdHm9owo6SH4PoBOGxoVpMdhJgCmbzHDQfmFS X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.111.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" all function calls are protected by kvm_enabled(), so we should not need the stubs. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen --- target/s390x/kvm-stub.c | 126 --------------------------------------- target/s390x/meson.build | 2 +- 2 files changed, 1 insertion(+), 127 deletions(-) delete mode 100644 target/s390x/kvm-stub.c diff --git a/target/s390x/kvm-stub.c b/target/s390x/kvm-stub.c deleted file mode 100644 index 9970b5a8c7..0000000000 --- a/target/s390x/kvm-stub.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * QEMU KVM support -- s390x specific function stubs. - * - * Copyright (c) 2009 Ulrich Hecht - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - */ - -#include "qemu/osdep.h" -#include "cpu.h" -#include "kvm_s390x.h" - -void kvm_s390_access_exception(S390CPU *cpu, uint16_t code, uint64_t te_code) -{ -} - -int kvm_s390_mem_op(S390CPU *cpu, vaddr addr, uint8_t ar, void *hostbuf, - int len, bool is_write) -{ - return -ENOSYS; -} - -void kvm_s390_program_interrupt(S390CPU *cpu, uint16_t code) -{ -} - -int kvm_s390_set_cpu_state(S390CPU *cpu, uint8_t cpu_state) -{ - return -ENOSYS; -} - -void kvm_s390_vcpu_interrupt_pre_save(S390CPU *cpu) -{ -} - -int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu) -{ - return 0; -} - -int kvm_s390_get_hpage_1m(void) -{ - return 0; -} - -int kvm_s390_get_ri(void) -{ - return 0; -} - -int kvm_s390_get_gs(void) -{ - return 0; -} - -int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low) -{ - return -ENOSYS; -} - -int kvm_s390_get_clock_ext(uint8_t *tod_high, uint64_t *tod_low) -{ - return -ENOSYS; -} - -int kvm_s390_set_clock(uint8_t tod_high, uint64_t tod_low) -{ - return -ENOSYS; -} - -int kvm_s390_set_clock_ext(uint8_t tod_high, uint64_t tod_low) -{ - return -ENOSYS; -} - -void kvm_s390_enable_css_support(S390CPU *cpu) -{ -} - -int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch, - int vq, bool assign) -{ - return -ENOSYS; -} - -void kvm_s390_cmma_reset(void) -{ -} - -void kvm_s390_reset_vcpu_initial(S390CPU *cpu) -{ -} - -void kvm_s390_reset_vcpu_clear(S390CPU *cpu) -{ -} - -void kvm_s390_reset_vcpu_normal(S390CPU *cpu) -{ -} - -int kvm_s390_set_mem_limit(uint64_t new_limit, uint64_t *hw_limit) -{ - return 0; -} - -void kvm_s390_set_max_pagesize(uint64_t pagesize, Error **errp) -{ -} - -void kvm_s390_crypto_reset(void) -{ -} - -void kvm_s390_stop_interrupt(S390CPU *cpu) -{ -} - -void kvm_s390_restart_interrupt(S390CPU *cpu) -{ -} - -void kvm_s390_set_diag318(CPUState *cs, uint64_t diag318_info) -{ -} diff --git a/target/s390x/meson.build b/target/s390x/meson.build index bbcaede384..6c8e03b8fb 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -8,7 +8,7 @@ s390x_ss.add(files( 'cpu-dump.c', )) -s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) +s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) gen_features = executable('gen-features', 'gen-features.c', native: true, build_by_default: false) From patchwork Mon May 24 02:52:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275373 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 CA601C47080 for ; Mon, 24 May 2021 03:01: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 25E8361159 for ; Mon, 24 May 2021 03:01:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25E8361159 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0q0-00045s-7L for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 23:01:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jI-0007G0-Gi for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:08 -0400 Received: from de-smtp-delivery-102.mimecast.com ([62.140.7.102]:46401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jF-0003Z5-GQ for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b3sCT5W1tBvZkvq+lHg1ihKqRhVk0RebQbBrsneV9L4=; b=jmPpW2v0cEDqfYLSIKYr35HDhkfCA4XiLsfhjzzoeLH4E2xamtYejmsnn98oV/oTx+bXM+ iletMqKcfho7OX5JtzjgE1rmURd8vKCUOH6A/nN5Xn/oz8Ui5uvM0A8yTlNqempoQeCjmE mHA3BBj+CbSYa5Luke6ooZBmac+3l4I= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2104.outbound.protection.outlook.com [104.47.18.104]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-32-Z2xfQf4pMGWfBfIB9WZ4Kw-1; Mon, 24 May 2021 04:54:02 +0200 X-MC-Unique: Z2xfQf4pMGWfBfIB9WZ4Kw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G2iXoxVwJLcB2hJkB7SCSzNaxr3WColN3dZqgfmhpqCXHCA3lJVJmWCOqrKim+YNd0DyAJWOwrDCjgXjckJd0jw4719xtarVU9KzT4xh69VlRWewGsA9dADcz6Oli6AptGBmsIhoajL+jz6ilyh+ntU198uDJFlvF7aw4eUV3FjPLDseWYQh82X48G2NV2mLk0p8z2/JHGZq6FdXDbvqk0i179iYWP8/kDuZVEzOj/KfzKI/znURYtuRM+NTKVp4jZZkkSEFifMB8nIkxd1sS/YQjWmUTspO85SYxku/GXNX37Tyaf75bPT2XxG2+NOIXuYMcMmtZOAmro7KsWpzeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3n0ZTOG+dRJKW2hny/Jzx4s5h2ksWeT128zuVixM5OM=; b=H5gZ4PtFaHnTukxtgj/QKs/qCs7gte1/gnkCC+HD3qOoocHtq97ZA4EBx8veGcZu0D/vXFtPrTS9zhHy9WqLdcT9rattyJWF1aVTPq8ADRDKvwvsLkenvJ2aoWmHKSqFWQVaH3JVWPoOJuF8LQLBe34YCLILDpzt3hs+mbW9ipSzri2aYZalpVbwNTy5ymjokSBDRBaKoeRhXCsOrHtn5CbrK4jhwo8OibSuxLwRiQ+eIzz2lCPMFYmxSGRSLDt2wtSykn9aTfs3QCHIWP23hha7mNVsUh9BtY92Pj8hHaky5mlRQANSbSApGCUsvZsOv+LsGpsY3d1+mhHaleuc9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:54:01 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:54:01 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 12/14] target/s390x: move kvm files into kvm/ Date: Mon, 24 May 2021 10:52:54 +0800 Message-ID: <20210524025256.22252-12-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:53:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 828365d6-18c6-40ea-085c-08d91e5f2f01 X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1417; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4hjzSkiPS0ciwEaAQi7Hpt4vbyQQWr2M+N6NI4PEIXT44PvoxrBRgg8gNE9/ctlJOjMNcQnyr5tRVTI3xxy0+8RCg71Ui+7KIlo9oa0zxYMea3up5MjSzoEcOp5WmQaKxhkf6aJn2pePC07KNm6zf9onUqUd6SJy17/3jAZPIWNq3uCYti6M46Sw3PL94XB91KVk21FQZgqMZbGl/WQHsP7FO8PpWRGwrtPye475IHZvq/wGKtySAftkMgbgpOuTOJeXz4U84pISRIgyh1LXiLEzPyLD+w6oicJiEPNM0eJTzhmyeA2H08iz2iCy+kqmbIIJnhWbfhYb6lRQem3MMjQxH4sqHpR1sZ+UKhw2GtqW6v3eCr3xr3LM9n68lR6tOA2fFXuR2WHxhOUleHGlEpJnDrzKDVtkNRhHTXNBwkUeKtz+gFAk8oSjbUNWuwuqlswDtXEtcv5MLoGk+4oHYqfC/70n2f7x0m3fcU7gx/0GDQLiiBIEPgKcsSnmPCKjgC45CN+Dg5qHVDBl+h3Ai8s1goHV+ilx7Fy9g2lrUCE47uzECRckY28MRxijBMD2qxOyKoBRmXFdwQXcZtYtTA8aFXuN6WGJSG5HcudScDbyPwkZlHhZD6pivx4DyUs/DVe0G21AMjQLckHIwXjNF+TSV1/phSm9Wk416xOCgAnp45a2T0SLxz0UqeF61Y0W X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(346002)(136003)(376002)(396003)(39860400002)(36756003)(316002)(66476007)(38100700002)(8676002)(38350700002)(86362001)(52116002)(478600001)(66946007)(8936002)(1076003)(2906002)(956004)(26005)(6512007)(16526019)(6506007)(186003)(83380400001)(2616005)(6666004)(4326008)(7416002)(5660300002)(6486002)(107886003)(66556008)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: A1FhjScysj5iYPQ57cy4QKJOIRvliu22Cf1QkUxnW72Hk17QiMqzEEyuXkpgZL/JsUH1w+qD3OkZHPCgRQYGfzkn3NSh+BXZbYg+5KF+VOmbIFNecj+zNQDWjKqVoUP2uYBV2FNfr7c/wrjsjvY+bOWdhRoVx2BXDDgyRn6l5nwgu09yH5tvlBXAmxVPQWBWec9EeWtzuHB66wIim10xKwoeZycVVuE/LY/Dyy2xC1U2l8eJKJ6MtiqceeSRVF5hWkRUi3tcXjfjKFMrhYlfvyDA+qvLFQNJN7GGJXwMXsS/1aS7OQDssw4RCczw5afNrf9T308leA3G6pKrNtDFWI15AMugdH8NsuE/hf/BB86ul07DDcI0hR6algeJNdJIAHbXZgpzlGsVk+/G17zGkqK3o/VgkQdghfa9T8rlPGIfz+8xz34TRDe0PfFQcrNTSdfdZmaBhr+L1eAXZkZ54caFdWF+Wxr8+M29/e/a+nESSVpVpejfwX4lHp8qH4aVZjykyXL0PiMZbJHfZ+gv7tjIz4/h/aACLuLJeAUzvWPNLbZkiZVJZsPEA7mPhi9K9a4VFTgfxzv2lgmmw/2NIDQzXPl5bkxNW51+WdTmIYThEqp+I00UEpGnJHrdz1VBQJD+YRg2gg5kjUgg7tVZOOFmk2B9vpI8fQnDsrIpkE4oYZM27Zwkc5NSt4TjDWtLBOZmgNBczcChgPxWZbNrGAIbysTjszPby2iCUThrraI7UgeUyGDzJOY+/weaQSOQ4FFAqVHpSC2ltJs3WBzZU7D0h5iAwIWshQSyx1fk6vcD0dYdmky27WHJjttfdBIImZw3dViNrILs3G0gQrBAsymPCmLhBFcjk/Z7ouxfkhTZS9s/2IaQfv7L4CUusrdt9vuXqpqmhHhDCL5gaJ9bmkwku7mGCGrDqH/ASpP4SRKWqhz25a68skercid43CyG0hd2MgTmOHkL7TgLoxs8h9qrz0W42zm4Id/VAb+YZ1TkIMw5NTXv7qT/ASuooBeHv/SdyjGy3Y0EveDlKs/00P7/5RjQ6yH++HaGUb2F71X5cPdWXoroXXzgJmH0u7Wk5m+TwxHNoI52oSEk4RtoqPJrukq6x5lS4Yz50faLUOwxRuzdAGhYQuy0catwN7FojOz0/iiZh/8HXQYIEFChFhlGXIRn49pBOvLQWj10NHWt03vKxqNM9xjkDb5U3xPheFtEtsJSeNkDWF4PQVQYuhugBc8QYL2KRqxr3xB7BCfWv9JSTHxH0WsEu1kCWTKcZ73BOZjnrVmgYZf2h6Fnv7qWJZYrOAVP5kLOl/JIQyjugZSBxlXAroPCK/uBdAwk X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 828365d6-18c6-40ea-085c-08d91e5f2f01 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:54:01.2297 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: x+IDln6+0Fh/Xip96mUn8Gqs3YFodfBRuQKNzEul+PbhORt62Q7cYzlBFi9oobkK X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=62.140.7.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen --- hw/intc/s390_flic_kvm.c | 2 +- hw/s390x/s390-stattrib-kvm.c | 2 +- hw/s390x/tod-kvm.c | 2 +- hw/vfio/ap.c | 2 +- meson.build | 1 + target/s390x/cpu-sysemu.c | 2 +- target/s390x/cpu.c | 2 +- target/s390x/cpu_models.c | 2 +- target/s390x/diag.c | 2 +- target/s390x/interrupt.c | 2 +- target/s390x/{ => kvm}/kvm.c | 2 +- target/s390x/{ => kvm}/kvm_s390x.h | 0 target/s390x/kvm/meson.build | 17 +++++++++++++++++ target/s390x/kvm/trace-events | 7 +++++++ target/s390x/kvm/trace.h | 1 + target/s390x/machine.c | 2 +- target/s390x/meson.build | 16 +--------------- target/s390x/mmu_helper.c | 2 +- target/s390x/trace-events | 6 ------ 19 files changed, 39 insertions(+), 33 deletions(-) rename target/s390x/{ => kvm}/kvm.c (99%) rename target/s390x/{ => kvm}/kvm_s390x.h (100%) create mode 100644 target/s390x/kvm/meson.build create mode 100644 target/s390x/kvm/trace-events create mode 100644 target/s390x/kvm/trace.h diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c index 929cfa3a68..efe5054182 100644 --- a/hw/intc/s390_flic_kvm.c +++ b/hw/intc/s390_flic_kvm.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include #include "qemu/error-report.h" #include "qemu/module.h" diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c index f0b11a74e4..24cd01382e 100644 --- a/hw/s390x/s390-stattrib-kvm.c +++ b/hw/s390x/s390-stattrib-kvm.c @@ -16,7 +16,7 @@ #include "qemu/error-report.h" #include "sysemu/kvm.h" #include "exec/ram_addr.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" Object *kvm_s390_stattrib_create(void) { diff --git a/hw/s390x/tod-kvm.c b/hw/s390x/tod-kvm.c index 0b94477486..ec855811ae 100644 --- a/hw/s390x/tod-kvm.c +++ b/hw/s390x/tod-kvm.c @@ -13,7 +13,7 @@ #include "qemu/module.h" #include "sysemu/runstate.h" #include "hw/s390x/tod.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" static void kvm_s390_get_tod_raw(S390TOD *tod, Error **errp) { diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 4b32aca1a0..e0dd561e85 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -21,7 +21,7 @@ #include "qemu/module.h" #include "qemu/option.h" #include "qemu/config-file.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "migration/vmstate.h" #include "hw/qdev-properties.h" #include "hw/s390x/ap-bridge.h" diff --git a/meson.build b/meson.build index 1559e8d873..37be2e60c3 100644 --- a/meson.build +++ b/meson.build @@ -1863,6 +1863,7 @@ if have_system or have_user 'target/ppc', 'target/riscv', 'target/s390x', + 'target/s390x/kvm', 'target/sparc', ] endif diff --git a/target/s390x/cpu-sysemu.c b/target/s390x/cpu-sysemu.c index 6081b7ef32..f3c1b4845a 100644 --- a/target/s390x/cpu-sysemu.c +++ b/target/s390x/cpu-sysemu.c @@ -24,7 +24,7 @@ #include "qapi/error.h" #include "cpu.h" #include "s390x-internal.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" #include "qemu/timer.h" diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 59efe48bcd..6e82ba73cc 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -24,7 +24,7 @@ #include "qapi/error.h" #include "cpu.h" #include "s390x-internal.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" #include "qemu/module.h" diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 4ff8cba7e5..0ed1c23774 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "s390x-internal.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" #include "qapi/error.h" diff --git a/target/s390x/diag.c b/target/s390x/diag.c index 8405f69df0..76b01dcd68 100644 --- a/target/s390x/diag.c +++ b/target/s390x/diag.c @@ -21,7 +21,7 @@ #include "hw/s390x/s390-virtio-ccw.h" #include "hw/s390x/pv.h" #include "sysemu/kvm.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" int handle_diag_288(CPUS390XState *env, uint64_t r1, uint64_t r3) { diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c index 734f0c62de..5195f060ec 100644 --- a/target/s390x/interrupt.c +++ b/target/s390x/interrupt.c @@ -9,7 +9,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "s390x-internal.h" #include "exec/exec-all.h" #include "sysemu/kvm.h" diff --git a/target/s390x/kvm.c b/target/s390x/kvm/kvm.c similarity index 99% rename from target/s390x/kvm.c rename to target/s390x/kvm/kvm.c index 2a22cc69f6..4e47563faf 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -27,7 +27,7 @@ #include "qemu-common.h" #include "cpu.h" #include "s390x-internal.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "sysemu/kvm_int.h" #include "qemu/cutils.h" #include "qapi/error.h" diff --git a/target/s390x/kvm_s390x.h b/target/s390x/kvm/kvm_s390x.h similarity index 100% rename from target/s390x/kvm_s390x.h rename to target/s390x/kvm/kvm_s390x.h diff --git a/target/s390x/kvm/meson.build b/target/s390x/kvm/meson.build new file mode 100644 index 0000000000..d1356356b1 --- /dev/null +++ b/target/s390x/kvm/meson.build @@ -0,0 +1,17 @@ + +s390x_ss.add(when: 'CONFIG_KVM', if_true: files( + 'kvm.c' +)) + +# Newer kernels on s390 check for an S390_PGSTE program header and +# enable the pgste page table extensions in that case. This makes +# the vm.allocate_pgste sysctl unnecessary. We enable this program +# header if +# - we build on s390x +# - we build the system emulation for s390x (qemu-system-s390x) +# - KVM is enabled +# - the linker supports --s390-pgste +if host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste') + s390x_softmmu_ss.add(when: 'CONFIG_KVM', + if_true: declare_dependency(link_args: ['-Wl,--s390-pgste'])) +endif diff --git a/target/s390x/kvm/trace-events b/target/s390x/kvm/trace-events new file mode 100644 index 0000000000..5289f5f675 --- /dev/null +++ b/target/s390x/kvm/trace-events @@ -0,0 +1,7 @@ +# See docs/devel/tracing.txt for syntax documentation. + +# kvm.c +kvm_enable_cmma(int rc) "CMMA: enabling with result code %d" +kvm_clear_cmma(int rc) "CMMA: clearing with result code %d" +kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s" +kvm_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d" diff --git a/target/s390x/kvm/trace.h b/target/s390x/kvm/trace.h new file mode 100644 index 0000000000..ae195b1306 --- /dev/null +++ b/target/s390x/kvm/trace.h @@ -0,0 +1 @@ +#include "trace/trace-target_s390x_kvm.h" diff --git a/target/s390x/machine.c b/target/s390x/machine.c index 81a8a7ff99..37a076858c 100644 --- a/target/s390x/machine.c +++ b/target/s390x/machine.c @@ -17,7 +17,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "s390x-internal.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "migration/vmstate.h" #include "tcg/tcg_s390x.h" #include "sysemu/kvm.h" diff --git a/target/s390x/meson.build b/target/s390x/meson.build index 6c8e03b8fb..ec73bed524 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -8,8 +8,6 @@ s390x_ss.add(files( 'cpu-dump.c', )) -s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) - gen_features = executable('gen-features', 'gen-features.c', native: true, build_by_default: false) @@ -32,22 +30,10 @@ s390x_softmmu_ss.add(files( 'cpu-sysemu.c', )) -# Newer kernels on s390 check for an S390_PGSTE program header and -# enable the pgste page table extensions in that case. This makes -# the vm.allocate_pgste sysctl unnecessary. We enable this program -# header if -# - we build on s390x -# - we build the system emulation for s390x (qemu-system-s390x) -# - KVM is enabled -# - the linker supports --s390-pgste -if host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste') - s390x_softmmu_ss.add(when: 'CONFIG_KVM', - if_true: declare_dependency(link_args: ['-Wl,--s390-pgste'])) -endif - s390x_user_ss = ss.source_set() subdir('tcg') +subdir('kvm') target_arch += {'s390x': s390x_ss} target_softmmu_arch += {'s390x': s390x_softmmu_ss} diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 52fdd86c63..d779a9fc51 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -20,7 +20,7 @@ #include "exec/address-spaces.h" #include "cpu.h" #include "s390x-internal.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" #include "exec/exec-all.h" diff --git a/target/s390x/trace-events b/target/s390x/trace-events index e6c5fc1d03..c3414f58af 100644 --- a/target/s390x/trace-events +++ b/target/s390x/trace-events @@ -10,12 +10,6 @@ ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%x. ioinst_chp_id(const char *insn, int cssid, int chpid) "IOINST: %s (%x.%02x)" ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x%04x" -# kvm.c -kvm_enable_cmma(int rc) "CMMA: enabling with result code %d" -kvm_clear_cmma(int rc) "CMMA: clearing with result code %d" -kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s" -kvm_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d" - # cpu-sysemu.c cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8 cpu_halt(int cpu_index) "halting cpu %d" From patchwork Mon May 24 02:52:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275377 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 E6E3DC47080 for ; Mon, 24 May 2021 03:04:34 +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 42DB261151 for ; Mon, 24 May 2021 03:04:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42DB261151 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0tN-0000gM-7u for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 23:04:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jR-0007og-1w for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:17 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:40538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jK-0003cD-Sq for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q1bD8lbroU7w0T6aZeqbMpc+mUEYl6AsIsKGoTnKAbU=; b=jFxEvbd5F2o5KO3RMIRk2Exj1EbYPVvE/jJnSf3oiuvPT3rjiKKyLtj53XcUNW7qrV5zu6 /t/sqvfB+FMrDLnFYoJvI/0NP+vNhXFFTJYvlArPe5pzj6TbYjwZ6C9S62rqz5xU5QLu3o x+Segvz0Wxe7LCGYZ0L0eY+o8gQt5pQ= Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2108.outbound.protection.outlook.com [104.47.18.108]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-9-QQIClprDMPWUQRMXEecM-Q-1; Mon, 24 May 2021 04:54:08 +0200 X-MC-Unique: QQIClprDMPWUQRMXEecM-Q-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gqQrqav8cpUfZ9Pf8cFRsHbMwbJBlkFFzdG9T7C/WOnk1EFZ9bRi2ZC3EQaj5YoM1Hz3Tz9zpPewvj7eCGt4Q5ycEbMRawJgtYxHFOEdJC2C8xwUr1w+TjSwW173m0bngdqSyPTTrJ4ovK0ooNIyasL7yKW0wNEP0NGGfeeq6GSOebI3nir7HZYfzM+nZhFustDDZQ8q3NoWM42xZ0ZsPd+x33so3nwzoUzNBrLqdILumSvJnp353ZpdWrHwIzFPLQbX3TiiE0nG5B1VfPJzlurElvn3naTAygIIRqLNjuZsDh805hEfeeRTwssFJcenjJ+KqRu15n0IIkzRQ6Tk2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=38RfK1UhrPpqfBfWGuwnrNO07s5HZTRpLK41BNjEM9o=; b=ShxuUl7LVkGMS1vNjuzyUVDAGwIb5ZAs1xp83TIlGvtdgPANH9tdnwXUcnLVescceiXgdW0N7mdmW/xxeA8nEhII6f9I3LqvUPkxPnRUmzZJkO25NtySd2Pjmm9w/Gvn/5RrH+5gQ/DJLXMoqzptkWJwBwhrkIQ+5CB1n5OShQeFSXYpUq8FXk06c3hGXFdg1heAezrHK1dinBmqmpS8k1h5PkQTFCwA7IZQQme/d33go3DXCdmD9Ie+oZIe8uJwvl7Nd+RFkmMIKwrW7BsU/iafbO80Ubmhss4XG6U9TsbxyyMh99aIqMAT3YErYFOmOiCqxh2ZqIP+j6oh438Y+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:54:05 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:54:05 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 13/14] target/s390x: split sysemu part of cpu models Date: Mon, 24 May 2021 10:52:55 +0800 Message-ID: <20210524025256.22252-13-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:54:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8b80dcff-d0dc-4f86-2992-08d91e5f3177 X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tJffCREKytIbaPBnBr5+HjykD/mlfy3Wh8MqP1HRLC4PiY5zgyWHc29J7KjrPxQl726szjrScqDep390TErMsn79JVNBQLa3j2QA3EKuzTtVEJ4wmYuB1uDiAobmuSatpBHoEI3SYMmBDU+VmXiD1JAYC2qisaw562wTr9IqnZHwCFk2R58vAg5PEUs+2vt3xK/Umsu2UkHGAZvgZSTYHhb3qo8i/Cmmq5OazCWFj5Mb05o4+8Z/GgtiNygOhj/f1LkALixZB+7KrQcVkz4z+5t3vaCG28lKkhiZCIpWn+kj9t/6Hk3c4gYlpCvUe6tGYsbrECxv0J56BM9KEqOJWNCTw5uPGxfg0fx/j9/AX6FttL+/F3uuwbGtS0wZxIYUdAeGr9wdi/0ohtTlruxZy34e7ZDrp+L9gEB8qJ3N+lPKUwnIbxRLsKy160biKm/mwEA65FH0zJ2CbuTrbDmZk3I+HmjHzE2NdRD+Q30q1xF/IWfUeQILpRgb8oCIUgIeIDdL2bjoE4L02/LpaG7tO5h272btkjNF15CfQgirQb71xFz4/lLg1zSZGNgvyNT63UcNIiPkjCVJ1hoTKZMzIXUis0xPsetxzDKaVF0j4E3pnyKxjWM7JFVyfFS+SYksehRAWAEbOrgkf6TbF6vXZC//mPsMrGtqlaM9ixQjcutHXebc2bRt6UQFBMPcb04pG6LSCVZ+aZvDxyCw5Cf8bw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(346002)(136003)(376002)(396003)(39860400002)(36756003)(316002)(66476007)(38100700002)(8676002)(38350700002)(86362001)(52116002)(478600001)(66946007)(8936002)(1076003)(2906002)(956004)(26005)(6512007)(30864003)(16526019)(6506007)(186003)(83380400001)(2616005)(6666004)(4326008)(7416002)(5660300002)(6486002)(107886003)(66556008)(69590400013)(170073001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Uxu3ewycjKWZMTCIeCX1IIXZCV/stS+/LbGc7mOybUh+qnITrqACutnWLMGHARk+d67tgGqV6NAESFNb8Up9brbZTNbUX0HwofTLTIjisWDvTno7mBD8GCMAx0t9FXJC8Df1onyGivwSAYQFPOJBSVRxTDdg6I9APQq05rDm4MGUcJYA18Sv8FyeYc2dr3YHYqblvhqsL5XyA4jrFqi9DJ+zgkK5TNXUNKkE+FdGXbSS3vtweVND4cehZ+rJY6YV9iKZ9srRK5D/1i5VTIEqgD30hqKRW6Yw620Ta1GrheiAzldCTazf6pwbeiRpi3WqFlI4g9A3RmwyW9Vr/ofCNhj7DDst8p9m0wL+5INqcLTNMLNsu8mXPKxqrR6FrsHxwQAbHn6UxPePM6uWiL7QFgn04Cdu9OmuCOEcuQUp3V6skJwN5bWv6aoy7yxC/M9fOfckFCxHlffwEmvP2pwmaAZ6E/+jbowOkBfmo/L7hoNyj64REb61xp94h+WeGltWWI60vs8qBTFq0e1ek5s+mckg5UTzJKH/mIpiOs7jivadVQT8VE1iLY9jFdVBxM0IyjRtg4cHC5kPSgD6OT3CJA43u3Bd8YuWC112fj2skBLXgNk0xoT14aRyti4XCKH8ms4OoEXxlE4kuvpmh8XoAZ5QnobitxF4GTQpNuiZwXDD0POunK+BiFYdFJ7ZGdLRWOtwPnxERjF4Zk4//067YllSkt2dvOy4seksNV8ScKeXHSI+VUPzMST3jUqB+TutJAYGLK63HgnZrC9lRWSEIh5FDmuDLpyVphFxDLFPykB3JYpmjG2UsK/E+UpVmeGDP/Xb4hZMkaut+y6BAwmQmyy4GQP0kIv9g51XHMlWwIzcK97RBonXML4IZg8L9R32faff9iNYbqiF1i+MG4HC8Qb2oDJQI3dkjtgTrUhcS8vx7eB9FsgKZoNWPcgPxyx3Mx1X7nUzIKTyNg3mTFJ5B+MzE1Nh2guMQnvFtcQxN0ERCbAWlPMCcnKOwhZF0DjCPG8iM+3RArF57pH7cPg6ssCo3gS8eCKjrD2rYWttatFeWX9WSW9pFyXHvern+DQ//vzxE16isUuW9MIzgJABDo+qD71/Zluy1HNyRyLpMd+s0FdSO2IQeqCp+XlRd4etjpx4vUWhWdiqk2kAW+Y+MuU5G2gYLOAYV62/mOjmc2hj/DeD79/mpXP6O0Lo39XgVda5atyU8XMQx8+dFvLr2RX25PxslpCz+Tyc1URMdyzeXzFvxyOvBOdryD0KVImoGbUzxoZikPm+G7tcJdGJE9i4rsPyEk5CJKT5bySN+JthKxDBHEcafASIkH4lfUTg X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b80dcff-d0dc-4f86-2992-08d91e5f3177 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:54:05.3393 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: e2SbpsBEnol1PAkPYXHSIMVVM+1ZLZGtM7pk0Xcv9yz00I7wlwy+e0Vtn98Fgaqd X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.109.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" also create a tiny _user.c with just the (at least for now), empty implementation of apply_cpu_model. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen --- target/s390x/cpu_models.c | 417 +----------------------------- target/s390x/cpu_models_sysemu.c | 426 +++++++++++++++++++++++++++++++ target/s390x/cpu_models_user.c | 20 ++ target/s390x/meson.build | 4 + target/s390x/s390x-internal.h | 2 + 5 files changed, 453 insertions(+), 416 deletions(-) create mode 100644 target/s390x/cpu_models_sysemu.c create mode 100644 target/s390x/cpu_models_user.c diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 0ed1c23774..30a192590d 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -18,18 +18,11 @@ #include "sysemu/tcg.h" #include "qapi/error.h" #include "qapi/visitor.h" -#include "qemu/error-report.h" #include "qemu/module.h" #include "qemu/qemu-print.h" -#include "qapi/qmp/qerror.h" -#include "qapi/qobject-input-visitor.h" -#include "qapi/qmp/qdict.h" #ifndef CONFIG_USER_ONLY -#include "sysemu/arch_init.h" #include "sysemu/sysemu.h" -#include "hw/pci/pci.h" #endif -#include "qapi/qapi-commands-machine-target.h" #include "hw/s390x/pv.h" #define CPUDEF_INIT(_type, _gen, _ec_ga, _mha_pow, _hmfai, _name, _desc) \ @@ -414,381 +407,6 @@ void s390_cpu_list(void) } } -static S390CPUModel *get_max_cpu_model(Error **errp); - -#ifndef CONFIG_USER_ONLY -static void list_add_feat(const char *name, void *opaque); - -static void check_unavailable_features(const S390CPUModel *max_model, - const S390CPUModel *model, - strList **unavailable) -{ - S390FeatBitmap missing; - - /* check general model compatibility */ - if (max_model->def->gen < model->def->gen || - (max_model->def->gen == model->def->gen && - max_model->def->ec_ga < model->def->ec_ga)) { - list_add_feat("type", unavailable); - } - - /* detect missing features if any to properly report them */ - bitmap_andnot(missing, model->features, max_model->features, - S390_FEAT_MAX); - if (!bitmap_empty(missing, S390_FEAT_MAX)) { - s390_feat_bitmap_to_ascii(missing, unavailable, list_add_feat); - } -} - -struct CpuDefinitionInfoListData { - CpuDefinitionInfoList *list; - S390CPUModel *model; -}; - -static void create_cpu_model_list(ObjectClass *klass, void *opaque) -{ - struct CpuDefinitionInfoListData *cpu_list_data = opaque; - CpuDefinitionInfoList **cpu_list = &cpu_list_data->list; - CpuDefinitionInfo *info; - char *name = g_strdup(object_class_get_name(klass)); - S390CPUClass *scc = S390_CPU_CLASS(klass); - - /* strip off the -s390x-cpu */ - g_strrstr(name, "-" TYPE_S390_CPU)[0] = 0; - info = g_new0(CpuDefinitionInfo, 1); - info->name = name; - info->has_migration_safe = true; - info->migration_safe = scc->is_migration_safe; - info->q_static = scc->is_static; - info->q_typename = g_strdup(object_class_get_name(klass)); - /* check for unavailable features */ - if (cpu_list_data->model) { - Object *obj; - S390CPU *sc; - obj = object_new_with_class(klass); - sc = S390_CPU(obj); - if (sc->model) { - info->has_unavailable_features = true; - check_unavailable_features(cpu_list_data->model, sc->model, - &info->unavailable_features); - } - object_unref(obj); - } - - QAPI_LIST_PREPEND(*cpu_list, info); -} - -CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp) -{ - struct CpuDefinitionInfoListData list_data = { - .list = NULL, - }; - - list_data.model = get_max_cpu_model(NULL); - - object_class_foreach(create_cpu_model_list, TYPE_S390_CPU, false, - &list_data); - - return list_data.list; -} - -static void cpu_model_from_info(S390CPUModel *model, const CpuModelInfo *info, - Error **errp) -{ - Error *err = NULL; - const QDict *qdict = NULL; - const QDictEntry *e; - Visitor *visitor; - ObjectClass *oc; - S390CPU *cpu; - Object *obj; - - if (info->props) { - qdict = qobject_to(QDict, info->props); - if (!qdict) { - error_setg(errp, QERR_INVALID_PARAMETER_TYPE, "props", "dict"); - return; - } - } - - oc = cpu_class_by_name(TYPE_S390_CPU, info->name); - if (!oc) { - error_setg(errp, "The CPU definition \'%s\' is unknown.", info->name); - return; - } - if (S390_CPU_CLASS(oc)->kvm_required && !kvm_enabled()) { - error_setg(errp, "The CPU definition '%s' requires KVM", info->name); - return; - } - obj = object_new_with_class(oc); - cpu = S390_CPU(obj); - - if (!cpu->model) { - error_setg(errp, "Details about the host CPU model are not available, " - "it cannot be used."); - object_unref(obj); - return; - } - - if (qdict) { - visitor = qobject_input_visitor_new(info->props); - if (!visit_start_struct(visitor, NULL, NULL, 0, errp)) { - visit_free(visitor); - object_unref(obj); - return; - } - for (e = qdict_first(qdict); e; e = qdict_next(qdict, e)) { - if (!object_property_set(obj, e->key, visitor, &err)) { - break; - } - } - if (!err) { - visit_check_struct(visitor, &err); - } - visit_end_struct(visitor, NULL); - visit_free(visitor); - if (err) { - error_propagate(errp, err); - object_unref(obj); - return; - } - } - - /* copy the model and throw the cpu away */ - memcpy(model, cpu->model, sizeof(*model)); - object_unref(obj); -} - -static void qdict_add_disabled_feat(const char *name, void *opaque) -{ - qdict_put_bool(opaque, name, false); -} - -static void qdict_add_enabled_feat(const char *name, void *opaque) -{ - qdict_put_bool(opaque, name, true); -} - -/* convert S390CPUDef into a static CpuModelInfo */ -static void cpu_info_from_model(CpuModelInfo *info, const S390CPUModel *model, - bool delta_changes) -{ - QDict *qdict = qdict_new(); - S390FeatBitmap bitmap; - - /* always fallback to the static base model */ - info->name = g_strdup_printf("%s-base", model->def->name); - - if (delta_changes) { - /* features deleted from the base feature set */ - bitmap_andnot(bitmap, model->def->base_feat, model->features, - S390_FEAT_MAX); - if (!bitmap_empty(bitmap, S390_FEAT_MAX)) { - s390_feat_bitmap_to_ascii(bitmap, qdict, qdict_add_disabled_feat); - } - - /* features added to the base feature set */ - bitmap_andnot(bitmap, model->features, model->def->base_feat, - S390_FEAT_MAX); - if (!bitmap_empty(bitmap, S390_FEAT_MAX)) { - s390_feat_bitmap_to_ascii(bitmap, qdict, qdict_add_enabled_feat); - } - } else { - /* expand all features */ - s390_feat_bitmap_to_ascii(model->features, qdict, - qdict_add_enabled_feat); - bitmap_complement(bitmap, model->features, S390_FEAT_MAX); - s390_feat_bitmap_to_ascii(bitmap, qdict, qdict_add_disabled_feat); - } - - if (!qdict_size(qdict)) { - qobject_unref(qdict); - } else { - info->props = QOBJECT(qdict); - info->has_props = true; - } -} - -CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type, - CpuModelInfo *model, - Error **errp) -{ - Error *err = NULL; - CpuModelExpansionInfo *expansion_info = NULL; - S390CPUModel s390_model; - bool delta_changes = false; - - /* convert it to our internal representation */ - cpu_model_from_info(&s390_model, model, &err); - if (err) { - error_propagate(errp, err); - return NULL; - } - - if (type == CPU_MODEL_EXPANSION_TYPE_STATIC) { - delta_changes = true; - } else if (type != CPU_MODEL_EXPANSION_TYPE_FULL) { - error_setg(errp, "The requested expansion type is not supported."); - return NULL; - } - - /* convert it back to a static representation */ - expansion_info = g_new0(CpuModelExpansionInfo, 1); - expansion_info->model = g_malloc0(sizeof(*expansion_info->model)); - cpu_info_from_model(expansion_info->model, &s390_model, delta_changes); - return expansion_info; -} - -static void list_add_feat(const char *name, void *opaque) -{ - strList **last = (strList **) opaque; - - QAPI_LIST_PREPEND(*last, g_strdup(name)); -} - -CpuModelCompareInfo *qmp_query_cpu_model_comparison(CpuModelInfo *infoa, - CpuModelInfo *infob, - Error **errp) -{ - Error *err = NULL; - CpuModelCompareResult feat_result, gen_result; - CpuModelCompareInfo *compare_info; - S390FeatBitmap missing, added; - S390CPUModel modela, modelb; - - /* convert both models to our internal representation */ - cpu_model_from_info(&modela, infoa, &err); - if (err) { - error_propagate(errp, err); - return NULL; - } - cpu_model_from_info(&modelb, infob, &err); - if (err) { - error_propagate(errp, err); - return NULL; - } - compare_info = g_new0(CpuModelCompareInfo, 1); - - /* check the cpu generation and ga level */ - if (modela.def->gen == modelb.def->gen) { - if (modela.def->ec_ga == modelb.def->ec_ga) { - /* ec and corresponding bc are identical */ - gen_result = CPU_MODEL_COMPARE_RESULT_IDENTICAL; - } else if (modela.def->ec_ga < modelb.def->ec_ga) { - gen_result = CPU_MODEL_COMPARE_RESULT_SUBSET; - } else { - gen_result = CPU_MODEL_COMPARE_RESULT_SUPERSET; - } - } else if (modela.def->gen < modelb.def->gen) { - gen_result = CPU_MODEL_COMPARE_RESULT_SUBSET; - } else { - gen_result = CPU_MODEL_COMPARE_RESULT_SUPERSET; - } - if (gen_result != CPU_MODEL_COMPARE_RESULT_IDENTICAL) { - /* both models cannot be made identical */ - list_add_feat("type", &compare_info->responsible_properties); - } - - /* check the feature set */ - if (bitmap_equal(modela.features, modelb.features, S390_FEAT_MAX)) { - feat_result = CPU_MODEL_COMPARE_RESULT_IDENTICAL; - } else { - bitmap_andnot(missing, modela.features, modelb.features, S390_FEAT_MAX); - s390_feat_bitmap_to_ascii(missing, - &compare_info->responsible_properties, - list_add_feat); - bitmap_andnot(added, modelb.features, modela.features, S390_FEAT_MAX); - s390_feat_bitmap_to_ascii(added, &compare_info->responsible_properties, - list_add_feat); - if (bitmap_empty(missing, S390_FEAT_MAX)) { - feat_result = CPU_MODEL_COMPARE_RESULT_SUBSET; - } else if (bitmap_empty(added, S390_FEAT_MAX)) { - feat_result = CPU_MODEL_COMPARE_RESULT_SUPERSET; - } else { - feat_result = CPU_MODEL_COMPARE_RESULT_INCOMPATIBLE; - } - } - - /* combine the results */ - if (gen_result == feat_result) { - compare_info->result = gen_result; - } else if (feat_result == CPU_MODEL_COMPARE_RESULT_IDENTICAL) { - compare_info->result = gen_result; - } else if (gen_result == CPU_MODEL_COMPARE_RESULT_IDENTICAL) { - compare_info->result = feat_result; - } else { - compare_info->result = CPU_MODEL_COMPARE_RESULT_INCOMPATIBLE; - } - return compare_info; -} - -CpuModelBaselineInfo *qmp_query_cpu_model_baseline(CpuModelInfo *infoa, - CpuModelInfo *infob, - Error **errp) -{ - Error *err = NULL; - CpuModelBaselineInfo *baseline_info; - S390CPUModel modela, modelb, model; - uint16_t cpu_type; - uint8_t max_gen_ga; - uint8_t max_gen; - - /* convert both models to our internal representation */ - cpu_model_from_info(&modela, infoa, &err); - if (err) { - error_propagate(errp, err); - return NULL; - } - - cpu_model_from_info(&modelb, infob, &err); - if (err) { - error_propagate(errp, err); - return NULL; - } - - /* features both models support */ - bitmap_and(model.features, modela.features, modelb.features, S390_FEAT_MAX); - - /* detect the maximum model not regarding features */ - if (modela.def->gen == modelb.def->gen) { - if (modela.def->type == modelb.def->type) { - cpu_type = modela.def->type; - } else { - cpu_type = 0; - } - max_gen = modela.def->gen; - max_gen_ga = MIN(modela.def->ec_ga, modelb.def->ec_ga); - } else if (modela.def->gen > modelb.def->gen) { - cpu_type = modelb.def->type; - max_gen = modelb.def->gen; - max_gen_ga = modelb.def->ec_ga; - } else { - cpu_type = modela.def->type; - max_gen = modela.def->gen; - max_gen_ga = modela.def->ec_ga; - } - - model.def = s390_find_cpu_def(cpu_type, max_gen, max_gen_ga, - model.features); - - /* models without early base features (esan3) are bad */ - if (!model.def) { - error_setg(errp, "No compatible CPU model could be created as" - " important base features are disabled"); - return NULL; - } - - /* strip off features not part of the max model */ - bitmap_and(model.features, model.features, model.def->full_feat, - S390_FEAT_MAX); - - baseline_info = g_new0(CpuModelBaselineInfo, 1); - baseline_info->model = g_malloc0(sizeof(*baseline_info->model)); - cpu_info_from_model(baseline_info->model, &model, true); - return baseline_info; -} -#endif - static void check_consistency(const S390CPUModel *model) { static int dep[][2] = { @@ -900,7 +518,7 @@ static void check_compatibility(const S390CPUModel *max_model, "available in the configuration: "); } -static S390CPUModel *get_max_cpu_model(Error **errp) +S390CPUModel *get_max_cpu_model(Error **errp) { Error *err = NULL; static S390CPUModel max_model; @@ -925,39 +543,6 @@ static S390CPUModel *get_max_cpu_model(Error **errp) return &max_model; } -static inline void apply_cpu_model(const S390CPUModel *model, Error **errp) -{ -#ifndef CONFIG_USER_ONLY - Error *err = NULL; - static S390CPUModel applied_model; - static bool applied; - - /* - * We have the same model for all VCPUs. KVM can only be configured before - * any VCPUs are defined in KVM. - */ - if (applied) { - if (model && memcmp(&applied_model, model, sizeof(S390CPUModel))) { - error_setg(errp, "Mixed CPU models are not supported on s390x."); - } - return; - } - - if (kvm_enabled()) { - kvm_s390_apply_cpu_model(model, &err); - if (err) { - error_propagate(errp, err); - return; - } - } - - applied = true; - if (model) { - applied_model = *model; - } -#endif -} - void s390_realize_cpu_model(CPUState *cs, Error **errp) { Error *err = NULL; diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c new file mode 100644 index 0000000000..05c3ccaaff --- /dev/null +++ b/target/s390x/cpu_models_sysemu.c @@ -0,0 +1,426 @@ +/* + * CPU models for s390x - System Emulation-only + * + * Copyright 2016 IBM Corp. + * + * Author(s): David Hildenbrand + * + * This work is licensed under the terms of the GNU GPL, version 2 or (at + * your option) any later version. See the COPYING file in the top-level + * directory. + */ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "s390x-internal.h" +#include "kvm/kvm_s390x.h" +#include "sysemu/kvm.h" +#include "sysemu/tcg.h" +#include "qapi/error.h" +#include "qapi/visitor.h" +#include "qapi/qmp/qerror.h" +#include "qapi/qobject-input-visitor.h" +#include "qapi/qmp/qdict.h" +#include "qapi/qapi-commands-machine-target.h" + +static void list_add_feat(const char *name, void *opaque); + +static void check_unavailable_features(const S390CPUModel *max_model, + const S390CPUModel *model, + strList **unavailable) +{ + S390FeatBitmap missing; + + /* check general model compatibility */ + if (max_model->def->gen < model->def->gen || + (max_model->def->gen == model->def->gen && + max_model->def->ec_ga < model->def->ec_ga)) { + list_add_feat("type", unavailable); + } + + /* detect missing features if any to properly report them */ + bitmap_andnot(missing, model->features, max_model->features, + S390_FEAT_MAX); + if (!bitmap_empty(missing, S390_FEAT_MAX)) { + s390_feat_bitmap_to_ascii(missing, unavailable, list_add_feat); + } +} + +struct CpuDefinitionInfoListData { + CpuDefinitionInfoList *list; + S390CPUModel *model; +}; + +static void create_cpu_model_list(ObjectClass *klass, void *opaque) +{ + struct CpuDefinitionInfoListData *cpu_list_data = opaque; + CpuDefinitionInfoList **cpu_list = &cpu_list_data->list; + CpuDefinitionInfo *info; + char *name = g_strdup(object_class_get_name(klass)); + S390CPUClass *scc = S390_CPU_CLASS(klass); + + /* strip off the -s390x-cpu */ + g_strrstr(name, "-" TYPE_S390_CPU)[0] = 0; + info = g_new0(CpuDefinitionInfo, 1); + info->name = name; + info->has_migration_safe = true; + info->migration_safe = scc->is_migration_safe; + info->q_static = scc->is_static; + info->q_typename = g_strdup(object_class_get_name(klass)); + /* check for unavailable features */ + if (cpu_list_data->model) { + Object *obj; + S390CPU *sc; + obj = object_new_with_class(klass); + sc = S390_CPU(obj); + if (sc->model) { + info->has_unavailable_features = true; + check_unavailable_features(cpu_list_data->model, sc->model, + &info->unavailable_features); + } + object_unref(obj); + } + + QAPI_LIST_PREPEND(*cpu_list, info); +} + +CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp) +{ + struct CpuDefinitionInfoListData list_data = { + .list = NULL, + }; + + list_data.model = get_max_cpu_model(NULL); + + object_class_foreach(create_cpu_model_list, TYPE_S390_CPU, false, + &list_data); + + return list_data.list; +} + +static void cpu_model_from_info(S390CPUModel *model, const CpuModelInfo *info, + Error **errp) +{ + Error *err = NULL; + const QDict *qdict = NULL; + const QDictEntry *e; + Visitor *visitor; + ObjectClass *oc; + S390CPU *cpu; + Object *obj; + + if (info->props) { + qdict = qobject_to(QDict, info->props); + if (!qdict) { + error_setg(errp, QERR_INVALID_PARAMETER_TYPE, "props", "dict"); + return; + } + } + + oc = cpu_class_by_name(TYPE_S390_CPU, info->name); + if (!oc) { + error_setg(errp, "The CPU definition \'%s\' is unknown.", info->name); + return; + } + if (S390_CPU_CLASS(oc)->kvm_required && !kvm_enabled()) { + error_setg(errp, "The CPU definition '%s' requires KVM", info->name); + return; + } + obj = object_new_with_class(oc); + cpu = S390_CPU(obj); + + if (!cpu->model) { + error_setg(errp, "Details about the host CPU model are not available, " + "it cannot be used."); + object_unref(obj); + return; + } + + if (qdict) { + visitor = qobject_input_visitor_new(info->props); + if (!visit_start_struct(visitor, NULL, NULL, 0, errp)) { + visit_free(visitor); + object_unref(obj); + return; + } + for (e = qdict_first(qdict); e; e = qdict_next(qdict, e)) { + if (!object_property_set(obj, e->key, visitor, &err)) { + break; + } + } + if (!err) { + visit_check_struct(visitor, &err); + } + visit_end_struct(visitor, NULL); + visit_free(visitor); + if (err) { + error_propagate(errp, err); + object_unref(obj); + return; + } + } + + /* copy the model and throw the cpu away */ + memcpy(model, cpu->model, sizeof(*model)); + object_unref(obj); +} + +static void qdict_add_disabled_feat(const char *name, void *opaque) +{ + qdict_put_bool(opaque, name, false); +} + +static void qdict_add_enabled_feat(const char *name, void *opaque) +{ + qdict_put_bool(opaque, name, true); +} + +/* convert S390CPUDef into a static CpuModelInfo */ +static void cpu_info_from_model(CpuModelInfo *info, const S390CPUModel *model, + bool delta_changes) +{ + QDict *qdict = qdict_new(); + S390FeatBitmap bitmap; + + /* always fallback to the static base model */ + info->name = g_strdup_printf("%s-base", model->def->name); + + if (delta_changes) { + /* features deleted from the base feature set */ + bitmap_andnot(bitmap, model->def->base_feat, model->features, + S390_FEAT_MAX); + if (!bitmap_empty(bitmap, S390_FEAT_MAX)) { + s390_feat_bitmap_to_ascii(bitmap, qdict, qdict_add_disabled_feat); + } + + /* features added to the base feature set */ + bitmap_andnot(bitmap, model->features, model->def->base_feat, + S390_FEAT_MAX); + if (!bitmap_empty(bitmap, S390_FEAT_MAX)) { + s390_feat_bitmap_to_ascii(bitmap, qdict, qdict_add_enabled_feat); + } + } else { + /* expand all features */ + s390_feat_bitmap_to_ascii(model->features, qdict, + qdict_add_enabled_feat); + bitmap_complement(bitmap, model->features, S390_FEAT_MAX); + s390_feat_bitmap_to_ascii(bitmap, qdict, qdict_add_disabled_feat); + } + + if (!qdict_size(qdict)) { + qobject_unref(qdict); + } else { + info->props = QOBJECT(qdict); + info->has_props = true; + } +} + +CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type, + CpuModelInfo *model, + Error **errp) +{ + Error *err = NULL; + CpuModelExpansionInfo *expansion_info = NULL; + S390CPUModel s390_model; + bool delta_changes = false; + + /* convert it to our internal representation */ + cpu_model_from_info(&s390_model, model, &err); + if (err) { + error_propagate(errp, err); + return NULL; + } + + if (type == CPU_MODEL_EXPANSION_TYPE_STATIC) { + delta_changes = true; + } else if (type != CPU_MODEL_EXPANSION_TYPE_FULL) { + error_setg(errp, "The requested expansion type is not supported."); + return NULL; + } + + /* convert it back to a static representation */ + expansion_info = g_new0(CpuModelExpansionInfo, 1); + expansion_info->model = g_malloc0(sizeof(*expansion_info->model)); + cpu_info_from_model(expansion_info->model, &s390_model, delta_changes); + return expansion_info; +} + +static void list_add_feat(const char *name, void *opaque) +{ + strList **last = (strList **) opaque; + + QAPI_LIST_PREPEND(*last, g_strdup(name)); +} + +CpuModelCompareInfo *qmp_query_cpu_model_comparison(CpuModelInfo *infoa, + CpuModelInfo *infob, + Error **errp) +{ + Error *err = NULL; + CpuModelCompareResult feat_result, gen_result; + CpuModelCompareInfo *compare_info; + S390FeatBitmap missing, added; + S390CPUModel modela, modelb; + + /* convert both models to our internal representation */ + cpu_model_from_info(&modela, infoa, &err); + if (err) { + error_propagate(errp, err); + return NULL; + } + cpu_model_from_info(&modelb, infob, &err); + if (err) { + error_propagate(errp, err); + return NULL; + } + compare_info = g_new0(CpuModelCompareInfo, 1); + + /* check the cpu generation and ga level */ + if (modela.def->gen == modelb.def->gen) { + if (modela.def->ec_ga == modelb.def->ec_ga) { + /* ec and corresponding bc are identical */ + gen_result = CPU_MODEL_COMPARE_RESULT_IDENTICAL; + } else if (modela.def->ec_ga < modelb.def->ec_ga) { + gen_result = CPU_MODEL_COMPARE_RESULT_SUBSET; + } else { + gen_result = CPU_MODEL_COMPARE_RESULT_SUPERSET; + } + } else if (modela.def->gen < modelb.def->gen) { + gen_result = CPU_MODEL_COMPARE_RESULT_SUBSET; + } else { + gen_result = CPU_MODEL_COMPARE_RESULT_SUPERSET; + } + if (gen_result != CPU_MODEL_COMPARE_RESULT_IDENTICAL) { + /* both models cannot be made identical */ + list_add_feat("type", &compare_info->responsible_properties); + } + + /* check the feature set */ + if (bitmap_equal(modela.features, modelb.features, S390_FEAT_MAX)) { + feat_result = CPU_MODEL_COMPARE_RESULT_IDENTICAL; + } else { + bitmap_andnot(missing, modela.features, modelb.features, S390_FEAT_MAX); + s390_feat_bitmap_to_ascii(missing, + &compare_info->responsible_properties, + list_add_feat); + bitmap_andnot(added, modelb.features, modela.features, S390_FEAT_MAX); + s390_feat_bitmap_to_ascii(added, &compare_info->responsible_properties, + list_add_feat); + if (bitmap_empty(missing, S390_FEAT_MAX)) { + feat_result = CPU_MODEL_COMPARE_RESULT_SUBSET; + } else if (bitmap_empty(added, S390_FEAT_MAX)) { + feat_result = CPU_MODEL_COMPARE_RESULT_SUPERSET; + } else { + feat_result = CPU_MODEL_COMPARE_RESULT_INCOMPATIBLE; + } + } + + /* combine the results */ + if (gen_result == feat_result) { + compare_info->result = gen_result; + } else if (feat_result == CPU_MODEL_COMPARE_RESULT_IDENTICAL) { + compare_info->result = gen_result; + } else if (gen_result == CPU_MODEL_COMPARE_RESULT_IDENTICAL) { + compare_info->result = feat_result; + } else { + compare_info->result = CPU_MODEL_COMPARE_RESULT_INCOMPATIBLE; + } + return compare_info; +} + +CpuModelBaselineInfo *qmp_query_cpu_model_baseline(CpuModelInfo *infoa, + CpuModelInfo *infob, + Error **errp) +{ + Error *err = NULL; + CpuModelBaselineInfo *baseline_info; + S390CPUModel modela, modelb, model; + uint16_t cpu_type; + uint8_t max_gen_ga; + uint8_t max_gen; + + /* convert both models to our internal representation */ + cpu_model_from_info(&modela, infoa, &err); + if (err) { + error_propagate(errp, err); + return NULL; + } + + cpu_model_from_info(&modelb, infob, &err); + if (err) { + error_propagate(errp, err); + return NULL; + } + + /* features both models support */ + bitmap_and(model.features, modela.features, modelb.features, S390_FEAT_MAX); + + /* detect the maximum model not regarding features */ + if (modela.def->gen == modelb.def->gen) { + if (modela.def->type == modelb.def->type) { + cpu_type = modela.def->type; + } else { + cpu_type = 0; + } + max_gen = modela.def->gen; + max_gen_ga = MIN(modela.def->ec_ga, modelb.def->ec_ga); + } else if (modela.def->gen > modelb.def->gen) { + cpu_type = modelb.def->type; + max_gen = modelb.def->gen; + max_gen_ga = modelb.def->ec_ga; + } else { + cpu_type = modela.def->type; + max_gen = modela.def->gen; + max_gen_ga = modela.def->ec_ga; + } + + model.def = s390_find_cpu_def(cpu_type, max_gen, max_gen_ga, + model.features); + + /* models without early base features (esan3) are bad */ + if (!model.def) { + error_setg(errp, "No compatible CPU model could be created as" + " important base features are disabled"); + return NULL; + } + + /* strip off features not part of the max model */ + bitmap_and(model.features, model.features, model.def->full_feat, + S390_FEAT_MAX); + + baseline_info = g_new0(CpuModelBaselineInfo, 1); + baseline_info->model = g_malloc0(sizeof(*baseline_info->model)); + cpu_info_from_model(baseline_info->model, &model, true); + return baseline_info; +} + +void apply_cpu_model(const S390CPUModel *model, Error **errp) +{ + Error *err = NULL; + static S390CPUModel applied_model; + static bool applied; + + /* + * We have the same model for all VCPUs. KVM can only be configured before + * any VCPUs are defined in KVM. + */ + if (applied) { + if (model && memcmp(&applied_model, model, sizeof(S390CPUModel))) { + error_setg(errp, "Mixed CPU models are not supported on s390x."); + } + return; + } + + if (kvm_enabled()) { + kvm_s390_apply_cpu_model(model, &err); + if (err) { + error_propagate(errp, err); + return; + } + } + + applied = true; + if (model) { + applied_model = *model; + } +} diff --git a/target/s390x/cpu_models_user.c b/target/s390x/cpu_models_user.c new file mode 100644 index 0000000000..df24d12d9e --- /dev/null +++ b/target/s390x/cpu_models_user.c @@ -0,0 +1,20 @@ +/* + * CPU models for s390x - User-mode + * + * Copyright 2016 IBM Corp. + * + * Author(s): David Hildenbrand + * + * This work is licensed under the terms of the GNU GPL, version 2 or (at + * your option) any later version. See the COPYING file in the top-level + * directory. + */ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "s390x-internal.h" +#include "qapi/error.h" + +void apply_cpu_model(const S390CPUModel *model, Error **errp) +{ +} diff --git a/target/s390x/meson.build b/target/s390x/meson.build index ec73bed524..84c1402a6a 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -28,9 +28,13 @@ s390x_softmmu_ss.add(files( 'mmu_helper.c', 'sigp.c', 'cpu-sysemu.c', + 'cpu_models_sysemu.c', )) s390x_user_ss = ss.source_set() +s390x_user_ss.add(files( + 'cpu_models_user.c', +)) subdir('tcg') subdir('kvm') diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index 171ecd59fb..e4ec5e55bb 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -265,6 +265,8 @@ static inline void s390_cpu_unhalt(S390CPU *cpu) /* cpu_models.c */ void s390_cpu_model_class_register_props(ObjectClass *oc); void s390_realize_cpu_model(CPUState *cs, Error **errp); +S390CPUModel *get_max_cpu_model(Error **errp); +void apply_cpu_model(const S390CPUModel *model, Error **errp); ObjectClass *s390_cpu_class_by_name(const char *name); From patchwork Mon May 24 02:52:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12275379 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 01A01C47083 for ; Mon, 24 May 2021 03:04:36 +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 8894A61159 for ; Mon, 24 May 2021 03:04:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8894A61159 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll0tO-0000rm-Kl for qemu-devel@archiver.kernel.org; Sun, 23 May 2021 23:04:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jP-0007jd-KW for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:15 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:30888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll0jN-0003dO-KU for qemu-devel@nongnu.org; Sun, 23 May 2021 22:54:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1621824852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FYCafF/WC3LB94/4DMxgi/kgo3C0r5bwiuB1ZQ93ueY=; b=bWMxsV430wOISJYamBm4zqMaqXISNf1iwSVnfUsqToa3KtHm9igEz6JZ8Q9smEwLCrMIEH z7pAKvvzn6hMO9tcsrMThISoAWjvJbfhFF4ltSJbpShiRMOAPToJ0jFaD8DYo17N/KJ6T1 7WUO+XEUqYZeUFzrKCS+uu8TgpnguOw= Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2052.outbound.protection.outlook.com [104.47.14.52]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-9-aMR1s0AWM1GRU23p2ZxRMw-1; Mon, 24 May 2021 04:54:11 +0200 X-MC-Unique: aMR1s0AWM1GRU23p2ZxRMw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A/xPxyb0Hzf/bM5Zf3y9cBDlkSTQtI3Q+cZmVNx2XW0dF0VVQvQTPA8uPPDuqiqZWNcAODfo69L7mj/MTTLc5apnx7Sd8gRLr+XQUl+K44ehETP7aCtWNJoGhGzFFP2Uj1FFtdD2BEU3tn9UKn+YB3m1jsT/rHVKd1DBTH/BOsUR1NbcteMMWLKCD4Z8P2J47A2sD+JkbSuB410codsPu65blo3Buf6Syz+RrKfIJXybi+SvTN5JuOgavQ17nU7TCLjbA5QBBDdUza+4v+EhBRCE0c2HCyYsdrxo2WBuh/MXsAFq4SwSNe4izFyRg3C5vmybgaSq0U/HhmrMVTJ0nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2taWfiWgplpiXsSv/r8sccgq7Sz8Kw3XrmIFTPrj9ig=; b=IVYuxt54Lhmg8ochuna34Hb+fH793Q0Tk9fQjh7omwThSxkQkLzLPhYEJ8gwnX71Y64Amt6l4g4Qx/9xv6nuInAjZv6kBjZVmPQyDfVB32W03Rk/7QiIsmS/4BX4NB6KDvaKtHleKoBk3qBE4NuxVEabAzWuUYyeKwp/cfBV9mqEQPqfTiqlirV4dZd85w3huO20aNefW3uWqkPFzBw8ePwKdwRGxeBKXVn0YFCc26N8puCT2pWLuHG0SmCXRu/U14icBmkJB6EY82f+v1UnfDuU7IbPZSYM6i/MCZBu9Wdj8yKitgPiJqxOlZe6uWiV0iwM4CgagfBajyQOzuNyFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR04MB4126.eurprd04.prod.outlook.com (2603:10a6:803:47::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 02:54:09 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::b446:f4ea:d07c:ef5f%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 02:54:09 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cohuck@redhat.com, thuth@redhat.com, richard.henderson@linaro.org, cfontana@suse.de, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, pbonzini@redhat.com, acho@suse.com Subject: [RFC v4 14/14] MAINTAINERS: update s390x directories Date: Mon, 24 May 2021 10:52:56 +0800 Message-ID: <20210524025256.22252-14-acho@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524025256.22252-1-acho@suse.com> References: <20210524025256.22252-1-acho@suse.com> X-Originating-IP: [114.24.18.39] X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.24.18.39) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 02:54:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7440f438-ff78-4dfb-1e02-08d91e5f3401 X-MS-TrafficTypeDiagnostic: VI1PR04MB4126: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:949; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7HfzmhR+f4zIj79ifUVHyimYrsP+5QFGlYouAvU7a6rhA+FhTgawwsWKJEF32MPE62qTyQ4NVq8gIU3nK8Jqnr9aSabHuhLsTlJRj3k47Isg+gmOK/kymiJRqRFkYSlCWelPlZ7lL+4yqV/jo8CaobFoIfDaDu/z7fJtRfgQL1b8UkjRi/VtpK0ZSctDrZCvBotRU7Y2l+ZrJo3UahYDoKm5blgWsN5C7KbxDd1wcB6pSitdLab6+Rcp4l0hUSwptRTKBuh9ZsbcV6+MEdy+aFRJxojmI0MGyHp6bGyFA6DoQdPMv39inkRtzyUJgyFVzbuuY6VjcWh7fV8hB3I7It4yqTtUKGJzyYGV6YdLSKxI/kPoZUKGEbJues0loqxIqlGizNNB39rNogQuo+QsIUSQAVeI0ylql/wCfOXnPRG3ARPGfzzEaL2H2TM/ezL/kLDu3755erR3qLirDy/Qcs51mipsYO312STvjcn6rZbnYclp5GUcEqMwZOfQefdZNZtND6FzR724OOpdoxi8F0sz6dFjiKGGe84NGA7kV/NbUYTJyVnEvW2Ujem+0E8Y006fK/JWJZlZEXasrLWT0yMO3BssHBPcT6K/7QThCVet8scguoGb45N567okAcp7wG+XQXkKiJR/oCSp3JqSVr1GASYMwRGsM11fWUxdJWGRUksvSNeEIrzLq4pQQnjg X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(346002)(136003)(376002)(396003)(39860400002)(36756003)(316002)(66476007)(38100700002)(8676002)(38350700002)(86362001)(52116002)(478600001)(66946007)(8936002)(1076003)(2906002)(956004)(26005)(6512007)(16526019)(6506007)(15650500001)(186003)(83380400001)(2616005)(6666004)(4326008)(7416002)(5660300002)(6486002)(107886003)(66556008)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: M9UMBUfXdjoUr70AqxCWhpnzuxiIB1DYRpjGcIMtWBr1hAf7m2qsDe37qqRyWU3/yB8VtqczQodShpvoXyAEtl2J0nIBPtaqHgXvxhceZam2bwu78/hvx70sFMisb8UVZ6bAdv5txdr169FON+rXH5QlLQkMolzTWXT8skOFG07YQGQzdZerWu3b9wao2wkDLjoTr16n89X2aHg9m3jf9hK5cCaOY5gTZMwUUNw3I/pGDJUWR5MSnMTYx2uDDFguBzFTnD8ceAkN7KlTaZIcCqhIliITZCygxU2DHVwFkTPS7mKbfCAI3z0cy/G3eQ6T0N4Vi2jjWlMX0PdjXMDCsMAiVo6f5/N4Tf4YDLFZjsPToKAb2J849HJEBVSG/2bn3XAX2Dr/+ii/gr6pcG04R84pvHTzufM5nnDE9mWj4DxKB2qax+80QD18SaamCM93sTD1cayG4eYhq14Qcq7nipyKcwn/ytY/VQkcnnluLX1+Mosr+quduvJsoAtbwww0Ni4tVIBm30Hw+Vnq6X0dj6V/D0LMw44wwxbJ2k+0X4h1ESDfEiBdNjTpAGXDxEZtB5KqgtVql67itbCphOqhuOMgYxQjLqMXeYugFYM7DGczolumtJuHR2t30MPN/q5rOUHVmuVaykxUlQ1WyCUPqI/h/qkyDsl0g8wcblwOE9PRCyjUKo8DhhSdvzcPCu0sNyJoOKMMRScLvBZo0xQd2jFnG2eaYe8LOFcop6Su7QaOloknviLoIMIDKZ18rS2rLGHqVH/vSu77BRwZDeNgnEUZlSWdrCygZJsMt4oZDGQjdJrAlDT6HY5zh3ZhV8BShGQd4P0xhHezGypoKlgGbqcQ4LnPCD1QgQAbyWrGpMng/8AyI5pYI+XkzcWiSTHt/MHGmFCLJgXOawBFzjuhCjx1Ofkh7NxfmUVN9eIwBO8MOJoKOJsBzrNthPa12SdLCBBg2IIyCMeLA5K1lwvnCFz+mIXS0dNxLe5evpAJRLRdVfc4QWmQf5ta6GffsVimBVDPoZOH3I9f3jmqJm2WIL+dRvGPDADaKv8utXQIYgWHxel5UPZ6p25QuzFL0rO0ttncazG/YkDvFwkoJtoGkF4Gh5t4mh8jUJ7NVwntOGTpWT6hC62dN3lbATkOQ7AQ0SOwCehJ1ut0w5ybHSKcDbLPScTGh3T8LjWjNCoW3lHG9UWXBqCZBBgLsORIcC3rHjVT4gJrNhlFz3xCS1dVR3PRbW2w6mxHbEPZ0c3PSPBXDIdgwCHtqVxcCvFiK2zsCALy7G0JcNFcOUerHhWkUfqudA+bKzluPJaKfATgwgnXMClB481ArhDdV8JQ92Fo X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7440f438-ff78-4dfb-1e02-08d91e5f3401 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 02:54:09.6238 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: M80v9r25q/fg3g2F5mn49o6G5VQDk9g0qq4ulsJuQXbKJW5/GhLZUhpZKmcZwcD7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4126 Received-SPF: pass client-ip=194.104.109.102; envelope-from=acho@suse.com; helo=de-smtp-delivery-102.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" After the reshuffling, update MAINTAINERS accordingly. Make use of the new directories: target/s390x/kvm/ target/s390x/tcg/ Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen --- MAINTAINERS | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 89741cfc19..8578927961 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -293,7 +293,7 @@ S390 TCG CPUs M: Richard Henderson M: David Hildenbrand S: Maintained -F: target/s390x/ +F: target/s390x/tcg F: hw/s390x/ F: disas/s390.c F: tests/tcg/s390x/ @@ -389,14 +389,12 @@ M: Halil Pasic M: Cornelia Huck M: Christian Borntraeger S: Supported -F: target/s390x/kvm.c -F: target/s390x/kvm_s390x.h -F: target/s390x/kvm-stub.c +F: target/s390x/kvm/ F: target/s390x/ioinst.[ch] F: target/s390x/machine.c F: target/s390x/sigp.c F: target/s390x/cpu_features*.[ch] -F: target/s390x/cpu_models.[ch] +F: target/s390x/cpu_models*.[ch] F: hw/s390x/pv.c F: include/hw/s390x/pv.h F: hw/intc/s390_flic.c