From patchwork Wed Jul 7 10:53:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12362387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 298FBC07E95 for ; Wed, 7 Jul 2021 10:54:55 +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 8FCFC6198D for ; Wed, 7 Jul 2021 10:54:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8FCFC6198D 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]:41638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Cf-0003xK-Mn for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 06:54:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15BV-00027l-7L for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:53:41 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:59956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15BS-0001yv-6C for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:53:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655216; 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=yGbqbFwBXc1Vl0Yw+TapPCbcOCj47SJJdT9o0Q0MNwU=; b=E2hBxOiB1NgtelNdm4HMK/1BqqgMNeZcVNofwX2tGjzTcVfjy3Q0jtYpPpmwOM8KOVHl2v bbdNrw8bvJODNqtHofD4amNqxp1+qb/dINZ7DMBU0nKCn5vD9SoPfYDK6K1zwHdgLI7jpM jv4tdBzgI5ZJPZ7jG7pttCv5itafGVY= Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2050.outbound.protection.outlook.com [104.47.14.50]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-11-w65J7K5ENPyzwFuMxbZKpg-1; Wed, 07 Jul 2021 12:53:35 +0200 X-MC-Unique: w65J7K5ENPyzwFuMxbZKpg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vk5qPMkan8w1xLGQSQoD4Z0YP4gQcuXf2L307I2KxckHScytxZAJsXsVVIakOWdVjJnP1cR0haYQgdY0Vm3U12yUbvJD8pIZV0pGICp9DugcyM8InF23PpwrV2WTUnRDaVpIEeqlQV83s2/tOX4Y/Y0sLnAbnZelB8a2xovflz4h5pbTPZZVQN6wdBBx39eUvk6/qOjhGwtazhTQqBzxY0S/L0Ouf6LaVHAllXlNX3IldWU1MVz+QvyaIFjdl4WpeYjinlN8l3fYyxeVjw+le9In3VATvh68EaQnRt45qVqhhCphnKOdnZ/edL0Lsl8kRun5A9RkfzRBhuVLWQU4Ng== 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=jqKi42TgMF1kAUsYKtBZScAleQG5X11hOlu2rlZ7980=; b=n7rPJA8TARUIIEdbsxrjSI/ON9pODbWOoTGT4UT5sTi9vjL/byzg9b+GxeLmOKZWGH4PZAy9FVGacKcM1RipNfrjjL1ZMeARZJyGgvoVmpticRRGWcsxQ/EMYYuozmMXOEVIJwLLgO9+90kXLV0n5gXqx9R5dkFBkOqOenUkoxIpy1np5zS1nzzB9JkjaaKfT7IkVnYiCcNjFrzr8iinLJ8QIpFYinGxlJ70OTT+f37PxLg2acKaLRcMS6jZRiqn/E8zu9WyM2BQx5p4y9CxZcw9vssDWG3le59+tj8AX/tt7HrKGvP4FRFuwy9tm8OipXqsc9plEnDbpSPeFDfMvA== 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 VI1PR0401MB2238.eurprd04.prod.outlook.com (2603:10a6:800:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.31; Wed, 7 Jul 2021 10:53:35 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:53:35 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , Cornelia Huck , Richard Henderson Subject: [PATCH v7 01/14] target/s390x: meson: add target_user_arch Date: Wed, 7 Jul 2021 18:53:11 +0800 Message-ID: <20210707105324.23400-2-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0072.apcprd04.prod.outlook.com (2603:1096:202:15::16) 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.20.159) by HK2PR04CA0072.apcprd04.prod.outlook.com (2603:1096:202:15::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 7 Jul 2021 10:53:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d19a3482-928d-425a-0aaa-08d9413577ce X-MS-TrafficTypeDiagnostic: VI1PR0401MB2238: 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: s9F+zGUfIz9r5fypjODQNWlTp6QvYIbVyYHdWMAFKrvO4vXgVY1iyRSL4vPVVigo1n8OtzZeiagKjG9/kE7VmD3/2sTighbDHOOZZ3fH1H2XrywQhHFZvF5CfhV+5e14vux+YU0DIpUJHo8EqZBBj4ovMkd/NyXRqVhUf5+/+M+Dh64PfkOmlyEIxwhE2Z96lLZXO0QRTWxXuBZxlGw1BnCYp0f5n0dUzyW7NboBJZT5X/NJe9ppmu6ZKGEm8QzStEnd8UMkaiUMsp0jgTXwYPSJev3z6Ltyp0pxA8gvGnUjrf35HaeAKFcKwHB2Yu+/wV5XxwFJYcCYmE+bnWONJz9k4g4Z50+y4GXVAsn9xcWcbpicKGvoxWclVXSRdn8B9Ip8RamPVPNvwYCFZDGxKIfXVb1f7Yr8qgMKsXTfZS9ujbc21P9/16pct6PqFO2ah3VXpEUtPuQsvXfEJETW0037T+rk/jYmbjWHqKmMZNliafaqdjnl/Ykfcj+CIcRH68k7mrR6VePntWIuRBHaNmyFAASGs0Xs1gx08h4MpNCEMu3dbTfe8FX+KYokxCWW9kieham58X9T+dNwBQGwXn7eadFR6bL5y09YJZHyQNUQKsHQM5sPr6VyOqrxp6jjjbBIrcYjSoxtIzZ/y8AMVUssYdJGp4NWujU5Ri33HPQ3mFFtmVIMlq+6MEBAEFwCbhrA3VgILj4UhgBZMIV22w== 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:(346002)(376002)(39850400004)(366004)(396003)(136003)(54906003)(316002)(26005)(66946007)(66556008)(6496006)(6486002)(186003)(6666004)(86362001)(8936002)(8676002)(83380400001)(2906002)(5660300002)(66476007)(478600001)(4744005)(36756003)(4326008)(2616005)(956004)(1076003)(38100700002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: acJjvbEdhH9x1C1o+UPffuEfKTobfFd+a7jZ14k527JmmaDgZ3/KlxlRa4hnlDwClNsgSom+o3zbH52Vy7Lw26k6UxcSqoItUo/eeV3ajl/n4ynLm1BKKYjBFTgLKzDSudMWHhoxWi6pGYiBmnCBf/JuLTtFDq4ljx9WA5rXFdyJp+iCqTMwHvpqOeKDSaR8I37DQcvHoWvo0VXzwKzwNHivaAACq4li1JJQN3Xil3U/gzRNg0feWusn3ze7Y/ygblbkfrXnotxBYA+cCIAOSTJ49nRUyK/QDuUYWyDqpSMHVZeEyvjpSUym7KWD5qbfuO/tH+xGD3v8umiIV/vJAngMWde8OtRljsdr8OcJYuIFfC+3JUblXX2HfJgPIWeK91P7Aoj3t9VGAOvwwivNYz2TjIbpf+oJd3NOdrTadJBhimAmLFdaz6mFmT8wZhjFnqATPXyqZe2BIVEJFj+G6DX7eqdwVLHrz48WAu1XdpFGD/qQUWQpJ3O0v+sOm1DzK18tHcHqtaZmsjXuooSwgoaPHPaHGz9gcNKoGv+0D7nPk5zbcfi3lYYAyE7hRBiF78N7jZ2nv2ZbaV2FjPzYhjNEmKAqBAmXNrKJ9BUPZNirTuUI53YG7QVM7hez+NeemJgS+67o/TxrpBUdVXVKXeHGIwuxOxEPkSb8nQ5Y9WIsZiGNtIzPGWQLzM2GYYT4yvDpGpTwhl5oDlFxvpuwBf9x+KuN7Ya7q9IQUmxU0xGmZj2ADDUwlLWuCtlRSbH9ZfGdMizaKK4IwcFYYf9HRWFwRk2lh5Nj8DqzIIBnJqDW8WU/f30J9gtj/Z4mxQuWqcXdIIb6A2VUrHKJv6EETiimua++d0nzzJ5fNk8QagSJ+wpNtxgnxCpmSLB4DDlcR6aBHotQcple9gW7KsbFBOmDW/cW/ESi1ml+wAIDY1bWFBVyAGd0+AZUe7cWmS/T3Dp/pgdb4WVH29GTn4iDaiD6pkWpTvz6UdgfbLjrNoVx87/EcpljsAD8tgYpKOMdyT1L94kRUix2TxHHq3lSBZq33TqusuPUN+pCctscD4aHGTXESkpZDkmSKo/2RWp6kK7Tmw4ybfcbUD6l/rZE9AaF1/o+TkGVWS0wp3DOF1awIm78ScgdjqSsYatyvMgvAkP2fwR3fK/GfN1dauLUIcDAMjQJMO3y+ty1Zwsp/WT4Dz77yUhuElt2iIQMKMQYwLSE1xNOPruoynWxXRd1Oin8uTlUNdVNJt3fkPkkZ91kruwmFHJF1phunqk03Nzp06PXtZidkyO4KuNRTsRXav4wxuzFw1+ujzUzN6hzaIOdsNktBayBDDAH42Ij5j14 X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: d19a3482-928d-425a-0aaa-08d9413577ce X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:53:34.9749 (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: npggPSbhIGm5ezc9FqhNxpRoc7niVwPPKUKpYT5rpDKI4QvOuCQNikl7IWbZ4Nf4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2238 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_H4=0.001, RCVD_IN_MSPIKE_WL=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 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- 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 Wed Jul 7 10:53:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12362393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B448BC07E95 for ; Wed, 7 Jul 2021 10:56:59 +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 3FB8761CAA for ; Wed, 7 Jul 2021 10:56:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FB8761CAA 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]:49882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Eg-0000vj-Dk for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 06:56:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Bc-0002Nf-GQ for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:53:48 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:37691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Ba-00020E-PO for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:53:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655225; 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=klJhR5wQmE3TtVScDc9Ipt5W56waTw2Bx8x9lWL+irE=; b=P7QoSfFwHIQutFNSYD9hRG0MdBiESd/nidAj8/GMmytP38lNniZF5D0gUrMv780UdIdG1T sixaqDsmG+xLStrGPjIqLC6soobxlROMf9bm9cUXce7qxs9sR9cbTkMQJXjCMer9T5ucXI sr606HcZQaQUjPCt6bjnw4X0km488e8= Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03lp2053.outbound.protection.outlook.com [104.47.10.53]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-8-VzcTJgwxP6iXDe_aIoixow-1; Wed, 07 Jul 2021 12:53:44 +0200 X-MC-Unique: VzcTJgwxP6iXDe_aIoixow-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SosfeE22xugzOFDP628gZGRFLyV6zIcEeVZIX/DbDBaNYn4wqVknLRvOXUb3m07SgaJPrQrKunT2ON0gfkh95I81dq6amaMnTt1xYyFuyLLRuiVbYtto812dDig9e94LFj3l2FguUxXWcj0amMl9q+zM9U2NZtwb+wyoaFiwwohLG6U2SfoKcHerQy9bi0vQCWA6mtA4tMl9E7Cn2HbwvxBRR6me4CsgIhjnoRw1iADnuwzHXb0n4V5+BBHXHZugbDBQX+Ib2r0vGB5cmmtZCKm5biOeqvMJr9vg6Iiqmr55xetjlxG/vb9kmOYkotT1Q3YzpoMRQOvCTcCIiPYHXA== 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=cDpvCG0fhr9NBozkv3Cm7NSL/0RDStUpphJdG/tdzTI=; b=YPdPzzaU0uGA4Ebcy5vIsxtkNFMdCrYF8Ad6C72dTqzOcakphtAwf5+JRUfgQNg2iAAe3yedPXtjP5iu4OMv2nyM3P91haq15i7acee6C6kjeyREcWTuPEfKMJ2U5XJadc6/UlW5NaPgCKK9XPFsvXYeZOJ+Ywn2k37ahG5HGxHj0CJHX/1BN725EUpAmVD5dFy3gRy1F3BFtgZEBk+6v/PajSyt3gLlLLq2dy6KBv8QAXIG8qft2L15ztXD9V+32ZBfzgfJfjoAMeGYTk1j+xSkBEoQDZ1KcXVR+Hmsv6RD9oD57F88fmBP6YAfEyvXfh2yfuvbmBEFYThKSUsaYg== 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 VI1PR0401MB2238.eurprd04.prod.outlook.com (2603:10a6:800:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.31; Wed, 7 Jul 2021 10:53:42 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:53:42 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck , Thomas Huth Subject: [PATCH v7 02/14] hw/s390x: rename tod-qemu.c to tod-tcg.c Date: Wed, 7 Jul 2021 18:53:12 +0800 Message-ID: <20210707105324.23400-3-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0090.apcprd04.prod.outlook.com (2603:1096:202:15::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.20.159) by HK2PR04CA0090.apcprd04.prod.outlook.com (2603:1096:202:15::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 7 Jul 2021 10:53:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5eb8eeb6-d94d-4403-304e-08d941357c2a X-MS-TrafficTypeDiagnostic: VI1PR0401MB2238: 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: PwQ6Iv3su7mUvKefoTBViuh7njurruG+SsS9plA+70r0U7W33nk1hgiU/4Yb+zMH5cEVhcms/D2hNibGpoSijVMcQ3soT7UYyJXwmF0g02WKL/B1Hz/hEkCQ7eIprgGBWAHu1zex611hP2EC1mnq97rxdbnRtuDpqlxEg2A7haKepHKrUSmr32R8uzk8F0UMoX4UO7dt6uvsCIPdVnHYi38d34Ony4feOodfOYWhu2nLrMD6aY2pkG8RhI9yl+7hd6EFthVxtvNcTJccct+AkAwAbp4j9CNiYejoc4bwtWR4+DnoqFE50jFNndeVxKJDVMcaDXvXLupQAnalOaF8PPWCZlO1aHQrgVX9/L95zQFIhfVKjizVgEwPKB8QmkOguthDLSVFTqlL16mgJX1ySk2QeSsw0+UBvs6M6FckiVXmX5Jsc2G9VXLRW7RwyGrB0tI3ysrgFstEvgaBP6CucbmNz+RqiP+cRyhtqHFMpI/RzZ14BQXyG4PpkjYhttAwXeX72HZql+GUEishXWFLf3nWkk+lPrXb0oERzmVLpIQKOm99JIYLFnRVOiFLzcFeJT70MvCvSwX198TakE6L0HgHHUMFELfeGm4BhgDQoCSzFYbn1MXrQZ2DUF5QANXKYbEOBP8JBYfypF4HxYvaVxLunCwVetrJvVMU/BHFo1w/ixaiaDNlXKwQtckvaVrLplUql4yIcXpZIomCOTVhyw== 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:(346002)(376002)(39850400004)(366004)(396003)(136003)(54906003)(316002)(26005)(66946007)(66556008)(6496006)(6486002)(186003)(6666004)(86362001)(8936002)(8676002)(83380400001)(2906002)(5660300002)(66476007)(478600001)(36756003)(4326008)(2616005)(956004)(1076003)(38100700002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QGtVrR0aoogCCvKBuRpNdA1AQF1IE2oBzZN8a00DAxUFGyiWCBd4Mdm2EuUEoehiwBTDDXphDVZl79Bm/nluzdVzcsyMVHTUZFTTjaVkCQpMUK9plTu1BYttn32FrpcPluC8yMSXkYLcFlJxq+h/XO37jxJ0chy/gVZgTiLDyuxqx/UZjMdOl3aVl3QkwSKhtHn7DcywqD4NeV74h0Vk/57Tg8FENKKl58hwxzuHXpZnEeiD+ciWutt1P3GFsLrds0jCYqhAd+IwozqsHvge6o+zmOQZe5vhzZYvgLOXgupMFCfnqdWATf+oo3WjoVPSVOUlR1taJvt90/mg6/MKkY5M7iKVAj313SRGkL/l2TMMy7xJf1lYfjbQ49Gq6Bk9kGTbKbIPyaFLsebxiU90NmoTL98CqA/xnuqUeVcH9jR238OXGS+hrggzZUu1qeWQArzx0IuGm5GKDLLCqvNJre5Yq/VUrY8xF5wPTzeRH8s2iiY8axhIekerWAcZ/8a5nAa4G+0Vjuc8ZmiyAAhWfxUxdUTSuzVmiCKnj39shae6kh3591i+uEOqtv0oCLHEtchKBpEayvU1kvGb6bNWs0/tjseDA7Qsj8gE3m6iNXUQCyA5EhMWKXjXVvwgDMuY+t9beV+ectXrU3s7gzeiNC9GhzCsSzonCIsj/eLPq/ErOji6vzsCXhrqaiwY0FQiFKkzdmXWnpX79QqvCCDJinHUjSR8b+XunpdVtbojRXVrp0O4k/I15UirG8FbQLuVCXH1JNQj3TzCjUq9vG2unohod0sKb/1nDRmV5JwfM75OFdXJLY6GRJgo+ADFIdDPSjdBtKGANHgyZCzyqAOKDjmU2RUbJ3SEpe5Iv8Jp/rsQ5Zh0m5A5FFwOUP8ECvvvJREg+1s5ew2U1D9eeRRKSnNvr619nrNKxq027+7GDV/ypchFnSE8hnjlDCjtX3Pom2jwJ6vdbC52EDZf5CEwjZc6c5ekZ2JT83ydKE+HZukcrF1c66Fz9TzMmV72TyXGs79Ww+fksfQV898Hsqa/r4e4GJUeLy+RwFp8J1FRd9lwDjucjqCd2YSmOQbTAuXfd9djzBDrO0KSqeKHCY4r/uKtxbgOxhPQVDLQOpdWH0Vxb6F/iOEAs7plE7ITaaJm7LeMpFmRzsHpeYasPsagSYEb7jKsGLDFd9TVgRHM7zUxT5srtH/8dUFshI2TjuX+IVdxGl6xs3AVqCFcVsW4l/uzMkexGbOKxv4+uZNLvBqRxruoz9HgnExstBdFvcdu5pmD9/Hlx6Zrh/TaEHtJQrwaFG5iFFn4/IXNXWqMejpFBUqn6Y5bbY8ilbAgl/F6 X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5eb8eeb6-d94d-4403-304e-08d941357c2a X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:53:42.3056 (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: fIrAzBpMLTZcQmB7uZH+njDmmgSLduzfdPlKL/6FWLr9wYA7v8DWCiCcRWCVzmlV X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2238 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_H3=0.001, RCVD_IN_MSPIKE_WL=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 Signed-off-by: Cho, Yu-Chen Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth --- hw/s390x/meson.build | 2 +- hw/s390x/{tod-qemu.c => tod-tcg.c} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename hw/s390x/{tod-qemu.c => tod-tcg.c} (97%) 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 97% rename from hw/s390x/tod-qemu.c rename to hw/s390x/tod-tcg.c index e91b9590f5..aa44deb809 100644 --- a/hw/s390x/tod-qemu.c +++ b/hw/s390x/tod-tcg.c @@ -1,5 +1,5 @@ /* - * TOD (Time Of Day) clock - QEMU implementation + * TOD (Time Of Day) clock - TCG implementation * * Copyright 2018 Red Hat, Inc. * Author(s): David Hildenbrand From patchwork Wed Jul 7 10:53:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Cho X-Patchwork-Id: 12362405 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 256A2C07E95 for ; Wed, 7 Jul 2021 10:59:13 +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 BB19361CAA for ; Wed, 7 Jul 2021 10:59:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB19361CAA 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]:58614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Gp-0007RU-Sa for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 06:59:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Bi-0002cz-K7 for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:53:54 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:32244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Bg-00021W-TT for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:53:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655231; 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=y7Av/I1BwaOzSgQw7Kqno9tpyGZ2F6rDH0MuRsnUr/8=; b=Rju+cH07GQVT2RqwTg2a02ZBT6b7NncOSRAOYz3TCYhqmAAilqJ0c/oSUSKXkD7cjFdXpD 2I4cm9cKWslieC5M7EYkEFEXCSmDhZUis+fPCR/cK8VyRjXQsvtKmKtNRTs8oobJQbv2lN 8exyngHYTDEJzGuej3m2Z5TNf/+7klc= Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03lp2057.outbound.protection.outlook.com [104.47.10.57]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-16-10u6T6OsMbifmMufiF4asw-1; Wed, 07 Jul 2021 12:53:50 +0200 X-MC-Unique: 10u6T6OsMbifmMufiF4asw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F0/3mzg4y57KYoJ1U59LJreRskMwk5fEj41ObZpA8OOxFvPhrBdlnMZ9h2ZGlg2kqHwr1mdeauMJbhW1IFTO3enS5Bei22VHVJ8odABknmf1pBQCIs+yVqzFuNAp8C/UMFsXupGULUZW9/9lp5CDXIwhqv2YoM5xE/tLVaqY6e96j1WSsHIW6XkNqH2T86qpjGeaUs9DCuFTwsASU7ehJ+E2uyPQtoNd6wJCvStDfQTX0wiuh6Ft/qJsXVsyeqJPpI7m9r14cnpNLEz+hYnHTKx1V463tGHiByG1Kk8F7buSoG9WeWna4uzeFF00T0oEXiFn0bMoC8KjgMNZQ4chjQ== 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=M6eheZ7xYViNpq89GjhEcSKW6Mj0GqrT9UCtXkIu6k8=; b=D4HB43OZ3AQqqo27FDw5pMcqIEPvD9ddT1z0Fz3U3QYXkK948Wj3sBIBmfsm6HJu9KGvtQhmC58BfpKWpHflXTuM7WtBUgpTD1LDVl1B7Tq+t09bCirZK+7Rhui64tG3h02YrK9Nsq+xPoeQwsjSw4W7JhFM2iMSGXe82IIZ9LZrsM3U8hAn+1cWieAzRSgjYSFRfZejLCBm2s0k94wHjYUH92mgAZwMu0oPaBTyz2Ndz7UhSs5LH8IGFbKwBFz2+V51MehtsL5uu9nbpCf5t1sQd1/J4YDHtepDON8NFG/7xOLjRG56ibOevoO7n1O7kuRa/UoDyMJC6WdmRxz6GQ== 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 VI1PR0401MB2238.eurprd04.prod.outlook.com (2603:10a6:800:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.31; Wed, 7 Jul 2021 10:53:49 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:53:49 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck , Thomas Huth Subject: [PATCH v7 03/14] hw/s390x: tod: make explicit checks for accelerators when initializing Date: Wed, 7 Jul 2021 18:53:13 +0800 Message-ID: <20210707105324.23400-4-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0087.apcprd04.prod.outlook.com (2603:1096:202:15::31) 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.20.159) by HK2PR04CA0087.apcprd04.prod.outlook.com (2603:1096:202:15::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Wed, 7 Jul 2021 10:53:48 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 01e19303-4867-486b-fb11-08d941358045 X-MS-TrafficTypeDiagnostic: VI1PR0401MB2238: 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: 4TOOFM6lCRCPMXn7zSGlPpb+jsU2W3DSf9KOLwlNX4b+j0O41dpOMz3kwOi/7kPeDZ0QeIdiMfSFrJX2QOWeb4KevAvwcdTN7CUtBD53Ad6LN1c8poAEvSISy5ynXUZKRcJecn7I5VmJzA5eLxta6cUxDrIhvXVY2YQqEIs18uM8Mry1nXfbVgUadF3RUINlz6lbOAvfNtTTh7Qre7h/4BJRo9bGVMPOsQ9lW/Cf7GCmOjySoAYwUW2cnCk+pKDQz+H5DqF9jM0+/hg8eCsG1lEKlan/2Q3xlm/AP9emfNxuYXzwEcS2mb24CPdyW5FUKLhcx320lieZn7yNUYfc9rNs74gmEMR6TdWdXGeV7+WkFy9cRhYRpVbo5G/M/a1a9UUfrOP8JruUrj0AFwK0lZWFjCeCCmO7ohj6FVDIy38RsW+/if8uQGt7H+ZaxGUBU0qplZjG+dpWjUCJYfsKkQpx1T0rndR1hxSJIqG+gCE4UtYybKYb0ny3qm76T0J+foIsTT2SMYxTgNZ7XtdW3jH3iQX315MTMhaF5wi+CK8+Hd5EfhK4okGOX389AeJXJY0K58qiGs5jvl23VtJmTRbVqS/FQGQSmboJpcdt6Ws23Z5eRgfFxDHQU32YWHg0B+ig+aP9DESsIS7Nkyni8e7oEwed6ZQAMAyKip+i1zcqlbsVV0j4AyYSd7rDAeZKMSVE4JAywZCPYCZdfZxyrA== 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:(346002)(376002)(39850400004)(366004)(396003)(136003)(54906003)(316002)(26005)(66946007)(66556008)(6496006)(6486002)(186003)(6666004)(86362001)(8936002)(8676002)(83380400001)(2906002)(5660300002)(66476007)(478600001)(36756003)(4326008)(2616005)(956004)(1076003)(38100700002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y077UdvQT2x1adflHcFdiVbJ8Keinu9UXViLmX5BiwGVFGgNRXZNzaomAAPVYEaehWjq5tvi/vcpJox1edbFspwEWan11Pj63Tzl/cIL2MAraWSoLaXmurZMnUNCoBHgou0+TAWo/PJc/77ydExTePvuK4fz71zDigH8OAKSFMOMRITn6A3Xj7c1O0iI0SH6CS6yR7FGW2/dC5h/gzTmuRqaCfyr2i3wxzpXRXHBRleHH7ChSRwtpkHd4mUO9fH8+JFe1B8FGcvIQA+I5EvSAtB742RMwl6md0u6WZlLynUF/x9H+AjK9azf6GTYEPRBepiCpmzEzKKN9NpWlE0lAdZCC5Yj0PQP5b4o/zQc3IWlpm4j3P0fkOtDS+HChKjEL0BiJz0KUw1RZr6Q3b0sshCiGiuTjObKDEZlVumSR79A8eeYBbWPzxtLXnH8MHjpNd3VF0p0qusR37xQTj5+e7dJRFalTZwjrP04wXiiFOnRtRzh/W0+aznAewO9yiCvCg8Et5PK3aOjwYXWcfBHmJd7NVKKihQiX12GkaguQwK5LIsVjT77EglDNfFqsyBBuK7oOueMzTxucfNsc/7tunBpyXTprDsQQiscTYijh5nruoSaiaTJLGE/yqC0iW/Iaes0be9GIFLgw7QjOUd5zKsRhDMJWIHl34I/YMffeBrw4y550vDx9ldqbQpaN1TCHcflNUyWxXUqMJdlsFu/JclGW9yY4VwilhRKE0e2NBP8A1bsmiilZlhpfHaQUXqorRwJ8zrItDWgWQSFPmaKO3wtbU5v30gPKaL+BmVgyJb3VxORms+JwHveSEGTtcxOPPKUmzbQoYH3xNWINBqGMnwIRFUVu647AzHY6GpU/Plv4lH5hfsCOjR2V0lrlOHvP2Ow4PzNwR7R/JNlk0HMkIHt7zssYULZFGLOz4yGMduCrXsNHm2Z8Zia7DvFBpEdsiuko5GlcQDs/XcUqw3VgHFtXh+TLptQQ9LZ+BORwe8waEZcq7DG6RN32f0PxGUGbkhqbLFFtxnoGcJs1gASHgxirCcZuyNTV9yoX1EysH7EYo3YSWqZqA6ToSdutUyn8O47FTeijcqGHafl5IPZ+GMVzLy6cDO6FV2CT4a5cIGc3keMHKDdEn0/DMWHjOttWOYaCXAFoSNHftwclhyp2rZp0DQKGyZhn7Z2zbbE7EdqNitC0t4GgH5UvdUUxfHdFxG3oqxGyGbzA670rj7vZousY8+XJRUcwWGWzqZEahtxpF+ixHwEoGQeYlNK4PiDxlT7mqtZCR5ItVInhfsJqMmpo0UgRTIX54ntbixNgS0ejgkOakH1eMncf1c5uRkI X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01e19303-4867-486b-fb11-08d941358045 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:53:49.1577 (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: U0dAL02dVW6g1ha0pWhOF9foQ8MsAD95R+5E/nYMvAZOuW9RrhQdAI3iWhDXeLiL X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2238 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_H3=0.001, RCVD_IN_MSPIKE_WL=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" 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 Signed-off-by: Cho, Yu-Chen Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth --- 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 Wed Jul 7 10:53: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: 12362413 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8DD6C07E95 for ; Wed, 7 Jul 2021 11:01:40 +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 479DB61C77 for ; Wed, 7 Jul 2021 11:01:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 479DB61C77 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]:38994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15JD-0004f1-Cy for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 07:01:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Bq-0002w9-Rt for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:02 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:45226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Bn-000227-Uz for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655238; 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=tYrC7nli+Qon0Xsiw0D2A5C3cIAL0l2jXZJuh6baunQ=; b=BWs48Z/mxYWK40oMvnrPn8wpk7F6ZxEQHN4tXUXu/u7FUC3UO6nb4AuEBxy7Q6NM2Xwrs2 Jloma4l0bkaDqLzTFuDV7b2ortTPgTuzS5yBNjE38xnrhWrkJLb/zoXewL7AR4Z1vL0YUc WUJAuByGkuV7BMjz5J0FWpgsTf3DkBE= Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2050.outbound.protection.outlook.com [104.47.14.50]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-9-QAhPS9LsPQ6Qn_4V5Jxt6w-1; Wed, 07 Jul 2021 12:53:57 +0200 X-MC-Unique: QAhPS9LsPQ6Qn_4V5Jxt6w-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ykh3oz+YhWfkYITf8aJu0SiDRZLJg62EJOujcV8OV9XHbYn0mDMN8XzJzH231u62A/+pC4b+uAzd7gR1jGbyNP0Ko/kkXIY080Jn6Uplodvi7QTD78+01fRvcN4OJAF7N7uIl4o2if9cm/HT51YN01AV8AFZfNE1Q18TAPWUR8PrE+rw21i46EPD2eItMaofuOh4OKNyrE5asKtTD90r48kYayLPZ/9P64GJ6q9826Tp+he2sSkbnb85WJV7JF9wKzghSdmMs2r2d2nU9mvt4mAnpH4ia8kw1GzHoxXSKQAwoNTHIWqlQL7+oE/f4KIx9J9iZ00xYgQMlFVJOLC4uw== 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=QXOGSMVQykh3iEnhfOX27DySSUEL4M1pRrU72QwL1T4=; b=erXdI1RAAhPD3yKWz+H4z8/mefD1B5a5ExFxHu2rCenSP8F1ZvMTr/C1IJPwUXOFxvmDexN5FRw++OjgOQJ55F71Qh3sNiJqJnwxrY371OKpkBf2GaWXQ9JD6f+Zv9WxlHSiPa9rB8RUiM5i4kHsu0vSaDUVIzROFmQBP4ZozWNNEq2G8s+8DgBCRNqrqSimtlM9J/0GSGNDvAmnqhBz/VHOOc/u0SDcjRCzW99RDJBc8iBhV2QTs4zMxWHu+LF7U1v1ydO4AwF3rqIqeDZirRYy/d85kIQ5tKr+sk5aMFLMGl6pQG6rRQSR4iWFB0iE4dl0Zuh9mEgwCtprkkB8BQ== 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 VI1PR0401MB2238.eurprd04.prod.outlook.com (2603:10a6:800:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.31; Wed, 7 Jul 2021 10:53:56 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:53:56 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck , Thomas Huth Subject: [PATCH v7 04/14] hw/s390x: only build tod-tcg from the CONFIG_TCG build Date: Wed, 7 Jul 2021 18:53:14 +0800 Message-ID: <20210707105324.23400-5-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0079.apcprd04.prod.outlook.com (2603:1096:202:15::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.20.159) by HK2PR04CA0079.apcprd04.prod.outlook.com (2603:1096:202:15::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.19 via Frontend Transport; Wed, 7 Jul 2021 10:53:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8a34b095-df77-43f2-10bb-08d94135848f X-MS-TrafficTypeDiagnostic: VI1PR0401MB2238: 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: db9APU1TJ8LG5fm8Sp3hmDexLUcTYGQGdXB5qi2d07BPKi9b20taq1qPmyj1XJC4PTFQ7NtBw/wY3iVmRoor993TmNYNAruBPYgdUqU/Bu6Kl4UhCc8ztTt7Uu1y1AxSh+7nr6plxbezTrprV25fmEifQu1AP7cq+o7gwun+vLnbclNxVC8PaRm7Y5P4MFG4VR/i4uRG8QV20zdRtDbflXkCzBN9lbTNGDOfWMjWuNtn4agKCrbXEtOu5Ro6ItHMkgRWuDy8ZVKokI8wj1J4WvhsmeZdRNp9mBnnohOfey/eUU6nUYo8ttXgAhGe92JZxG8xffTZ7E+joC9BaV6yHmAtprOXTk5B8zhX3WVAZaUCGXVmfOA0Dpg9AXRHBhE38TIX6tvq4iVXt1T8MN7jiUtXg4tBIfIvxNfmH9H5WCFJwvKH35PRI6PhKXldvj/moOWU59fZ3dDPFnkbDEXEcUA1mg3j1UlSouKDbYJ+x5WnYpbs4swjassy+Y9Womnh0dDK8ZEVr2tVv0CQbI9p93LjUGHoCVuifG3QZF0dfTdKcqvYrCDD1X3ZohAUpdt6DglbKzRu8CGFVjJojYbQhQUXu4+nOggOvqGAohgJDB6n2d35Os78uxZgSyUEpCHyB/2xzqliEiqTH4bK/8yJQ/te7RadrJjGVyz66DmkvNrHw4aGc5NFNEqtimK/reMT 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:(346002)(376002)(39850400004)(366004)(396003)(136003)(54906003)(316002)(26005)(66946007)(66556008)(6496006)(6486002)(186003)(6666004)(86362001)(8936002)(8676002)(83380400001)(2906002)(5660300002)(66476007)(478600001)(36756003)(4326008)(2616005)(956004)(1076003)(38100700002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VSL6LBRNY1zBHtTNsGJCqnOohETCGV6epwL1bJY0IeIhFZdThTGSun7zWbAh0XvsLGaLvyBrtdgcmPxwAaeZGAnD+uS9AqPkIs8fQwBlNsDVh5xK7csBXt6e4QTeDoKS2LPnuhPQFRjkdnGoJ5DGiceulfCFk82tTzbETghCMccjzn2oo7RatpCMUU77rIuM7+83zm6tm6vfsMGxaACOyaRYtw9X/3/0hDg4RPIdJDB/uTB+zZ+PKKmQsMcfb9AdnNW1W9UcF8gnglvHuUQfSnkxstsXll7yGRxt+cj9+WW1NyLdNVb3VEhNLFjggv2GQOuT7v7zhn91eWlMQTQ2hbcUcisU5EFpQypaKwLPeZcQyHlqhH87fGKc56HKjFjFquQlMhkP7UcRNLAL0BPACtYqzns2+in8YpQEtYO1ExMzNnyycz4J7DoYucW+A8761HJhZZDKmTPD4s800gILwm60Chtyj4xo9s80BZ4LiQc1PyAuPdh+jlD1agt90pmRA+lNEQigbdoIJ3ZRxMznxgBKCE58GYi+H0pL8228PrEcF6AIIgNNwsZ3UoEx3VzgZhshSuAKwP79PiDU5k+3KohVHT+QJ6V1TM+G5gctLl4KwH32iuBSavX7ZytFjpInukrDpyltlU6bYWEb/ibXd8n72EOIpJniJs9ODQgGAvRjafqSQZMXSrmq45bKLc5QNnY3teXowXVKl7KcVp9dtwHcQkNwqTMeZZo3XIuSnNWXRvrob3gm1rA+30AhtIfiyya/qdsbyQSQOTRlQLOFiWzpiMrAgsJTrwPi7ikexbiAv0nN9oB1O3LZ5UdAAIQ6sRtdrhJVph18UL2QeVLdDV71J8kixGTxtQIVQMQ7OVyzjl9bV/+JZY1YLeyAohaI/dsG4qqPuFs8ZJcV8A41DorE90lzsJ/mQo4vA/DqQ3wPoGYVPS0WJAwuD92yrZLn+hEhRFq9Ul43+gt3kPmskcJ0QfxBvCprV5YMaKQm148Q+QdjyJ3nMPeS1U6QCTwNKg5luI9EsaK0hscZcJN0Ho2ruqjsRBQoXP2KQ3eWkpu63vYNIBZ3XTADLGPbRW2mzb0aMwh32yLMG98AYtLT2SGO+ysoMvKhHXNDdilWORwsWpHxyvUpIGsbKGc9xiv4q3V6G/awq9skdWMkpnpUtuKxLk+7aGTTqcD5AztJNOEiI9jb3IJv/Z6se21l3HlZDYPkDV0YEeg7lMEsNZTfF63qYcHn3CXqs+tpP9wHTfv3WlOH8MRDmha1FBFj70P/ERgoJBrol2hS0Kh2KWaL8YzAza8wHbrl6kzQxMOqJy2T/OPlo/RqIefSccRN5pSq X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a34b095-df77-43f2-10bb-08d94135848f X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:53:56.3535 (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: 8os/YrOluDYF9mqkBT9RH8bkCcUQiA/Cp53r3AuK5hsVLnTgOAJ3/Up678LUik83 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2238 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" this will allow in later patches to remove unneeded stubs in target/s390x. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth --- 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 Wed Jul 7 10:53: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: 12362395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFD6FC07E9C for ; Wed, 7 Jul 2021 10:57:00 +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 4CFBE6198D for ; Wed, 7 Jul 2021 10:57:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CFBE6198D 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]:49988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Eh-00010Y-F7 for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 06:56:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Bv-000300-Sp for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:07 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:35001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Bt-00022t-Kx for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655244; 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=US8mWO90E1lMT3HjFqg08pXRI580s1mZe/qw62m737k=; b=aoF/HkYrcXVj/7aNM8yJ/MwWTAoixYf9yXdbbePquVbfnL8BHGwMizMczFZzlzPtzvFMs6 jdjmaFDUs/k60Fua70y5ef3MsRw0JPthmuQ+OfIS1tqPn/IIjl+GZQYIBn8W6LC3ConPYE 1lVV+pv/KRTCgF791SFbDVs/eGakm/c= Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2054.outbound.protection.outlook.com [104.47.14.54]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-15-zzQUiAq_OkGm98zLBE5_7Q-1; Wed, 07 Jul 2021 12:54:03 +0200 X-MC-Unique: zzQUiAq_OkGm98zLBE5_7Q-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B6cflDr81kFztkQy59/6oXLvHhDYnwnPDJJeOZziBYvNhtKntw2qaqKh9MzTNW2nT5BY4t5y+B8zYTOf4OXUjJwSuy0+C9LU1eUiufqbsZ1OXDbwMMSC+2hKbOzwpBA7k3D5fi7NrWFfRRolDAy3s+pcTPBiVVAlUJpsMwdjZOOK44ckrfnkSuC2QHtfTMV4KAVIULjq6pmuceLQpbhFjCrxoMTsCz99A/FAI5gOhrtIBJbN6IAOW+ua8oCycDCpURqZ01U0Wk4ExwzTcc9DXsEGiE2g0WG9zfkUkwfl9OsOaDHQwimCTmUx2bbmOvQVCwVFkvjUF4/N8XqQUcaFBA== 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=WKod7ZoEn0lFKTKRPUhDRWaHAZwtsN/hsBo0gmgurSw=; b=bLXJVZ3VAWskWBiB45zh2dA/xsY35iTVRAMGCc+Kq5bc836JGYwzorRmGkh7yLt8HVUStDK7OcE2fjtm4shjMZh81QjaNJRm+LjDlRFeQveowl3HMQuIfAovrKab2CtWJDf5v4nvYswGRoa/MlwkHXEFUm8Samrdj9DnCIWQD5CYfV4KPenUUMOnlpFlCNBsMsgEUktLJDWq0BkqW0U9eti3T5FL8fDYicC+bPWFtWq/zMEX3EbhO+TbvY/Sc/5GcoaBtE11RqY/XKTQltNl2W4CdUCBnzSTBcpIEiPQh4fMQdFRhWYlmbXUP/6Q+pb0D8n08pQ6t05jHioC/yFQJg== 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 VI1PR0401MB2238.eurprd04.prod.outlook.com (2603:10a6:800:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.31; Wed, 7 Jul 2021 10:54:02 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:54:02 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck , Thomas Huth Subject: [PATCH v7 05/14] target/s390x: remove tcg-stub.c Date: Wed, 7 Jul 2021 18:53:15 +0800 Message-ID: <20210707105324.23400-6-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0068.apcprd04.prod.outlook.com (2603:1096:202:15::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.20.159) by HK2PR04CA0068.apcprd04.prod.outlook.com (2603:1096:202:15::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Wed, 7 Jul 2021 10:54:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b7c196d-2bd5-42e6-badc-08d941358813 X-MS-TrafficTypeDiagnostic: VI1PR0401MB2238: 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: XpUh2GTKulzNVHCEjGANdKWHglZ9Zx1gxA1yGQdmNXB93eYJ1mbXxKt6o1/PJtLKpjPNpz2wGhVLRcVyva92jjBp0y+4bNO6sYPiBGgynoxGLh+jEQtRPUxFdYiSENPgV6umYp8GC0XZatRfNwU1ZJ6XFo4IK3yoHYbEpc0vzOYOx0O2wFaExcYtaztEFlwX+Qi6rCRtaXYOUF4TdKd3xTQBI4EfckniILLLoBC2jwA4vJB5DurbLNuFrxZvQRdbh7NRtp24UlflcIAFI8tjwm5KSZF7gzqBMgC25XzBiBJBlIVA38PjkmvDdIM3XXJSNyPhqeU9XXAXbWpAqi+hQzLf/T9v2gRXaO/u1a4i7w61xHgClzcb9XLsdRnZYC/30kf2EUu9OfOwQ6p3ceE9q/aAts/Vxoq3iaLiV/CO8nSFfCPa1m2/uypKc9H6Idq7H9HKGnNTZlmidooU2RrUUskg6EvY07z6tjMEsBoRqkYyDTNEwuzFlu5XZH9DYmuZu0HAOyTuu89pImVH7NuPC8jePeebVpxdXjG+9fewO7m93UlqcIhVl8alBhtCw101Gj3c1YhoVIUZh4b3YNM4Xw1qFaHW1rz+TZ65GvBHc31ZhWZkxUYV3hSsP2Ukfhi4jrIzs0JcC866EPDdaMneVRgJYsPXydU08FTcWUiVMJRLNBQaSljnGy5Gr2puLCfzd7oE6YkXV0JEU/3b7xqxtg== 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:(346002)(376002)(39850400004)(366004)(396003)(136003)(54906003)(316002)(26005)(66946007)(66556008)(6496006)(6486002)(186003)(6666004)(86362001)(8936002)(8676002)(83380400001)(2906002)(5660300002)(66476007)(478600001)(36756003)(4326008)(2616005)(956004)(1076003)(38100700002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FdjcipbrTHEOJ8EKp6CJ0VlfOsBeFQd+idyE1y0UyAiSrGbCjiwlBj7ltwHenACqFSoAbD+Kv92Mu8Kvdg6PbRTn4MAbdVApFgxBOMKESjpohDsR2ePVKmfHL6cbiXDNwRV4/VkJPDVxxh3t7+6OUvl1Q0KwDDdEs11koPXP4PqIpOSCHric6wqn8oxdfnYCfVKsnlv3/mufjLG741DOrDwPUiR1B8xvXGy1HgxcNIzVFj3UaocSIPSdokHZ5zd6HrJEhyoRnn762LvutWkKiZ9T0GX+BTJNjHTlPb/SBkpkN7RKuIHFX0ry6MeQ2p2InPpsT/j4BPyKdTlEnu9juKkT2EvPIn8rVbO6yEx6T2vZVUrbaoOUZv8nmLVRgDYHN8STLVXXqKpoDUDE+UTpzF2oH210+cw/1nY3Vxj3F5PwsvMQPQp3MxzIVfm5gQ29PyKSVIHZN/0jepP2sTqIExjsCj/OLGKVJq0szD7E3aLEs23iE8ol/SPgrCIR/85djkeCporWAVOfPZ5FyatnixBMT9dllA2hfg1JzwpPSfQ8oSjs+QqUmQg+n5fceuGNfr9HI5hD+yrQUbrwWDlfOBa4OwJu5VzTdDeezrRV67ycQpk/Aa3i2RuwdAQaCrIWWWx0U4UOS7Ldn/C1kENGoTf0fGgC3hg/uIfFnjs0+pUU10oA6e6u98HU6xt9ypy4DBK3TF3cl6JlfISTOwJ7ycmUyCdZfOo/ouGF6WI3967pbL0aHzNzqav6t2x73jd2wYy9bXq42vcTklVDQiwvPm74sazZgI28OqvoEmeTg6HN8WdyH2sT9a/8dhU6k6/a71Pou8xs5JSNvvopdjyULy5GSXbK6yQoyu6I9i14oqAPlDICa52a+jinxexSCVcikF2eJ6j9LokGrquTwBJ32LB5H341e69VZfCBtE/Vg/tVuNVsvRF8aDV6YrOSSH6/Mg3xxF4yEtoKVVFVgjm1BM2gja/rBHiq4sEaeodFPs1XwHRd6tucSmCQmLvX2JJRCj2wwo1D245GZEtnYoRTlmVJLzO9bzNOlFB/f6W9nMICZaoTMbeUQH9pc2TtoEn26YZtRYCv2EKhs+PrsYAaVayxySBxfeWFDC0AnVY/UXIOfoiOgLCmziO8Q5oyNTNqllWGipoTsVGK+81hRdHxM8xj0q9m7wyswq5lbFi74jf3fPrL5GiAGMfTBCpiye+AVSgmmFXHmp8iytjogkcqYDe7yi1kF7eFxJ2XiYxf00d9OkmVwMjJ0VCZrLvtBsg3qRC0a7XaBHCzHCIy72qJNO9YfavtEArlBFy7FBwkO1FaydKTr1FR/P8caZ8f4Isc X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b7c196d-2bd5-42e6-badc-08d941358813 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:54:02.2981 (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: 2Gzg2ynDhpjSccHSjmcKWGGR5dmqgchd28fpVu8BWrQfjfwlS7S+tVDzkIBEz8aa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2238 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" now that we protect all calls to the tcg-specific functions with if (tcg_enabled()), we do not need the TCG stub anymore. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth --- 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 Wed Jul 7 10:53: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: 12362407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9C36C07E9B for ; Wed, 7 Jul 2021 10:59:13 +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 7BC5161CAA for ; Wed, 7 Jul 2021 10:59:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BC5161CAA 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]:58672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Gq-0007TX-NZ for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 06:59:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15C5-000358-Kg for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:19 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:55602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15C1-00023r-SV for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655252; 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=no947DBn8p4yPD4+fqFnbmn6LSWqScWohAZ7TJAQ5kE=; b=k94JoPsepCeOIf+a5IR83ZzaAa8I5R5Y+moWJuJ8kSHahs9gnA26Qg7BR1bz0q/A3gySrV YuOqX4NupSFOaWFGrnFWXew4WabhTNLm8QMLxW5148ydWHuaA6SfdY3noX3pC/erHB4XJ3 PXyQTBakGoa6ZS/nJWm1w9irAbB35ZI= Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03lp2059.outbound.protection.outlook.com [104.47.10.59]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-26-ETJMECMCNuiOoa-b2zh6FA-1; Wed, 07 Jul 2021 12:54:11 +0200 X-MC-Unique: ETJMECMCNuiOoa-b2zh6FA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LgiPI5Id8WtPysOM7v8o4I6+e9FaWqTRbSoc0DCubl6YiWyF8QiXTDptMco07raSLZJM92ep5C1kotLO/5DUBq7deiaEjvqcagwehOdjiZdRijUfuXbeFzyAlxFr4h3fSpKArN11SAIhwHK4T6f2IC+r3MrCUgsYgevE89CGbYkP/m2PgCxJizbDPH+t7Yucd+6PWp4SHrIIBuKM2iLDszjFKkU8oJa1A5KkuyFimyrMFTqd8j9Hp1AxfAhekb8Gh4D6W2MTaXL2tA5a2ELa2u2dHhHmGdoOKTKo5Kw0x+Tc0IF4RtiV/0D5g0YDhoTWqN4siuk85CblmKszZpi2Nw== 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=FlfF81wvABkEcguYFE/v/8HzQcqNX0RONdyXV8fEgP8=; b=Y3/1wxJzQjZ1qXsyyRZs6T42dbBN4v5GST4TURmAqPo3NFiWjbk6y+i0/hGJDeDI96zzZ0s6RvSmns+SOhuUCOr7oopSrwkZU8xsIMGWYyZGIQhvnQvMReImBTDPhIfuWvUWlNyvK4f1OBDC15zZSpUgZCfTWgSwgJxlGW2hYkdbWRmLcY195z5oQBtYueXmQCHPIHD9KaZR3jninZ5hyA4A8Jl4wQtT1iJC+cThzQfVrdZGADfv2A5ozhCCvqI0ZCj9QqDTXByZDFE7grlH2c9V+NUhcq79v/oNVgJHPrrPPhjp65hqQYfp8fVtQ0uSdRfx1Erfj1rn0vWN+LyJ2A== 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 VI1PR0401MB2238.eurprd04.prod.outlook.com (2603:10a6:800:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.31; Wed, 7 Jul 2021 10:54:09 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:54:09 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck Subject: [PATCH v7 06/14] target/s390x: rename internal.h to s390x-internal.h Date: Wed, 7 Jul 2021 18:53:16 +0800 Message-ID: <20210707105324.23400-7-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0069.apcprd04.prod.outlook.com (2603:1096:202:15::13) 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.20.159) by HK2PR04CA0069.apcprd04.prod.outlook.com (2603:1096:202:15::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Wed, 7 Jul 2021 10:54:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 395ac9cb-9c4e-48ce-bf39-08d941358c5b X-MS-TrafficTypeDiagnostic: VI1PR0401MB2238: 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:2582; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hdXwr22FXZ2OScuyl0fjY6VfzzETs9CqyuYOusiBu+OubheE9BIZj90wTNCSx0UvstsdyvapngY08TBJWUflSuSLeo/Rutbt6whhUmrc1Yd9rXIroXec16uzfuwbHIowYkIwuu1k58UoOSfRPhBOJlqF/yziY8c6CdBr+a8ajmGmxJmayFDPLssOBq+KuQDEUzEsv14pt0mW5cUQTkM5sSchUj19KAxEEcHtaP9/GDmOVj0ENxYGNsi4VWHz8sZL8HfyqQqey/LsukQ6xvPqhvgNURBW9Mrls6l3/XDiHEQVpn4z1jEBEXwnuP5TiNCke0B0G/n+VW8CHzKUKdwnuibVWlvSK6DRndX3Fluquoen1t7NL+viFVVwNBnrlR/WMVIQ1VshHy9bdMOFkGmviecTZPUYc1ZyMQTGKh1G8/KQW2XlrFA7uRfl8FWXpC7KCkfIMjSWySzDvqd1wVl/LMIAGUoTnSWKyifyJz/6u5nydRBg7jQoI+7lmV64yNZYNa7AyaDRMsKlVy9d8VXLZG9hhNVbpM8wFwl4Lfat7tY+8ysh3rWP4xaE/9zldGSqay8gNH52t4NerltYR1NnpstCBpjNxKQs87EGKvPpwDMBQmLZPoeBwyGfxSBoy7f6V1xXilQ3IuIF1NlOqCeMWYbafK4EfVIXPgST3SNZcI/xLVIwYy9c2JCdhig9C74gy5tDcdkndPFXJtYFvq4kyA== 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:(346002)(376002)(39850400004)(366004)(396003)(136003)(54906003)(316002)(26005)(66946007)(66556008)(6496006)(6486002)(186003)(6666004)(86362001)(8936002)(8676002)(83380400001)(2906002)(5660300002)(66476007)(478600001)(36756003)(4326008)(2616005)(956004)(1076003)(38100700002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4VJ+SRJ/HCGp3JQWaMe1O6HE4hnGTW7LMMBIFut51Ri0bGgyD1CAIkLBisUWs2rjQv/kfg0Za8PkByzkq1HxbvnmtcWRdK93kEbziICXSqGpq8ZdhcDxlZ61FBYBPdwtZ4A4MAEyFBpBAJbg2aMFCd/FBnYUZQBqpzZd6Y8/DFG3N9AzzIM646+gVOI3KWt86YD5HtUwgfOV8jtN1w/Pxc3AgwWEL2ctDBHg/7G4nI6fUrCNp8gaa+hCfzWRZ5otST0BE9ISXNXUW3hp7BKfh/AeBsYn1KZX3D6vM6QfcGX0Ilg4hrNdb6xgQ8fcJnRd9hIn/GgRYZa8kPePd4XG8ST5XpTvIcPqIAgD/NnDNEotvULwQxsa22bFtEtJQ0VPg+pG24HK+g3WDGrkDnLCDm7JwIarrndzRQcX9XaM/Nk9SwfssRCiolQdjeWQ6hGv+4BUyEWyu+BwaEL1cuTn82orPKN0yxD5qtp2pfpNGSl+yOhu64EMUxHocFBuTuhJ58p6YyO23v0nK7wTG3cD9rlDDWmINB/fs76hxeTkLFcXTGbgJCAFv4pIehD99yMy5A2yzs9v+Xx64IdHnu/V8UAqVzJ/TCnIHzGS4MwBN7nlDbtMZb4r+bxynUVRnT0N2x0NNK44bUAdNdhxqTYrj5uINcBk8Ov3NQW8LHzWc1CSqShR2/s5Z/p2NP5VRVa3bQ7HfJvkmCgfNOv6om4LzGd202g3sN14y70Gu4S5SN+qto/KJCFHxwZNzY6DZ6+FaAD0XolBOcvLUkU+CWFBjSToMjXalPoDoCvlsXx963iQFs0Cjw7TfmnRYRyd+by5xm6vJgT12tgmGMtxaGdcfRkAfZo1RKtqiLF72nlNjyMs9ZuKIc0TEBAN7PIqroOY79NIqUAL4lU/r6/SFyY632ju4zlhsw8y2rXr6cDl619OlAGhMDamOd9IhPxwtT8BVA5F+2ADj/4bViV28h5ugorzilsBT+6NxrKFygIRr/hjsH6NA6OyVWM1PaHOT+TJYY364AETade+KNmo7RMsWeddpBDO2BVg6AYdM6UeFit+jwpNKFkQXVSFYLesVtezmJO41rJy20jjJADApRUXqnvWI7AIbD/WINbWDxfGPNAY99Kg4he/ZPEzGZuDpC1oSFfiJXtegxlyUltpAYNne2JIRwnhLCyDpobD9SW1SCM57Ibk4gw/xzPnNqZdFzVfUFAET44gI7qdpw0pc3JwjW30y9o2K5IocXOVIik7C4GHNz7Pi2uzGc+3oolA0EivAy4FBDRqx2eMtnW/EpTSy7n427ea36EFDVjx+X2YMoBrulZQI3EQfq2b2jA8M5tV X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 395ac9cb-9c4e-48ce-bf39-08d941358c5b X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:54:09.5639 (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: rk2+zZP06yJ07CcCiCBH5+9XZaUL2HuMNBG/Fs2DJEIBWQeVpZs6/kshOCc/0oYZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2238 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_H3=0.001, RCVD_IN_MSPIKE_WL=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" The internal.h file is renamed to s390x-internal.h, because of the risk of collision with other files with the same name. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Acked-by: David Hildenbrand Acked-by: Cornelia Huck Reviewed-by: Thomas Huth --- target/s390x/arch_dump.c | 2 +- target/s390x/cc_helper.c | 2 +- target/s390x/cpu.c | 2 +- target/s390x/cpu_models.c | 2 +- target/s390x/crypto_helper.c | 2 +- target/s390x/diag.c | 2 +- target/s390x/excp_helper.c | 2 +- target/s390x/fpu_helper.c | 2 +- target/s390x/gdbstub.c | 2 +- target/s390x/helper.c | 2 +- target/s390x/int_helper.c | 2 +- target/s390x/interrupt.c | 2 +- target/s390x/ioinst.c | 2 +- target/s390x/kvm.c | 2 +- target/s390x/machine.c | 2 +- target/s390x/mem_helper.c | 2 +- target/s390x/misc_helper.c | 2 +- target/s390x/mmu_helper.c | 2 +- target/s390x/{internal.h => s390x-internal.h} | 0 target/s390x/sigp.c | 2 +- target/s390x/translate.c | 2 +- target/s390x/vec_fpu_helper.c | 2 +- target/s390x/vec_helper.c | 2 +- target/s390x/vec_string_helper.c | 2 +- 24 files changed, 23 insertions(+), 23 deletions(-) rename target/s390x/{internal.h => s390x-internal.h} (100%) 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/cc_helper.c b/target/s390x/cc_helper.c index e7a74d66dd..c2c96c3a3c 100644 --- a/target/s390x/cc_helper.c +++ b/target/s390x/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/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 94090a6e22..94789c7280 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/crypto_helper.c b/target/s390x/crypto_helper.c index ff3fbc3950..138d9e7ad9 100644 --- a/target/s390x/crypto_helper.c +++ b/target/s390x/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/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/excp_helper.c b/target/s390x/excp_helper.c index 9c361428c8..a61917d04f 100644 --- a/target/s390x/excp_helper.c +++ b/target/s390x/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/fpu_helper.c index 13af158748..04517fbf9c 100644 --- a/target/s390x/fpu_helper.c +++ b/target/s390x/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/gdbstub.c b/target/s390x/gdbstub.c index 5b4e38a13b..a5d69d0e0b 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 1445b74451..8015c4e3d1 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/int_helper.c b/target/s390x/int_helper.c index 658507dd6d..954542388a 100644 --- a/target/s390x/int_helper.c +++ b/target/s390x/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/interrupt.c b/target/s390x/interrupt.c index 9b4d08f2be..3fde18ba46 100644 --- a/target/s390x/interrupt.c +++ b/target/s390x/interrupt.c @@ -10,7 +10,7 @@ #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" 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 2388924587..5b1fdb55c4 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..4f11f6ac6e 100644 --- a/target/s390x/machine.c +++ b/target/s390x/machine.c @@ -16,7 +16,7 @@ #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" diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index f6a7d29273..9bae13ecf0 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/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/misc_helper.c b/target/s390x/misc_helper.c index 7ea90d414a..33e6999e15 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/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/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 100% rename from target/s390x/internal.h rename to target/s390x/s390x-internal.h diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c index c2d5cdf061..d57427ced8 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/translate.c b/target/s390x/translate.c index 03dab9f350..c07ad2d34b 100644 --- a/target/s390x/translate.c +++ b/target/s390x/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/vec_fpu_helper.c b/target/s390x/vec_fpu_helper.c index 8e2b274547..1a77993471 100644 --- a/target/s390x/vec_fpu_helper.c +++ b/target/s390x/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/vec_helper.c index 599bab06bd..ededf13cf0 100644 --- a/target/s390x/vec_helper.c +++ b/target/s390x/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_string_helper.c b/target/s390x/vec_string_helper.c index c516c0ceeb..ac315eb095 100644 --- a/target/s390x/vec_string_helper.c +++ b/target/s390x/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 Wed Jul 7 10:53: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: 12362389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91E57C07E95 for ; Wed, 7 Jul 2021 10:55: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 2754E61CAA for ; Wed, 7 Jul 2021 10:55:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2754E61CAA 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]:43936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15DQ-0005TD-BB for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 06:55:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15CB-00035t-1Q for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:23 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:36634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15C7-00024G-8r for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655257; 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=4SbVIxek4fceoZqTHgUodDxn8ZwV4Jiu/T017ERTPG4=; b=WAJYSKd/RMVmVojm2BcLV9bpWeilVsQ2PUQTLnUvKVc900dvDnCwWPu+UNPyQFriORw5c5 cLJTIIB4U/JlnvckDbOpPN6s84GhooxoQjZ2ftjJ4P6XnDjVlbGAQE0MYvux5UXkgQ/lqa rX3BWAmoT1a9TOlX+RukBmY+m0ZDWq8= Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03lp2058.outbound.protection.outlook.com [104.47.10.58]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-5-o7u9G-dwMDmFadWdDFCZQA-1; Wed, 07 Jul 2021 12:54:16 +0200 X-MC-Unique: o7u9G-dwMDmFadWdDFCZQA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PP4MKHWNP52VpVHtj/pH52xTwvVrlYbAr9mrQ3xKvy0wVg7xe2twOReIQvcCYswiZQ+8jy13ekbspjIqwlrrgFRB/39zBOFT/B6ziCsPXCMVSyKWbMbfMo95JkM9ZSyVKKQSjfYFG/BNET4xNqmRftJJ8tB8vA8ouHREqSsJPaHRwetrEaoXI4wrcgL/nWclYTPc05BCO0EbzfbNGGf2h1jzXm+F7PxQ4Qe/Nbl6oXR5MHwURUwBXxLwO1MvEw2GMOD99FIPUr2AvR8zky1TD0NOgXH2EWPFihLlckugrBs0lourXKcjNegOtYbQz2DecvmZIhhabCsD3HGsT2SWdg== 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=tucG1b6V/YiUPDKt1ZPg5VGdBoa6whakSarywy6j6lo=; b=OjhIDpKLITu4f8D6jktp0bax/yUrlJsktN2Sl7P+lmiLjXedQv//us47rLjvtMxA69aejIU+8U1uYkcemxnsB65fGVyIa+ChKTVo8vjpAlER3sxhSKDyCgX29RxdqIGQ6gP+AedJnE6fvjMoGFMil1egt5MfSOpwGAKIuwVAbch3WbQUdw2LxmWt84zstbhbwtaflqfwJL/Fd7fHU8zmV8n3BWD9eUJWGbYGQONCAD9k+TbsgwcX/RZQrsuJ+VaEZeLUsnGJh4yGECz50NQkLOn2sQn5a/sA7JkQcaoWwh1+uPkFfYiq5GqfBFL6U5HBRpzygYxLcn0rlFP9/pWUVw== 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 VI1PR0401MB2238.eurprd04.prod.outlook.com (2603:10a6:800:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.31; Wed, 7 Jul 2021 10:54:15 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:54:15 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , David Hildenbrand , Cornelia Huck Subject: [PATCH v7 07/14] target/s390x: start moving TCG-only code to tcg/ Date: Wed, 7 Jul 2021 18:53:17 +0800 Message-ID: <20210707105324.23400-8-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0075.apcprd04.prod.outlook.com (2603:1096:202:15::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.20.159) by HK2PR04CA0075.apcprd04.prod.outlook.com (2603:1096:202:15::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Wed, 7 Jul 2021 10:54:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1808b007-8b45-43f0-095f-08d941358fe8 X-MS-TrafficTypeDiagnostic: VI1PR0401MB2238: 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: APJ8xry0c/Adf9gT+3Ae0gO5fGebsPk32EIJg4RJym2OHx84s4/59rVfylebBEhxSVgq0WZY/ZvyRd1GkCuAXl1fQhPVqLZFMJjhJLLwMv0481ZU16DtSysnwfWZE8G9sHF8UpelCZ+piElWrYCgawD+y89UhhFl2+PslxrwSe8n/azZW7BtNkeTdDbGK4Agk59kl9087XOwei/rBjGcEHLF8VG9HUx256GzL2404rhuuGo6aTbw9NIa9SPQ8qABfQTe7KPpS/WXm2GM09cHmNMY2f9VjdSJUj837reVkmdkmd3EpwVShpsSewfxH8btX5riROOkFqaVGa2bgkMj3yqctWnG74qfDNUTqQTSUryIsxxs6VARZbyV5UN52/CX0cjFmMqIMy6m3QI7LxiVoXW+ftu2HM8EeEPjQGSWaB8s8Rv4U0Dewyn+4tquzZn6kLMGMI7rWtIoxKu3st5JHDSWWBYi+nUP6SclH64OBm/bKxUL3vUrv72E+GGvScwKO27YJOIjLVzxd+N/uPli03ZIDVGrYYNZs0D7HLn7Xhacr/sSdHmXWc7jvx6ETDyralHziFG8TYdkidLUD5qr+yaOiai8YATE7Yw19tOVh1uyL8hpUpNpb++cPILwWQQgLP9bf5+XGYHOCO2Qb6DTKiXTB8XCnOqSwspO3oBcukfTbGW1VV/ce516ONctqZGSwBthGho76bvhb5BvhCUXgw== 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:(346002)(376002)(39850400004)(366004)(396003)(136003)(54906003)(316002)(26005)(66946007)(66556008)(6496006)(6486002)(186003)(86362001)(8936002)(8676002)(83380400001)(2906002)(5660300002)(66476007)(478600001)(36756003)(4326008)(2616005)(956004)(1076003)(38100700002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: j05OktT+T7jqo/x60pQnTdqRVC+M7GeETS0EM7B8S9ctzndMJhvRLMJB2+3CosnZ0EC1fciX9C50QaGu4DSnkkaSpTXEGOL1gBmfVmjTdgwRgwE1YYYhRLV/6OTxN6q7oZbKo8GTA6zriWywJppUx3LHneOphGW5vW9QPxIfbF0wEeNoIiDcrb9gHfTb93FfNv/1y7xHQrJdwMkFyu3m0Yv+tHnNnG7SpHNp5gKWBwi9lGG6NMsGQ3GWC3AUoySj/nKvAv9hza+a0R0Jij8cMbE+BfIge4Inb+B/WhWzQDUMpiRY8HsM+qk3pBlMtyHGdLEmWj7R+7n/VhPPgJDN1SclzNdl8rt3Bqiw6FCFYVz126YtbvXC5VaAJnT7+8CNR1OKCO5GYOX0kGkBq9fhN44XrEn9tK03hgmCkIxCw21tzbHaBsNaJZphaLXDPweL/YE5HbrzKi3aqNfzX0CyVKkS7pAMdGCEjV7OsNL6CZN5Lh6E2i2qPodrzvQy1p/o6G5s8ojdlqlqDeNuEyBSWMhjrFZ0IAsu2sRxAHRPPNCb8Kf9iSwGT911gPDL1TVn1jB7V0hS2VVbPKAeLjM/sQ1MC3uvRHyd7ySiHGG/KxGTaMmt6k/3ojeHcuiCd/BheOajGyXkIfERcDk8AIKra6UWHFbPxskM7u/9ZeqWECP3uydADxiJ6g6/s2CqgtNn6WOsXWK9tPXttPBUnJIo+ZHTBy/xa3QnHKEVH+zoX/HFMMwa7i4Z4dhESGMc/BFtOzTGA8kOdfGBXVOo47QZ31JStiJyFDVinYwwCrYs4uQA/JETwy9ZZEwEiPFfYWo7RXexpmxr25C5QH02PEN+EnYAgEYSQGY6ygCenI4oLg05IWohWYRvesV6xZyxqSYyzSum4Dx6NXdm6/an4Pn2HdkHXWPLw+fvBIxhRRDGn/AaO3CjUxjtv1vgyV7S70j39wUTIHZrYC5QmYza0nqpAtF8Krk90C5QpYO1wCju6tux/eWP5fd8pteub19O6qLVi8FcEIkp5UgNyqvdI+1RVZZouZVri5CN1g8Zc9jzJ4MpdJkyvoe5u3/R2vPWJ47FgFwh2yFvvG4DPB4CyBc1zplqTLt5q9i8yrLL/zKQuYmm8fpIkqgs7qt3sFhZnVSfXzZtzSZqpMNmWSNFh/Lr6+5YHAM8utSnZwmkKg9SmtG4nWxEMojkL9k1ZHs8gP5LUFZArGf0SSGxcB/EXdmT/pzcCBg6LQgFtiZ/mjDIvMQ6c4x8PRpU+60bni4tLEo0c2f48oy0ExUTXp8UwaoewA/jVAdtQNMrEGnN7+X4h9HNbLPNAVbfjDthAsdbLwe2 X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1808b007-8b45-43f0-095f-08d941358fe8 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:54:15.4145 (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: 9JIZ/pfxn3UpIcbiRV+mSJMKQiA4KAdRh+0rUSGWhP+Us+VXQJ3JlGaq62W54Cxs X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2238 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_H4=0.001, RCVD_IN_MSPIKE_WL=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 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. After the reshuffling, update MAINTAINERS accordingly. Make use of the new directory: target/s390x/tcg/ Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Acked-by: David Hildenbrand Acked-by: Cornelia Huck Reviewed-by: Thomas Huth --- MAINTAINERS | 1 + hw/s390x/tod-tcg.c | 2 +- include/hw/s390x/tod.h | 2 +- target/s390x/interrupt.c | 2 +- target/s390x/machine.c | 2 +- target/s390x/meson.build | 17 ++--------------- target/s390x/{ => tcg}/cc_helper.c | 0 target/s390x/{ => tcg}/crypto_helper.c | 0 target/s390x/{ => tcg}/excp_helper.c | 0 target/s390x/{ => tcg}/fpu_helper.c | 0 target/s390x/{ => tcg}/insn-data.def | 0 target/s390x/{ => tcg}/insn-format.def | 0 target/s390x/{ => tcg}/int_helper.c | 0 target/s390x/{ => tcg}/mem_helper.c | 0 target/s390x/tcg/meson.build | 14 ++++++++++++++ target/s390x/{ => tcg}/misc_helper.c | 0 target/s390x/{ => tcg}/s390-tod.h | 0 target/s390x/{ => tcg}/tcg_s390x.h | 0 target/s390x/{ => tcg}/translate.c | 0 target/s390x/{ => tcg}/translate_vx.c.inc | 0 target/s390x/{ => tcg}/vec.h | 0 target/s390x/{ => tcg}/vec_fpu_helper.c | 0 target/s390x/{ => tcg}/vec_helper.c | 0 target/s390x/{ => tcg}/vec_int_helper.c | 0 target/s390x/{ => tcg}/vec_string_helper.c | 0 25 files changed, 21 insertions(+), 19 deletions(-) rename target/s390x/{ => tcg}/cc_helper.c (100%) rename target/s390x/{ => tcg}/crypto_helper.c (100%) rename target/s390x/{ => tcg}/excp_helper.c (100%) rename target/s390x/{ => tcg}/fpu_helper.c (100%) rename target/s390x/{ => tcg}/insn-data.def (100%) rename target/s390x/{ => tcg}/insn-format.def (100%) rename target/s390x/{ => tcg}/int_helper.c (100%) rename target/s390x/{ => tcg}/mem_helper.c (100%) create mode 100644 target/s390x/tcg/meson.build rename target/s390x/{ => tcg}/misc_helper.c (100%) rename target/s390x/{ => tcg}/s390-tod.h (100%) rename target/s390x/{ => tcg}/tcg_s390x.h (100%) rename target/s390x/{ => tcg}/translate.c (100%) rename target/s390x/{ => tcg}/translate_vx.c.inc (100%) rename target/s390x/{ => tcg}/vec.h (100%) rename target/s390x/{ => tcg}/vec_fpu_helper.c (100%) rename target/s390x/{ => tcg}/vec_helper.c (100%) rename target/s390x/{ => tcg}/vec_int_helper.c (100%) rename target/s390x/{ => tcg}/vec_string_helper.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 684142e12e..8ec845f4e0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -297,6 +297,7 @@ 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 aa44deb809..9bb94ff72b 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/interrupt.c b/target/s390x/interrupt.c index 3fde18ba46..734f0c62de 100644 --- a/target/s390x/interrupt.c +++ b/target/s390x/interrupt.c @@ -15,7 +15,7 @@ #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/machine.c b/target/s390x/machine.c index 4f11f6ac6e..81a8a7ff99 100644 --- a/target/s390x/machine.c +++ b/target/s390x/machine.c @@ -19,7 +19,7 @@ #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/cc_helper.c b/target/s390x/tcg/cc_helper.c similarity index 100% rename from target/s390x/cc_helper.c rename to target/s390x/tcg/cc_helper.c diff --git a/target/s390x/crypto_helper.c b/target/s390x/tcg/crypto_helper.c similarity index 100% rename from target/s390x/crypto_helper.c rename to target/s390x/tcg/crypto_helper.c diff --git a/target/s390x/excp_helper.c b/target/s390x/tcg/excp_helper.c similarity index 100% rename from target/s390x/excp_helper.c rename to target/s390x/tcg/excp_helper.c diff --git a/target/s390x/fpu_helper.c b/target/s390x/tcg/fpu_helper.c similarity index 100% rename from target/s390x/fpu_helper.c rename to target/s390x/tcg/fpu_helper.c 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 100% rename from target/s390x/int_helper.c rename to target/s390x/tcg/int_helper.c diff --git a/target/s390x/mem_helper.c b/target/s390x/tcg/mem_helper.c similarity index 100% rename from target/s390x/mem_helper.c rename to target/s390x/tcg/mem_helper.c 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 100% rename from target/s390x/misc_helper.c rename to target/s390x/tcg/misc_helper.c 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 100% rename from target/s390x/translate.c rename to target/s390x/tcg/translate.c 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 100% rename from target/s390x/vec_fpu_helper.c rename to target/s390x/tcg/vec_fpu_helper.c diff --git a/target/s390x/vec_helper.c b/target/s390x/tcg/vec_helper.c similarity index 100% rename from target/s390x/vec_helper.c rename to target/s390x/tcg/vec_helper.c 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 100% rename from target/s390x/vec_string_helper.c rename to target/s390x/tcg/vec_string_helper.c From patchwork Wed Jul 7 10:53: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: 12362397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA2A1C07E95 for ; Wed, 7 Jul 2021 10:57:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67CBC61CAA for ; Wed, 7 Jul 2021 10:57:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67CBC61CAA 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]:52652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15FQ-0002lM-HS for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 06:57:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15CI-0003TY-Dz for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:30 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:21671) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15CD-00024k-PD for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655264; 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=G+AiDlL+61L5B1wn+xjCmG+/XTJbswjpGkOhHK6N/t4=; b=NKGJoonsaV0Tz9U1Vzsa7JxMgPGnSCX1SlKbFQA/ZHdoTPCgjuOUcNh1Txv2wrDYG2dYVv f1aDl9KZI24tyWvcdABxO1bv0PWylMISaTRK/STaonJQ2g9ta3OmHBisHI19kVVw6z4c7M jlmider1NAhJquP1WlZzVNdlNxCGGjU= Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03lp2052.outbound.protection.outlook.com [104.47.10.52]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-10-JCYnGIcwNL-tUUxSkvDz2w-1; Wed, 07 Jul 2021 12:54:23 +0200 X-MC-Unique: JCYnGIcwNL-tUUxSkvDz2w-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m5qXQgd3DkvvzhdC3ASKMiU2+ol3CD9uNw3LiKA3s1DHC+4UyUET1naQ2J0WvYhBSAcv++Ut8+rvhaUp5Hn20EPZqk6oxhVVHqmhMaXETM3RDF6s8XrSKQCTOhzDt6iGCpC4ZWtYLEgxzQWUGUApRz8T44vaf7fZ7HAYzV5DWIPQMEmqTM8ggZDFDl/JU7kT9uP02Nah9L6MN1iColpX80o2oNHxkSv0gjrH9Rzpv/ruWipM74nM5QFl3iTH4aIOVdaMYMasMKG/AhtmeAPSjPa6gspuQtBhyx+ShoFWCCSioZHrSI0uHSnIWcmHKwXs8zkusZZOt8NfCuMyyRRbxg== 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=E2I1n5ILhTXtXIbsXKlVlNKj5da82OQa2amKHf3EeVE=; b=RukARCoFXaCWKJyV4pVtBQIS+9r067Bfc6vQ02l8Wi5WMdayFPZWYKUua4TEsutQoueVskRso8HeG5OGvSzI1u7n3iDgFsO2AF991OUpnYDGdpccvYqIPef57ia0L5xv0uCb2wVn7KSC4JW6+iahfzYbQHSjcKjpIsEAGnm6+wPTyFsqWg8FygVqupe+PE+opYVzpDDLBDJhUfkm2GeKDDnWfWscAy09Nzo1EOiBZFQcCyeBdTVc5kfpV9Wlc/5Rn3oQtT7COCLXvvNAFh4qPzDxorBkfuuSpGqUS+kWqRbCWMjq5z8j6B3fLWF6VoMmjvE+FyyW/HLKMrr5SSJruw== 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 VI1PR0401MB2238.eurprd04.prod.outlook.com (2603:10a6:800:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.31; Wed, 7 Jul 2021 10:54:21 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:54:21 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , Cornelia Huck , Thomas Huth Subject: [PATCH v7 08/14] target/s390x: move sysemu-only code out to cpu-sysemu.c Date: Wed, 7 Jul 2021 18:53:18 +0800 Message-ID: <20210707105324.23400-9-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0069.apcprd04.prod.outlook.com (2603:1096:202:15::13) 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.20.159) by HK2PR04CA0069.apcprd04.prod.outlook.com (2603:1096:202:15::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Wed, 7 Jul 2021 10:54:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a703840e-6c1f-4781-837f-08d941359370 X-MS-TrafficTypeDiagnostic: VI1PR0401MB2238: 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: 7Bncbc3TPDqLBaAxkt4LMs2rGKbRRY6Uhr/iHimJxuVxEx5tVCMqfr+56g4xmG/Aja7azr69p+iJIy4zhkRnZzTdZ/tCn4qDw2vqVKt/TjMJyyZCPaJCasD1Ox55VZ0kH1NG622Y5sN+R1n8gEoo42cbvftZm3Thj3QitZQnyA/LucfbkJsoVQ5ehlr107rPygW0UiAme+EzjEcgB9j53kPmj2EZtXUlmFUkRfIMsrpTW2fGSFPWAJC2tOL+7HCBXx9QW0hOV38GDy1rhCwzJSw1zmxCB+Mszaco6ivCA1JCsP6kKpqWw1bJEwK3TyQ8GQOEM7vhTFdmt2eOOnKxEQ++vLfD2voIym8rn1fatAMfaYvLXkP0spoSoz0JBKvPOA8EgKVJoPBSp7qgjmtAfpaoWBhugJfdZaIq5m/+8GWwJG82CqmUffbfHaZccHLWKWLpNyEG9dXDB/5ILmrESIWsOmlP0HbhtdCrLivoE7MSKWiM6W/aklkdctjQoFUnhui4H50zhcIDUcROa2GlLtkcPrFGHxFssYuOe6aDe2lBkfK4OxGkxWjnX0eo02CwkVbU/wM4d58URm6EZ/0QnAkNaSTpK6lSMdjxq8ZO+PNFt8jXe8Xccgi+wb7XuvglV/Eg67xnA4II7wDrlQP2wdoxYhvy86a+sM+SJHBvTkzuY5HnW8o4nOU59MkqUiUv2IQdphkMtM7FFsDtcs0Y59Bc/eZN8IGjghN8zoy9DO4dbDwZ2WV2hLvC6BKn5hS5nJZfwEINpSTuoctgSHK2LVWzP0czxkuxBOl0nFPB6R4= 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:(346002)(376002)(39850400004)(366004)(396003)(136003)(54906003)(316002)(26005)(66946007)(66556008)(6496006)(6486002)(186003)(86362001)(8936002)(8676002)(83380400001)(2906002)(5660300002)(66476007)(478600001)(30864003)(36756003)(4326008)(2616005)(956004)(1076003)(38100700002)(36456004)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /zrUjyCtw1Kd6ePZ2e4L6AabPOP6ePV99zOFMGGgOxeLc438jzprY2uiKYUfbYw7Pp3Hi2IipQPRiVpxlupGlPGG9yVkn3fvejC8zNYksj+gAmJ1VWmzbjSu9iOZU6yxsql21RK90yHowrVLeuhFUOkRAalYQCl1RiO6NOSxbfQU3+3xn9KHaw4bnRYtL05cFGgC0e9HZJodP4rhFP7r5sNNDkWNQpgurBHifrlyx6AkWM3TG+KZ3BWKBZcgU/Dj3yfrb+qiAuwc+mPw4NqXlETndkFPTHi0tVsGlf9u3qQLm6/WJoXYUsHf/XvaJfPp78Nak9JBZEotXzvLfCxE6EfClIUAKiiTMRbe9HKCxKWgEzSI2m5dOBRa+OiN4q7e1sSW++2yuuI04QrjuVSXJHJFXSQU49mB8R8aqzkMoipSl1JLmhCv9l57vZbbO6S8nznBIO2c9VE9GOVeAXgJ0ZXclQCTUy9lAUsXDV0L/rFgPwV8om/U7U2b3gxyfYB1L5+0unpU6PPtUYfz3ru1Ug41YxjquJM/o/wjV6NKq6tEa2vs77dydL+cgXtvbx2IMnSYiI7/caKW7HVwtgTRd+3yKdBtcqUoHdph1LQT0q+QFB4UzpM95DbDKr4zzuPgnaH1Xdw6dPKBfC4KUDerlJigZ1TPU1vYGGzUkaetmdT2DhRPP+ukBaLbvhNmasf1ZZaysu5U9Pcq9mRBgrQpLDb2pNXDfVvya88EI/1HZJP0ScnZBZ22OCakNfpmTaW1gShIlo8GJ5ihpbDiwyy14PWoq+Ka7Kpjb2sCGHhjW+lsVTQBNR/1brBv5+adMEtgZfpFARLlBrINfgGGaiqwDD2J9cdyU5YwIX75GHcdfZ8FSfC0OWAbOD1T3NPx0xfarRcqdV2gL2jG6Od5WvSwQYlwFfm+33BbLimfYXLS8B/PO/pw9djWk/CjWm87MMweUgCOleY/pKpCMskhAoEzJACrof1oU6hHmTjCgVru+CJOEp1TfVGykRv6YBVPbVj7lZTzjVuJ7j3erBWQ4BIcbM6HMT1wVO/wyCpkgsVpIsgqjktkf17viXSNDsQ9nCX24o3Zd8RGga/Ysi7MQQmqZvtqCPzIbs3tyFS9SAGti1rPYftC2NtLFgn7mYvyLPwB8n16GJasHSJ9TQb8FkMZyY6wRqHgWZySOVvjc5D6xeD/LqWpPhf20B0gPcH90oIC2D5TpvFWe+8bZiOV/HdbShTMA9/eP2VG/Zz3rTEtCoNU8qfxpL/bXTkM0t9RDQmLeYVxal4Giu3tSJOhHcdjKdj7k+crqaB+ySX+H5C4vjezv65JZrJyXQS43uavV0np X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: a703840e-6c1f-4781-837f-08d941359370 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:54:21.5470 (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: YG85xOnhVtQEg4Y/0CHby0u5conNpNXrtElmEbdtHs0uk+vVkSnUIa9a6r4VnxIl X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2238 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_H3=0.001, RCVD_IN_MSPIKE_WL=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 Acked-by: Cornelia Huck Reviewed-by: Thomas Huth --- target/s390x/cpu-sysemu.c | 309 ++++++++++++++++++++++++++++++++++ target/s390x/cpu.c | 285 +------------------------------ target/s390x/meson.build | 1 + target/s390x/s390x-internal.h | 6 + target/s390x/trace-events | 2 +- 5 files changed, 326 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/s390x-internal.h b/target/s390x/s390x-internal.h index 9256275376..17edd4d13b 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -240,6 +240,12 @@ uint32_t calc_cc(CPUS390XState *env, uint32_t cc_op, uint64_t src, uint64_t dst, #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/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 Wed Jul 7 10:53: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: 12362409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F356C07E95 for ; Wed, 7 Jul 2021 11:00: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 86D8F61C77 for ; Wed, 7 Jul 2021 11:00:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86D8F61C77 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]:33218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15He-0000sE-H1 for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 07:00:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15CM-0003i7-O7 for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:34 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:29946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15CJ-00025C-NA for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655270; 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=4DIz6TbWWRPaxLW4oHLDqkOxuZAfxVokFyFEsACQoVY=; b=F4jd7xfCFuaGfa82crFx++Fkj8FDkaDqXlYpJdvbzviOfKHMEOQq1xc/ozkSSuUfoJznjo RocMBnmoj53HcTTTXcW+DV7mESbXZ+pjZp7vhCZznGfuhKHTXKOKc+0bsXDIdTdfImv2Rm udUwnCgEuvX1onavof9RFRYLwBTJrK8= Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2110.outbound.protection.outlook.com [104.47.17.110]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-18-fKQji3jaN-CN5rwRMl07Jg-1; Wed, 07 Jul 2021 12:54:29 +0200 X-MC-Unique: fKQji3jaN-CN5rwRMl07Jg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gTRz2iu/yLi+oz6GsAZCkXL3GR4Do98Ryrhi7wTpXBH+/1RYcioG2Aqqm9BZGmfBlKRV6/XrO//JCNW9VZ3/k/FmYUAyZbCpz1GH2FSW5RxrJT0gg+ElpKudHEnZ1U9hQKJqBrgenNNRjrJ85BdTE9Qr0GEi6+/pYlEkZA+qTqGUtN+dsrasn2GFHgd+nxU0JRrJCBqSQ7HeAz/vecRw+niCKRZdNEocsEzrc0eCCWo5KXR1JWcRMsjd949ogZMhIyuMwcbuodbu1cyu1F0R9l5+UyTVMQeR8In/G9Ypoj5nrrloJMrKGqOfHECcceSP/bdYF+O2E0e36EzvNYdR1g== 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=LJSMiCIozs8E0ZQLtq8tNf2yF9+4OwHSSbkIQ5Nj3FM=; b=iqClBRqXvS2baSVigiElc3gO7xsbaYLZqBsXdUyvoiUO/OywQiTOL50PvzdA7D4vtnIw2psCJ03ggQcEhHzN+FE598dTZ77R/F3apiUEMRbtju/+OgHrF304PuHR8kaMjmDjtEFYBUUZksI+yeOiHwRBlPk4iz1dS1UA4eltha9Vkc3/zhM2BRsw/yX2HV/YIwz0in497AUCVa6uTlz4pbouQ3I5UsUIHpgVK0rwiQ7ZaOa4wansonrJd+5/Hpup/SfLah0xxuvMFutgqfA9bqwptiP/u7nLehI/Ntr23z4meLs3LNMfw0vWpek1eOVb9RZ4ObHvgfS0YYfiZAJvEQ== 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 VI1PR04MB7007.eurprd04.prod.outlook.com (2603:10a6:803:13e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Wed, 7 Jul 2021 10:54:27 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:54:27 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , Cornelia Huck Subject: [PATCH v7 09/14] target/s390x: split cpu-dump from helper.c Date: Wed, 7 Jul 2021 18:53:19 +0800 Message-ID: <20210707105324.23400-10-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0089.apcprd04.prod.outlook.com (2603:1096:202:15::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.20.159) by HK2PR04CA0089.apcprd04.prod.outlook.com (2603:1096:202:15::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 7 Jul 2021 10:54:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df65fadb-a91b-4c8b-37e7-08d9413596df X-MS-TrafficTypeDiagnostic: VI1PR04MB7007: 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: F2tpJNJ8ss8bU3keGOU82yYVloRMTkggCsquFpL+CgKN9SKQNY+vdKyxA24TYArjZlCORs8ENlfaZz/uMCoogvPkIIT4MAowPv5dO7n9ntFWxZeJIfb+QxU1Y4F9mWQ31+XQyR2pSPK2GXsuqWWS8yWyzGzG9siVQE82OqPYTF1trLeXvVqhcjCNjSmYAtSgvxQz3EstUH/vYE2K74xXip01I/px3qchCT+8WcJIVGBowtQS3pX0zvBShoN5NoQKtyF5lLFcgm2hp3CISJTgu3bQd4se2FiuxMwXtmkv2QpsOT8ZLOnO2rOrzxjgOt0jZ/GkTm+JVAJ3pB9WXZGL3XRy2l7c9Ggu5RA6Im16cnBX2ZYl2+CBAKJlA19y6S9zzs5O+qpMb10m2P9rfKYL9dgOBX9kPFLQFwi7WBCvO8J77ZhWoLQDCLcxyWePOGwQ+Z1yuSgc2iZ8cdDr6UjoaTz420/FZu/2edlPzg2FUrPT4XM9lcDaUNgAyZRl7GJW5x67O5na1FxsEjKL+SE3WQXKokYL+wWIoCCB6etKQjkw7U8D7gMrwW8Z7k1hv+pfi9japhCDoPyWH4MBrZFcGz0c7QsPiXxaW5fiXDhr6+AQI7JR5pKIygSqZz3y7PPCBwu+g7dMK46U/649CXWmAcpFvLfurB2UdAjUk0HmNzlnvURuiBOtFoUr+ttq5hsu5iYQl1SxOBf9Q9ZuniouUm3jGrZyC4Jrs9a4zI75PZA4ZbwjcRgaxz2lMC9X6K//xBbRVoHYvKUDCLHocy4zRefTEXdxLogF1jlUPgomk2c= 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:(346002)(376002)(39850400004)(396003)(136003)(366004)(30864003)(5660300002)(478600001)(2906002)(1076003)(36756003)(4326008)(316002)(86362001)(26005)(66946007)(6486002)(83380400001)(6666004)(38100700002)(2616005)(186003)(66556008)(956004)(8676002)(54906003)(8936002)(66476007)(6496006)(36456004)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: czKCAI/7pn4mviDYZAA4ljkau39lM2baYkgbOwCHrKhGlcm6iFeku6qrqs0U6x+SbAIFVB+NvcntecSurpCzQVySUrtu1XXOTuFPoKWQTe+jxThB6hn+kGQMfs6cEePt+gxlnsCoFtqoClLSry7TE9swp498+oLrVdNs8Bb1aoqf0E53d0eCHfQzckd7G63bM2mVqHu9IuiiQkvdyL4iDGwXjBAHFKbAewCG//1ULODhAaLD4VlzaPOzhUpgS9kmtn3nV5ySVV0FTFmyUxGugzf5xNlOUArBTe3YAxa4vOph7zQeQ6vE9iGq1cnT50xv4F4WK/62nT6JU/cIaFdVojz9v+fcye//4XtkZrAlAKFlwby0zTqs9yotjLXsUBZn811yzTd6j87YwVoqDnkDtlIgXKSBPaQeQkLvETCYRNWYzKIMeawVmUoJZ94WuniLi4uINR78e1NnxMpKmUoVSXCSDtWtAhJN26dxg5Z81ybJYcZ2ej7rb66mXXgoDCJ94/16knteZ+shr5HUSqXnXI4QOoif3GFTa551Yitkjo8HwCXtAhiexmjLQz2y3YPks1JuIF9WzX5rPnEVxOVitKNsfnmhSagSSN+5evi0NfNNidjATMcYipZc/880S1PlRpWsSeCSjtWe99OLVx2bzaleMl7BYTA6QlhK8HytjWNsAtiZi4ldNN+bOmfTQjc2nSEDLbKY+VM3JMhR6mDl7QEPwkdsk55fX+4C0TrRWhumscZrrI41zspWZiA9mCEU8kVSA6g4HQ0t8Fy8f/fA9/sOqDfktwh6bE1lHoBX7Xn37qLKpm3H+x+68vK2Al03YtHLLvbi4eF4Z/Hdqbz+/LcgZmxVNyDphbL7XlnvfeqP6E1UVxq78X3UFS6K4kZ68UIdTcd0xi4mXKKYuFyksXmxat3VTewa92xEFr07ulVn4vCEbut0LLQSG+Rpv97ETXF9U8LhLzgtBOEjjfFHY+0e6jigVzvwd0PfWqxkk7hF76WPwm2W1Ge4ZIkwiDGBguRomI9R9FQLzR/JOS5AdPfGc+mmE5/ISJpI9kp0YDx1pxqVwkSU6VeTakAUTq/iWj4oZ1ixOVFqgU9/xSgTd591FXYYljejNubwsLaSOj5mjdS7ivPZqaf9W6znAUqV5ZyddyIAXGI+ZuBMUIa1DclXF9k+5HiCwI6pXDQXeifikkSccMsx4SJCCd6nEhzRTVZwjU6FqfxDYZlWFQ/Z6oRAcMo02n0yoe+UjfWGqEngiM89AgEuO4hGpiAh8nBaQhmQoDod3uteSZ2RL8HBv+rywfm+QnKiVBRGIMLVne+VZznmLvbCsK68PqkYHney X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: df65fadb-a91b-4c8b-37e7-08d9413596df X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:54:27.1158 (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: hhIlbyfzWZM53XGr1N6epJPyyuSvjcfFvO/YV639+gv5QiJvMuN8qhXjq/d359jg X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7007 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_H3=0.001, RCVD_IN_MSPIKE_WL=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 Reviewed-by: Thomas Huth --- target/s390x/cpu-dump.c | 134 ++++++++++++++++++++++++++++++++++ target/s390x/cpu.c | 43 +++++++++++ target/s390x/helper.c | 151 --------------------------------------- target/s390x/meson.build | 1 + 4 files changed, 178 insertions(+), 151 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..0f5c062994 --- /dev/null +++ b/target/s390x/cpu-dump.c @@ -0,0 +1,134 @@ +/* + * 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" +#include "sysemu/tcg.h" + +void s390_cpu_dump_state(CPUState *cs, FILE *f, int flags) +{ + S390CPU *cpu = S390_CPU(cs); + CPUS390XState *env = &cpu->env; + int i; + + qemu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64, + s390_cpu_get_psw_mask(env), env->psw.addr); + if (!tcg_enabled()) { + qemu_fprintf(f, "\n"); + } else if (env->cc_op > 3) { + qemu_fprintf(f, " cc %15s\n", cc_name(env->cc_op)); + } else { + qemu_fprintf(f, " cc %02x\n", 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/cpu.c b/target/s390x/cpu.c index 2b2b70e1c6..5c456f6014 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -34,10 +34,53 @@ #include "hw/qdev-properties.h" #include "fpu/softfloat-helpers.h" #include "disas/capstone.h" +#include "sysemu/tcg.h" #define CR0_RESET 0xE0UL #define CR14_RESET 0xC2000000UL; +void s390_cpu_set_psw(CPUS390XState *env, uint64_t mask, uint64_t addr) +{ +#ifndef CONFIG_USER_ONLY + uint64_t old_mask = env->psw.mask; +#endif + + env->psw.addr = addr; + env->psw.mask = mask; + + /* KVM will handle all WAITs and trigger a WAIT exit on disabled_wait */ + if (!tcg_enabled()) { + return; + } + env->cc_op = (mask >> 44) & 3; + +#ifndef CONFIG_USER_ONLY + if ((old_mask ^ mask) & PSW_MASK_PER) { + s390_cpu_recompute_watchpoints(env_cpu(env)); + } + + if (mask & PSW_MASK_WAIT) { + s390_handle_wait(env_archcpu(env)); + } +#endif +} + +uint64_t s390_cpu_get_psw_mask(CPUS390XState *env) +{ + uint64_t r = env->psw.mask; + + if (tcg_enabled()) { + uint64_t cc = calc_cc(env, env->cc_op, env->cc_src, + env->cc_dst, env->cc_vr); + + assert(cc <= 3); + r &= ~PSW_MASK_CC; + r |= cc << 44; + } + + return r; +} + static void s390_cpu_set_pc(CPUState *cs, vaddr value) { S390CPU *cpu = S390_CPU(cs); diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 8015c4e3d1..c72e990f4d 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" @@ -289,153 +288,3 @@ int s390_store_adtl_status(S390CPU *cpu, hwaddr addr, hwaddr len) /* For user-only, tcg is always enabled. */ #define tcg_enabled() true #endif /* CONFIG_USER_ONLY */ - -void s390_cpu_set_psw(CPUS390XState *env, uint64_t mask, uint64_t addr) -{ -#ifndef CONFIG_USER_ONLY - uint64_t old_mask = env->psw.mask; -#endif - - env->psw.addr = addr; - env->psw.mask = mask; - - /* KVM will handle all WAITs and trigger a WAIT exit on disabled_wait */ - if (!tcg_enabled()) { - return; - } - env->cc_op = (mask >> 44) & 3; - -#ifndef CONFIG_USER_ONLY - if ((old_mask ^ mask) & PSW_MASK_PER) { - s390_cpu_recompute_watchpoints(env_cpu(env)); - } - - if (mask & PSW_MASK_WAIT) { - s390_handle_wait(env_archcpu(env)); - } -#endif -} - -uint64_t s390_cpu_get_psw_mask(CPUS390XState *env) -{ - uint64_t r = env->psw.mask; - - if (tcg_enabled()) { - uint64_t cc = calc_cc(env, env->cc_op, env->cc_src, - env->cc_dst, env->cc_vr); - - assert(cc <= 3); - r &= ~PSW_MASK_CC; - r |= cc << 44; - } - - return r; -} - -void s390_cpu_dump_state(CPUState *cs, FILE *f, int flags) -{ - S390CPU *cpu = S390_CPU(cs); - CPUS390XState *env = &cpu->env; - int i; - - qemu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64, - s390_cpu_get_psw_mask(env), env->psw.addr); - if (!tcg_enabled()) { - qemu_fprintf(f, "\n"); - } else if (env->cc_op > 3) { - qemu_fprintf(f, " cc %15s\n", cc_name(env->cc_op)); - } else { - qemu_fprintf(f, " cc %02x\n", 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 Wed Jul 7 10:53: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: 12362415 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2B07C07E9B for ; Wed, 7 Jul 2021 11:02: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 569B960FDA for ; Wed, 7 Jul 2021 11:02:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 569B960FDA 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]:41642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15KH-0006Np-Fq for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 07:02:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15CR-0003wK-1k for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:39 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:50577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15CO-00025X-K9 for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655275; 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=D3BWz9VzXx5w7bO9208w3gunRgKRwzIf2U9/SGCvZ0A=; b=faeJTksBnaJ8sJ51u/AN8tit2VsLL0UmOVbcA2fcpRooxV0CmHxc9OGyJagktjVbARgHUw kIEQpiyfbpP+3FidH4QZoI9C8KWZAErM/aGTYDIu5IdaML0IqyMO/esGaz4MS7G4jawaa4 I4c13yOTRLe/EhGhZ85/ZzLeSH9Da04= Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2108.outbound.protection.outlook.com [104.47.17.108]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-31-534oSSbjPBG0TBbUK8DC4w-1; Wed, 07 Jul 2021 12:54:34 +0200 X-MC-Unique: 534oSSbjPBG0TBbUK8DC4w-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hH01cq7TnqrLB5oGkmxw70vi0RfHDEtyQe0u7Ll5vMSD1KgrSARGWR5zEKRjQpncXgG+ztTFeaYMni8WULbia/dFlUTziyjbHqtDZdaRMHXDy4wkHjUsWEnDlTkME60+iP28L3MIi7ch/BSz8gd/XOWrmlM5dQfJPTNC14lsctryUfrCXiLOR1ceLzO+fsHpVv0R6Gy9JRmZEvDWy+hzyimwTIqSEeSAwzIleRNfFS1yCZvMmMQPx1FbAtAjitkJWyaLeOjIULXLFDHwKs1L2pnIhWlrFf1lXY+08/Wbvk8pwSb832BW9dgWm4vveKIx8lkLDM5uEKK6010PYn5k0w== 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=ssWHjoC+n0rU3io4I6kyxCUg6KqIAGTYtNxLjo/m1HM=; b=VWlh7iy4tF15BCLK6YwPyrTJ1omNIdJOBq11ilO/IFqy6o4Let3CMidFkXPEFxEyQC3hqYO5JjRI9goLN6TjoeVH/Q8DVoTKTgsYCDcCb21gPb9Bfqh8qd/b8iciKLlLK6WFPKdk4g8kMhgORF8UQ2baPDuC9SKxHwEsCKgUYQMj35Zq44J7GuuvL3uP2JwpaM65Xx8QxNZaZ9xz7S67nHIFDUkYGPpW6tjuTFr5K8QPxyzzXxAJvMq48drXTZVj2/+pn5gwlPfl9rU96JvTWzGaBZ+BwEfV39IOCVPiArOHihqFtgfsjBU2MCT7doJSmwZ+42bQ5yN+B77KZwQowg== 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 VI1PR04MB7007.eurprd04.prod.outlook.com (2603:10a6:803:13e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Wed, 7 Jul 2021 10:54:33 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:54:33 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , Cornelia Huck , Thomas Huth Subject: [PATCH v7 10/14] target/s390x: make helper.c sysemu-only Date: Wed, 7 Jul 2021 18:53:20 +0800 Message-ID: <20210707105324.23400-11-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0084.apcprd04.prod.outlook.com (2603:1096:202:15::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.20.159) by HK2PR04CA0084.apcprd04.prod.outlook.com (2603:1096:202:15::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Wed, 7 Jul 2021 10:54:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ca35039-a08d-41db-57d3-08d941359a98 X-MS-TrafficTypeDiagnostic: VI1PR04MB7007: 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: p4Fkw0Lqx6TE6ib4/rIZ3mopCRRnPyrrLjFT8yK3HRx4P0Kdfh3VwgB068GGgMlLhJGntBYhjEZ5d2adk4T/e2X6B/eG4ebV8QSjEKhReEYyWs1gH1nEiRGPKK0w7vkya30hxgjeyua+5NG93fnpQvWoU4n1a4wPMlYPUcn5BDqO6LogpY2ybaRKCzr+9TJKHgUd08SWldPQ7rubotVqWQRCJj0Qw5LAidxkvD3+sGJv6S11ie8RcpxaDzvLcp1nKdb6H/rf7VV5Eo4OTEalRK2tddWP4ei2mgzPXnG0lj3b0ZzPswUO/ol7MfETyJ5v5ugZbINggM3oSt6ZIRtUCNSVag06vOhwoMOIMuddG4gOwFOtPGRvA+aSOAOOQTOez3t7dErvQW+tccSnrLz7EzldA1B1FKAtuy1263Ud8ibEdy0UL/zYTpxKOo+hIWLIyFO3/KyA3H1WMfpjEhGOdGdX94c3WInktxKQyL2adHmDNdnECpMU1bbLI7jWDQyxTsPEik3p3uGZPlnfFs6jMvZNqU9VlQnCwVMYtrSbPAfYC1wnWBOBGM1LJvLGtvk5CSSH1kZhNwjbYM+bNVrUY19zyuMG50gWtJnDvNkWVNY0E9wEwWU2zig2iPNZliBY4nZApxFmyFGdZeoFOumUaDbbWuK4BEKMc4wFUhhkgxSUgIpKzzdvaVGDIFaP/ThuEtHaO//nFqsG5XsZcChf2g== 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:(346002)(376002)(39850400004)(396003)(136003)(366004)(5660300002)(478600001)(2906002)(1076003)(36756003)(4326008)(316002)(86362001)(26005)(66946007)(6486002)(83380400001)(6666004)(38100700002)(2616005)(186003)(66556008)(956004)(8676002)(54906003)(8936002)(66476007)(6496006)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 63ChQ9jWOoAuQdRvVfWHoT27Xv92gxoJqeknMd3qz0J7lSJKhyjcRSzwNKmKNQy+8sqVswIGVmAVD0IjxePPlfyoGNupCCLPEE5fCf/6mIklBDDF+RMfrGbJsOslT6Wv6tUsjgn99YjG8RCqBrnztVsOBoORc3MsITRFj7X70kdeCmedLuuDr4FPar7/oo/s68pZHt1a2MAoueGYpU7Ay0bRP/hLUBvSJ2LnF4BEsS4nFXjQyd5yUThwxNKpEA+Z4OIGb+WM4YYh83zl0LLcQUP2GW2ewVzS9HHJM8KlIES6nf33kW1Fn7hfJOwF4HmbJI5rMU6i1a4bH6WXPbw55+Hw4o4HUoECXEWFvTCTXs6GbXI8oahpkwAUPgCY+Z4SRb6SrNXzdnx3LkfFGduJpv1lUHTGlbqfgothwoBGynTwObrRa3zcAamDaZCoKL+6DBNBnrJ/Kjb9+AV74Bnrw09wh1FYNbNpw9lbihRwXWN8MIC2COxqpmn6i9cjoS3KHuekjKaEe0WHzt9fQ1phWg//1dHajgXedGvgvS/vjsN2E30mwVe9mlF4HaVbZexJtiQdCMEJRzjasiuCRvy737KldP4BI7tY49UgsSCUO69xP2eHswaTldi8nJhf27lQNPQURSwNmwaedWtCON3Eqmz9DsLpJBk2CzuWqTZOV4eOP6r4ZmTfLfgDQ6AZ63+9J/v91saTy7H19g4R8BHX0Cz0sfPED2o5j5jrG3jZwRvjkX6h2kEJQAYIhPrVIwEWOhm5XoelhuNUBoTvv6HCI0hUi2u60Go213Ij93hT2aUmg+KnXoYJz2Pg16Oe+68Jco4ApKPiGQSmMk0/P/iF7VJkxDhgWRu/AoM/UgpdvtfSSTvN1hS+gaDio05WDcMGCdj9XgQJUi+bv4wFSfFTIczCS/sTIByAlKLITBzPkDos7AWRK5K5H5n9evknLtmtfkJPZGh2D+aV/4V4ZRKJe1UJC9v+FQ42vuJlAbxOMb5pwHuieJlp3bq6NL5G3bfmugJa0i8GmAUH4gd5ESDHPQyVrtK/DRBbAGx8jkEOz/0b5UCgG0VBVqtqYYYfGq7nDUPSpNjYXT7FBP5GSU07/szM6BWmT8XbOQw9pTVZSHl12ehGJ7zvIsIwnqm2mq2uXY8idU5NGiiRCkzdYqur89UqLDgn9jNV70Avno2QnuAkUajC3JFcBL98oJOJBbcL0ds+kXowyyWpBVz9ZKzg45s6Vx7AUwuw9p+uA7e7wlyym053mx6nnt5gAbuDqfIomDUQT6Y/bbhCu+TsJT43YUwZrnXHa2JUecdNZ2RL1U2JGQe4OFa3YiGqXWucIynr X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ca35039-a08d-41db-57d3-08d941359a98 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:54:33.3132 (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: MfG4ul6kGHRSDvngB4M3znPpVMtjGHt+W64SJk1SgchvWxUrHlqqCTMsCfzJh2uy X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7007 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Now that we have moved cpu-dump functionality out of helper.c, we can make the module sysemu-only. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Acked-by: Cornelia Huck Reviewed-by: Thomas Huth --- target/s390x/helper.c | 9 +-------- target/s390x/meson.build | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index c72e990f4d..6e35473c7f 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -1,5 +1,5 @@ /* - * S/390 helpers + * S/390 helpers - sysemu 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); @@ -284,7 +281,3 @@ int s390_store_adtl_status(S390CPU *cpu, hwaddr addr, hwaddr len) cpu_physical_memory_unmap(sa, len, 1, len); return 0; } -#else -/* For user-only, tcg is always enabled. */ -#define tcg_enabled() true -#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 Wed Jul 7 10:53: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: 12362419 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A2D5C07E95 for ; Wed, 7 Jul 2021 11:04:00 +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 CA85A61C77 for ; Wed, 7 Jul 2021 11:03:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA85A61C77 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]:46482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15LT-00016q-0u for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 07:03:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15CW-0004Ev-Ha for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:44 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:28232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15CU-00025w-92 for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655280; 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=5DjbauwFNgxOCXyXac18fRIUZBg8nTx+f+wOEDgZLhU=; b=G4mVFOIgItIlrkOb2uBQN4aE+rgzfuTZE/dwBU0K8KNUS+RGoUfoegLgff9UnM+3g+Xsi2 9maZ2qlMk+DfXAisSZrDEq7MqJ1pTxlYnttTQUquz5aq4yEQgcbP7Dn+Sp417xjEVWDTV9 hQKy13/sT2aCafZHFx9VcP9IYUoovfE= Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2110.outbound.protection.outlook.com [104.47.17.110]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-3-s5AjYVIGM0-n8Ex2nRrK7Q-1; Wed, 07 Jul 2021 12:54:40 +0200 X-MC-Unique: s5AjYVIGM0-n8Ex2nRrK7Q-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nJMBms5v8wdZHimZrmUUTv0ipVfipXaileMOi6HpGuykKzE9Zk9lJUrv4NbV6J1vzVGALPtJ2NvrALWQ7xLQeHmMHQHbezqDkAVk7akQG6vkY4ENmP2f8J+MGcqzB+oReZY+yH5u5N+s5CrRvwtG8VtYVLe+/OXXgu782GFnclPImhZtm4/jZnmh5akA9djBnf4BkPGmpQRPi7V7499KIk136Kd4srrFHtTN23OuVUk/bWDrxbMkdmDv6I2Ypo/MpbX64hxRdSS3poAeMgvlku7LhP+3PSK+T5JMP8rpEPS48G2kK6P1pHbw8WJDp3Cf5OqQIHrqnD12bO4h3dvotw== 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=4yno4gp86gLBIzeeGhLIbh3UbTT6R9mUb31hYYBaQYE=; b=j/r8/Cy6SZw+AIQRzCk/rD6sIX4RfyOeEXUyHgbVpzDZyz3r1zkRbZFdQ8epXAh5RKLQ8F25GAVrXl8DsX6MREr3QYtmyjt4E39hyIEJVO/+27sTxGCMZZbiaSqht1Kd1sTJfjvR2UdG7qpkeLbWVNOgm5oVFHoy0VAAkAC/q9QomRjuiPPfMT+0IYAg8UE0lP8isKZh5zu/kvZyhALpIaCD/sI8/yvUTPYS3qUVALOqHaP/lUWCRByTPG+xt+Ii4B1awUdnyDdDGY5nMsr0vZHPyqPab39s2RztBFVmH2I5aEoZfRs9zWOZGqdJk3pvl0OA9F3+k3H63fnxqce2Ww== 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 VI1PR04MB7007.eurprd04.prod.outlook.com (2603:10a6:803:13e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Wed, 7 Jul 2021 10:54:39 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:54:39 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , Thomas Huth Subject: [PATCH v7 11/14] target/s390x: use kvm_enabled() to wrap call to kvm_s390_get_hpage_1m Date: Wed, 7 Jul 2021 18:53:21 +0800 Message-ID: <20210707105324.23400-12-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0076.apcprd04.prod.outlook.com (2603:1096:202:15::20) 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.20.159) by HK2PR04CA0076.apcprd04.prod.outlook.com (2603:1096:202:15::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23 via Frontend Transport; Wed, 7 Jul 2021 10:54:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 75626a71-72f4-4145-ee2c-08d941359e02 X-MS-TrafficTypeDiagnostic: VI1PR04MB7007: 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: UiamfU1qHsWvGU5fHNQ5nKhxV9wwTqVw/gdEQVVR1XVEWAsa//AWzrgoXOmtu57wpX3U59kkhdrqG+IvBhMX/HEm1jCBuB1JNNZEIxngPjxRNEZaHAdz1V0vhiiII4dlYES6QfM6ieCWPivuWex1aiWizJiBsirSbegh47C7LynZZaTE3LFTeZoCFIF8fZJwT+5zYkvMWP7Ap9pbEut5mQ6s0UnVS/XtGYc2Zt7uSSNztAT/02Zxgz7kd82hkw8T+ckOs1tfat4h3WParvXDJrsiu04wdcbS8donBtlxa4O0RzFHPrflPGMZKPFJwaMKfdbNxGueYVN9bsF77wcxUyjG8taNdMm++UrrwLKfUobdvBilTVxiEfOOCFEYIYzM56SBVful6sWS05LG1nMMl4hmI/wYv4/dX+LRY/KpUsbZ6xhppiX4zoQkSuzvuocv9YYQesRyf8leTCsW1vjTr0Qv69MV0dmjWwo2PMzxGAK0wgdHVJGnfU4RK7/YibuS3LBE9WCfdmfYSM4oFwK9olBB1OGjwbOtR4FNB5oQYKitg6u0Z+ih0OtMZu3DqOvIpahCwfhllNG2ix+9sMlmF6e/pMZgA2OcyjDrRxU6OUL7n/pFuL8Fy9QvUPf4QbVcPpz6SnVDJUiRoyC3naPeuH8xGmqmcSIxgSbLah62I92j+TQwe4GaUjT0hhntEYOwv8Hlo/ySkUb/rzNhYMaJNw== 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:(346002)(376002)(39850400004)(396003)(136003)(366004)(5660300002)(478600001)(2906002)(1076003)(36756003)(4326008)(316002)(4744005)(86362001)(26005)(66946007)(6486002)(83380400001)(6666004)(38100700002)(2616005)(186003)(66556008)(956004)(8676002)(54906003)(8936002)(66476007)(6496006)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EwFIAnO5I4svr5I88NRTG4VDv72SgMTKKe0dFmkGMw5ng+Teoj5XRAE6epeVSLjqlQgEF2hNByAKmmelPTnnC2ZiM+GDC5OLKJwW6nhrIgGVdcnUQIURqnTr6IcRrzUZCjuab+iCeBsUlnmT82f0sDw5TX4qJHcV3KsX5eFCNWsJTZWaZgNL4uftj9xit6Vh1GRgcZ7PacbBwnVwsAwhxikcaXQtwwDgDeCyMSTzJUSeKnh0xLOT78y3sazv1G9wCPeMKldjxS2E2W69qqh7ogdpy/gDd8pu6xkvX2L3HaCtwoBAjDFdMZeqTRLi8s0wC+VkZ2jdMQ5vQFncDKpPfT/W9zszGW/cjwyc9YqCUBTBTdKScDkk4C9YAxeWSeDtl6pALwjLvM93gLy6ugmnf7/TB7m5G62bebp2wa1uv4G1myXvKIDUX3Wgd8sQ2Pcw+gE4OjnrfYFnUFfcsM8HSnvxadT2t1OoAqNCeWKtB3Vxn/zychXxGpyKVsiXIjvAHlzMOeB6mir5rOGbLkKphn3r7gmBMjGYXDL7M2FMGREWSTXUMGb2skzu5Gn+93WeB8Pt3axg2yvG1tXHq9ECtL3+zTuHGRWw2pNZjCcBJpqcFiwlQEjgvg2YwD0DsOtVgZbmwxw6DHe6m3U4LsedVMjZtpdT82v/33PKY+ofC8nzN4+jjQj5t8SiDaUWCpAWJp1aSKIWLsmCdoI/TbNIjbGziOYEGBi8Qxz7VWazj9qZz9wSi8+iDd7Dv5ZoW2QfTuGgYcuadOzyOqvltMjNC2KYwfLNLwZmGTA5ifZ900X17VlL6EnK+1fb4uEph2wDMTdPfLjvbDV6mSif1oGEQV0YGa0oUkXOz2Sm+Y4JwM/BtMF3l4AI0a/EiKq/e+xBeWcgZY/gSAlvAka83Vz77WmmPQeznWN3VWd80zqbzvQgEeXeid+crP+L7vYxsfzZeAVGVJZG6ORoV3tr9NbqNk020zLZEg0wGjjlURZGQ9Rp6mMcNizIMKx+Pc8/kBGrTNbaX1+75Q4xSqfDXmLlpX9MJYCfxygElgJEh7+F3fDCaFl+zZjJALPVDxduA4SeZBTZFLN8LSx23KVx204xgFz8R0OHVgDnP8y1Hsq3sl8JBywg47NfSTkBfYcXu9ar9apn/Ly1tGJCnwG4LdLUjHLcInuhR1mb2oR4sg4iPcwoe6dW7cQXA8MpM9nRQZu3FO9IQRZ0lGvgTQWziNmc64BpsK7wYtpuXxf9fMb8rPNb51cu829bfYxAHddpXmnx7hj4aYqgX7Byd/FdgNJj06rxqfWn6CcsM0FdCEa4AIGjBEmoovlTXY0z+9tyV1Hp X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75626a71-72f4-4145-ee2c-08d941359e02 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:54:39.0479 (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: mXQBo6buhXUvqUqk4H5WYDPCtguHWcD8TcqCduoZfrk/RdXamdxkMjOD2pdkefub X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7007 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" this will allow to remove the kvm stubs. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Reviewed-by: Thomas Huth --- 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 Wed Jul 7 10:53: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: 12362391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13462C07E95 for ; Wed, 7 Jul 2021 10:56:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 89F0761CAA for ; Wed, 7 Jul 2021 10:56:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89F0761CAA 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]:46690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Dr-0007G2-MS for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 06:56:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Cc-0004Wg-2A for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:50 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:38777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Ca-00026e-30 for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655286; 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=mhoQpaYXVRgy46T1jyCYw1LvUyZPnyisxCD+13LG8/8=; b=P1iP71GT11cepqPMsCV5nB4PiS2KYwAu/25a+oudCYSz8qXY06QEdSgxRQwsgu7302mW5u w2FKimeFAO7gGnyvQdbopOyzQFCurVoyE0wRoQ5pR6eCmbvIACDkCYII5guVe1U6G+2CiT EJIEA7JIsnqsjFh3IzKptHe7OX+bK9M= Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2108.outbound.protection.outlook.com [104.47.17.108]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-13-99iNDddNN5ul711Mh9SSMA-1; Wed, 07 Jul 2021 12:54:45 +0200 X-MC-Unique: 99iNDddNN5ul711Mh9SSMA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kSNaCZFvB/2Hl9pngoErL5uoK2rjunsZcxgPDTCoMJ4IlKBsLb/veLq5KjR/0WPUuXp/0dYSBFrp8b6fBdxlcFuQ/Rlc2LKJmHKZ69vMqXf87/kHN4Dtn3zTdtyIwkKIL8+2lmsR2r4QQez23cxSaeYXMA/VhtE66zyLyt6+1sHLeD1TWAZFTI8pECku3x1dtTJfHgCJzscOXo/vGjIJsfsuvVNirltBg41Inu98c1uWMmhQh4SXL/F/4xyp+8O2l55WebUC5aYUKXl9LC05iG7mcMjT5QccGTewfyHRmRDLeaXilaqouGztap+CsOeOxktCGwbBLaqhh2vyAfnrYg== 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=RFJ8Mltpb7EhCRrtyGBXPptEJoRE0zHOHAmifrMeV40=; b=llWTFjHWXbdCaMFwtreCeGaISdvl6+2KKmK7DGD1xnP7n6bpgj64A+EnFUdKLz3VjhEev1axFkL6J5oxqpWArX+4AIY1L4R9xo7qHrSF4+2EalaIy6PC0I3rygnhhyVJ0q2vROJNEizo9ZgpSp7HUQfhPIkZNy9bUuGzsdUuL0tRv8TY0Eb64zhRWPjRHotUflCLSdHrR9KLGfdQfynL3V9Ng0c6tX2Qn01Z2vh5HRdEG8Xrlic2N2shiKmAJkWxn2ZmEMqmeBMgUS59z9MwY91ZnDyijRR7iTh4/FkXfHtMraDnWEBzU4OMzyYw5PvT/e6SLZ2PsB0cS2NMbLVSPA== 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 VI1PR04MB7007.eurprd04.prod.outlook.com (2603:10a6:803:13e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Wed, 7 Jul 2021 10:54:44 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:54:44 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , Cornelia Huck , Thomas Huth Subject: [PATCH v7 12/14] target/s390x: remove kvm-stub.c Date: Wed, 7 Jul 2021 18:53:22 +0800 Message-ID: <20210707105324.23400-13-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0087.apcprd04.prod.outlook.com (2603:1096:202:15::31) 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.20.159) by HK2PR04CA0087.apcprd04.prod.outlook.com (2603:1096:202:15::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Wed, 7 Jul 2021 10:54:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 02122ca0-1511-4450-0d6f-08d94135a14b X-MS-TrafficTypeDiagnostic: VI1PR04MB7007: 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:3383; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V5nepkQ1XK043LjITBKAgVw2rpsJ7QS8QgCcDahYPLmletMt7wxtx/a6ZGn+lnxygdX3uCoAWYB/Km5A2JmvE6IsdB4Ubtd4SDMoLH6FfG3x2/ygpJimA+siLuC/sFBYz/PVWST19ERovzOMiUhecHVcsw4/Fnkn8l4zgDIT7Ey6bSUn/pWDVryFhPM/lAA2pSqIW3W9+d+gKmAcBe6n4ShUCoYk1b4l0qJukiKzbb1S3Wv9M3YMu1gM2BY48qnurEYMNVGzNxZY1galpanOKMCw/wdo6OZzWJfavfTKwv570LzelCSd5bn59XqdQWKkjjRSVr62hKY0Um9CdcFtgKbbU4HWgWzfs4r6wm3txPBCpDStyIoH/zoL7HaFv7dacw17TYYF6QXUkDKOouV9ULMrkGDA/MSlInN3OA5bv6gtFBO0kodu/P1v55tL2l0t0dA3cUbh5CmqnYDhCE4zUrrJLS2jAatKW3fCulSIrtlS5LrNfHVT15zP/ch/nQ00vqKxYr36uC45MkQWtABG0FBFgQaVu5g6lyxrwJ3BpYMgHo5ye4kXn9aubYCR6WLWKLcFgsx0LtivbRTuEGKcfEYinycF17slJASEQOPfKa9dqjU8AhW79zJ5++Fb7aqVph6+q0Ytb2kbGq0puw2yMbebvxqurj6lezVtK4gsQ7ue0PHIGldgP3hWsWQaDpFD5F6b6NDHdycsxbwfkc+zyQ== 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:(346002)(376002)(39850400004)(396003)(136003)(366004)(5660300002)(478600001)(2906002)(1076003)(36756003)(4326008)(316002)(86362001)(26005)(66946007)(6486002)(83380400001)(6666004)(38100700002)(2616005)(186003)(66556008)(956004)(8676002)(54906003)(8936002)(66476007)(6496006)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J5E0pVAjkwaOhD9TX/d+v3SzYtVjRZEfE44200MwmpwLKlFcEycG8/jlPUqru4cryAc+kdGUZzlC7mjk5hwMZJjq2dUnjNGSyOk07Bd4OyGrkFOrgRoddevtTLuuAQhRDRB/nvjyHLfw/X+Cd1fvtoUm3aSspaCH1WuAEeMCEjisJ45+du8lNHRGxhuKI4PsDGrAcw8xzesGNzQqIMEGf8nNs0SLpgFml6zChsIexhiy7+G0sRiIDy749dH3UZnpNmbUno56p9faVP/Wo7c8mE5YjGFix9mMVumyhZwFvU1En6BdXJAh9yQVBsx2xGjsxY/lq20flEar0bEcyupb7W9uLWzdsTfC3vidhfgkK6lFBDJRjR1Xa0SAsVEQAJeVcyZ3tSH/0CRjetg6xAzKA76EKxHo9xZ9SI8xHeujQxlW1zlYS/wVuW5paihabTfzPzXm2FagTYmhclnAjQ0VazgmsH7tWv2g4iRXGXthk8Lv1YWwZ87nJz2qgsNztEFqGBQ2woQSWKLAyzVDG2sHHmFCuOHxNH9ZCaXfpjqBdSCWTAKvnLkNwk5i1ZaM5UgrjUqNhzIFXL6FTsZpq7hfAZComojjtnSYy5lfkDDodlV/97o8MM/dqhWev0XRZIj2hGdjTwfHjpToZ36EJ6mZDkuyEw7I94anbmJRMpS9hHjJe++CxrlEEC2pD9F/L/vRwtgDbRue3vE5GdolE4UiJ/QfS4v84o7z2VAtruV7fx2C92ysbujVlNUVMLUO8vOVmhCy8POAzEex+gCSj9pfiswxZBjJGbW1OdgE2FhbZZwx2L+XyYXwRoztw98BCCTdu3gYY/w+C5hgqpsTY0DCSCCg4tTSWTcpaYBEXOWX8u5mUUY+hpU/GIwDfNR+pr970Sl2vN/GDQukE+3K2zBzLZgiFi4h4Rx5BC0x/Lf8pAQu8/qPmHv4n5i0VfIoUQc9Bsax46rP6SPwJvMGcPkFRpqxDASkhVW653pPkPe2Er9tExHSVZmIb4cZN7On3gYizM93/cVgerA4+E+AN86uscwo3v8JIQimIMUFSn7vNECxTJ1VZ1aNo64SmsE9llB4quj4/cBc9Dqq0GbOVBr8yJFkVJgJJlGsrxCKnYLiONgaKXPdHwzl/CD0wG1LTtWGK+xgUX1xTvllFkevDwNWIBznCxKy/QCEVh/+IrTq47Askfpn1V9VhQLELAq0MwUxZW0I6ZlJ5UfYd3xNYkq8a10bbNware5NljznC4sT1jWeJoRCy/vG7xu8rsyr7CEvbrMmtjh80osijWQc5xCmNyyK3c6pZV3xiLDSD3Meavm4CmD/jMmApoYmTcEck6gQ X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02122ca0-1511-4450-0d6f-08d94135a14b X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:54:44.7506 (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: BBQnQuZHXQjmC4HnObda9Tu8LlyThgW11HrgTYCeXcVkZWyhgzv/3vz20qaemw6n X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7007 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_H4=0.001, RCVD_IN_MSPIKE_WL=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. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth --- MAINTAINERS | 1 - target/s390x/kvm-stub.c | 121 --------------------------------------- target/s390x/meson.build | 2 +- 3 files changed, 1 insertion(+), 123 deletions(-) delete mode 100644 target/s390x/kvm-stub.c diff --git a/MAINTAINERS b/MAINTAINERS index 8ec845f4e0..4e04800576 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -396,7 +396,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 8a308cfebb..0000000000 --- a/target/s390x/kvm-stub.c +++ /dev/null @@ -1,121 +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_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 Wed Jul 7 10:53: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: 12362403 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,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 1161AC07E95 for ; Wed, 7 Jul 2021 10:58:38 +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 7FDDC61CAC for ; Wed, 7 Jul 2021 10:58:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FDDC61CAC 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]:55302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15GG-0004mr-MI for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 06:58:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Ci-0004v2-HR for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:56 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:43375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Cg-00027A-2D for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:54:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655292; 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=TYPXl4epdup63veqEUEMDsX7AMvFPrMezdCzQZUay5Q=; b=CEGEvAS7fywHw+nk0aRUSC/TKsL8vb7DUZzHrO4DJ08OapoANDk2YeAtAhXJ4Vgb70RfC1 3aOhTwQY/rXVpsI+q12MxYC5JCKIVZapI7GG2NmlEqOuL6R6AjSPQOTnlw6pE9eksVWB1x xNXk52QlWdC3M1t5DedzU3YiS0alkGg= Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2113.outbound.protection.outlook.com [104.47.17.113]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-27-SuZ3LwdQO--aLktmWZImzw-1; Wed, 07 Jul 2021 12:54:51 +0200 X-MC-Unique: SuZ3LwdQO--aLktmWZImzw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ztt0Gionk9O6S3uSYCj0TiIyoiSESFWyImCtcgu+6TMYJ/ZRn6auv8utce6+QKb6qszLIxiq2Z3eT68/UdIcEpkVKoqVl7yCedcsnaTk/TtkI711e6WhSW5q1gGBMUbqN7E5ODmTS9AQxxHhY2AjBvkyqfhPTtWRm8M/KHkTTd1GgyCXW0Trr3PZxn7zuFu/aZLHtmUrfEfpnEAOlQMKft0OpH7tfvvW8BO6mPKqv0xAKZybShBUoKkCQe9LESOn4cEpWPIp9/fEJc4Eh/NXaaHDMqdyl8cwwV8/MTu9+YTJI+z9620u6vRvBN8wWkcBnbrWBS+pe1u9V4lrDIPhAQ== 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=Th442xmWdd21vL/ot4KXZwdZad/NidN3x/UpL79AbRA=; b=LkThR2PaolPe+Huq6QPCGHddseOUKfxlIPIrvAZdCliWYUl3jzpViUgDWnZe4XaXXJGAH9WyL3CHxlHJsQgudYQySL+EyvRucoRTz+HQtgIG1QZ/V/rxVLbBFEilBeNP28pw7zJQ5gsuYGqtUwz8TPzo3POcNqc/bXBQqGuzHqeKO0CXYr8SYJuAnyn1NLFR1Vkb5jqlc84g7ISKa/AYSGwmwTjayTUDzyyTLUEVs9PRl8KpZne2L4qPQsvMG2LMcZ11TA0LrTlCuhC/D0qT0tS9kCEjJGvjlpCFcZ1a/ob4Watue1Ni8yds5VmoKTxBZIOExQ4QecriEu9bGZ7q4Q== 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 VI1PR04MB7007.eurprd04.prod.outlook.com (2603:10a6:803:13e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Wed, 7 Jul 2021 10:54:50 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:54:50 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , Cornelia Huck Subject: [PATCH v7 13/14] target/s390x: move kvm files into kvm/ Date: Wed, 7 Jul 2021 18:53:23 +0800 Message-ID: <20210707105324.23400-14-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2PR04CA0083.apcprd04.prod.outlook.com (2603:1096:202:15::27) 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.20.159) by HK2PR04CA0083.apcprd04.prod.outlook.com (2603:1096:202:15::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Wed, 7 Jul 2021 10:54:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64d61842-bca0-4496-95b3-08d94135a4c4 X-MS-TrafficTypeDiagnostic: VI1PR04MB7007: 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: I6m/RZafg0Gm+uzzUpTJIawy9pvCwk8Ykw33uZsYFGTtPX7JyRP/Hcek+OG/UPDA+Uyp1qsqhVyAsLle7TDtKICiLPZQ9UAcY7Oe+1P4uh+oizyNkP9b4wDbH0+bJwQcQgl2n4X8c04WRze/YqjW74p1T38Xlrya9SS8faXCpE9XHMK4wvLyjbr9StFeMM1z6sta2HKuSU6V1hvb0kM6XhZMFBHdMQnDxzOQ24S5po/9LcWCxqzdD+EDnlWz0qxAGMlBjM7WDcKkbHBRQOxcPgJ6JPPbh3zb3l3exS9RIRjJaLptbeJY9Plua2gIRqU6QRIr74fOKH12IvMZSFQmPRDjW6KKrXiOKeyxiAdrRLZViALqL83fIDXR5zAmSCthQSFIdnHzJyWB5qvxkQVctmV8nzOOJ147x0aQStGbEobgtOjKCpb89m8wuk0tI0Az5kKoDPzjoOHwwrGMN6nc6bs9GV/TM+nmpwW3SgO/hezVErOH2DxeTMbifQaWB6ptAFF6Slo52P9rBbDPIGB367bmTVL1U4Wa9jdVDK5vhXUtVMY6AzULNJH2X7QC0lW83uCbGMK6vcgo9YID09zbe8qieY8Kwg4qNxVMbuzRMBEKNVzKe4+V9dRjDs7Ftb7rTETYvBdMO53mxqcSop8t4MbzV9lIOLg/K1rq4YoHfjkzdDBbMsPgIUiYo3aEUUDN 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:(346002)(376002)(39850400004)(396003)(136003)(366004)(5660300002)(478600001)(2906002)(1076003)(36756003)(4326008)(316002)(86362001)(26005)(66946007)(6486002)(83380400001)(6666004)(38100700002)(2616005)(186003)(66556008)(956004)(8676002)(54906003)(8936002)(66476007)(6496006)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pNGy8wjya1206ZiRCITIIg8dc4qm/MkdX+q+am2a5YCeUQwCJt0oF/ypGg8SkfDT3364gjoKvjp7XdWO+b9jLb2LTEI/++v4VBr51zM5q/80kBJ6XOAOx+knAyXgCV6URvjZ8zQIqVOeS0E7LHp+GUahjK5g9x4Afctim9aW66/MaAD3qjzC2DaUdws8oXNZmrAz5Up9L1Bow4Fvsg25d0aZCP6EwvGGu40M76++0iWTgKBC9acg9MhB/EIUFli9EK+9BzMx+xZmpYvteD36AfTS4XOhETVtxX2GsKHoQifKqPlTCI5jWNmPKU/cizg0+S/06tWGgLVQnKQZCTde86FpUeuTRMIB5XPQWR1PaOj08NTtHZwr6wTOY8ADm5rccPG2ErbxOuxpW+omtExoGraNjItuTGN8mqc/x08h6QKgeRTmQnTao+WBwazvU0G5XziawhDTqNvuZ4DysBvufqxIVqc3yIBa/dRw8661be80dlAcOOdXB3EC3gjFcU98/JwfI2YP9Uw9e0Zc/uB52hTlFYFpgYzaAwPVWZBdVpfPItr0wbqN3427XY3FIiCyQWapFazAnm6cEOMIsXlfudxS0x+37TmISD0tqasDNyDME93cws8bcqOG7SxL+6BYbTFxnbPXlw7WKDKWO/L0nrNvw66MbU7fH6/eygEXr2kCc427JJI8y3CkXNOloUiMMHAR9dapjYE5NYgAhV1Vmc4a4sAOr4v3foVzuQm4qjJPlXlapCb0Wytfq0oogvbd93sDP5xoSF3XrW7rvd5GOR5bis1DPfUZ0HMNV3bAVZIqdpWX0MvzZv5GJjHWjngUVXa+WCDgQW8B0fdp8lo8OujpNp0garqbpWdezfuzzJ2Jffgu6ZVdQNmCDIo0SjX6Q8HNzdKUwZmJkGQ/ECVa70bRuAvi1VgdXHnzS9+OPvvPxzx+2eEkwPH176263B7GY0v4UTyQP+imdv1ii7pkp99V3KDbDinGJq6Bd+0Jlo1IyMpR+8ZZC8yp8G3V3bwHIMZ6E9SPV5kzpdZ9GJ3hLkwmslWaUogFQ6LQDIFiVnCSrdJa4QiuzNc5HiwlQpOjKWBNGd2Zgrac2uZX/pojjjB/Y9ciGcx1mMbGr4pc4vHf/ni2x28MhQSsY1WE2ycmZQKCO6RQhJGoaGPRS80/q6Qra5jB/iPtXcGYlvzh7THgsZIzXjohIQVu1UEWI3hHEBPGpOLUbvJZU3pqu3XMJ5aZmTMtVZnbv40Uu+K75Nv3dnDyboz9qzBcpRz9qi4AyKdKn3RqOHhRi3Ro2yx4LlbI6SCj1ppbhXzx0kCsCQK2FdvzzOaf/Tgx2Wa2X0EX X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64d61842-bca0-4496-95b3-08d94135a4c4 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:54:50.5893 (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: mUrvzIp6aiFWTlDmyKRHlDjnxX3oBiXGFjE1q/4CH/KUKkA7trIfdFBNqueub6Xm X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7007 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_H4=0.001, RCVD_IN_MSPIKE_WL=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 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 Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth --- 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 | 0 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, 39 insertions(+), 34 deletions(-) rename target/s390x/{ => kvm}/kvm.c (100%) 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 4e04800576..11d9ce72aa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -394,8 +394,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 7e12de01be..b458cd33b8 100644 --- a/meson.build +++ b/meson.build @@ -2102,6 +2102,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 5c456f6014..7b7b05f1d3 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 94789c7280..ba8f6a55ac 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 100% rename from target/s390x/kvm.c rename to target/s390x/kvm/kvm.c 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 Wed Jul 7 10:53: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: 12362417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C701C07E9B for ; Wed, 7 Jul 2021 11:03:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1FB761C7F for ; Wed, 7 Jul 2021 11:03:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1FB761C7F 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]:42230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Kd-0006m8-US for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 07:03:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15D0-0005f6-9C for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:55:17 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:46188) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m15Cw-00027Z-FU for qemu-devel@nongnu.org; Wed, 07 Jul 2021 06:55:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1625655299; 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=RlYLHVIn7k8D3uwqV8ThdngdgojUCi8CvGltGa2Bh1g=; b=Usr1KSyatpFfrI/1gsyQcRzJpH8pK3O40gMMp2bPjxmPk8u+ZTi9yUkBRCkkyJ9pazb618 epd+ssNIXV16rXzSwa2uZU6EpxnL0pc9Sm5pFBWnshuLvGNxz2ba3N91aXlZhRWd0KhIVi +8EkOFbsYrrEoNkkpSDZh71SF46Sw9w= Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2106.outbound.protection.outlook.com [104.47.17.106]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-35-fwfdgbOePdK0-Y0jWKWLhQ-1; Wed, 07 Jul 2021 12:54:58 +0200 X-MC-Unique: fwfdgbOePdK0-Y0jWKWLhQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c90vO0b+cS91eMmluw59WL1RtlwkHtXGFvL3S7fuLwXB8l1QDte3piyE2nZ7k2dkUi+M9DpheqRiJv+WH8k9raTuUT8HBn7iQcNs3G4aJIdaCsUJs4tEjch2C+u2U8uxR4oKRXTYLVku5f2vhAbzPKQQfw1TEgSxZxbQDR9ZqEqAsyjLS+2FqHpFTPhvUK223xtlHIF90xHc8JzbyZWZXv9oyTLREunby+1yGr9msWyZW5gN57TyU6jqd1EpBOIwI4MO8/7lWj3otySQuCyFeZb8srZDLAbIouIAZLpSBo3J95J6snVx1sK4kd529C414JxXmK1dR1mtEoqvpoTlIw== 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=MR8kY0wnnUv9cuJCLg5JE02lvp+hFs1uRDHPlNuvn3s=; b=cl8Vsm8WmYO5e9qqitoT4AmLdBUB+wm+XAeaHJOfKe7cljbJr08N+HyHXTP120tSBt+4YOFqZi5Op/b+JxFSn0hPvKnCiBDK7H8EnhWcaWPyOfo/rnJgo+hTiaMMcNFZBNxcYQihws3Gv96b409WP5AL6huTYLhy7oBGqZH31BLMsiElll4CORqmJS20fREqwowsAnWJ9Sae+gjoRSv+JSdmKZ2mJbFx46QyD92W6SkuMDUbDFmZcK0DzSVNBK1efFCxop/MhhNy6JU0gcOSVNs+xNxuC8nTdLyomNcBChWEmBaB5ppe6A0tVu/F4x5BjvEgX2C2bmiGPRKbIj11AA== 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 VI1PR04MB7007.eurprd04.prod.outlook.com (2603:10a6:803:13e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Wed, 7 Jul 2021 10:54:56 +0000 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f]) by VI1PR0402MB3744.eurprd04.prod.outlook.com ([fe80::4c1c:b538:59b8:30f%5]) with mapi id 15.20.4308.020; Wed, 7 Jul 2021 10:54:56 +0000 From: "Cho, Yu-Chen" To: qemu-devel@nongnu.org, qemu-s390x@nongnu.org CC: cfontana@suse.com, acho@suse.com, jose.ziviani@suse.com, Claudio Fontana , Thomas Huth Subject: [PATCH v7 14/14] target/s390x: split sysemu part of cpu models Date: Wed, 7 Jul 2021 18:53:24 +0800 Message-ID: <20210707105324.23400-15-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210707105324.23400-1-acho@suse.com> References: <20210707105324.23400-1-acho@suse.com> X-ClientProxiedBy: HK2P15301CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::18) 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.20.159) by HK2P15301CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.2 via Frontend Transport; Wed, 7 Jul 2021 10:54:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2daaaf0d-c12e-4dce-3f3a-08d94135a852 X-MS-TrafficTypeDiagnostic: VI1PR04MB7007: 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: AKrwttPKoXI+v2ND64yh4pq6N9j9PZ5WICxHyBKKZ3iSHdD/Fya6he3ju+gXjPVoXkwgkzYfr0dtbfZi5lplUaZcfe8iiwBg/gtC47BQHTfWhOgyNycRg9bFsJuhEjg2mdNrfJscsWTvqzwdkK1QCKBF+jPg5TLKIYxw7lF/a2GRmx88SlOzYQcp3AjVboukQSZrM9nQiYJGLZjwOUFtqNWqXEq0N1jznzNvaHj9VPHIem++0O5zcCez9LBF6QjlMWojc6kbGTILtwlYW2zZZfzKN+STSn4qNrLFammuBNc32p+a5yY40f8Z3U/oZGdaJSEeFQX0U6JXVQQg3VAbNHYuL0NUoE4wfz0numLERx8uDJQ8lGOYi7Ya0NSp3PHeMIC1ejgePP/9QY+IOFa1Zuv3k8FcLHJypaPzvJWLlPKZsQhQOAiyTcrf7/3DWtxZLHZvsnWIjwFB4qptQsdeuIu0Iin2iLyNo9Sb/tcPPD5McSijUAhnNOUCLLVxp4bFgpGbEGpsaXCnyk1mwWDp1pctdlZqO0nTJMD6xG3DZrRk4OQyhATn+PN0rXc6OLIE4JlQRaJZa1+EejDGfSqr3N5cEAQ57fQ/oulCgaWltMm0+NS0QeLChAWn62ETB1VtZwgmWznTq6h5UYzSwERfC8Rk9nHo/KUlxsjkQXQwf89T5DKMOFRvv48cqCqyyb3mQPufqD0m7WyvE/IpuSmMaNshgKVwYJhUsTNxKh6a4FU= 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:(346002)(376002)(39850400004)(396003)(136003)(366004)(30864003)(5660300002)(478600001)(2906002)(1076003)(36756003)(4326008)(316002)(86362001)(26005)(66946007)(6486002)(83380400001)(6666004)(38100700002)(2616005)(186003)(66556008)(956004)(8676002)(54906003)(8936002)(66476007)(6496006)(170073001)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qkMy1F6WXy4Jt+fYdRViy+22hUkVWTGqPjTjvi0UNjwS3CuNx8imZiKDQdBv0nKL2LKqsXPUazkIsWzLYT7pOSYr/auK6ll7AG8r4t7fs6ekon8HK6zPkEbD6Ph4D6MrumgXa0pUamk1s6G+N2UuOLU+YV95WPuShA6MDaC6gBvBxKMye1NGaNU5fBEzGMgOygw8HFRDenq2VMWoO2GXnGOlkAiuqalSOoANhhWIGvhg7jr+rPPHJ/7aRZsrW9zXHj7eDoPtdlaRIE7YJCkACXsJW1o3DE5Zx9dtrsbGAEBWP+3lDPGSblPcZ7NkMCz+dOLdY4Ht5EzcEQzLoyuifJydD4p4O3qsQBTE7cjCNJp3ScY1+QbpN+fh/9ZivIihpiLqCSuS+tzQiw9c2M0dxLgt2hBjcjWuHlI+Zaqo6DOAfUtkuTQAugJiFLvZhDJCTe9UtcW/YbtWS/VDczJzxIUgpqVaHwi1kO9A6rdvvbTjQLF9BUwqx65dBGoTrbSanaAsoRGO4sq5YnRiXTSgiYfiaqcNVqmjdSR6UDYOagiWjWEQ2i98K9wPqQFc7v1XgXOWbqrKN0Y3NG5KGd8k1b3SF54LrP6Zb6ju1jORn7NMSrUf/cla6LV3lvMNjmoELqtjmIFeLn6eNYhjuT2gitZKdovTFhL3QILkRtsxQl4d/Xl8p0Kvc/c5HGbvFPh1qKO8f3Y99zGJjKMuepUiWmEkXxBND4cTnQsa3nMevZj5TODhAztH8pCdgAq9aX3IY6wOMgaIp8HpNQvYaXlEx6F+z7JcPXEKSi/rwFF5revJrkQ7p1G4OPFfpB+XJrE4z5zYIllaRPGNV94SsvvfjpBfzFuan/TYq7kohIOqHwz3ATdl8IW12dSQsJkupR7qb3oO1MHRxKz37aqdrDTY6iP0DVGFZ6Z7Lz4wjqkpJNZa4Xczfe9Z7cV4vcQae9u6AOyoHFPmvw4BBlXsjgTiD5+F+prQLaC1EHMyMoISzEJh3PF3dfrR/fUUyjQE70GQzXvW8EiguwpIsjlBmwa3taDhiVI3fOxByxKjXTMTAKAwiK/bTbfuphfako7mCm//g+0LT0qf6zoLqR9NSsEBtOWRZOy7UADgCr9al4jTWz3Ly5F7GpQjskYvXNZXrLlYbrpGQiBcnXeRUrvXLhf98oEn0Vf/oDhGpOk9RQEyWYC/cYxnlrbvijFQMf0zXaZMF/xONNQsfasXNmQOesa7O7Q5pB9r6yr3TKAX0xtU/sFpwhNOLKCTfvP6r/vRKz/We5wr2k3co0x1jK1s/ai4HNT4mVSB/LoUqsh7fnc/I2N+BbJCFFmJCsH1OTJgVSip X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2daaaf0d-c12e-4dce-3f3a-08d94135a852 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 10:54:56.5358 (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: 3rhUAi5DOPIhrp6MkXC3OHYDmlnQ87LWVD/LQk37t+u19zTjJIwAcSejaIw+7SS4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7007 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_H4=0.001, RCVD_IN_MSPIKE_WL=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" 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 Reviewed-by: Thomas Huth --- 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 11d9ce72aa..af1edb3e6e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -298,6 +298,7 @@ M: David Hildenbrand S: Maintained F: target/s390x/ 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 ba8f6a55ac..ef82e833b5 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 17edd4d13b..5506f185e8 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -261,6 +261,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);