From patchwork Tue Jun 22 10:17:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336755 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,URIBL_BLOCKED,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 67202C48BDF for ; Tue, 22 Jun 2021 10:22: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 09CC0613AE for ; Tue, 22 Jun 2021 10:22:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 09CC0613AE 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]:60410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdYB-0002S5-6c for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:22:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdTV-0002Kt-KN for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:17:45 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:41414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdTT-0005zZ-Qy for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:17:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357062; 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=wmk4J4tkx1lA70aVIYeEXvrh31NYRHUZ2+idETr5EeM=; b=SbqH+/0kl0YpiecQe+hTxH480IqPuunSAZcX/WxwsQTV/7X9MH5moQtNdwj405FL+884FB U+2tOxjjl++lsIRAdi0ra0llnP8mYrzRcwMkmvmpRqZldkuo5A+61DCN03g5l6ePr9tomH LAWVN2bUdl549hoiMJgVpLdvbIFZdqE= Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2057.outbound.protection.outlook.com [104.47.0.57]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-32-USgzZuPgO2ygAGIhugzNgA-1; Tue, 22 Jun 2021 12:17:41 +0200 X-MC-Unique: USgzZuPgO2ygAGIhugzNgA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oSLI+pRy/fi22RU84OfvB3Y186ZtkvvtNJfVGUWYguG8l/okcaHMwdB1YEuWTMvn4S012AKd+Y/QraKg0bZkpfNPcVroe9qGyGBtWKPYvCDF46jAgJlqYMWC890q3P5W86t0f1Jbjn3TCBG5v5O5nchYmPExIEF5Bes8He6GDqyOCdVhqggXECBJVza9ZRR26USJnJH+GoSlCAO+MkHHSMPa2cBRq8+LTKW7ApoIFsTK7haeaKuRAqtvzQYxQC3rPFYpIz2JarB5+EPBxK+uT25Z7IyYIeV68wXaGR2w5h/5YyAlWiTYPAzSaRrS6H+/hEoO33lKWOoLbwO8s6CmLg== 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=jnRUYohirJo6bc9I7z1rJ/LBlkcgpHD1uUbF8MRUBvY=; b=KKUzlO5vMhjiSPB0SmffrTi5kmXBWEt8C62SiAjqNHAJv1XeOyBa1rNschjbp+cJbsNQXw0GDVGGY07GELRNvItO5/xnRDPbyLr/iKZN8lwOmxEQRtUO79LL+8solQaxmq/OnZ5NfP1lyak71t2DziokVleqiiBj5dug1fFbY7uii2qwVcsOUiiXLKkm0886u4PDd28CFZHoKys1ku0MCdGgUT/Np8uH91+HfLZtou4/w2vdUuHE7au7eOBUHaOYgM0E9DGhmuZ2ZGJTdzHpPCxVTd3tYbElji54SN7kIpRL2G+9XsQCY1uVxCe+atJhnuoEGvth8Yf8fS/Hy3xVaQ== 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 VI1PR04MB5405.eurprd04.prod.outlook.com (2603:10a6:803:d6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Tue, 22 Jun 2021 10:17:39 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:17:39 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana , Cornelia Huck Subject: [RFC v5 01/13] target/s390x: meson: add target_user_arch Date: Tue, 22 Jun 2021 18:17:14 +0800 Message-ID: <20210622101726.20860-2-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HK2PR04CA0065.apcprd04.prod.outlook.com (2603:1096:202:14::33) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HK2PR04CA0065.apcprd04.prod.outlook.com (2603:1096:202:14::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 22 Jun 2021 10:17:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59fc14eb-3fbf-4c37-dae5-08d93566f6bf X-MS-TrafficTypeDiagnostic: VI1PR04MB5405: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: nNKwt8psUETgDj60V0KQQF1d37L7PCcP+XYNPm0p1f5IkQTJZBG9Entz5qUrNGsbH/OPi1HD9TQa7SoW669Vc0uWaDsQ7MBZDyjt/xIy/nZngTDi6qtZd6aQJQTOF+RtMVTeuCLzydJkwkjqPtixciSkveXoaGHtXEuqqWMpDx3JdLDiiMbMA2zybvzt9sNSrqlKkbyRPRCnCswb8WisGIcUXSrxvi9gNOL6ZdL4T8uTFtpWKd6oo+IIEbHlUthNn7hMTp8m+mF48VIFHwvd6FVfju4JDA4Z6BePd4u+tPCgBeQv4/OqHkJWG5qsVAqDIm+c92F29wi+cBT96e83scQkqYwhxa0E7A2E32o9QpACFUTDZZRWggVyhhswaYuF44WgeyB+mQZByokqzC2V/HukqfCmBKa5n701/4byupmZa5UBo+QrKXOiJQSdSnD3BPB9RvtMg8RdLalg8lI+vDGtPykgaPZ2DC2sg8r5ukhdACC6djEdhBv4zf54sHiF636Cwjm3lVQKz8L+k+e6mtE4dn5j3t2U/S+1vIg3n6svYb3a0dMG5WJc7DwWctSajPCJkFD1W2lKTv6vFFU4Ua8QS6AAl4xQ4BDvKpp3T+42ffIaEnUUAWfqC3j4saWXM+3h/KuL2HMwnuAwd/PN+g== 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)(396003)(376002)(136003)(39850400004)(346002)(4326008)(316002)(956004)(86362001)(2906002)(66946007)(6666004)(6496006)(2616005)(66556008)(66476007)(8676002)(186003)(16526019)(26005)(8936002)(36756003)(478600001)(38100700002)(4744005)(5660300002)(83380400001)(54906003)(1076003)(6486002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QuIxKC34QmEc1MK5N8oJcYbPzMIKqEbRneT2j21UTiGZtqHBTs0ncrCUQa2eMgLpasb/15z5pKkddfaUzv3PZevaEWQZckyHNTTJ5TciY+uVdIhLh/iZ+UgYYMUkUmZJLISB7qYY/OuiJbZtL9TMC0QzqswxnGiaSpVHlG1f/G1Bqjy0DJiC7zZAO9Ylapwf7BZuWC3VWnnAwvBZB5fA+lVL7JdhtlcccooPDI1c76/Tg5K3r/Mtx+cZRDUncI6739TK/DkgMBDm0WcuZ0wuFDsVmJtqKX2+DPkmjv7V7ws4DmGrsG2eTMH7ZiR4mlLv30cHFsYbJlnszxNroymU+UZC6AMQGovj1YTkN7zEmHl9A+kD6XCVEM6bHOjh23m95i48mN5+6P4N5FcduVxiWYYFGYNaIErzSh/f3DhViE24XNEfbGqjU9auMkuR/zj6Nru2sWRSC8CtTvn8jRiUIAe6yWciRehh+dltbU+AHq87GyUd6uy2z3gA1MzeN1JCAyObhSEXj7KIkh/Uebd0RXeNRgS8RdhwCjKcIRSRPHM+HY2ZhZZIOwDp5I6Bg2bdM3PGUkapCb3ao18aRS63XolHwC+c83Rg9bAUt3piHPAiDHhchEmi6ML/brt0WOvLWBBFRfocX29sfiDgefQuhMUzEIZiKZQOEq759r0CZ3zqHs8cQ1hYKs37qkFPBjvwAi0Iat41Ke93Kx6tClDvTh9v+lw895sS0Etk/vJuCghJ7kZMhAKJa24FvtoeD3PVca970oDYB7qx0BSA9ZwZQzNWJHRxqWtJLDFneE1Zut2WGPeKM+HpaH4kve1ltxal0IDt1fXmthDaTzqvYwnuIvLU7nWjS4vlOBzemMOEQKgpo1HDvagohLhni75Sld0hhrOcXR+V5h3ReorEyIF0OHqYNLFmbNex7tFpp6IAmY/XHKLkP5t6yaXlp+QdHJNIP1mF0vrnFuoEh7UQBENTSRIxByISJ2vfYH0AlyGDezja6PbZ5toK7SDmvgbWsWhtzG1fqnf0zCos9VSO29Vk4FbUWq9QkKKsAeLehdySLyU0eP54+RFUsbXcRNNLJtitHl0Qfbadjn053+Wra4tOuk9NNDG54ZUyUu5RcyuXaYvxIv3nQ8st3ebn0m4hKMF82rlPU6YkefP7WuCkqqvbSS8teuB01wi/wr2xpJWWv+6Y9MJ6dZOGrl9zBi02Qu3g6uniUtlmjIM+TUFSRteh8fKgMhm6B6kbYKp5eJ+CseeUi0sg1XJaRRgbk+I1sp6dARl8yaceXajYsnlS4PGRQ7bOAg8Ai88MnltgKoW5ZZmemB1+MKgGxEav7JnqILmS X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59fc14eb-3fbf-4c37-dae5-08d93566f6bf X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:17:39.3520 (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: 65jKO6AVN8CdHjSUE5szJ5/PiYsx5OAP7sJz7i4/APKHf1ir9YjTbXHqCShpEkeR X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5405 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: -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" 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 Tue Jun 22 10:17:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336743 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,URIBL_BLOCKED,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 0E755C2B9F4 for ; Tue, 22 Jun 2021 10:20:04 +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 860BD613AE for ; Tue, 22 Jun 2021 10:20:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 860BD613AE 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]:52424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdVi-0005Uh-Nd for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:20:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdTb-0002ZA-Em for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:17:51 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:44494) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdTZ-00063g-JZ for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:17:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357068; 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=ejnA0XeLS8mP5uKqVtQafxU3Oq3hXVKd93VxdEgF05A=; b=ShI/J52utsHh45jVZlcATxSY3I4mqgMHdTXBbq9EUwEPSqs693sRsYile/7at+fWfstcY3 /R/SiCusEflF/P5Aqv6Xnxx0ZYvfaVPK/X4ucq/QWhC5SZs3rUMcvS/ZlzXL3+pCQ/gEPg e+P2dPNnf5WLqBDIkPe4yYvOKrLNsEM= Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2052.outbound.protection.outlook.com [104.47.0.52]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-2-GnmJW7oAMjOvqUSfhyJ_Iw-1; Tue, 22 Jun 2021 12:17:47 +0200 X-MC-Unique: GnmJW7oAMjOvqUSfhyJ_Iw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TMupMOENrkj9LcpWiTLpwoR7l5m7/qDPqc19Rmz9gLcQXjbn9DyOB5l9U5Er4donm8+c0YXhCb3wz2WuBa+eIU7eFTPlBVGm+0UbOytcBQogUfs6Ito+EqA3TyUrmcoaEYnwop43nQwqdy5YGa00cIlTDlu1rxjr1xnlJus1A3pFFmJO2ob0b5tu7nawkd2XO4oza2YGDpohdo4HoiQ+bPH+RdiIID7gYlSYchBekB13Qd1wOCZu8UEi6TiV0X5d3K6q/rpIMCh3N8W1OA1C1v6ZBI9tzYQRQVut2z1He+9I5EtlC2sxfi5EJSxJ6h2/UFEqr3Z+Y2W5XOVN5aQ2Fw== 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=Zc+NdAtMX+OVdXw+G6Nf9o3ckvzhqYycZb1Wm6H0L5g=; b=IUMjBS9i0md5sgOcN4zZRkBKD7MTts7ziCT2brnl0ZYUYpGCISKnO9X8JvOOn7Tm10S+M9fjA0BSEQpshnsP9Ow57OA8RqIAXMo+XMeoCqYFFI/biOkKZ2Sb865uLi1CMthxbDpIgHii+F814wfl1ffsABEp27d0XBchMIv+a7XXklJ+UgLZDA1afE4qNlSEwlF6Ol2oZjT0m2jvpz6V0RVqDnk9omqrOaxDnA0VUntH9wuuVMHi8+2+kbGJlyAr8mMbjgInSD5G5WnTF5Nix75B6UEAyLgr8S/8oxe90vDLIPK2KjTy7n4VFwq1zK2d+nyk3zLd9D2uwDLUw9wo9A== 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 VI1PR04MB5405.eurprd04.prod.outlook.com (2603:10a6:803:d6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Tue, 22 Jun 2021 10:17:45 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:17:45 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck Subject: [RFC v5 02/13] hw/s390x: rename tod-qemu.c to tod-tcg.c Date: Tue, 22 Jun 2021 18:17:15 +0800 Message-ID: <20210622101726.20860-3-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HK2PR04CA0060.apcprd04.prod.outlook.com (2603:1096:202:14::28) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HK2PR04CA0060.apcprd04.prod.outlook.com (2603:1096:202:14::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18 via Frontend Transport; Tue, 22 Jun 2021 10:17:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 974d49da-f0a3-4906-f0fb-08d93566fa85 X-MS-TrafficTypeDiagnostic: VI1PR04MB5405: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: oDnl91tP9Z8tKNzOlDN7ZmI6P4FniU1UXmlTFoIJoL20NyWxuEDBEJoVRB0ze5W5RZ96f0jeaR1uojSTw/SU1mVR4ou+U9oEoyi2fnSciqAWEKoiKGPs29U5FMzjohvUCDX5V8ty+MD4kcB31+HTx/Dchb3NFIJS8zpmQZESEgnRHTVG1QpfxrAxQmAOhlSJkWY2KwrdKZ1+YGn3peV1q/NPUyvzdeMGsTcX1CukuwvJoixumb8d8oTwlVTuXBywDNT3qY9NC8dMuhY0jdBCCgXP4g1S4S+NOmleOmyXTL8chS5RQABvZF1jLumxGD5q0hI11gXH9quNfA3ALka2Lm87WGNA4lCq6ZXNur+8W5apJ071Ijbq1FKjh/J5057VhwPoc2U6GuZx5ZCIC5UTt8KM/WfGOUcLVsjyct0xLuZukXpRsXUn8lUIkEvDlUn5mu6cLAX5b+C8vNNxMX4NTsgSvQiZ3V6VyzMVn7rI4UP8PSctcE1mnrq3VQoV5WWgsMH900iZOgyhOs8A2O1QXISOoTwRFjMaWfWlSasYLU/fg8JMJb6BdEcMTkl9UrkOEe8Avc8Z615A1gzU/zrqHK+gPUiu0sQXMqdu89XQEL5jHP6iYxBTYQVzjOqh1i1lCclrGJ1iNdf+rD/0zTBJbw== 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)(396003)(376002)(136003)(39850400004)(346002)(4326008)(316002)(956004)(86362001)(2906002)(66946007)(6666004)(6496006)(2616005)(66556008)(66476007)(8676002)(186003)(16526019)(26005)(8936002)(36756003)(478600001)(38100700002)(4744005)(5660300002)(83380400001)(54906003)(1076003)(6486002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pzuplKMCVwZOTZYm7vN3iYHC6yJuzoch/PZndip4hFizJ+UfoeyPvtCcflU78QjmrZ4yDwEdZP6JigAd0Ny1ucuddV/c22hd42DTU9rV9RtZn5+e0UWYR2HbOwEFk722y2/mttElzTktkcy1cp7e7u+xQPfvMpyP68bIwRc4RUsJpRPpDNg8Nooh9WYhVk6k/fUYYheunBwhpO5er2dLC0skQbHviEA8ReOXq9wzcno8QJF66/gXYvgfOTRwDs3xNzIMhjMzQLHiOfSbH1k9S9952+ACvwCVpwbRyjLUYF/SbYy+DYbZzUIpOCraS/IOfu2Na/W/UWqs7gIem1Qgnyj3z0uKLHZsSndsSvY8wydWry7VBSpiit0KOQx/czJoH+1HqBAXKh+5jRgt93tOV4AJfK2p1OcZN+4jC4JgOoazG3fwx1o6SHn0HlxZePbG1tX2UoY0yYTUIHgdlGzl5ss4cQ2JWVxKU3PqUjicoRKLYtXxhf+P5jQ8S8e/6Ch9xCd6I9YbjFWurXTcc4MoIB14CeK72EjssLzzJn2lf29mQPOhL+eQu8KnA0UKsGJ4PnrX0gJwyvFy3v7Ifdthg/HcXWSW51BVznr6QdhKpOIxLEU9E9KjTe0u/y+QhRZZ9QPZFWvxfqP+e3e7G/Bsyl6yL313UGfn6rTlBnIZOC6WYtTEx6uKjOcokh/1+TXIChS+0/xo4XwQFhETekRHGIHRLU5C0k5TtQF1dVTGw2bui4/ofbaQL8uGubQ8ZxSdO8UjzDxIUgj3XBWtJOL9u64CuB/B0m0rpGXbgwoRHKgCj7wXMrHXq7ayKERc+2ik7gOSnt5lewnwbCUME8KgFKmg7OQOUl1QHdtCGzLrvnTgY0cOZHQW7QRWjHMj8hpsPk42gGUn+feJZyLSmLgTfq4Q+o1KCqDfib0Fdh23PoSWYmNAYWt9ZZEGjgkugPR88m71KeoO9876zb5i+IAf63gYWoTki7cGgbg1nvrNjFXlWg30HtgmFMdnBUu/Ik+oLqFw+tEqCTqdhHen/KPvQ2V48ZOFqoALJaGP1XrTy5XsMO2tDYBT6nRotXtgAlGbvE/UFWszgeAonYbY8orlqDJCLn0IKIucVI5MfCX2vQcccujPkNiCmYv3UHz+ksPLlsqR7SUMmOKGX1wBSW1XjNEB1HyqVrLCfIUUk6RqbVkaUzeFF/3kLTZ3zKsiOqZTcF8w7ccQnsppKdpZSkLg/IreDZwZP4Al6pQL5l98sVYff3wIYkLibfzaJeUYr6zdEcy7WmpJ7vZ27Rj8khaYUkYQIlT7bI6LbmlzHYnNZzJRt47X7gVrFub6A46Tdz5d X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 974d49da-f0a3-4906-f0fb-08d93566fa85 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:17:45.6713 (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: NPCcTluCwSLbsMcJ6z2jlDG6BvQkseAbh7sqTwksFNJOj/XjjiPHo+gh5raRgHOM X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5405 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: -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" 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 Tue Jun 22 10:17:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336745 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,URIBL_BLOCKED,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 3E271C48BE5 for ; Tue, 22 Jun 2021 10:20: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 A300A613AE for ; Tue, 22 Jun 2021 10:20:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A300A613AE 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]:52502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdVj-0005Xg-Qu for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:20:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdTj-0002hE-Io for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:17:59 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:27497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdTf-0006Ab-HP for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:17:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357074; 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=gSBbX1WXaZu+QwP+EK4Jb0gewy9eheCKRm2hVCQfCLs=; b=E8Ahg83TjzFmuUJAOlvgQmhdd/z71EJXTOwoRdpNnJCosNNrmRCp+0A9Lvta6obCoZR5q8 dKa4McAYNTaJShp8KWer24VCBuNPPQRrwUdw4jGSLmj2W225FNUAXQ2cKFAUHeQT6+dKRj 9pRPqaVtdV2iQIvWxyJmWTU+kvMVC4g= Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2052.outbound.protection.outlook.com [104.47.0.52]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-12-30EMvS7sME2D6SFDtab6kQ-1; Tue, 22 Jun 2021 12:17:53 +0200 X-MC-Unique: 30EMvS7sME2D6SFDtab6kQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bAlnjYODj3CD6dfiqn6cX2orxYQ4rktd1pcEdYwJKF0QE7Z72BkNit2H4C/evmveyQsmyHE9xp0J6MUTFdl+grDp/AHeP37jhz42zTTTomHVhu3sqCnCRAitoL1brZ+dJjsW066YU5O5wh/acOF+hrSs+c4BQXrouAAMpLlLVT8lcVQhj77szdszFdJkQAgJRUx06SKA1qHVLpCS8NPUIyf+YMPjF5Yql3I/9Y1VImZQEl9D3bslDxNdpKHyI7MQ68Q251W2nzf8Mz+pKdCnuqEp2RK5OoIMsJAHOy+HWJHOpA2buDItJD4lfbSbMJ9JfI+jO8gd5p+atdCpDEej/w== 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=CsJ4x9wsHMPluQQrp0HAkUlVSXc/ogjdBWddnj//TUk=; b=YBsU3m9BluFb1SlMrczD53oACTf5poh8A/9aHRp8zm6cq0MNOf2vCzViVjqPkfk6dl58Hkvy+olDoMe5T2rzoFzMcueHzgouy+NsjQmrnctub2TNUzJkZ8Mo1TOleeP3w/NOqKhoWT0hWTF8Eg5XNPQ4g3MuNPhwuxMSZJOXDPWDhxzKmsjHDMAnCQuLuIKoA6VV1rF0NlDHbwaPWTmK/065RiW6OEIQcvxzUfDAsBKB4V991VOY1cu92t8Q8dbV2tRLwFCT5vd1oz/1Gx/O8InHT20h7V/38/wWw95IlWoVtV5cve/n4a6zGiUl1Lg6lGpCnLo2UU93Cx6HNlVf3w== 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 VI1PR04MB5405.eurprd04.prod.outlook.com (2603:10a6:803:d6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Tue, 22 Jun 2021 10:17:51 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:17:51 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck Subject: [RFC v5 03/13] hw/s390x: only build tod-tcg from the CONFIG_TCG build Date: Tue, 22 Jun 2021 18:17:16 +0800 Message-ID: <20210622101726.20860-4-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HK2PR03CA0053.apcprd03.prod.outlook.com (2603:1096:202:17::23) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HK2PR03CA0053.apcprd03.prod.outlook.com (2603:1096:202:17::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.7 via Frontend Transport; Tue, 22 Jun 2021 10:17:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1df1a6c-24a0-4476-2673-08d93566fe01 X-MS-TrafficTypeDiagnostic: VI1PR04MB5405: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: nIdxeJBaqUBBhUuNyvh+FEA+Rp+myxOSAGs4+OX7NiqcoZPFVg11CMaRrujFJYt0nNnpnlWWCdhqnyOrKOFnn93HHLHLqBHd08Guc9M26W3bUIXAM+wrM0bY9AqfpsJk6WmydeL5MfkOj5bZWahCQ9c3l/mwBR55IQ+M7ZpfVhIfbBxisNtzSgHljEKFvQfOSNJsoBjqugjCbw93qRyZn/0Yt93a8HWdZ105701IIRlZiRvN+W5KpwehDSzRlFQTh3oymfBOFrtQ1ZYIfC6tV9Nan99tq+fY/f7ta3sUM37N898YPBvGsqLCIHgWn2zi+WISG0XODoIXpavafgKQUmACJXrCaUVuZ0l5lYcSyd5LPFmn94lLR1V769bdsujYOnC8Mtd5Vx2Xe1GyntFcR+B8/pQuq5QjSPKaIr6ngAGo9ES0zvmodBv+gmFBCid/IqdpZfVumQoaeexeKeSIk/535SIreVj3dt6zCUxMjw1m6O7/N+KkKucXoQ77lYOVvF03Pb/zsck5cVU2jzuT0nSVrsM13q2+hhODV/c3F2iVs/zEH4MFINbpaNAeW/a9Cpmrh5cEwgNyWSNQ8rNaKJ36ZtsrYDDZ02Djp6bThiZfWL3uXi6k+l5ISbggHmspRmzAgIIpKlXoJOuzeXQ4TA== 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)(396003)(376002)(136003)(39850400004)(346002)(4326008)(316002)(956004)(86362001)(2906002)(66946007)(6666004)(6496006)(2616005)(66556008)(66476007)(8676002)(186003)(16526019)(26005)(8936002)(36756003)(478600001)(38100700002)(5660300002)(83380400001)(54906003)(1076003)(6486002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LK9xjfhQqQsBNNT0n82mJz9WMUXPnwBw+0wYkJzL/+3EV/hwoALYHDQV1dR9KuOV7v4pvwT8rlfej+O4xP9tuKbnhkidDBJtPDX4zucujN88QjKDrmAyeB3KwSpHPLnvIA75L5s8+RqIs8tmhsIgwFJkH3SvITHwm9Pija3Ms4SjJvv8nmd5UZIePNrGMbYhCsVFT9z8RFSt3gpgZGDRZMOc0KfMT50FROUpbdEzb8DaRta86ErYumfarB2M8wCRnurEjvXe297dthq9ydxYbAVrmsgcAolVESP6k1oALEFofmTkFIfld3Egd+Z2MCAqC9vO94c13d/AK80UDhiGOWpTQdzvb+DAeDHbOe3HoL/9zKiJ6T9aAMuj6NwSjcH5Z1PFmTJnggMyFDG0wurzkeh3N1uT9hnbdbNC7In5jYT5YGOjUyQFQVVTOx2EqFflzE2UVzBjQuEG2+fBeK+d7fVfNxNwdlXD81Jf2B05s56RbhrckClhAidOqc/qw+QtiGui1sPrw+qZqAzjGZRoDcHk6UTvvIkqp2esG9Viy28G2VYq8CiuYdVtCtBttlQeM4ia3FbLAIJljLRgcxgb1CZoIsTc1d/sA4AnzIxDAM4sMBiTRp82EtVijOI2AhUWPKkptUQ/V6VENoDWM+c3jf1GTR/E9rzYpig8YU8TFtSOiR4DERQZMKiSnRXXw44r0z0BGkfi6jDi4C753HB+hhsXiIThbC5bd9eI/b4TJV451Rv+ZG2x1tuWQK5nouC1bhrv1zSEm9XXDUJucetnHHDxxjmucKdzLR1/UJ1nf8YhT9xlLfPI5LSTTvlE+Grs6c4ymJDEjZ1sQqtNZC4zeefM1qG3wrEuN5rGae/OhsQurHLk+WwwF2D+HXa6SCQHnyoyWXPK67NLB1brU0Rm5GxN3nBDAlzyZFFKE1t0mCc6dIpo4WyzmABKsyZwIuZkBbTjy5XRoK7qRgrF9kgRYxePyvXvM8ChKtnKUimLR63gssjWleTTwj4tF2w6JdA1x8cavAkvuBlJQ8SKBr5A4M1f38FMmi2MlVxKtGLNS1A87S/E/vxSPbLX4pqgvGqm1vpgemT7f8KiUvtEcCRiB+7Md/Na4YccexNJ5bqGChClKb1VTReyTynKh61m6uptQX7xf+wjnnQ6vVOjCqHgZB5wdEsML0V1Rv3XYL171u5ea28+gTi4dgIw2yyNhc3aW8q10y5I/cctAo/edI7u/QW8nTATTcAvJCZJb4gWhySNAo0SSWd5gCpHfFs4nCRSosJYksiA6ouR7YKgwCMGhwueeEHtEz+Jv9zhUeHrC/bkVrTa9q0NBrq8g4z9hTkF X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1df1a6c-24a0-4476-2673-08d93566fe01 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:17:51.5209 (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: NIHuu5Y30jCK6iHJej0jeoUVXnWevwxVRpaMdOp8VMeUQVkGtmw+Q0wOp1HslNct X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5405 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: -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" 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 Tue Jun 22 10:17:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336747 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,URIBL_BLOCKED,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 27CC1C2B9F4 for ; Tue, 22 Jun 2021 10:22:14 +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 A9BAE613AE for ; Tue, 22 Jun 2021 10:22:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9BAE613AE 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]:58818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdXo-0001Nz-Lk for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:22:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdTt-0002lm-5l for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:10 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:58273) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdTm-0006FZ-Ui for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357080; 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=0ffHu05ns0a4PVzRntMRhGeR7DMvg0pTAyQfKBKaZz4=; b=NZIu4ylJ07J2rQGflWVGUmCa/I+5SBaphKRHzKhz4FnhZ12Mb1bH/i2XXf1smPKiBF37Nu BKjriy624OXRZF2/SRzoMxpOa9nEVUxV+qcgMH1EWoIKz/TVN+ezwHXZpP0PgdWJXRVoOf QRHKfwSOcF06N4z2o1AC6hsmichGE2Q= Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2051.outbound.protection.outlook.com [104.47.0.51]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-15-H1p4kDNiNei_Va_HOetYqw-1; Tue, 22 Jun 2021 12:17:59 +0200 X-MC-Unique: H1p4kDNiNei_Va_HOetYqw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FnwCySl0ozuTiPXKGkPLQGO+YLeKhm+UYO5AZ2Wcrb6f7FnCB1/mHI7SjupjugzI2BeDz45B5EDGzceMOsUiAdCISnmEnEdWa8tfk3ttk0DbrIzNw9PDmbjXV9NoyZOMUPgrHbXI49FRMb/erYeYvyVdeChQiHZigLP5kjChG0waAyWVW1buUpobi8ZLks03pJIg7jjaZmbcAjqgVy4t8/gGJFssLfhgTvwGVKj4nFaOq4egsk/moeJ3TaTWMY6wBzpiVUjXDUY9tSc0B1hLYeEbyMq9RTvD/A0319hhAwAoZXmny+7DEmz+TrySlxXluk2UpY8LmWbeRZIExWW/Bg== 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=Cr9a3tWzY9nE2P88NC50Jvm5gSYST+el4uIWz6Llkeo=; b=N538YDTZ1aRRiC9ZEtc7dgH5vbx1NDoPzHvUVBhubMiWn9koGv2J0rR9Q6SbQ1dhCsTQFgKGwRFbhUPoVsCvvi8fMgTv0W9ERugCR9DF/twDen+IFCYK7m7pC4F6pKmlRoJ5Db+j7kXNeAuMWp22XRVeG+XPieHzNoXZkAa0gMWjyZiRPKE/SVcZ7gNvgQYqrJF63b6QbleTaQXHKlvTK0DNc/0hh7zivD5AXFNWtBBPaK0D4TYILamgk7kh6ETHXJGcM8OuvWU1yTRJXjlSktE0LaiBJqI3o4jCoAjQ5sgeHG3LwHM7zsxXR4mZrl1qoxW3qS3S7PlauSACqTXMfg== 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 VI1PR04MB5405.eurprd04.prod.outlook.com (2603:10a6:803:d6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Tue, 22 Jun 2021 10:17:57 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:17:57 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck Subject: [RFC v5 04/13] hw/s390x: tod: make explicit checks for accelerators when initializing Date: Tue, 22 Jun 2021 18:17:17 +0800 Message-ID: <20210622101726.20860-5-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HK2PR03CA0049.apcprd03.prod.outlook.com (2603:1096:202:17::19) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HK2PR03CA0049.apcprd03.prod.outlook.com (2603:1096:202:17::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.9 via Frontend Transport; Tue, 22 Jun 2021 10:17:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fa78b9c7-4601-4fe3-7aa5-08d9356701b4 X-MS-TrafficTypeDiagnostic: VI1PR04MB5405: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: AHkDdNz8TB6Oc2EaqrUnBuTKVXYeZDOp6AH8VUNT4tbMmYKUd+tfpLuISZcU2lFvPnlly0LGINmxp6seKJb5JSbG71C4d96891wPauTKhTe43twCyFqcXrY4FK2KrGzjAndduWAPMdANqvZWM/D/AGalpf0P1+JbiczGZM5gZasZAqWjT65hypaJBKTolb5w24iMKOD7Jz7ht0LTFRPS/RzV2+Rzk/0LUcHh8jqb/DDiU6AtzgfhnxGydUkIJQy4iqQ/cnEvX8IEw9AiqM9JQr10K8ELh8fxe0IdyE1jnEKnXCz+gYp5wgntoffmgRlIUhM29vVScFtG3M5M7GQfKr36UNi1Oe+c52ETZU7n8aOO8TX4TCLj8o8KG71GGpdZ/VtHoBdKdWFlo7AXmW1E1bw+q/zi6EHv+bwRawWX3XPxmQH2aJVO6+ZrKgrwlqJyuFQUTY9KNl8qNkhTMIR8dpXn7EY0uhk0/yP+CxovZNUIxr6YlvCITJSKdm9keFRr+i8QVkdkxjV35l6liShXxbvrQ8QUaduzzdJjDrYEtiauhZfiUIIBqbnyODGzzjISZnLWcd3qJSf9tzkuoWb+ljqlvqzwwXZOFwd2iFl28pG8/VPARDzMX7cy27nGXfpozKjOGAGY2njAPnAhuJe7lg== 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)(396003)(376002)(136003)(39850400004)(346002)(4326008)(316002)(956004)(86362001)(2906002)(66946007)(6666004)(6496006)(2616005)(66556008)(66476007)(8676002)(186003)(16526019)(26005)(8936002)(36756003)(478600001)(38100700002)(5660300002)(83380400001)(54906003)(1076003)(6486002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J8+QVatyMlPC4z1XcIx+RBOMTunrWV8AbMuwdEpk7Ny7cEPsUG3zwAHaD0ULEn7y3t77jXyFBAxeJNsBZFUYu7EOjGOA0sB5o0ilh+oSdAGDILzCj/rtoLfn779UkLU4mss9cvXo7GTQpWbFc0CpbMJXT4vTg7QNaIoF4mkfaHV4tP/xTO6Y5Rya9LXyzmfMl5nmHQMuVvef3Qe94o0AY/+NeZ0A4Mn6fRxgwpF61lC/Uf/USSGDgwXnkOW5ujCyP8swwiEAnGXPf54ZkNvU8HQ8IF8E9u+6iU8QVhI0yaIPU57y6b8IrtfAukTeZvm/udVS8vtEYPoqgkCpWpwoEDa9m86Z/GBUD9nGKkNAMeK+2k8kvxh8thc2yEB51NewoY0mBKTsheyglgsqS16I4Tzia09FSQvutcl8gc1XpB7DHMXgJULJEhQMzSjqD1gZu9cw/sJvobH9b3PyIzFNJxtZD9uamsxQeVlIVHxqqiQlkSINJu5w0kj72BPOEP8n58qN04Bi5zACXaSTQkxJWVMnpKjAimTJlkx2/E2099ZbjTbfECcDdRxfjQygT6OjwA19Mzeds75JtRoelIVKOSLT8av9uOpQvdLmNRr/YKiYTKHTxUQ386OXPmm4KLCiBCdsycC1ydATU270bk8WIEjDgoII5sCr4suU9/nbnLr5NPo0ShWoGwZQhyx8bZffDK61gq1TIi+Z5OMI8qeTr29CCGPP2dedkHBZMeukzt+npD13oQ+ES2cwI2+WVbmV3WDCcfkNYawVLYNO4m6rbN/5HFvvwh+ZHXVtGe6t72YXB/2H5FYCAdo3o85o9d9s+LT2Ke7rHfelvjqSVAJC4GeUkHdOBgrjTHyFEp6tYfcm77XWjkBiGdNqmVn0pQ6y3MPhq9kft6fXKSrl/BDniwa2rKKHhKbVVIRsVvswRCqTJXEZ7JZdFQi5ySnKRZSdAQ+1vaHTjFQU4FfeWHfx2HYzd1C/OWMI+K/o519QYPc4blatM++G9wDmGB10Hwlpdq8cbj/2blDKdtAxUZzitv09xB19V6XL98qLhcj0JR9XxlnK239Qsi8pCvXVpGaxz3AjFNpMStCewAfMsb/NMXxwuylEQo5s1/fhv299gK/1eivuOJx5WhYVxQ/OaNRO5yzY7fOSoFnqltPkEdZPRvS4baT1QRaGhLgtfFelp3Jx9BwLYXGBToyXK6mEFMX4+xph6crW/nV5ozQZ4jBsHwIAbbK521A6SHOJXFgrIRiLv/0Ps61wz49sos3nW72bQGfytGWZebDhVDcOvsa2bt/Lg2UUvM/Ae9oFH2LIj5NIsMGBJC2ACNq0U1IpQszz X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa78b9c7-4601-4fe3-7aa5-08d9356701b4 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:17:57.7663 (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: YVu29wQdnNH3A+fTA6isFv5aJgCjkb9K9YaAABS0DPz9wSdZ8tBtsMBscdRu5OSw X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5405 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" 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 Tue Jun 22 10:17:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336759 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,URIBL_BLOCKED,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 B7588C2B9F4 for ; Tue, 22 Jun 2021 10:22:48 +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 5CD29613AE for ; Tue, 22 Jun 2021 10:22:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CD29613AE 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]:33120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdYL-00033x-GS for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:22:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUC-0003Uq-2G for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:28 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:36163) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdU9-0006VS-B6 for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357103; 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=NZ8IVP+/zApoEh+BqT+JPVGDDLxpay6YbMz/EFtjrqw=; b=N4UpJlEukoSschgCX0RA9W++drPxbVYB2zcurG08uD0TZOJWIF68Ja40MG835E/geB2/dr SyNzx0DoCIgDFqNb1h7lb+y8sTsmfasHL9SIndJHceZOihSQ3wS17oc0JyF/oo0EWyCRjt hR1hmaYcwpTTzTATMQHJ/WGGeJhE5KM= Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2059.outbound.protection.outlook.com [104.47.0.59]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-27-vpOIyUW4OX6YlJ2uG-SpFw-1; Tue, 22 Jun 2021 12:18:23 +0200 X-MC-Unique: vpOIyUW4OX6YlJ2uG-SpFw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MpQlND5jMbPpjXLpb1oEoxfyO5NMTQo3uA1WPcK51g16S24B9J77/mFjkt9kOOisr+DmCTWLG5xCEfcRZVTTTWJCyphg5DCXLioBBsPOtncB6WZBRR5VM4orCI4+Di+wESSkg7D7LaoHRng6IJr4QQsQ6DGfoayijcISSetzwZ41ZwhV3T8zkJzHhZJ9Y8LQ/+XVmsakGuunCXoiGxT+u9qJ77PZl7gdovijfEvKK0ekoovyZEQ1ho8pbMEnPVb+kad3E+yCuuYIxWBq1M4Cs/9Am7Zm5c8vk45Ckxpgr/9QfVZLtP8JdC2PUMcNbK7x5YJlzzubQ8DarGW3qMhs2A== 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=ytOf7LW+TZaAePb2wsSPx9rQQg7/l+IzunlUfKZET34=; b=RbvRFs14bSFbCqqSVWW9VbJxZd+m1XMCWeAumaVj6Y7TJPfJYcX/Q/KySp+YnOF9iXILJiCKCbTdoylV1UT2sQ+ZOhWy8ageIWq+CpbRu1TL6D6MBHGldjbkqHrYnm/4r7kPSfi/yOGs+eUmJZUoyW00W0sQgSnFas3w+lzluHnHbsHHlJggG/mURa9QwNwr4VN5t5aEgir4Ml7EhJUdWUsXnB3NvXngzUeNp4HiRI4y/V4BIlDvBS/mDirl1xo/sn/0JoUPG76Cz9CGRJGgp2P187LaDi8eD0T06HK551DnBLB+bzYFxPXJtm95RszUhOFMw7bFM9P3R4FxgMOhog== 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 VI1PR04MB5405.eurprd04.prod.outlook.com (2603:10a6:803:d6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Tue, 22 Jun 2021 10:18:21 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:18:21 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck Subject: [RFC v5 05/13] target/s390x: remove tcg-stub.c Date: Tue, 22 Jun 2021 18:17:18 +0800 Message-ID: <20210622101726.20860-6-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: TY2PR0101CA0039.apcprd01.prod.exchangelabs.com (2603:1096:404:8000::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by TY2PR0101CA0039.apcprd01.prod.exchangelabs.com (2603:1096:404:8000::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18 via Frontend Transport; Tue, 22 Jun 2021 10:18:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5eb4a4c7-61ce-44f6-6f3e-08d935670fd9 X-MS-TrafficTypeDiagnostic: VI1PR04MB5405: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: FS1lxkuBZh4EYTLTc/kpW6cuvQ+owXJh3JJdOi3TGz10DQYzS3y1+inegyTnHRXGuL56dKhrwwLYdgB+o6UD5gee1hGLzqWav2MCKURUE5x+M7CA5FIm5tg9VdWsR5ToiL2wAtlh6T9tj7AVSj7qzvKZKINtx1Jp8KsmSByGqveidpf/N13i0p/FpW/cHWNft8XsfatGxSv7cBfhDe6O5jEnv0XJNqL2BBF/Ijj74t8SUgqZMDRt9DCMcJNyR2IF5jIFVg114i2FPknhldrnUHw0cfpMU8x5N02YK4ZQNqElnzZFtHJ6Q+ekHSwhVRX10tWHjRbrfkIPHHZjugrVr1A3sTJNf2NloLzAcSsL595uxJoPytbKYyU6e8JwkVt0Cj03B0ScRlJkqCKciox9bLo0YHvSycEomximS8bSVaolwxPztXqxjUvTehl1vHYuurF8o/LGAdHzQoQUcQqubrCKhTMI5MZ5by9nZa1/kxeqGDulylRgBjZh1PVVOdNsoRv9sDQsX1kR6I09qWJwOixq33ypwOvpHI9tE2jZcW7yXVW5qoA/4kpbFS9IzCRxp+IHkWZi6B5MTsLwI0Xy0YiDLobQ1wEwseooXiPsrnVcO55oSm86pswL9w2eTiVUWvvYMrMWQ3prSypp8ITq4Q== 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)(396003)(376002)(136003)(39850400004)(346002)(4326008)(316002)(956004)(86362001)(2906002)(66946007)(6496006)(2616005)(66556008)(66476007)(8676002)(186003)(16526019)(26005)(8936002)(36756003)(478600001)(38100700002)(5660300002)(83380400001)(54906003)(1076003)(6486002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bXN1M8vSUqoaQtxNUGp+U6CJJ32Tx2XTKT3wD2Py0Wz2jTj5Ny8/JsJ6ygu/8Imt1UIV7LduGDsVM9tXyJO1V86ONyrMQ4J3CuZQHU3jMbFxlm+yXqjKBTgzvtvrjPKwO4Bl2DJV1M4ajv1x5/p5WRcC7/4fkn4zayHJMvZEEp1rHgWzrJN2yc5V/bVn4eRC13iFSwWqzlU3u+tJ6LBqBkghwgqxd5plGmKmf9jFEhu6uz1HAbqzORxCmoyKGi/Yoe9sjLGX/D2/XZcxgfuBt4E8KY3nTXdc9ZZGIY/RENmGfnNWFkBJ3GI8Mg0eCeXD3TnZMjnBOvay0sI+ctFJ/RQUy0thrn/7egJORBCSrta/3crFqeNMYeQxqYFIKBgm7l2OfhIHuCBNIfeMQUOmBChcF7oas8dQgjlLQfJQHYkb8O5Req+kg2BOBlP+AF144j6LfwYTt+RH24h/5klOpLug9u6ClQbhiWsVliVEsAnn/+8MyObcoHUJgYgjLEPwDGZIPE6JBAb+trhKUIsxVWb2k53WDC5lJjFxV1Tyc++mSlA8xWicyTn1NZ+e/Z9MXgdAMXyakC+JhnjAzG6UVSTNVOn8oYNF9WHVqVMkkt7xPe7NYlfKyvGri1bJ/cUBtK4FVsmNR45hPURP/6JGVbcPP5XZ0LTt7gUSxbhZgum4aJLVQ+ekfxql0vT5hRUUGsAnUWq6CkM8x0A0sNacSiet/MteTw5w2NHfTDrXO6O3KHI0IuXMr//lJOKCzDLASjkRHOtfjjGVZvp84oGq8zr0MSzKFYVF7C5UcHHRb9JEmIwVU8opS4jjhM04zlWos5/Sam4i96UHs9c5XuwQTmNkLkFZmvn54bT6BW1BJ2NFrgAs4uXCHYlN58U1tgJ7YAtOLvxKvXwLs9BwiejKk+3JTiIeb9GnqGKHOomtNsz9P1aliElfWqFmhQ6YNEjgER67fhDTPxQ5IEkjDiVXk+UjEcS4tj6u70ciJdDovXCj5enTRXPPwVYl0/2NEuUYNLkKYKkXsJGMr1k2QzPOS4c+FG6abawUoxaP8/SFzFlNoiItaw68hFtMAVzUxE1aLKqyYUWmhtB0QqEStEP0bneEEL4AnQND41w4yahXRnArpDCS/GjsGeEI08+ZNAZt8Tv/FDhIitaT6BiNs+1LQRSge7NV5hX2seyqnI6nj0YZQaw/aFtE8kPHgCk7Pu0zN8vOSwMYG8QFCLeY1Xpn3iUYLFwIVxBQuS0JsVTh92jFFa41AR7Mrf4B6WwwQH4lMFqmlg/WZQTcYKXR8Pxhp5YxYKoXThO58sGq8YiEpXnO5owSjV5zKb5CSbT+Wr76 X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5eb4a4c7-61ce-44f6-6f3e-08d935670fd9 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:18:21.4666 (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: 5iXWT4kBK9i+DzHcf4xAP6BdikKlO+JWNSzzaBvL6uWFLxRlkaZ++/6aJHnjOH7b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5405 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" 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 Tue Jun 22 10:17:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336757 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,URIBL_BLOCKED,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 69311C48BDF for ; Tue, 22 Jun 2021 10:22:46 +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 D6713613B1 for ; Tue, 22 Jun 2021 10:22:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6713613B1 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]:32818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdYI-0002ry-Ui for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:22:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUK-0003pb-NI for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:36 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:44234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUG-0006b7-Cv for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357111; 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=mdmGg5Z6/9J48gXwVPMDbsDOGE/y6l8HC4JS/JhKIx0=; b=G4lw/8e4xWdD8sPY4VrFrKNpWK7TA+eLVwMqo2nYk1en3Gi+Lp1YsV/W/CjX+MdS0+JWa0 lV6EvktUfC9wgMyQSMEbd0zWDjYDkralbIN9E0Xo+lPTpDTrNBusH+ofFrjLVjqOZNmtSO K2HNY9PFSDRG/77O/zbgP+d4OPFiJvc= Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2050.outbound.protection.outlook.com [104.47.4.50]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-39-FIGJZMV9MWqW6KbCIuAzgg-1; Tue, 22 Jun 2021 12:18:30 +0200 X-MC-Unique: FIGJZMV9MWqW6KbCIuAzgg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PmxhSLiDGvNDRFbpOqWHG4g+/eDOBMbiI1mxV3joqPfE5pgja9p0Fu2jIPy8zID+E6LSnZo8p3cPKwjzOqZVwysiNBp0U5X+ZaJXZK6zB1EQB6t+401KhBbj5pf+UOKpMjqvPlr3E51cfu4zCABIEBYJINJOIBhABVkzVYQjgRRp7OK4HXJR1YhPYkxTwR9J4NLaxcCfjkRt7Ho6aF0j2zVtgif5bIb86nlK2JChQm+TXz0nwL/SpoGEBj2RjpGTdX6v1slaA1luCcOZyOH3zkrSJg1WB9FKuiz697QCUSHWSOE+gZEhbkbTjTZgFZ0u29EnjrkaW6TBn+FrF/zWwQ== 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=FKT+VFzCUHkHK6c6RZgMYTmHExJ9l4D4hn8CkMy8rP8=; b=ZCTUzDjAHolUzd5PnnySm0o243CzpsNVgXe8oWSq9Vt0WF+8cFK/oG0++MupUiKbMV94fRMwzo0T7Ir1V9Rp+LXiyjUNI5hW/68NOe/HWQ8SQcT+zDrbw34sIaToAt3RPkkBYq/TSZtIqxEuZM5HhnldheAVhBnhPdz71RL5OKGt+IZpD888qz3mRgGStwiHAUetvIi18Tuzz57xYwjqESPYaGGTbKUAggaQFbFNWIlc1dF7KqKiZdozFc7gaYTCjbdn8cRH0qPasdpCmQDYyCG7jilk55aIlnOOCYW3L/1XUQ3YUmaxmW8dTA2cXjkO4TVRmJnMWV6ioClS7851Yg== 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 VI1PR04MB5727.eurprd04.prod.outlook.com (2603:10a6:803:e4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Tue, 22 Jun 2021 10:18:27 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:18:27 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck Subject: [RFC v5 06/13] target/s390x: start moving TCG-only code to tcg/ Date: Tue, 22 Jun 2021 18:17:19 +0800 Message-ID: <20210622101726.20860-7-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HK0PR01CA0070.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::34) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HK0PR01CA0070.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 22 Jun 2021 10:18:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4d21f81a-064f-4484-f037-08d935671378 X-MS-TrafficTypeDiagnostic: VI1PR04MB5727: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: 0QuIwZywpPtcQIZJY4LBgFXMhZeoiVfj2kn9MMn9cBCqWCOqrVmCVOKx9NhuLHR/YLKBPK9e9Rrc0LKdko1IoSxfPcFWb4uHWKb6Ne1r2e8stKBr6SY+tpUjb+ScmaDiyGAVgnnUygtGpZKRjovRRo/HAK0g2nJMniJC0QXv1j2cbJCi8dLHSj9tOVXS0uDLWLBZ9OO+GExDQPIc4Aj+/wkwjfEaDBLAnCCOZqXudWDdV3am0L4BRn+e8yE58VjGZvO1PuFAcn3Ky0y01+a5n9mGdYdnJbIEV7EzJgzRz90Ly8o4o1OTVfISaxIIsWgdlICGoMKIXGOd3JJ8vpyfba91aoEtXsKpZzuBTLbWDx81WzFwcBaHV7HR/7iBvPxhM6B4fn2aORha9q03o4ztPKnHkcbAFzGxg1qXFovNdHgiLU+C3tNHc3mmyjD1mEFAY/zdrM9Ws6uR1qmH4NGjTKNQrgFs67eg977LUHXFTV2Y4rGQmj2t9i+eJbapaV3j5d1QY3w+LAhmMiDUpbccczA1qBO9hXKucAIcfIH52cpGItq4bVvyU/Ts+lm2+V/Rja3IXHFAocC80qZq3o+/B6H+Lt2vlqKcZo6zd3mkSPVAlXoAVVrmy29SaUBfdLJ2uHByGZ/+58rSrpyjKRleDbks2ZmqwdOM90Ax7YGfDSB6ZebY3hDSgFPpM+7FgEDs6V2hU+5xYoYSg//y7vqeDQ== 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:(376002)(396003)(366004)(39850400004)(136003)(346002)(2906002)(16526019)(186003)(6666004)(36756003)(86362001)(83380400001)(30864003)(4326008)(26005)(66556008)(5660300002)(6486002)(66946007)(8936002)(1076003)(38100700002)(956004)(2616005)(54906003)(316002)(478600001)(66476007)(6496006)(8676002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mnuUre2PDTTYBBkEUAMi5SV53nqNEtqmO7HHv/8jWfim7ATmqpMzyIR32Pj4aeL8y3hM7Z860mixpz2ijBbqG41N/s59l24LLVxoCJopNmJPie0K8BUAEzeAPbpKYZE6NdrZ9zSfgXBtafdscSV9Ysd1SsHmeuP9R1BgEflMXG3vHxYGJmsdECNCBHY6qCVK1K2+p23BLF/nSWrFG5dsjKkMCSPnmTw5mfjyix8g9ypb2NOwQI1vZ2MqQgHImMFP6q/vvoPjHA0LvE6UIOzQ0iuRwMJ0/zXvm8p1L3ZX9JX2MnBiEky/3i7owfTPQyOlQmUgwsxYX4W2Sn5bSCMpklwrHa8g8O/b3pnBt00+ob+jtALVrr4aSCaezya158V6MKn7g50yIsm+SZAm2t5FFpygZkJ75aASoUO93Mc9e0lQNfBNw5AF+PeTvgHxVDB9qeBeK5tzwBnO8uQ4LkP8xusRzPbdur38jqzMZ1y4yE885DMYOW0rPEVpIXEeLKBjFR2MIYvPQ5zSdvrZVgK7r8iiyfC3PFzyAjYjbV07HvkUNMQ9gP91M3aA3RjsvPiJpfPgow0ekHXuEOK//S0dHKlpt9GIv+cyT7baZvqqc+1shC3jaAOdNFQZiRuDhbna0vHxouqFg/UIidgiUmaYVZ8RugkXKEwUbylqj2gJ/Mt5nLVZe4hvqkghtBecmWk7k+X6YXMdYSYFZp2trcR+a771+Vy//PkF3c4DzEQGummhVuxhswcJZnpY2QVpuYglSyxAqY3AcjHRLlAaS8VGeQZ/SbU1aditvdizmjgJ87PQ6b0aMkS6EeUDuneb8cVSdx+TAv2VlTz94AwJyiswjDMx/8faE9z1adadT4Q1MQEAF6lRa4kgvuz8vj90cutnzrZ+2Yqc7DKzRRlcc7C12v21HJNnM4g5FuRvWTpdNN7pTXCZQjFRlBPPxCARDxn+MmJW3g3R4lvl+SgYdm10Wty6oDtN9ib8xMSyJflr9X1O3sjFfrM92WR/q/QH6aY/bgPW3qyYEDQS8MPbI58s4XfB+NwyjEpmLkwora437sbcJItw/4+aWo2T3HJDPgD8Wf74EI/cvqnKckRX1BXa/RyW2U64kDSXOi+AK3Zt2noXZALrD8o9p+GS0qHhnlFhdSU6vJEAI5IyodlwXScE0AwAniy5tl+ltXvQ3HiX+zpMkHmyyKX8RqLVcEVDyVOzc8hz8yWZXWb8jzwCPYs8VeE20viFYRdqtLQ6LLsI15lxhMBLekBElsPcz5xWq81wglhly03R63TAcj/l+ZVMmMDwq+JaL0kmOnVjOCUOk/fq3wC4UEnHdh2G8WRNNdfr X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d21f81a-064f-4484-f037-08d935671378 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:18:27.5801 (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: LusAi5R6v2r6mdg6jlhnopFXqPUKshZY9HMUaN/FrsnJy5b2Q2hl/RBX/+AaZt3J X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5727 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" 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. After the reshuffling, update MAINTAINERS accordingly. Make use of the new directory: target/s390x/tcg/ Signed-off-by: Claudio Fontana Acked-by: David Hildenbrand Signed-off-by: Cho, Yu-Chen Acked-by: Cornelia Huck --- MAINTAINERS | 2 +- 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 +- 36 files changed, 50 insertions(+), 43 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/MAINTAINERS b/MAINTAINERS index 636bf2f536..d05dcc22e0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -294,7 +294,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/ 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 890f382a36..1795042e97 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 e243624d2a..75ec915cf8 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 Tue Jun 22 10:17:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336761 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,URIBL_BLOCKED,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 CF9E8C2B9F4 for ; Tue, 22 Jun 2021 10:24:20 +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 4B9D9613AE for ; Tue, 22 Jun 2021 10:24:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B9D9613AE 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]:38972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdZr-0006w1-Fp for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:24:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUO-00040G-Va for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:41 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:24447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUL-0006eb-Ej for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357116; 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=tEcmhhFqf7tA7P8B1viDrxHAllMTon/KXcUi5fYGEPI=; b=CvKWY9WI3p/+lHI1rkTjXznStrGqOiGVf3VQMZ5n3gsTVsr7q8XzasrO98L152sbaDqI4w oRZnJqKJPvVSAe1yzjS/y8vgo4VY94DEKZmaUkTR8INHIAdWLmLqyiFs6yBnBy1wtVa6LS qRhBCuw1Vdw2iUBPSgNO2BoGJIf4pAA= Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2058.outbound.protection.outlook.com [104.47.4.58]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-9-F7Gng58UPeiBHP2zV8qkDg-1; Tue, 22 Jun 2021 12:18:35 +0200 X-MC-Unique: F7Gng58UPeiBHP2zV8qkDg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OU2y9l1xfFZtRrJO6Oz41RDpm0yi2CYg5BstV7PdI2W1AoJJPmWL+D7SwL7v2NTPaj1Cmqx3fqP/IGGuPQb+fYPbzCRwRM1sW2cMlQ82fdNxbRVKCz8KXxJ5s/QfzCmiWIKKzW+/72rxQLtDVbRQTtPF0AXbJveht76T+XTbUaYPdRx59LEjQR9WgOz2f84+iP3Aot5EopDcHkGTEZGTMQnwIu+wsiAhb62XQaepDjeoU2+puZ6Jtv/ehFjG6oIpzdk0oPxJaTGce8tKTc36IuBBhzGFWv++LimZpPqjfYLTc1PRgWdHnwwmx2WJJqlJtcojhTD4M/EcIMDhCzWiQw== 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=0bnZo3mcB7XRH+z3tdKyag5TPR1wZgiMCuIZrlNhyaI=; b=b3/73qjNbCRp5fO8hx1Oumpicf6i4uQTVPYc/n/SMJQUhO/M87lnymf/+QcgdEKt7W2gZ4gW3lkqpNObAXTpiZGfnmy2QV7HgjRb8+OfUZwDPnTuGUtNswOPBCS+YZoWN7nYniFDiH2VwYTB3rCFCxwOdWEFS+ypxw64+jwkUCIzJX0mIkseR7bp+3WYSZIp097vBQmqD2uQ00NzuBOVwntL+g3od7xNkqU5PRIM3rCiglJ/UOaldePRER7dB2fcdjy+AlUy3I0gpEYA5O9qvEzr3Ar6jwMojpVyapfvM18L+m+8GDVobLykYfiQKooOOluPFuIZ5YCGRn7ov3dzWw== 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 VI1PR04MB5727.eurprd04.prod.outlook.com (2603:10a6:803:e4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Tue, 22 Jun 2021 10:18:33 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:18:33 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana Subject: [RFC v5 07/13] target/s390x: move sysemu-only code out to cpu-sysemu.c Date: Tue, 22 Jun 2021 18:17:20 +0800 Message-ID: <20210622101726.20860-8-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HK2PR02CA0190.apcprd02.prod.outlook.com (2603:1096:201:21::26) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HK2PR02CA0190.apcprd02.prod.outlook.com (2603:1096:201:21::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 22 Jun 2021 10:18:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c149fdb9-9d6c-4098-b6f8-08d935671713 X-MS-TrafficTypeDiagnostic: VI1PR04MB5727: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: mwfId9tmdeaRcjanluA5roj6cwpA9b+jvZMARz21bf/oYWSoe46K9Y7uzwPze9rx95+p3P7YXqgEFpoWigpeVhP/aFsqUFZq/Yx55E4Y9JUvH54qf0SToFJrdQ1a56Vw9MlMLH4yC8C3sUxSrMl/rSb3nbEjv3m3udhRdCcVwyaGSOUqacHg5eVjtcof6RZ4kcxn/lNkeNYQEK/HRDh3pQKP+ZLuOgULY03Ohv83ILoEPv2N4gC6aXmOjkpBtgOhk13b9VHDcFtvtHTMNLL55DMVtRX3RlnXqWs45mIaVwG4DBmT97LZO5woN5Ms33T6Qw9MjfWIDREUUjmkJlPQhdGNtDYVycvYUW5n5EHL8EPGkVDl3bZQT/mA9JThAdGUYHvrfooAl4x3VVGvpbDFd10lIkKoDjjlBOUvQ+RP7PSK1/P5eRMOuRCmBZcB+j/J6tJ5k8/6pr1l5tWZ9eBplUx/MSg3OyBewKwvi6j+xh914z17M2v3WxkWMRyyuUaBhKRufhR+1mPjewGNVQSrX0pdwK4DN6+xwfWudhnXZChMWZC2Fmncc2qFG171Fhjly94bk6VCYVLQnC9/df2pqVnEt7V4cs7VGqzyy6SNQSV0zjb1hyY9bXHiC39xrj1xkNh+pVqMQDLtYQT3gLeMKwZeTG0UU4DDc5uk64DfRrH0WFOINIShM7uZhquxp2jTZIEQDQbw3E+Pbg5YWo9WAqo0iDuXxC4f/LOzWaf0IZqdPB2FkdGLiS8id91uHqbXlhCTuCr/GZ/HHo7IWnUALkaT4ToJtfnCf4R5xXKaEuPSaZq3WrWgD9+78MuqlkSPh6Yd7mN4hHhtZqgVqCrgfw== 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:(376002)(396003)(366004)(39850400004)(136003)(346002)(2906002)(16526019)(186003)(6666004)(36756003)(86362001)(83380400001)(30864003)(4326008)(26005)(66556008)(5660300002)(6486002)(66946007)(8936002)(1076003)(38100700002)(956004)(2616005)(316002)(478600001)(66476007)(6496006)(8676002)(36456004)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RpY8uQpgYsc9/xfsmvb9D76bxLsYtv5r8i6Xt7gZ4hGpqptXjEVr5glWHDveN370ZzePkLWwwad8oA3S9zALpz7fQs8qoHQEDacHaMHdl5AZuecX6vTjZ3hu8J1p67MatJTHxEJcOA67ncjv7nMew3Mwf2QF6XuJmKUDZuEGSrEGDasFuEkPEvLT/DvDF5xnqwKxMvf0bCRwqc8qMZbCCgSIgNaGxj7JhxL3LwqvPme5v7wiE76LnAXH4P6up2PpsA2mqr2ioh/RcEBlpzx7QPVYHBEZKOhXNk9RonvQ0ThwCadGOg/CllcesHXm5vqSUyM0ZH9gk55ZWitskmlgC/q0i4GEpaYfBENvaek046rGHum2y+x7Rs5kEQ2Dq51fAYfCBhbDaBX6picz6PyKu6kt55hFhPPDkFa5ZkDNQisWMs+OMuOU31Ttvuuheeh3tTFkdG9PMERnKGG0lM7jgJw8ZqYh9iPrEUvL/XBXAFOXvdAicfbkfoMMp3aBifqSlRuTBmuvhV53hP+KWrT3lENQ/Gd1EfU3/96uSpzIgfaOQ7pPNnP1Hynja3QST7llLNwgwXyt3Fa8B5pP4QMCaEYzkjw6O8RgIoEJjtVeYd/iF2Kp67X/Phh/fUgKtJ9ilf5PA8ys3vWob5PPmY6TOV/4o8Cp/VhUaZOHGLHckbokEVYKikQPrzRK2UV5iQKEdDybddsVTEJK5obPYs/WEiMHZ8WncV0XxngKmmVteTso6rgJvqxacdPIXBSokRlpW8/xqBAQTGhVUDf1jnWPrxHNzp1VjfoPLUnEGP1q4uvnEzLpIWqUFeHE4IrB/1PT22FJqu8+JyX0IivqOqjmomJLw6bzLuJx38BUYEuw4uqCzirBUQXsyMWawm6smq23VMGnxuuDOES3DfAaE80R63ptHP/cH1fwnbBz7YXdYma+iv3tDRx4AlN5GMwOcQWAivWc++88uNAXC7rNIYfy0AuZUhzlcyopj9W6UvwxlEtDt0APukaybGjkBoQ4Pbtf/t5atZvHTUpBRAVVPDmjZ8Y/w8LkIzicCI/HUASMd7GWc7W2o7pzPuIs6dtr0pSpRxR2DSIuFIMguejKNEJYZfw7DtrxbiJQ6tG+jcNdj3wHbhZDHFobuGb3bf+FRHybYh0/KEKmdVcQLwELbHUBE6LtslNb5GpnhkZQPKntnEQ28lkXvork2OM5xKBX4J/ucDIdbKXuwG88+beIhh/TkYaUKgHSTg+QftSXagtsVi5zx25Zxdz0aexAWbOVLSHHpFX0aj9D9/F7mvo9/5QqJG4xG4lm095O3o4z/5D3eHundKAFoQnYDJMe+OKEck3T X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: c149fdb9-9d6c-4098-b6f8-08d935671713 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:18:33.7795 (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: bUeQPvS1LqR5tmcA0dxcB/c0rCQCbMCG90WpgPKQGR7bKf6zCXfn1Yzgh5oWMB2H X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5727 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" move sysemu-only code out to cpu-sysemu.c Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen --- target/s390x/cpu-sysemu.c | 309 ++++++++++++++++++++++++++++++++++++++ target/s390x/cpu.c | 285 ++--------------------------------- target/s390x/meson.build | 1 + target/s390x/trace-events | 2 +- 4 files changed, 320 insertions(+), 277 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..16e5301084 --- /dev/null +++ b/target/s390x/cpu-sysemu.c @@ -0,0 +1,309 @@ +/* + * 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" +#include "hw/core/sysemu-cpu-ops.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); +} + +static const struct SysemuCPUOps s390_sysemu_ops = { + .get_phys_page_debug = s390_cpu_get_phys_page_debug, + .get_crash_info = s390_cpu_get_crash_info, + .write_elf64_note = s390_cpu_write_elf64_note, + .legacy_vmsd = &vmstate_s390_cpu, +}; + +void s390_cpu_class_init_sysemu(CPUClass *cc) +{ + S390CPUClass *scc = S390_CPU_CLASS(cc); + + scc->load_normal = s390_cpu_load_normal; + cc->sysemu_ops = &s390_sysemu_ops; +} + +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 1795042e97..2b2b70e1c6 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"); @@ -476,17 +218,6 @@ static void s390_cpu_reset_full(DeviceState *dev) return s390_cpu_reset(s, S390_CPU_RESET_CLEAR); } -#ifndef CONFIG_USER_ONLY -#include "hw/core/sysemu-cpu-ops.h" - -static const struct SysemuCPUOps s390_sysemu_ops = { - .get_phys_page_debug = s390_cpu_get_phys_page_debug, - .get_crash_info = s390_cpu_get_crash_info, - .write_elf64_note = s390_cpu_write_elf64_note, - .legacy_vmsd = &vmstate_s390_cpu, -}; -#endif - #ifdef CONFIG_TCG #include "hw/core/tcg-cpu-ops.h" @@ -515,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; @@ -526,7 +255,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) cc->gdb_read_register = s390_cpu_gdb_read_register; cc->gdb_write_register = s390_cpu_gdb_write_register; #ifndef CONFIG_USER_ONLY - cc->sysemu_ops = &s390_sysemu_ops; + s390_cpu_class_init_sysemu(cc); #endif cc->disas_set_info = s390_cpu_disas_set_info; cc->gdb_num_core_regs = S390_NUM_CORE_REGS; @@ -546,7 +275,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 e661a81e3a..e83a8cf85e 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 Tue Jun 22 10:17:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336769 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,URIBL_BLOCKED,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 95B78C2B9F4 for ; Tue, 22 Jun 2021 10:27:41 +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 0B11D613AE for ; Tue, 22 Jun 2021 10:27:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B11D613AE 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]:46376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdd6-0003ZQ-8B for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:27:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUW-0004EC-LV for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:48 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:44731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUS-0006jC-QC for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357123; 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=V7tuu5kAoc8tQY5loMSBhD6mwoejlgHHp7H5qRinYi4=; b=FIV9BI/qcZfCZPnnaKDI3d0lOg16ugLGwKKWG2rVLw1UkKV9ml5rPoT956T1QCoXRPhDLr nV3u4gWoYnVr8X44AwJD8q3Yfwb1gEzV3WTyei2Fk7AxziGZJuHdMBbBZX53cUMc+y0Oso dAi2WzdpEgk3Qx7MHfi/jAf0+a5LAnw= Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2054.outbound.protection.outlook.com [104.47.4.54]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-28-7yFo5eb9PqyRMi9tSDlkxw-1; Tue, 22 Jun 2021 12:18:42 +0200 X-MC-Unique: 7yFo5eb9PqyRMi9tSDlkxw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OPKLRt8CQbBnJUuEbGiLY1mG8vb31frcHmc95F3qbn972PvBbn6JFKjg8zkJcVaX0/RAKOyrTIjvQJNjBic1s7k7/en14kmFNgcRInJYZLCGxnOLrtvm0RtmWUh6wptGd5iRg83+V2Vir7qSHuihqxi8diqZpYNNAc1z3HubyFCgu+y73XL3xU+J60zBv/A+KFlK9CyKboAhaYMzoNakcj0jPtFEgzXwlhbMKn5ol1ct+SH1TJZNJaHPrnEOFLR8Sy3HuzBCfxfFq8uk3FW5uO/QGtgk8pFqbLonAjPySTC6M15kN38TpVizqet+RQAEC1BcjUIXXMpB10CxpW5Jkg== 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=7g/2DaC7II9jKXkPOvZkEoFlOepOgCbUgTiNd27Re/Y=; b=BdR4qctv45peFPgGXRazlBuZc+L+vF9riRTgFRcyxA5QLy089/OKCt4npwONzjE8Jw2gwpSJ0VaY8m+C7ykzKEu3kZMw2k0MolaR7ajnCngxWxAY5MoGElbMkMHdxpohPCjCdE8o1ZKNB9qNfSDFm9chGWbMthnThK1dBtbgao6JWMFaJAh1zPjVP50m4iqOzWn+YCLTqRGeoowzbJeZIG+Fc5w6rDcsz1Eqidpc84ICDZI+YnXwN96OzrDklQdl7f85LWB3oPlOqhBVaJymyXq51YDhlrtLFbqeMJKSed1VDu6ArkuCUzahRWc5u7dZ9CGGbQFMdMb/rQZvfvsYww== 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 VI1PR04MB5727.eurprd04.prod.outlook.com (2603:10a6:803:e4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Tue, 22 Jun 2021 10:18:41 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:18:41 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana , Cornelia Huck Subject: [RFC v5 08/13] target/s390x: split cpu-dump from helper.c Date: Tue, 22 Jun 2021 18:17:21 +0800 Message-ID: <20210622101726.20860-9-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HK2PR02CA0193.apcprd02.prod.outlook.com (2603:1096:201:21::29) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HK2PR02CA0193.apcprd02.prod.outlook.com (2603:1096:201:21::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 22 Jun 2021 10:18:40 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4263553f-c399-4e11-ee51-08d935671b67 X-MS-TrafficTypeDiagnostic: VI1PR04MB5727: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: jY3nrVIzHhl1lrtFxZT/qdHwYCbfXFHNp5Leb+prEx1HiVHSdiWl+JW6OEDOfP+tpbOI59ugxP0HC8AgJw7rFl0jDvu4Y21g4oWVx3xzau0t4HAWl7xIOvtAOlwYAPC5a+HHrpD91boRYv/9X9QvHwbBgDuu6YdPMaKVpW94Q5lMHSi7SJPdc66gSXHm9vRG+m9C3pQ95U3fXLMd7RE1tF6NougRWygbaer9blwYl5WAacAelJGYRX2olHalJb4mF1A/Bz1oZS4q+1+VT33Fx2f+xouUlkibhIBP6F8of47kOP56syOAYeOGAj2pA+kMO/XmQXLNVuGJpaVf61cT+bTpCPfq35EoAEL4QOnkpHJRtYIBeR8W3fFNYgZ8NIa9u1IcLln0hyrWLuoFPazo1dGeP49Ss3n/IpFKZ1duxIgyeEcfKGKIzetcf7qIPnBKXR3w6MbabgrvD/wSjnu4V31I0pmDeej3uDn9TdlOi1S2tfJsTEOg3UxQXLeRbP0Ux2zBHR3oP16dej6AZ+i8XsJZGLPuJ2Hrzb1BhPCMVoYqjv4M64lE9rCq17c1iN0jgRy97+QkeT7qe2/l14lrlpPe+oydXWkQZFKh33Qv0Xp4d3Nd6rGW6PWzjO58h+7nrtgDfuiYs03Kyh2YzkAzQ9kyr7oXE1v1+Zx6d/LaM7OS7yem0NULh/ZoMHdj3TEgeNeyCQGGdLx62TCCKC6+NvWmBKFEX88+3uG7GTU0JZBH8TdcUX89cMSD+963pz9qCtBPjrQrte3H+DTfHIM7VOr7jGtzqKrhTh+6VZkcFUpU/4CTSsN4cnUXnP+Ym8sdTBkVP3o1kSA7MwKkWXEoNQ== 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:(376002)(396003)(366004)(39850400004)(136003)(346002)(2906002)(16526019)(186003)(6666004)(36756003)(86362001)(83380400001)(4326008)(26005)(66556008)(5660300002)(6486002)(66946007)(8936002)(1076003)(38100700002)(956004)(2616005)(54906003)(316002)(478600001)(66476007)(6496006)(8676002)(36456004)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /Nuy5SaL9opHWlFpnjKCcQo76a6aRNZtjUWYwufjuB+js6LDengNrdGRT+xsStdjVQEllYHSkFw+hRS5QffFdZYJKwvj6i8kEY/nPaBuU55SUBvIuz/v8ErdHn5OkgqFmMpMuRJB9VHtKCxa5AroonLar81yYeCu5geiQCIOE3mMNrlRH3zckVzteVFyjCDz2JKCptXlpR8o7u/hTdwM/qDjRw7m57arreGmDEaZnfmrJtXNKHSSmu9Fpr/8TE0pmMs5avVfN5ju72Q9Xws+5+eu7bYXnpL9Iv7tgczNBVcLA95vosq7oOHLDtENSVltbkUGgRvt6mzKZscGP/GStmpaF3LtUdpnTif1ipL4F5sQzom/0JcZXInbVo+BeATz3ggjQM4YsTITDYQU1flJzOsiVy1fbW+v9+YWkdgoW3Cxmv0ev0C1DkkiWX9kPfjflNdqQEnJR2TFXf7u23uRqyQU4YcZBwPA0aBUV2QZjgjwJ/ibP/cYbTuZ5bcXS1UzHDMFJ5DylsAuxVjfc6Q8jMltGmk+9tOe8HQgJBT9t9tfywmVS3/y0VZIvMSWIfXF9mHuoPVV38cpykBFnV9yJul4+j129A/2LOSlON0oItbP9LpuyBkZj++2ci74xc9WWod4vtBdRbWZkBYxXelIC4mx+fQMJ5nUTxFwfme4gJq+Yc12Ng0zn1qvAYyu6q5y7BKDFtX/3WjPxRg2EtmWbJ2abSgYyeLlWWxNr2iOx3DAWErUfaCutzk9xakdgGtz6MQfINFbMy1NexdphNnHmESAQ3j3cmljK5vM13vRKvG0YsKAXigNTzV+0brA+zFQmIDwDr7n9AE8EKHGetQ4Q2mK3pZm6gfdT+5tRxxPvb1UYPuKz4s2YAZZYeq8O238VKmFjosTrhY5lFQ0eYK68QI60FvFw2gMTZ1dIoCGy5KifpIe+7PZP2XJELZxtyHrEDQ+R+R5x8SNedLtVE1yFflBM5mcMjQqB9IWHgxlClVFewIeFmR1OnthqDc5o6p0wB0lhI6Kpkt1ECvAU2CacWPThSH+L67ZOIg5NE37uC9cIxBuaifk/ghVhLWEzy8JScw1mT5sOlT7hYG8xlhIXIZ4QX/QjwK9E5riMOTVXEfqMJq67Nx4Vh0YuVmI3co+LqOYohO1joRDSN8yAUmJIbKqlzZq5Z36Tq8DQ11nVsVhUvrbz2Fc4QHluOE3GTzQXGU4N3so8/2f4bwa3O6ncQjWCssl4Ch2StEf/9QVTmQ7QZ9RuZLqSJmgP7gaCzAfIP45PVjbC74SLIZsumcJ2aKpgp3pHI7Igcu8hAeNq9DOcRZlXqkvoOQEr1M62trT X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4263553f-c399-4e11-ee51-08d935671b67 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:18:41.0393 (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: cEmp9zQm3Ao3a7YPRUsaZ2ahS+RdOZhDfKJ8+aC43mtM4y0Adcim1z0jnYWbeUiX X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5727 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: -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" Splitting this functionality also allows us to make helper.c sysemu-only. 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 Tue Jun 22 10:17:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336771 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,URIBL_BLOCKED,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 011A8C2B9F4 for ; Tue, 22 Jun 2021 10:27:57 +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 85225613B2 for ; Tue, 22 Jun 2021 10:27:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 85225613B2 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]:47112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvddL-00044k-Jr for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:27:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUb-0004H8-Sx for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:54 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:59299) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUY-0006lz-77 for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357128; 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=boUg09M4RXgox7kI8w63b6iSpVtFG+CowpZzhDhxgYA=; b=Dm1ZG0468bT+1eTgw43UEfw711e4kRJKdcWx2wtYlzaRo93yjYKoJ+lPYYZd3XWyadAiB3 hL7/WyuQef64JmQj4jN7XllcyaAaaLanR72nDknpDj7PTGyIj/36hvWxrh18NOJJI2LXOL XAvQpJSJBUnfQsLT/x3/Ifv7sYCCTmw= Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2054.outbound.protection.outlook.com [104.47.4.54]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-40-UYVt7B-DMfOvMiDcAyFJyA-1; Tue, 22 Jun 2021 12:18:47 +0200 X-MC-Unique: UYVt7B-DMfOvMiDcAyFJyA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lb0VFQz8PbXcitGq5ZHFqyZ3ygINSpWV34FcVEHTZbpnSL8+ITVH2a2zpXSuYwVp/r3MUjWMMmij18SEUTdKxIDLp7g00KW6zy5QAP24+q5jvBYIfcVBM6Gpx26krtq7zMao3tEbyNmBGyJ24EqqLDb84dFvCQNQeb+YLXg7QPbWombEb+TSO/87KAE+ZmU2zj5mDEFtPwprziihpKHd2gQn+RUO0RuMws4GvXG4sV7bd4Jg2FyWk1qKd5mbayd98NspKTN/aPuVU3WuzhNKgCB7/Ag8Dr/JV9WkgCJbEMNmrSt1tmtV5TUb5ZFB5MyceYsPy7twWcK7cLvkFtTjYQ== 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=BPt0mzp0ADKmFY/vHk/yNtlu9o/KRdkV9oAiPI9zC5Q=; b=mlutOVHB5lVIVIaEFE0hLRIuFmsX1xCO7PGRzjXkjHnE9amGCr+76mVQj8b7V378GZollJ8xY4lX6aXBp8md7GL4eLeA2KtrSxANxarQuGO6fB9LU3JlvmQ/XrQaJ7y2URpa99NH8EcHNsmhylaur+N5XH/JhfciswgousAJfwyiEPWHOMWcUfoA8p/m0wM/5ULXqDHei2LIcay1a4CU2rQtnBv1QwR6VkbyFJJQKhSZlPwrWT/05GzD2ClH4h5lP4iAdEsyeVP6OMGRK5Fkq3PmgeFbUpCVg1RFXs8+4ZMQDytEebX4ikY/4JV6wfEXz3P9huCNvMg9KWCwoIRgmA== 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 VI1PR04MB5727.eurprd04.prod.outlook.com (2603:10a6:803:e4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Tue, 22 Jun 2021 10:18:47 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:18:47 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana , Cornelia Huck Subject: [RFC v5 09/13] target/s390x: make helper.c sysemu-only Date: Tue, 22 Jun 2021 18:17:22 +0800 Message-ID: <20210622101726.20860-10-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HK2PR02CA0198.apcprd02.prod.outlook.com (2603:1096:201:21::34) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HK2PR02CA0198.apcprd02.prod.outlook.com (2603:1096:201:21::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19 via Frontend Transport; Tue, 22 Jun 2021 10:18:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e9ee4cd-6d43-4fa4-1656-08d935671f26 X-MS-TrafficTypeDiagnostic: VI1PR04MB5727: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: 3K+iF9lGHJmzDnpa3ta0wAhu0JuGl149XAJk1VIvn07EU8ooCVDvJnVa2kLKDA56W0jQ+9o8EqsLRCkTINzTcDuC23zC3Kyxkmpk0iWc6eriZ+gqmL7JrLyqAyLVQu7muqwpAB7hzj6TusUta6QZcpkrFcJNoYN+IEZkQiSKjCgX4/0hJ7L/GoMfiXanRbhuxeXbskZ1HQJcLmbpb/d4CYxZ1IbLuYvwCL+/u2rpX6HWvNn7yME8axXwelaizu58JW0MwK5I9lSbvzJIujukWvZzMEe+kvA83L3SuqKhFPnHWemhSMy1ctTYeVcnPKVv8a18fFcl+LRLV5WJPg0iWQXEG+bRBM+RBDYQ9x05Fjl2jZPUV0aBtZKGF7nyWADi3Oiy+fu5Wt8GMxnwLwpFd1To2uH/P9MiB3pWhvvlzHhb70zI9Rc6ImFMYsvIAungQ/4+PVtZTR4mOsuJW/LEROnCvlVYNfGA2CyjItjywxu9TEX21ePwKTZvQyfV6TRhQfWvn01pdwr8YZL5Fs7HhfW3wi21GVcXPORbvsqEn3GPBMWe/tAftF0JGe9zqTE9xVjnfTN02VRp1dyMeguP4XqD4vejqaXTR1wx+OGi3/V6KHYxCWLc/Dyp7dPEFfZ7Hoo/UHFKN4tzDKKGlIpEhyqds9kcdx6/aQAGzRbNWtdxJZ6E3MMYCH5S+SZQabmLkTeVgtWX0Kq4oij01mPSSA== 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:(376002)(396003)(366004)(39850400004)(136003)(346002)(2906002)(16526019)(186003)(6666004)(36756003)(86362001)(83380400001)(4326008)(26005)(66556008)(5660300002)(6486002)(66946007)(8936002)(1076003)(38100700002)(956004)(2616005)(54906003)(316002)(478600001)(66476007)(6496006)(8676002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c51loF8ICmW3OTyVzKMKhnCFflAUZYBwpTsxlOQpkYsfd2kz/uIloTOVm7/JknTKffCz3tvzTL18nnziyky3xZiYE9QlDMOBEsPuzMTGCYM0/TrRibtSaiaBQ9d9QNcoLfVFIEQsIzsHn48DGF0wX/ZetrJ3QqumZaXkIz09uXqvEhXT7YbVJ/BqP1M5uXRIp8JTtRadQnNSlSDcJWMNcthle7d+qRsayO7HCPxLB8h/IpAyaJIIjFamb9YwosWt2MQpUvDV4WMHtM6Jro2jsXgryWuVnfPk8HcVDZ2zDVwldy0GNidXpMmF5fPHEgOsrmn69Qtaw+xY47WzHEk46YTSEh0VYoAnj06+4YUHXvRvF5VSXm/gkxxIFiSVXFm8egjyB+iOuWZaZmT+87v7as8vmQ/bymAFVvnvQUS6v94zrPOQQRb14k4MMoP1qjCbGcsisU4Vur0SHHuGqQjyl6xMlHKqCzNfeZx57s6OXcmMNCzP+n+bsPE+hVGmtlww4q75eK/AfOnOh2Lg3SJe19r0/+5Jhp7IEn+x9mAtuUjmT35jwf5WYmdg/oBQ/odzDxljDLh/FYg5uQ82FqSZfDj6yVywL5Rtpk8tzGRLa4gJWdKHnMnhAeZOUxwBAxj6HFS2nqzjoecysWcdPRmRNcH12x2xsf2fZix01YgbTdzuRXrLbAkrwHUc52ArcQhyZImMZH/pfWgHuwqkYl/XKsbW2BFgeR6tIGZ4LqNKhltnbneNEXDpiDUuKjEnz8ksiwt3IVx9a13PLbU5QWHuiHCxgQPdFdOK9+wXbD+Aycv5pmfnM61D5YCdkoE/Id9fHzYUpgjI1wAZ2PZaEYHB/27fkbE3rGM8cLSEfK1LdWewjCy9DuS3ebjsGZQ8A3ixL51hrrlP9pd2hJ/1ocDneKBSgRS1WdvYYX42xK9Ro4KIfmvHIpmsE3RCk1F2QV0cJNx3B2cD8vvVmmiNn07qreo1zxuyiDt386HjLqFccK1CXP2Dc1UpImUB5sIkkwZ4xIubIWN+gRPLXLejbAdMY1VUcNp+BgyJOr5KrG7T4JRDmKPj+wX5wq10PwfCOnetcfFlt+CDqKy9OKCKkCmVzX/0Ww1u/bD0kclQPHgvI8bm2qIr3Ve9AZswaUVkJ1BUT2yG/qRWjPBzLVc0vgaYtlHO1iNqv0ScCZCMROfvZd5s8+Tk7Sf6w3EYuYAAdLtV5xt5L10Myh3EjkOlEXJ/2aPNunHpluSwrkBqBnOiyghZhHicmYVou3MWjIdUqx95wgrYUZXnaEcr0WiQ4eQpMpx5how/3rN2TVDhdmBPyQVNJXLv8TeWYtdPD5vUGoMC X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e9ee4cd-6d43-4fa4-1656-08d935671f26 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:18:47.1248 (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: wt21gbFLJey2dpJl0NKOZnihp+Qr9stABC2AK5dghiCgD2c7uEXcAIHUnoXqQYoB X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5727 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: -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 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 | 6 +----- target/s390x/meson.build | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 41ccc83d11..b9d18325bc 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -1,5 +1,5 @@ /* - * S/390 helpers + * S/390 helpers - systemu only * * Copyright (c) 2009 Ulrich Hecht * Copyright (c) 2011 Alexander Graf @@ -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 Tue Jun 22 10:17:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336773 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,URIBL_BLOCKED,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 44755C2B9F4 for ; Tue, 22 Jun 2021 10:29:52 +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 DDD79613B2 for ; Tue, 22 Jun 2021 10:29:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DDD79613B2 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]:52638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdfD-0007tX-3P for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:29:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUg-0004Pc-Pt for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:58 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:40141) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUf-0006qL-3X for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:18:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357135; 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=I7AfSLRN7oMwfjUsIwliox4w+6+wvPIcVnP6iNgU2+o=; b=P4DYVYSecUxqpZvhkJ0E5ESB4bDaGEU76ggWI+CGF+8XjGw0b7dgHmc5mFyK1AEGRmouTL bwl6jEEyxGeZ63a/i5IVSBy9UG+mTxo+ce1pRPjkkqH3Yabipsm0N0hdY1G5aBGEvP881A C3LkZluOQlOs0MiJ573xxhc+8WVa/ME= Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2054.outbound.protection.outlook.com [104.47.4.54]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-22-5DaO7sjiOjGJqhljlm_AAg-1; Tue, 22 Jun 2021 12:18:54 +0200 X-MC-Unique: 5DaO7sjiOjGJqhljlm_AAg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mLjMFNKZ9cLS08sD7/a1wH11OfjdgkA8kXLavSMzqQhTFiq4RkhOW8GtH05JrL3mZJ3HfF/U1dVmowlsQ+V1PIjEIy0eIfKi/PHFyILqps6/9Q7/Z7wK8/wICDVwkS76JikmIe/NfwLHPRMwGFcABgR7ycAONSkFA5JJIeTUPhTVXWHMDg1dC3ACT8DGZKnQNBSVC/Hi/h6YEq9PMnsLbh3QFyiRCgJJutBYD4z72HmNh+/zIpe7THluEz+ttGN05KUIeyFEu+F4sL4xsfa56WSG6eiNOmPJNrmFutZZILjG9HWSqyEr/ztcLXReT70/fkV8Qxh8qzPKL1wPpl9Hpg== 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=nw1yACjG9lZbj0bE06qheLUxHfn2hS48id5iWCu2OPs=; b=KLXq+d0BAWHb+scCUjyv0hdfkXKETLEV3hltm/0fevTSy/26JTHWIP6f/RUwSo4DB+kx+81QbxrkQld6SFGORmWKbal3WSPzCgFZ6eDGjRQ+O6mxHEozP4749wLrFiBb1vYlXBhQDd4orRAzxOgsuivdzzUBmsPr4g7JfYojk2o4umwsomxj3hnHLf9t8zta9JtQHLgeh4gxIH+MaQ4zjNfPEa3CcDO4fpfJyA3F/tY6zKCKEcIRYvQu0WQuOI5g8DKZcGYVUFHAUpxAfvoWgILpR+uJ9smeOm6rfO435OzOSyAAF29WUfpnGngxAFXNzTIowZD0YcqnWxq7rOXykA== 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 VI1PR04MB5727.eurprd04.prod.outlook.com (2603:10a6:803:e4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Tue, 22 Jun 2021 10:18:54 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:18:53 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana Subject: [RFC v5 10/13] target/s390x: use kvm_enabled() to wrap call to kvm_s390_get_hpage_1m Date: Tue, 22 Jun 2021 18:17:23 +0800 Message-ID: <20210622101726.20860-11-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HK2PR02CA0192.apcprd02.prod.outlook.com (2603:1096:201:21::28) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HK2PR02CA0192.apcprd02.prod.outlook.com (2603:1096:201:21::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19 via Frontend Transport; Tue, 22 Jun 2021 10:18:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 60d1011e-efa0-4307-0db3-08d93567232e X-MS-TrafficTypeDiagnostic: VI1PR04MB5727: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: oreIU+5dLbrPI5WASdcvIL1bHymAK45jmdNDwzGkQmRGvgSTWjwrPqIcgPvNZtBNq1IQC0c12l9gqjZ82n8gAhoZ+xSrLouI/AoG/FYG/XrJ447IpZI5Ka3/fvaJZPFx/HIwQuvu99qHa+ZPkgHdLXrHyM70kiYRO0Pk+8dnsxTYgzBw1jT4XAVYCJIemjoMi3hA7ZCwgiLYw9UOC5Awp5wHZDFkQ8yQ9mmpHFNpTC6CHliQj9rP05PTExotJDoFHxtsIoSbgXgdbPYMslAanKznNcW4rEu+fVLwnLCjTYoc5kOn+izbZUJCJ/dfNGfoZOinYxuKOu+CBk3Q9WjnoPJDy6iqtK1mi1EGoMwKjDBgVADhnyZQ9HI2ek7rpQK3hhOUxUW0Etj5JKLq4vN2jakA8h+rsHpIJMtQQ17bpQqLxA4moTy3GP8YTu4/owPjkjYr9dRR5c/L9FHhrFT6JpdtyET1D2LwPpx+GIfsFrIUjzDvYIRhpS9F2Kw+6qWpLbbuJqwrU1ozE7lUp/IGeEhObZy5vR4NytWwb+kGFNLFF4eLvd8Lvpfoa0Kf5ezT349ZBcH/Te2kR2fYXCjm6r3Rzu/Nkh1fRc3S+E2OAL5DnJrQKPsvyc1+h0jCqn+CXcrTF5Dd7WslStdE101hzZsWP6vJIw0xfNKgmeOY5ThoOO52fGVt8q16f2WmjbQhPvzOvcLbjlNFEt5hQTC/tw== 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:(376002)(396003)(366004)(39850400004)(136003)(346002)(2906002)(16526019)(186003)(6666004)(36756003)(86362001)(83380400001)(4326008)(26005)(66556008)(4744005)(5660300002)(6486002)(66946007)(8936002)(1076003)(38100700002)(956004)(2616005)(316002)(478600001)(66476007)(6496006)(8676002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VoOvzphagpgXvMbKEE0isiYMqmxpfHfiGdKN6/+ii53wYaU6NAZkL+rMo/W2oLCignazpgVumqUhDKGC3gxDJbSr27RZ3aFEf4N45b+P8lC1ALOoOVAhUZbPgTlolBkLmMEY01M1dsiSnN3UwW9Gv5JdendDoLux1anGYZeuJIl/dz8FUx+Dr2gbaaP8WCcyVEDTyhtlkRsW0sj1lvFfilT2MehBTQu++mWKwSUl9PfiCCEo1353kCMJYNgj6IEgSuRsHMifp+mXa9ltBe90X8++lKixdACk/AOvqpjqyv7NGjRRAP3ynvHW+qD6zfkA5964bt9stOv0Btnr9fsU3CPrnrw22S9r24r6lK4lhz/vRtzb1Os11iNNRcF/sDNRHbB2AVT6gKaFAKfBue7LcLmBDfkpmULLwiKMNLms9/Pslt5CRwaR4pTaF8eI/PmnTObQZPoKkLzH3IbYDuNcuOQ7YEs0n6YBsWGOXQz47vbQz86uHtfHcRmrl+dJMfLk2xaITY4RgsCsJ4xXBkPZG1+ubcJlIzl+OxL0fqBWXRo+cv2y6RRGii515NOnWCk1tgRTakAxcY8g2LMAlAO6x11wQcU7eX5zvkzBb3BKeMtgLMQ3uXs4NDKMi9wCPwKrLyv2v1LJPMMtyGSzl2Htju2RNpcCoxG6c6zvqgEHbiXMrJFn5Yj3YK1tCVMJ+5lUaHAAxRVAwmcgtINXG4m/EM6YSEPb2rBKzqDYNbPUZeKv9NZtrZAA6B4jVzi6qDx3vSXTB/IxiunKiPAHeIvzPufVe2uAWnbh5P9CZM96snnpEtVPZ5uL/ALVx+PLZhodW2j/3X/JDUcecg4sMgTk06/dk0qqy/fUyDAlLMnvzeUzYuTBCYdkX3P/zCUGEdFbN86139nSZX0Sx+3jvCzvPodMNcmM/ityd+uI5E8CChW2hzEDd06LOtyahi+Y2FgEXfgX1kW2M1cy7NhlJ4Ygs8IwE0H/1JIFtxYU5FcskNBYKLGAlvqNc1qbodmXB11oUaS4T9XzTz4UJmFD1wImEw4OK7WsTQcgi2cSkzXPDlsn3YjGGAplnQUZFpztzQuTsD99i7jZPkxd0kul8Me3Kr+gsFO3Q6VOBp2V3g8ut2KMhwWSk7p/OMvHGy2pWM5zlRoNuUcvLCH8U121KYPk8EP/oQ17fuWKobB2aZojgtpmLEf1982maZJW3DetcIAgJyHmH6eHX8/dJ8+ZtZpUj3NzcKJ0l4yNNmwqGt83wg4Dw+iQnDbKCUtlNASJGvGvddBSIH53OByEVIiEg5skjylCijig3RwYlNIYikMct1p/tTHYVYyTA93ZRiu9YerZ X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60d1011e-efa0-4307-0db3-08d93567232e X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:18:53.9269 (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: rvp6mt48duAWSxdCZUpDP2ealifwydsa5tc4H3Rc0Uq1M+8anEAdIchNDavGvDx2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5727 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: -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" 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 Tue Jun 22 10:17:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336763 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,URIBL_BLOCKED,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 620BCC2B9F4 for ; Tue, 22 Jun 2021 10:26:25 +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 EFA03613B4 for ; Tue, 22 Jun 2021 10:26:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EFA03613B4 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]:43082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdbr-0001Mk-Q3 for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:26:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUo-0004ot-Uf for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:19:07 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:38526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUl-0006uj-O7 for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:19:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357142; 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=aVjbndGDpf5Ky4CAhptJk2ImvkQ4OgASMeXJIBWu55o=; b=M0YxQiIgH3TQtwqEEjYdyiU2WLnxSDpWFVJSa3kqS9BE/8LWwuBW1c0c8bBLO843gpenop 5lnAx3tea20yqvKaPTxIV5BCpylfoZ0KYuE/Q8xOHTDDWnwaMorvPcec3WIO4b92UOrwsa PLfJzbREjJDTc5bMxkmQVAXZ0L/gWHs= Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2053.outbound.protection.outlook.com [104.47.4.53]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-24-jquuYU95M-yvFIpRQmwmtg-1; Tue, 22 Jun 2021 12:19:01 +0200 X-MC-Unique: jquuYU95M-yvFIpRQmwmtg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mrcOPyuJY7wvFh3wPAZgCwk5G6o975OlFX5S7kpzDPfhHuOvAqvidbKf5guIAN0DduWbw8XZ8j6Rp8gB7nttZsbVsMiFztuk15Edm2b7FJqRp1Mjjt0nhutwkmYsdXOfPUpSADxcCK6gVY2dKk8SilEta/qhfWNEoEfxd+S74mphwZdOwtnT7q8VVQRcxdJPf6GjOSg2m7paWVTdEgN2j2G96qZtmZX54g9VdX6x3YwbGCEXgmQtxqSMI+putQzMCNpFOJ57jgo7TlfFKGqOsnXVma2MuP7A/JczlHyCCU6InVOvS3gv0RtxPeIisUy9AfFbtjtU3tbL3IqKFEOppw== 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=OwfjZ0Wec/9vHlEzviNX02ceMyaixVBO5oQcGTtjV78=; b=V99PAR7IVvsp2jSdWGucZwXd9qRO7LEgtONQTXNh+n4baiFn9rRg7idefzMuGW7T+kF/lRJpWK9fCsyJi2TohSheaHIayncViir6ObibrZ71z4SStFMlN+gZATxcHxiNTQj0EwO6nhhEnhGgZgJ8i0sthpMKSmg1ScQY27JPLsz/3PrMcTNvPH/F8yZjHl5iMCSmAN1wE94E96fmE4Th4uxzy2XdaEDap4055Fc5VEmJEBU7LkSTrvN9EX4sZ2sFpJfIFTanWND7CSfgOsvZg1ai21d9lvDijgWM3ESoAs5p2SszxOpnIWgGLhakCKnV3vjsR6eqnZMr3dsEissomw== 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 VI1PR04MB5727.eurprd04.prod.outlook.com (2603:10a6:803:e4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Tue, 22 Jun 2021 10:19:00 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:19:00 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana Subject: [RFC v5 11/13] target/s390x: remove kvm-stub.c Date: Tue, 22 Jun 2021 18:17:24 +0800 Message-ID: <20210622101726.20860-12-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HK2PR02CA0176.apcprd02.prod.outlook.com (2603:1096:201:21::12) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HK2PR02CA0176.apcprd02.prod.outlook.com (2603:1096:201:21::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Tue, 22 Jun 2021 10:18:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4c120cb-ee58-4289-b993-08d9356726d4 X-MS-TrafficTypeDiagnostic: VI1PR04MB5727: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZhBOGZrURiKZmzUL5pZ1JjD/bYdwW6FSisGXGLdVqKdG+GkmTxJCz9ykND5Bq408lYW+rlG3u56PZG7R7oq6EUaKlC/oJUNM6ffwU1eRz3Jczxa2CxZMrUBrZsUB7djCM1un1hxUzvK2VIlsz91GWf9WdRsmYpKKqEkUMxXRk3M/t5fEATZmNJsaBCbQPBU6qMHt8EZ7OpDAO1RhKagQfjgo475VzpbfU1PBFYtM0Jf/S94+qkqohgMPKtXTVhvpzfnqjhDpQdMOyvqbzu+QmDD6GuY5m5AAMaoMGuv9AQnz0t5EKnICS/xPifdr4O7x37RLpXY2dOAxlOV9r4yTgRfuuutmwuzjAHCQAnXNEjcaJ3U/mEpfbGh3s3Fv9zz/QLkiVzqGMrW2fpmy+t7sRS0mkCFAeyw/8c1zD9FkkKC0g1v345L8beASsvfG0wkAA3C4+4gLyRPIrn6Zv/pAfB7O0dyDd6ayYBum2Q6OZddEBw02zNR28iwzrwckc5QUjCmJMwNs3hTwW+Qn+6bqyt3n4z0xONvNNtEBiA5K7loryrwLvwLaamaiLJ1bwI3oFeUgO5LGTAeznhC006J0LnuOXRa0jT9ZyIAev89+rmMqB1Gll2FcTr3UIQdvVICCPeWFgsur2Ewy04EH2nzhFJYzedGOhKsKgZ/pFDMBk3gJsEyMpscsy34gAEFNUR+x9jYmiGHtJ1YF0nd0Ex3ejQ== 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:(376002)(396003)(366004)(39850400004)(136003)(346002)(2906002)(16526019)(186003)(6666004)(36756003)(86362001)(83380400001)(4326008)(26005)(66556008)(5660300002)(6486002)(66946007)(8936002)(1076003)(38100700002)(956004)(2616005)(316002)(478600001)(66476007)(6496006)(8676002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nCe3B9cbIuOo+w1sq80iF/U3QpewrEKRzFAyQ52sRfsJhH5s4JnhYcA12D3VsXoSLDB7zr0x6FKCaLh+otBL3SB18ChW7jvsSxK6x3JaOoa09juAlM+YQ+CB9uxNwrrS3P6iuHtxdk2MAdkgUEJ4X61N9AvlvfHdXHJ0+JJMVYSgYvW1zI3hL3ZzP9sksm5dkZf70dBt6siLcQUtsT9CgmZiBXnmm2WeCcTLI28v9ofKvy6ZqWHQSwCnaVK9IgZT8YoERXspunE1WnYbz6sXuXgWdPQR0r0zlW6stXUe+J5goEsXQA5xOzrJnQZ+i41+RLC1mkqE5JNU80/NQ/CHKESghc/7a3c07RcUgCC34pvXgMwhq6MDbDKEbiLu9q3k/TXts4sJpeDbRf4N51fZ5wPh1IevTJI8FGHPoXgpag+cvvxTWq3g+nmG81MOSJ/dI3LfHMt5sSH0p2htHKuBpxztrjwY5Glql9YNWzkjupfIuyQMyPfVd5H9YvyLhUfwYtbBtswLihrvw9yN4tV+PjZ8ZSf7b8WA6woF2yR0V6O8HH2XYup+lpOohItVoTlSoyj6GBctps87tEhKaWZApwQpPytUyXs6pAbvdkMY89RfQ0HCcurHyqq2ujAkd9k8muFj4IsuSq1WXo1wwCc6BuWhX/yMYVI5Ui047ReiiUjko1T0/i/cQ6vPd8+UePrIWS3DOWVajBG+RZZm6vGmr443M8PsbFsIX1MJ0ruyra4fNzi17Fzu0t4yx1C5WPcblzkIVK9j3tE5Qqirkmun18VruDqGEkB1Z8BZPGOshmLz0QJHaiOY+qiKo7zGeSQMIPG44YZEpRe9PQmx3Mm6WpXJo0SdB2WTKrZl1kgFARtrQrqMOMtnhzcvksUysx7cpgJu6S5Z+8Qbx2gu+jHBPUe6yxMZrIeKVh0oPIv9ozYR/F6T802Ay1fiVG5mlAS88V1pqm4UAhXpkioYN03fJeL4SqtEIU18vP5tWyEnhvIrzU0dhKhyDZ6RZtSD6NHI9YSVs6G8WU9uyHGbpcEf4y7AeID+gC1jP/YCnyVp16/1ky4aKUn39EXIb4FPI0bPY+1ujtPhbY0LpXKuVCH+iIQDbo8Zl7tqPLkfaBXG/b2DZpTeKzUjjNQT389W6WQfFBioHU0zk3KflE2sdhNvQVDdNqmzs2XF0/MRTiXzwWqL2pIsEwCs4ScMPb8dzwv8VI6itsWuWL4sU5GtjqM/xcVIavX4b66ZkE1uvAF+aVa4Vy+sgoARxX33slFrZw+T9nJLh42n7c6SKsiqtRupUT8Rwy5ro5Ydx6MsOLmjfXrySzfVzbRhbcVRhcOy2EXH X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4c120cb-ee58-4289-b993-08d9356726d4 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:19:00.2232 (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: +C/anQ8iGFRVuQHHJ1spcMyhhasX2YIDHtyvZsWT+RlIXh9ob9j4SOyV1EiqjNlo X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5727 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: -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" all function calls are protected by kvm_enabled(), so we do not need the stubs. For kvm_s390_get_gs(), the last user has likely been removed with 0280b3eb7c ("s390x/kvm: use cpu model for gscb on compat machines"). Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen --- MAINTAINERS | 1 - target/s390x/kvm-stub.c | 126 --------------------------------------- target/s390x/meson.build | 2 +- 3 files changed, 1 insertion(+), 128 deletions(-) delete mode 100644 target/s390x/kvm-stub.c diff --git a/MAINTAINERS b/MAINTAINERS index d05dcc22e0..bf9bc0513a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -393,7 +393,6 @@ 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/ioinst.[ch] F: target/s390x/machine.c F: target/s390x/sigp.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 Tue Jun 22 10:17:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336775 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=-15.9 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,UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,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 4F9E0C2B9F4 for ; Tue, 22 Jun 2021 10:30:11 +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 BA79E613AE for ; Tue, 22 Jun 2021 10:30:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA79E613AE 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]:53716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdfV-0000Ao-SF for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:30:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUw-00059W-D3 for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:19:14 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:28346) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdUr-0006zT-Sq for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:19:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357148; 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=J6mY78nm3AJRm4K3WywrY0/SMmeOAmDWM+WBzKzhr2E=; b=BXRhQ5J2UpjmUTgbauXg+8iWvdkoOMZ49DZl1GaIBROUOHCgvwP5/P5Y3/CSoxFyEaN540 FFSj1rBF3yODxQfd31UaxjfflOVjJuNlOh+Ap30ebH2g3xQG0rj/ZiHsCxjsUYNq4TpHAp tLnKzvA5IEvd6hFsoS2eEObYPu7uHcA= Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2054.outbound.protection.outlook.com [104.47.4.54]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-40-WvamszJEMtuDCmbGNTMMTQ-2; Tue, 22 Jun 2021 12:19:07 +0200 X-MC-Unique: WvamszJEMtuDCmbGNTMMTQ-2 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i8ltgXQqxx+FwciI/Xn9IyykNYacDkSzUItZVhDgOQQieOVw3lq6MrYyk1BH42ter22ogMMORHpxrUkpJejtMZJ8xixoVNGsKclIrt3XIZfeDqa7ar8oxlTSkVLwDYUNrAG1wdkzFas4kQN13y2b9fcUpc1BnNACtFwp7rWIakqGcS04gBgFCuImR5y3vZESeTf5/DaX5xkscldFXcpeedRIrVDc/vlXP9cO3mwFQmKVvsEdDvskHKCrvfFPtXMjmcBfkLK2R4EWNV1OpoJw/OXqqbYSlW44OMZDd846Ecs6NWX/7R4RLZu97hg1ZiUtA1b7kWbXnv56UFDzy0hz/g== 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=Q1YKt4+yGWWYOFXPaPnaifRyikTcigwpJI0arjglWw4=; b=EQG4HBVFZsXBAZjdyE+BQYPeyVwSkzU3FivuDvTYvWY8xfL3WL3gGnS62ZmoW22q74pXIxSa3Gnax1cEAxmhYrPWyOrX/mobi44VZGoMTWxmy51EvRo+badiv30mffyMxfO1y/h5+OHjkC8j/VX/EcrfbmucUcBP9+8GQqD0y6QqI3NzgxUjSvnEag/Ba+ogXaWne08wPq2m0imAA/jFjJCim9jmTDtpNkC/wel4SzKUALCvjAOdtASkMGczG0B6xfs8cWkgGUTb63gdlF+iVZ3aLQr/xky2pnpGvDGDa6QB0OfGckZcAlI52wn5Nq1xeqL+h0NodLw1Ql8EJI1PkA== 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 VI1PR04MB5727.eurprd04.prod.outlook.com (2603:10a6:803:e4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Tue, 22 Jun 2021 10:19:06 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:19:06 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana Subject: [RFC v5 12/13] target/s390x: move kvm files into kvm/ Date: Tue, 22 Jun 2021 18:17:25 +0800 Message-ID: <20210622101726.20860-13-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HKAPR04CA0015.apcprd04.prod.outlook.com (2603:1096:203:d0::25) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HKAPR04CA0015.apcprd04.prod.outlook.com (2603:1096:203:d0::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 22 Jun 2021 10:19:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fe7396c1-fafb-4621-d60f-08d935672a7d X-MS-TrafficTypeDiagnostic: VI1PR04MB5727: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1751; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EsC/EBz57I1VjYu7CAnPmztaetNBG07WHi68TbnER3HF6BzqvTu9ObP2wpNLhdIh65KPbn5UBMEaxjSKo5fhq+s7PixZ4Njd5XZJdQijJW5gJqmNY91vV6LUIcLzK0BAFqbzki3cc+QXQIWURPSN1eLa3sne+iQWxURX4cKQosMuZtCLswUrrPOF8+XE2XHEyFlURpHJYzniEFsHU5Fa5f9kbZOJbpinXOFWeHC6zFO02dqJO3K1cmuGwOY78S8ZYeEADad5B0cNdNDSaKaZT9TOEuYmYcKKgErlfgT5NEfSNB97VXygtWYjYbkgL93dJnqSLDFPNJc3vICndIl+CINIib6N/Mp/jPxq82JMvTgslE7ad/5NmyRQ/mIB9Me5MQz32qBOA2K77AG2Z3UYwu0PUjrsG4NDrPGKacIebZIFNfV58B4LgBrCDBylpeH52wwyLUHfwkOMi77p6d7YknU47MY5B58XQfdS02FWAurBsiFz7517mDPnyxJyDW1ylOWXHdlMAiqffK8B7cLH0Jt1K/U7wqgZINpfdZ3Ba9VY2oXvlmz8N5ki6Votw+O8jxlfi6ks9BVkue7Llod3UXjAustcIp/wjKQrK63Z9lG4FrO60xe+yRq4XpZHNIhPuGH93OTtM1USn9s7r6NJ+nChwvwJVU+0g2yk/Ww2KWjP22eCyxiH7JUUtZ1u+Eim 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:(376002)(396003)(366004)(39850400004)(136003)(346002)(2906002)(16526019)(186003)(6666004)(36756003)(86362001)(83380400001)(30864003)(4326008)(26005)(66556008)(5660300002)(6486002)(66946007)(8936002)(1076003)(38100700002)(956004)(2616005)(316002)(478600001)(66476007)(6496006)(8676002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Hz4dd1RJOO7S7CGtY08usAaeQtEKGCZsZi7KeCIWPJ28Ai1ho338nU5GpxwkZqX8WDpsNGcaUBcybdjtycTMrND7GaRjkzHv7qvK00RvaWmB1vK69rqeZW72Y8r7cXF3eZYNwtM8aTDJ/jzU+tQQfy7Tyn8DuiWErxFZXrX+amoYRIcac2MfsIwnxlcHgUvnRext+R955SjuEyNs9tsAIO9bj8stgbr6EM8WQY/rxmx9mgaDW7okgo6H/INgqIhg8QUzxsMQfl894WllNaxuNKUx3P8lBvN+kIPznWUGNEodBtcfquJEnaiPKLPzMllP5Nim7CZX8rkbOEh/oBcLjV3B6dVwXb/2UKMXhoaVA8QRyZFur/Qy/BXQCdbppLAoq1o7qBpgZMHTGc1hT7/oC0/psvJE0AkzswlpaOH3RfbUztdHTDbtZwCoTUdMwwYhTeu/9PwN14P/wJvpxilfji7DjtMW+LyKNT7/CPcePuxGD+CQDKDGIet4lzs0IKcL9lzFDHkHJtr/ZGi+zDU4yzsuL1X11eLgY0RXEg1GCmCI8++XyzK1ykzt6KvR/7J0J/dUHQvBEM/i3Ib7jI0PLx8lmQEHsXYIBQm2EcMcMij9b28mhup3Mn7kG6d/JSTf+2Q9K5ytZz+4f6JK12xwctij6chS2EzUBxs9Ku+a8IR6gSd+4e/IXLLAT6LcOEur0/W+oKWODEuf8ICzhLN5HPtOO7fISz5FxRwTFdmZD9OczCTahRWOCnGDCBHAMb+nlMvAZDp38mzyG+WpM78MAgNqSmVuLuzAay5aQOmecbmvBmzV4Wglrq4uLxDumwicxFVneqEpE7pOFl/+Lb3aGy+kMC6XR7nvZyXfUL5Qoa8OyIziSee/DqfDRwWG/CcFKWmOKvIIn2BpWq87S5eeN1sO/O6OF6fAgOGOONoaeWIeAFz4SCvVaMkgjugkuKukAz7QUkMyOxIJ+GTuyMKnx1OyCNltP/irV6VKVlZgevfI/mjaeAmlNc9nddO/wX82Eg2OhMzyIyRjfoe8NDKn9A89NTSxTPjAn2RrnKR9bCB1q51UpuHfb5aihsLdxiczra6dYwbY65Q3U1coBURQuFWARW/dSnz6zphLUAvkMby/O2/6p0GFxlsVCKOsZHzDqsoWAenb9hQmfm8eqG9Ud7/D04TOIu8wxrKD2h2v3uRHw+u9KcaSu3TYVC4UVY1I0aCa2+Q4S+cwPJnmvMYUZWQoEYWlmLpDaEykAVqRJDQOMLQbK5F8aHqQn6c75scRt66F/mPc6feWhX2yuR5rxrwJKE/QwK0vGXOYs74Yf+AMMdKlw+bZbVqKpYpdZtEX X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe7396c1-fafb-4621-d60f-08d935672a7d X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:19:06.1828 (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: 0cL3LqznghwEb0JPCp4cFFvDeRmN3SLMK1I2LeH0ITHTe03hS/XXOltcltKyD9TJ X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5727 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: -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" move kvm files into kvm/ After the reshuffling, update MAINTAINERS accordingly. Make use of the new directory: target/s390x/kvm/ Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen --- MAINTAINERS | 3 +-- 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 ------ 20 files changed, 40 insertions(+), 35 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/MAINTAINERS b/MAINTAINERS index bf9bc0513a..014d4365f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -391,8 +391,7 @@ 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/ F: target/s390x/ioinst.[ch] F: target/s390x/machine.c F: target/s390x/sigp.c 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 d8a92666fb..4c05153fe9 100644 --- a/meson.build +++ b/meson.build @@ -1886,6 +1886,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 16e5301084..df2c6bf694 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 2b2b70e1c6..9574bc9305 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 e83a8cf85e..729cb012b4 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 Tue Jun 22 10:17:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12336781 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,URIBL_BLOCKED,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 52EE4C2B9F4 for ; Tue, 22 Jun 2021 10:33:52 +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 A8C4C613B2 for ; Tue, 22 Jun 2021 10:33:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8C4C613B2 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]:59346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvdj4-00049t-GX for qemu-devel@archiver.kernel.org; Tue, 22 Jun 2021 06:33:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdVE-0005DI-W4 for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:19:34 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:54496) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvdV6-00076T-Nd for qemu-devel@nongnu.org; Tue, 22 Jun 2021 06:19:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624357161; 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=0Ra9h1cw72bPLHOTftS8+0vM3lOoJpnjT/PrrW4Kdpk=; b=d8RYrfRLi7mWrSpJutDcj+UyOJMuwmZw3wiG9GwAxPLsKqHvJ4RhzNI0qaHGWkerL7m8sb cD7kIGlDVK/nohXIpMFO9X7yfooMKTN9ZHizs8bUwJgsmyYcYcM7TsSV0cHCATNWVJ8emm xl1BmD4LHC47iRU9PyPRYEEhm3WsKwU= Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2054.outbound.protection.outlook.com [104.47.4.54]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-24-Xd2mqNHhMGmFU5eaIa6_wQ-1; Tue, 22 Jun 2021 12:19:20 +0200 X-MC-Unique: Xd2mqNHhMGmFU5eaIa6_wQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lMFKi8HLZ7FtT7PTx+BuYHU/vlFubGmm9F7+QiXngvGd7V43H59akqlnrZ3OrRy7Ucn799S8MumNGOjM8M2tHkvuR6gTPpgKP2XLfRYde7wYdf9VtVvQp17IQfiB3XfaisHn9sT5uToHgBoiQ51QirMxSGlbqFrEwzI6DeHGO+NloOoI50w1UDoaVOn24pfkaDvgKIQYqLIODQzLf32dZejYOVoUR3oXdx2EZ6aVaxwF6i/mH37YO+ENe/FxXZg5zqaPGFjLQ0cjdA/KErpr0bR4C4bwttfWE4Xzp1lPDJg5RXotqhUV2HpTlY/PSYgzp4ziYc9c/08RBoRfyxEA2Q== 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=y+hBCGE+GwvOvOlPekjt0SbTeg0cEAwLibVBPC0D5b4=; b=FXKNbWdQYYCMwIul1HoEcevsRGcZBODCUdo3jWq9vZk21nYV/WAv9nESHsT1J43n6i/zcUTvi0aY2UFWnwf0KdIpLkrSgFh9Zeiiicu0I8MHkGc7kA+3C7PXEG2aIKlpo0M7q/Px//6TrpzBHujdfxgQHOPjgrk+kBnpK1AE3aykf5wLLI2uXc9pQBnUk/4IAkcJVZCzh4en7l4xAy4wQ4RH6In/fw9hJJNkorGxuCUu9LwSyhWWkP5BZaldWMdopr1k8anplK28u81ZctoBDKZJxjxiN8PF87G4QwoQuOiB0UkYGk7yoiDQXVM71NbjLlE4NOA2/OkjBcqGdPUcIw== 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 VI1PR04MB5727.eurprd04.prod.outlook.com (2603:10a6:803:e4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Tue, 22 Jun 2021 10:19:19 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::28dc:6111:d2dd:4777%3]) with mapi id 15.20.4242.023; Tue, 22 Jun 2021 10:19:19 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, Claudio Fontana Subject: [RFC v5 13/13] target/s390x: split sysemu part of cpu models Date: Tue, 22 Jun 2021 18:17:26 +0800 Message-ID: <20210622101726.20860-14-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210622101726.20860-1-acho@suse.com> References: <20210622101726.20860-1-acho@suse.com> X-Originating-IP: [1.169.30.211] X-ClientProxiedBy: HKAPR04CA0013.apcprd04.prod.outlook.com (2603:1096:203:d0::23) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (1.169.30.211) by HKAPR04CA0013.apcprd04.prod.outlook.com (2603:1096:203:d0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18 via Frontend Transport; Tue, 22 Jun 2021 10:19:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eacb84c2-2bbb-47ad-46a3-08d9356731fc X-MS-TrafficTypeDiagnostic: VI1PR04MB5727: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd 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: GzCWE7wZXTQabUKe4lVKHcAC5AmV+6Nt+vXjtV8LAaeuVvTWdXcTBDidRn5BvZvJcPwvVXq1F3jk/qw59g9VFZKcwOY0pq7rk4BAZGTzKdE80YkpOgz+XhsnsQWQTv6YnzMmGJK8HgNa5fGlM0p8JDryR+XWXnjhothhhtv6JDoYCnRML9dOBHl29gnb99OCphOmdaXtsOCADLf/FxCTxBaTvYp1O/0jFgCAxSdZvMARfPSKHXNwWeaRnf0PHSbAlN79MnDGlGI2s8AjarpSV+N76omL4p1bTzk/Vkgchse4c+Yupi26r8ZP+S39qFREURqchDdCtxKjzdQk+SUCX6fasgQl71HX78Wv15dlrDxlRi4Co4YzQ9e73uvIa9Tb9NsKgb9404jEYxtYdRQtwI1mwkJXpo8sXO/2Ttxc3MIuooklGPKrzkwNopvL0EXw13wHpcLu37NJWF/K6zaLTcW9mXozhGZt2D8JwfR8iaOG82DsFYWIt6govC+vcqT4zLzHZrRpylbERO8Gf6oKDAuBj+QfO9SMhoGl+T4Mr85yiaKgSjovXoeNM7CVH8jozLiqXJMmvJdWG2BR8H0Igkiyh4WZ/aPVUpRwq/416hWnL2FtS5dAGeNKrM7mbKQBCLgjZehS0RF8e4qjIsaTiMS2C2aj6UoDXVvIMZjQ1fGG5EjX88k9zrkXiljizdQyzWWwcqT7mJp4t4uAmhGEyP7gOqHNb1KVAdF1n4/cQYc= 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:(376002)(396003)(366004)(39850400004)(136003)(346002)(2906002)(16526019)(186003)(6666004)(36756003)(86362001)(83380400001)(30864003)(4326008)(26005)(66556008)(5660300002)(6486002)(66946007)(8936002)(1076003)(38100700002)(956004)(2616005)(316002)(478600001)(66476007)(6496006)(8676002)(170073001)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gHksj/3syUx9qL6DQNyedVE8moIIJgU2o59hWm8gOgGweD8L3ARHU0UgC4+XxAbvow2/rLAY4PSJLy6jUTTv6xC4dlMTe9vo68EzE3lHGBgpc4UDko7av4AGEhIvMeud32MVpqRIkUushfqfxZQ2ibbOZOpmdSIlyVhdfBMbtmxWudursCGKsvaeKAU7BHenMwhsQlbKClYU7QBaeSpm63+V1UMR33GAZAUdectE9RuNAhjFQtugJQ/qvrdNP8WKf6ZL4zIQC7pbm0hN4dZHbRA73ahBP10fPM4rpO7eAEm54hNshTl9IKZmHXpkUnhD/e/wQPRO87JERXMYufIABekBNHnG4fdlUa1vgzjSTKe6W9zVGhHdLMASnDpWPp1MGGJGteOz1QumvKbyz+T9fo8nE9Lj/z8Zh+lYBSPdJoUQ8gONQTc9rt7SVZv4uzOforjeZ8oi+sUxyIYcrXfcOdtDFknzi8xtUM88EG3U5CYRXNYv9CF3SVF76r59VeABCMw4b0eZhNk8xJHJaIULXPyQNG3vHE6Xxcj9KPwy/sy9rvW1Wf4KV4JOrq5c95Xux8KrmQ8LqV+KrHpR+6CMVfSm+FIYHRA02f1Tx7PzaNi7QUf6DV/yHW/kTNIqhtF9CFDQKSAhW0Pd8QgpN1h4HTT//rSJj5k6MyLh0ywowtZJF0cAhBbAWms15VkZEueB7E+cGoVBM1jMsBW8KLqKmMRGO3EUd1oreN/44cC+wSSe0UPaFhsAi8gjb6S+cGKewf227NZmiFwPV4WD+zXTuq0P4EzF9X4dydBUtvmwHzPccHRn+cFRT2nwK2a3pRzQ7u1+yCVYg4PuF/eJu+bO5fcVW4yMhXsH3zV7x6Lfddf5vyskMqb3McGE3UEEH0H03VbKmx0MxULF0Zaxd5d3WSS1qe8+PVcvRIvWYxSWWnV1EVq9BYnH8BUpH0ZgJj7Y/SrgM+tqkas5r2ZV1IOPxMhGLAN2WwIhlQff66MKQgB5evRwV2d/y1OYQsSdDCXhRUCxeSh/l72T3VBTTdedaw7yd9m9M8rt25bzqPmjfaAp7nJ5/rfYS1EO4yEEjwhbQwyqKQUVYhGyOwjsjwGSQ9KrAmuG34VoKRW1zNYrU8AvOp3v+9TWmaRJQCDIpM4fzXzyayKSUb6+UIcwSP5Mpm+bGAMHxeWnQCFJdVs2VqhU4s9j381ceWx/HJHySa4cG7RXGBIM+SNhWFQbT/pzXboI9Ka2xcE29RtdOLtNiCkaM5HK+M4Jld7ATUbnDuU3Tv3Rk1+RD+PqGJr1ZuJVcBVbz9w0dDStv7IvPq2Dg2EI9cchyDPJp01GZ6Q9fqs9 X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: eacb84c2-2bbb-47ad-46a3-08d9356731fc X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 10:19:18.9534 (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: hTG1ajDEduVZS76Jo2ErgpwwSbT2SlWf5oOvl1UEQ7NXGquDebAc2xW60LzAsoaq X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5727 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: -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" split sysemu part of cpu models, 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 --- MAINTAINERS | 1 + 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 + 6 files changed, 454 insertions(+), 416 deletions(-) create mode 100644 target/s390x/cpu_models_sysemu.c create mode 100644 target/s390x/cpu_models_user.c diff --git a/MAINTAINERS b/MAINTAINERS index 014d4365f5..0b446a471d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -295,6 +295,7 @@ M: Richard Henderson M: David Hildenbrand S: Maintained F: target/s390x/tcg +F: target/s390x/cpu_models_*.[ch] F: hw/s390x/ F: disas/s390.c F: tests/tcg/s390x/ 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);