From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655298690709.244582648803; Wed, 7 Jul 2021 03:54:58 -0700 (PDT) Received: from localhost ([::1]:41638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Cj-0003xK-FJ for importer@patchew.org; Wed, 07 Jul 2021 06:54:57 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?acJjvbEdhH9x1C1o+UPffuEfKTobfFd+a7jZ14k527JmmaDgZ3/KlxlRa4hn?= =?us-ascii?Q?lDwClNsgSom+o3zbH52Vy7Lw26k6UxcSqoItUo/eeV3ajl/n4ynLm1BKKYjB?= =?us-ascii?Q?FTgLKzDSudMWHhoxWi6pGYiBmnCBf/JuLTtFDq4ljx9WA5rXFdyJp+iCqTMw?= =?us-ascii?Q?HvpqOeKDSaR8I37DQcvHoWvo0VXzwKzwNHivaAACq4li1JJQN3Xil3U/gzRN?= =?us-ascii?Q?g0feWusn3ze7Y/ygblbkfrXnotxBYA+cCIAOSTJ49nRUyK/QDuUYWyDqpSMH?= =?us-ascii?Q?VZeEyvjpSUym7KWD5qbfuO/tH+xGD3v8umiIV/vJAngMWde8OtRljsdr8OcJ?= =?us-ascii?Q?YuIFfC+3JUblXX2HfJgPIWeK91P7Aoj3t9VGAOvwwivNYz2TjIbpf+oJd3NO?= =?us-ascii?Q?drTadJBhimAmLFdaz6mFmT8wZhjFnqATPXyqZe2BIVEJFj+G6DX7eqdwVLHr?= =?us-ascii?Q?z48WAu1XdpFGD/qQUWQpJ3O0v+sOm1DzK18tHcHqtaZmsjXuooSwgoaPHPaH?= =?us-ascii?Q?Gz9gcNKoGv+0D7nPk5zbcfi3lYYAyE7hRBiF78N7jZ2nv2ZbaV2FjPzYhjNE?= =?us-ascii?Q?mKAqBAmXNrKJ9BUPZNirTuUI53YG7QVM7hez+NeemJgS+67o/TxrpBUdVXVK?= =?us-ascii?Q?XeHGIwuxOxEPkSb8nQ5Y9WIsZiGNtIzPGWQLzM2GYYT4yvDpGpTwhl5oDlFx?= =?us-ascii?Q?vpuwBf9x+KuN7Ya7q9IQUmxU0xGmZj2ADDUwlLWuCtlRSbH9ZfGdMizaKK4I?= =?us-ascii?Q?wcFYYf9HRWFwRk2lh5Nj8DqzIIBnJqDW8WU/f30J9gtj/Z4mxQuWqcXdIIb6?= =?us-ascii?Q?A2VUrHKJv6EETiimua++d0nzzJ5fNk8QagSJ+wpNtxgnxCpmSLB4DDlcR6aB?= =?us-ascii?Q?HotQcple9gW7KsbFBOmDW/cW/ESi1ml+wAIDY1bWFBVyAGd0+AZUe7cWmS/T?= =?us-ascii?Q?3Dp/pgdb4WVH29GTn4iDaiD6pkWpTvz6UdgfbLjrNoVx87/EcpljsAD8tgYp?= =?us-ascii?Q?KOMdyT1L94kRUix2TxHHq3lSBZq33TqusuPUN+pCctscD4aHGTXESkpZDkmS?= =?us-ascii?Q?Ko/2RWp6kK7Tmw4ybfcbUD6l/rZE9AaF1/o+TkGVWS0wp3DOF1awIm78Scgd?= =?us-ascii?Q?jqSsYatyvMgvAkP2fwR3fK/GfN1dauLUIcDAMjQJMO3y+ty1Zwsp/WT4Dz77?= =?us-ascii?Q?yUhuElt2iIQMKMQYwLSE1xNOPruoynWxXRd1Oin8uTlUNdVNJt3fkPkkZ91k?= =?us-ascii?Q?ruwmFHJF1phunqk03Nzp06PXtZidkyO4KuNRTsRXav4wxuzFw1+ujzUzN6hz?= =?us-ascii?Q?aIOdsNktBayBDDAH42Ij5j14?= 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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655299525100001 Content-Type: text/plain; charset="utf-8" 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() =3D=3D 's390x' and cc.has_li= nk_argument('-Wl,--s390-pgs if_true: declare_dependency(link_args: ['-Wl,--s390= -pgste'])) endif =20 +s390x_user_ss =3D ss.source_set() + target_arch +=3D {'s390x': s390x_ss} target_softmmu_arch +=3D {'s390x': s390x_softmmu_ss} +target_user_arch +=3D {'s390x': s390x_user_ss} --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655423231992.484301378078; Wed, 7 Jul 2021 03:57:03 -0700 (PDT) Received: from localhost ([::1]:49882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Ek-0000vj-8p for importer@patchew.org; Wed, 07 Jul 2021 06:57:02 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?QGtVrR0aoogCCvKBuRpNdA1AQF1IE2oBzZN8a00DAxUFGyiWCBd4Mdm2EuUE?= =?us-ascii?Q?oehiwBTDDXphDVZl79Bm/nluzdVzcsyMVHTUZFTTjaVkCQpMUK9plTu1BYtt?= =?us-ascii?Q?n32FrpcPluC8yMSXkYLcFlJxq+h/XO37jxJ0chy/gVZgTiLDyuxqx/UZjMdO?= =?us-ascii?Q?l3aVl3QkwSKhtHn7DcywqD4NeV74h0Vk/57Tg8FENKKl58hwxzuHXpZnEeiD?= =?us-ascii?Q?+ciWutt1P3GFsLrds0jCYqhAd+IwozqsHvge6o+zmOQZe5vhzZYvgLOXgupM?= =?us-ascii?Q?FCfnqdWATf+oo3WjoVPSVOUlR1taJvt90/mg6/MKkY5M7iKVAj313SRGkL/l?= =?us-ascii?Q?2TMMy7xJf1lYfjbQ49Gq6Bk9kGTbKbIPyaFLsebxiU90NmoTL98CqA/xnuqU?= =?us-ascii?Q?eVcH9jR238OXGS+hrggzZUu1qeWQArzx0IuGm5GKDLLCqvNJre5Yq/VUrY8x?= =?us-ascii?Q?F5wPTzeRH8s2iiY8axhIekerWAcZ/8a5nAa4G+0Vjuc8ZmiyAAhWfxUxdUTS?= =?us-ascii?Q?uzVmiCKnj39shae6kh3591i+uEOqtv0oCLHEtchKBpEayvU1kvGb6bNWs0/t?= =?us-ascii?Q?jseDA7Qsj8gE3m6iNXUQCyA5EhMWKXjXVvwgDMuY+t9beV+ectXrU3s7gzei?= =?us-ascii?Q?NC9GhzCsSzonCIsj/eLPq/ErOji6vzsCXhrqaiwY0FQiFKkzdmXWnpX79Qqv?= =?us-ascii?Q?CCDJinHUjSR8b+XunpdVtbojRXVrp0O4k/I15UirG8FbQLuVCXH1JNQj3TzC?= =?us-ascii?Q?jUq9vG2unohod0sKb/1nDRmV5JwfM75OFdXJLY6GRJgo+ADFIdDPSjdBtKGA?= =?us-ascii?Q?NHgyZCzyqAOKDjmU2RUbJ3SEpe5Iv8Jp/rsQ5Zh0m5A5FFwOUP8ECvvvJREg?= =?us-ascii?Q?+1s5ew2U1D9eeRRKSnNvr619nrNKxq027+7GDV/ypchFnSE8hnjlDCjtX3Po?= =?us-ascii?Q?m2jwJ6vdbC52EDZf5CEwjZc6c5ekZ2JT83ydKE+HZukcrF1c66Fz9TzMmV72?= =?us-ascii?Q?TyXGs79Ww+fksfQV898Hsqa/r4e4GJUeLy+RwFp8J1FRd9lwDjucjqCd2YSm?= =?us-ascii?Q?OQbTAuXfd9djzBDrO0KSqeKHCY4r/uKtxbgOxhPQVDLQOpdWH0Vxb6F/iOEA?= =?us-ascii?Q?s7plE7ITaaJm7LeMpFmRzsHpeYasPsagSYEb7jKsGLDFd9TVgRHM7zUxT5sr?= =?us-ascii?Q?tH/8dUFshI2TjuX+IVdxGl6xs3AVqCFcVsW4l/uzMkexGbOKxv4+uZNLvBqR?= =?us-ascii?Q?xruoz9HgnExstBdFvcdu5pmD9/Hlx6Zrh/TaEHtJQrwaFG5iFFn4/IXNXWqM?= =?us-ascii?Q?ejpFBUqn6Y5bbY8ilbAgl/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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655423959100001 Content-Type: text/plain; charset="utf-8" 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 =3D> tod-tcg.c} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename hw/s390x/{tod-qemu.c =3D> 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 --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162565555698557.70562922205386; Wed, 7 Jul 2021 03:59:16 -0700 (PDT) Received: from localhost ([::1]:58614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Gt-0007RU-Ra for importer@patchew.org; Wed, 07 Jul 2021 06:59:15 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?Y077UdvQT2x1adflHcFdiVbJ8Keinu9UXViLmX5BiwGVFGgNRXZNzaomAAPV?= =?us-ascii?Q?YEaehWjq5tvi/vcpJox1edbFspwEWan11Pj63Tzl/cIL2MAraWSoLaXmurZM?= =?us-ascii?Q?nUNCoBHgou0+TAWo/PJc/77ydExTePvuK4fz71zDigH8OAKSFMOMRITn6A3X?= =?us-ascii?Q?j7c1O0iI0SH6CS6yR7FGW2/dC5h/gzTmuRqaCfyr2i3wxzpXRXHBRleHH7Ch?= =?us-ascii?Q?SRwtpkHd4mUO9fH8+JFe1B8FGcvIQA+I5EvSAtB742RMwl6md0u6WZlLynUF?= =?us-ascii?Q?/x9H+AjK9azf6GTYEPRBepiCpmzEzKKN9NpWlE0lAdZCC5Yj0PQP5b4o/zQc?= =?us-ascii?Q?3IWlpm4j3P0fkOtDS+HChKjEL0BiJz0KUw1RZr6Q3b0sshCiGiuTjObKDEZl?= =?us-ascii?Q?VumSR79A8eeYBbWPzxtLXnH8MHjpNd3VF0p0qusR37xQTj5+e7dJRFalTZwj?= =?us-ascii?Q?rP04wXiiFOnRtRzh/W0+aznAewO9yiCvCg8Et5PK3aOjwYXWcfBHmJd7NVKK?= =?us-ascii?Q?ihQiX12GkaguQwK5LIsVjT77EglDNfFqsyBBuK7oOueMzTxucfNsc/7tunBp?= =?us-ascii?Q?yXTprDsQQiscTYijh5nruoSaiaTJLGE/yqC0iW/Iaes0be9GIFLgw7QjOUd5?= =?us-ascii?Q?zKsRhDMJWIHl34I/YMffeBrw4y550vDx9ldqbQpaN1TCHcflNUyWxXUqMJdl?= =?us-ascii?Q?sFu/JclGW9yY4VwilhRKE0e2NBP8A1bsmiilZlhpfHaQUXqorRwJ8zrItDWg?= =?us-ascii?Q?WQSFPmaKO3wtbU5v30gPKaL+BmVgyJb3VxORms+JwHveSEGTtcxOPPKUmzbQ?= =?us-ascii?Q?oYH3xNWINBqGMnwIRFUVu647AzHY6GpU/Plv4lH5hfsCOjR2V0lrlOHvP2Ow?= =?us-ascii?Q?4PzNwR7R/JNlk0HMkIHt7zssYULZFGLOz4yGMduCrXsNHm2Z8Zia7DvFBpEd?= =?us-ascii?Q?siuko5GlcQDs/XcUqw3VgHFtXh+TLptQQ9LZ+BORwe8waEZcq7DG6RN32f0P?= =?us-ascii?Q?xGUGbkhqbLFFtxnoGcJs1gASHgxirCcZuyNTV9yoX1EysH7EYo3YSWqZqA6T?= =?us-ascii?Q?oSdutUyn8O47FTeijcqGHafl5IPZ+GMVzLy6cDO6FV2CT4a5cIGc3keMHKDd?= =?us-ascii?Q?En0/DMWHjOttWOYaCXAFoSNHftwclhyp2rZp0DQKGyZhn7Z2zbbE7EdqNitC?= =?us-ascii?Q?0t4GgH5UvdUUxfHdFxG3oqxGyGbzA670rj7vZousY8+XJRUcwWGWzqZEahtx?= =?us-ascii?Q?pF+ixHwEoGQeYlNK4PiDxlT7mqtZCR5ItVInhfsJqMmpo0UgRTIX54ntbixN?= =?us-ascii?Q?gS0ejgkOakH1eMncf1c5uRkI?= 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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655557309100001 Content-Type: text/plain; charset="utf-8" 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" =20 @@ -23,8 +25,13 @@ void s390_init_tod(void) =20 if (kvm_enabled()) { obj =3D object_new(TYPE_KVM_S390_TOD); - } else { + } else if (tcg_enabled()) { obj =3D 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); --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655704646341.97349989095983; Wed, 7 Jul 2021 04:01:44 -0700 (PDT) Received: from localhost ([::1]:38994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15JH-0004f1-IS for importer@patchew.org; Wed, 07 Jul 2021 07:01:43 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?VSL6LBRNY1zBHtTNsGJCqnOohETCGV6epwL1bJY0IeIhFZdThTGSun7zWbAh?= =?us-ascii?Q?0XvsLGaLvyBrtdgcmPxwAaeZGAnD+uS9AqPkIs8fQwBlNsDVh5xK7csBXt6e?= =?us-ascii?Q?4QTeDoKS2LPnuhPQFRjkdnGoJ5DGiceulfCFk82tTzbETghCMccjzn2oo7Ra?= =?us-ascii?Q?tpCMUU77rIuM7+83zm6tm6vfsMGxaACOyaRYtw9X/3/0hDg4RPIdJDB/uTB+?= =?us-ascii?Q?zZ+PKKmQsMcfb9AdnNW1W9UcF8gnglvHuUQfSnkxstsXll7yGRxt+cj9+WW1?= =?us-ascii?Q?NyLdNVb3VEhNLFjggv2GQOuT7v7zhn91eWlMQTQ2hbcUcisU5EFpQypaKwLP?= =?us-ascii?Q?eZcQyHlqhH87fGKc56HKjFjFquQlMhkP7UcRNLAL0BPACtYqzns2+in8YpQE?= =?us-ascii?Q?tYO1ExMzNnyycz4J7DoYucW+A8761HJhZZDKmTPD4s800gILwm60Chtyj4xo?= =?us-ascii?Q?9s80BZ4LiQc1PyAuPdh+jlD1agt90pmRA+lNEQigbdoIJ3ZRxMznxgBKCE58?= =?us-ascii?Q?GYi+H0pL8228PrEcF6AIIgNNwsZ3UoEx3VzgZhshSuAKwP79PiDU5k+3KohV?= =?us-ascii?Q?HT+QJ6V1TM+G5gctLl4KwH32iuBSavX7ZytFjpInukrDpyltlU6bYWEb/ibX?= =?us-ascii?Q?d8n72EOIpJniJs9ODQgGAvRjafqSQZMXSrmq45bKLc5QNnY3teXowXVKl7Kc?= =?us-ascii?Q?Vp9dtwHcQkNwqTMeZZo3XIuSnNWXRvrob3gm1rA+30AhtIfiyya/qdsbyQSQ?= =?us-ascii?Q?OTRlQLOFiWzpiMrAgsJTrwPi7ikexbiAv0nN9oB1O3LZ5UdAAIQ6sRtdrhJV?= =?us-ascii?Q?ph18UL2QeVLdDV71J8kixGTxtQIVQMQ7OVyzjl9bV/+JZY1YLeyAohaI/dsG?= =?us-ascii?Q?4qqPuFs8ZJcV8A41DorE90lzsJ/mQo4vA/DqQ3wPoGYVPS0WJAwuD92yrZLn?= =?us-ascii?Q?+hEhRFq9Ul43+gt3kPmskcJ0QfxBvCprV5YMaKQm148Q+QdjyJ3nMPeS1U6Q?= =?us-ascii?Q?CTwNKg5luI9EsaK0hscZcJN0Ho2ruqjsRBQoXP2KQ3eWkpu63vYNIBZ3XTAD?= =?us-ascii?Q?LGPbRW2mzb0aMwh32yLMG98AYtLT2SGO+ysoMvKhHXNDdilWORwsWpHxyvUp?= =?us-ascii?Q?IGsbKGc9xiv4q3V6G/awq9skdWMkpnpUtuKxLk+7aGTTqcD5AztJNOEiI9jb?= =?us-ascii?Q?3IJv/Z6se21l3HlZDYPkDV0YEeg7lMEsNZTfF63qYcHn3CXqs+tpP9wHTfv3?= =?us-ascii?Q?WlOH8MRDmha1FBFj70P/ERgoJBrol2hS0Kh2KWaL8YzAza8wHbrl6kzQxMOq?= =?us-ascii?Q?Jy2T/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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655711427100001 Content-Type: text/plain; charset="utf-8" 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-c= cw.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')) --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655424252680.9244565958054; Wed, 7 Jul 2021 03:57:04 -0700 (PDT) Received: from localhost ([::1]:49988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15El-00010Y-8U for importer@patchew.org; Wed, 07 Jul 2021 06:57:03 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?FdjcipbrTHEOJ8EKp6CJ0VlfOsBeFQd+idyE1y0UyAiSrGbCjiwlBj7ltwHe?= =?us-ascii?Q?nACqFSoAbD+Kv92Mu8Kvdg6PbRTn4MAbdVApFgxBOMKESjpohDsR2ePVKmfH?= =?us-ascii?Q?L6cbiXDNwRV4/VkJPDVxxh3t7+6OUvl1Q0KwDDdEs11koPXP4PqIpOSCHric?= =?us-ascii?Q?6wqn8oxdfnYCfVKsnlv3/mufjLG741DOrDwPUiR1B8xvXGy1HgxcNIzVFj3U?= =?us-ascii?Q?aocSIPSdokHZ5zd6HrJEhyoRnn762LvutWkKiZ9T0GX+BTJNjHTlPb/SBkpk?= =?us-ascii?Q?N7RKuIHFX0ry6MeQ2p2InPpsT/j4BPyKdTlEnu9juKkT2EvPIn8rVbO6yEx6?= =?us-ascii?Q?T2vZVUrbaoOUZv8nmLVRgDYHN8STLVXXqKpoDUDE+UTpzF2oH210+cw/1nY3?= =?us-ascii?Q?Vxj3F5PwsvMQPQp3MxzIVfm5gQ29PyKSVIHZN/0jepP2sTqIExjsCj/OLGKV?= =?us-ascii?Q?Jq0szD7E3aLEs23iE8ol/SPgrCIR/85djkeCporWAVOfPZ5FyatnixBMT9dl?= =?us-ascii?Q?lA2hfg1JzwpPSfQ8oSjs+QqUmQg+n5fceuGNfr9HI5hD+yrQUbrwWDlfOBa4?= =?us-ascii?Q?OwJu5VzTdDeezrRV67ycQpk/Aa3i2RuwdAQaCrIWWWx0U4UOS7Ldn/C1kENG?= =?us-ascii?Q?oTf0fGgC3hg/uIfFnjs0+pUU10oA6e6u98HU6xt9ypy4DBK3TF3cl6JlfIST?= =?us-ascii?Q?OwJ7ycmUyCdZfOo/ouGF6WI3967pbL0aHzNzqav6t2x73jd2wYy9bXq42vcT?= =?us-ascii?Q?klVDQiwvPm74sazZgI28OqvoEmeTg6HN8WdyH2sT9a/8dhU6k6/a71Pou8xs?= =?us-ascii?Q?5JSNvvopdjyULy5GSXbK6yQoyu6I9i14oqAPlDICa52a+jinxexSCVcikF2e?= =?us-ascii?Q?J6j9LokGrquTwBJ32LB5H341e69VZfCBtE/Vg/tVuNVsvRF8aDV6YrOSSH6/?= =?us-ascii?Q?Mg3xxF4yEtoKVVFVgjm1BM2gja/rBHiq4sEaeodFPs1XwHRd6tucSmCQmLvX?= =?us-ascii?Q?2JJRCj2wwo1D245GZEtnYoRTlmVJLzO9bzNOlFB/f6W9nMICZaoTMbeUQH9p?= =?us-ascii?Q?c2TtoEn26YZtRYCv2EKhs+PrsYAaVayxySBxfeWFDC0AnVY/UXIOfoiOgLCm?= =?us-ascii?Q?ziO8Q5oyNTNqllWGipoTsVGK+81hRdHxM8xj0q9m7wyswq5lbFi74jf3fPrL?= =?us-ascii?Q?5GiAGMfTBCpiye+AVSgmmFXHmp8iytjogkcqYDe7yi1kF7eFxJ2XiYxf00d9?= =?us-ascii?Q?OkmVwMjJ0VCZrLvtBsg3qRC0a7XaBHCzHCIy72qJNO9YfavtEArlBFy7FBwk?= =?us-ascii?Q?O1FaydKTr1FR/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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655426052100003 Content-Type: text/plain; charset="utf-8" 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')) +)) =20 s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files(= 'kvm-stub.c')) =20 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 late= r. - * 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 dx= c, - uintptr_t ra) -{ - g_assert_not_reached(); -} --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655558480292.26709296203853; Wed, 7 Jul 2021 03:59:18 -0700 (PDT) Received: from localhost ([::1]:58672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Gu-0007TX-SX for importer@patchew.org; Wed, 07 Jul 2021 06:59:16 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?4VJ+SRJ/HCGp3JQWaMe1O6HE4hnGTW7LMMBIFut51Ri0bGgyD1CAIkLBisUW?= =?us-ascii?Q?s2rjQv/kfg0Za8PkByzkq1HxbvnmtcWRdK93kEbziICXSqGpq8ZdhcDxlZ61?= =?us-ascii?Q?FBYBPdwtZ4A4MAEyFBpBAJbg2aMFCd/FBnYUZQBqpzZd6Y8/DFG3N9AzzIM6?= =?us-ascii?Q?46+gVOI3KWt86YD5HtUwgfOV8jtN1w/Pxc3AgwWEL2ctDBHg/7G4nI6fUrCN?= =?us-ascii?Q?p8gaa+hCfzWRZ5otST0BE9ISXNXUW3hp7BKfh/AeBsYn1KZX3D6vM6QfcGX0?= =?us-ascii?Q?Ilg4hrNdb6xgQ8fcJnRd9hIn/GgRYZa8kPePd4XG8ST5XpTvIcPqIAgD/NnD?= =?us-ascii?Q?NEotvULwQxsa22bFtEtJQ0VPg+pG24HK+g3WDGrkDnLCDm7JwIarrndzRQcX?= =?us-ascii?Q?9XaM/Nk9SwfssRCiolQdjeWQ6hGv+4BUyEWyu+BwaEL1cuTn82orPKN0yxD5?= =?us-ascii?Q?qtp2pfpNGSl+yOhu64EMUxHocFBuTuhJ58p6YyO23v0nK7wTG3cD9rlDDWmI?= =?us-ascii?Q?NB/fs76hxeTkLFcXTGbgJCAFv4pIehD99yMy5A2yzs9v+Xx64IdHnu/V8UAq?= =?us-ascii?Q?VzJ/TCnIHzGS4MwBN7nlDbtMZb4r+bxynUVRnT0N2x0NNK44bUAdNdhxqTYr?= =?us-ascii?Q?j5uINcBk8Ov3NQW8LHzWc1CSqShR2/s5Z/p2NP5VRVa3bQ7HfJvkmCgfNOv6?= =?us-ascii?Q?om4LzGd202g3sN14y70Gu4S5SN+qto/KJCFHxwZNzY6DZ6+FaAD0XolBOcvL?= =?us-ascii?Q?UkU+CWFBjSToMjXalPoDoCvlsXx963iQFs0Cjw7TfmnRYRyd+by5xm6vJgT1?= =?us-ascii?Q?2tgmGMtxaGdcfRkAfZo1RKtqiLF72nlNjyMs9ZuKIc0TEBAN7PIqroOY79NI?= =?us-ascii?Q?qUAL4lU/r6/SFyY632ju4zlhsw8y2rXr6cDl619OlAGhMDamOd9IhPxwtT8B?= =?us-ascii?Q?VA5F+2ADj/4bViV28h5ugorzilsBT+6NxrKFygIRr/hjsH6NA6OyVWM1PaHO?= =?us-ascii?Q?T+TJYY364AETade+KNmo7RMsWeddpBDO2BVg6AYdM6UeFit+jwpNKFkQXVSF?= =?us-ascii?Q?YLesVtezmJO41rJy20jjJADApRUXqnvWI7AIbD/WINbWDxfGPNAY99Kg4he/?= =?us-ascii?Q?ZPEzGZuDpC1oSFfiJXtegxlyUltpAYNne2JIRwnhLCyDpobD9SW1SCM57Ibk?= =?us-ascii?Q?4gw/xzPnNqZdFzVfUFAET44gI7qdpw0pc3JwjW30y9o2K5IocXOVIik7C4GH?= =?us-ascii?Q?Nz7Pi2uzGc+3oolA0EivAy4FBDRqx2eMtnW/EpTSy7n427ea36EFDVjx+X2Y?= =?us-ascii?Q?MoBrulZQI3EQfq2b2jA8M5tV?= 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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655559508100001 Content-Type: text/plain; charset="utf-8" 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 =3D> 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 =3D> 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 @@ =20 #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "elf.h" #include "sysemu/dump.h" =20 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 @@ =20 #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 @@ =20 #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 @@ =20 #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 @@ =20 #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 @@ =20 #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 @@ =20 #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 @@ =20 #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 @@ =20 #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 @@ =20 #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" =20 #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 @@ =20 #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 @@ =20 #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 @@ =20 #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 @@ =20 #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 @@ =20 #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_hel= per.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" --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162565534474971.87943183356742; Wed, 7 Jul 2021 03:55:44 -0700 (PDT) Received: from localhost ([::1]:43936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15DT-0005TD-Le for importer@patchew.org; Wed, 07 Jul 2021 06:55:43 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?j05OktT+T7jqo/x60pQnTdqRVC+M7GeETS0EM7B8S9ctzndMJhvRLMJB2+3C?= =?us-ascii?Q?osnZ0EC1fciX9C50QaGu4DSnkkaSpTXEGOL1gBmfVmjTdgwRgwE1YYYhRLV/?= =?us-ascii?Q?6OTxN6q7oZbKo8GTA6zriWywJppUx3LHneOphGW5vW9QPxIfbF0wEeNoIiDc?= =?us-ascii?Q?rb9gHfTb93FfNv/1y7xHQrJdwMkFyu3m0Yv+tHnNnG7SpHNp5gKWBwi9lGG6?= =?us-ascii?Q?NMsGQ3GWC3AUoySj/nKvAv9hza+a0R0Jij8cMbE+BfIge4Inb+B/WhWzQDUM?= =?us-ascii?Q?piRY8HsM+qk3pBlMtyHGdLEmWj7R+7n/VhPPgJDN1SclzNdl8rt3Bqiw6FCF?= =?us-ascii?Q?YVz126YtbvXC5VaAJnT7+8CNR1OKCO5GYOX0kGkBq9fhN44XrEn9tK03hgmC?= =?us-ascii?Q?kIxCw21tzbHaBsNaJZphaLXDPweL/YE5HbrzKi3aqNfzX0CyVKkS7pAMdGCE?= =?us-ascii?Q?jV7OsNL6CZN5Lh6E2i2qPodrzvQy1p/o6G5s8ojdlqlqDeNuEyBSWMhjrFZ0?= =?us-ascii?Q?IAsu2sRxAHRPPNCb8Kf9iSwGT911gPDL1TVn1jB7V0hS2VVbPKAeLjM/sQ1M?= =?us-ascii?Q?C3uvRHyd7ySiHGG/KxGTaMmt6k/3ojeHcuiCd/BheOajGyXkIfERcDk8AIKr?= =?us-ascii?Q?a6UWHFbPxskM7u/9ZeqWECP3uydADxiJ6g6/s2CqgtNn6WOsXWK9tPXttPBU?= =?us-ascii?Q?nJIo+ZHTBy/xa3QnHKEVH+zoX/HFMMwa7i4Z4dhESGMc/BFtOzTGA8kOdfGB?= =?us-ascii?Q?XVOo47QZ31JStiJyFDVinYwwCrYs4uQA/JETwy9ZZEwEiPFfYWo7RXexpmxr?= =?us-ascii?Q?25C5QH02PEN+EnYAgEYSQGY6ygCenI4oLg05IWohWYRvesV6xZyxqSYyzSum?= =?us-ascii?Q?4Dx6NXdm6/an4Pn2HdkHXWPLw+fvBIxhRRDGn/AaO3CjUxjtv1vgyV7S70j3?= =?us-ascii?Q?9wUTIHZrYC5QmYza0nqpAtF8Krk90C5QpYO1wCju6tux/eWP5fd8pteub19O?= =?us-ascii?Q?6qLVi8FcEIkp5UgNyqvdI+1RVZZouZVri5CN1g8Zc9jzJ4MpdJkyvoe5u3/R?= =?us-ascii?Q?2vPWJ47FgFwh2yFvvG4DPB4CyBc1zplqTLt5q9i8yrLL/zKQuYmm8fpIkqgs?= =?us-ascii?Q?7qt3sFhZnVSfXzZtzSZqpMNmWSNFh/Lr6+5YHAM8utSnZwmkKg9SmtG4nWxE?= =?us-ascii?Q?MojkL9k1ZHs8gP5LUFZArGf0SSGxcB/EXdmT/pzcCBg6LQgFtiZ/mjDIvMQ6?= =?us-ascii?Q?c4x8PRpU+60bni4tLEo0c2f48oy0ExUTXp8UwaoewA/jVAdtQNMrEGnN7+X4?= =?us-ascii?Q?h9HNbLPNAVbfjDthAsdbLwe2?= 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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655345127100001 Content-Type: text/plain; charset="utf-8" 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/{ =3D> tcg}/cc_helper.c | 0 target/s390x/{ =3D> tcg}/crypto_helper.c | 0 target/s390x/{ =3D> tcg}/excp_helper.c | 0 target/s390x/{ =3D> tcg}/fpu_helper.c | 0 target/s390x/{ =3D> tcg}/insn-data.def | 0 target/s390x/{ =3D> tcg}/insn-format.def | 0 target/s390x/{ =3D> tcg}/int_helper.c | 0 target/s390x/{ =3D> tcg}/mem_helper.c | 0 target/s390x/tcg/meson.build | 14 ++++++++++++++ target/s390x/{ =3D> tcg}/misc_helper.c | 0 target/s390x/{ =3D> tcg}/s390-tod.h | 0 target/s390x/{ =3D> tcg}/tcg_s390x.h | 0 target/s390x/{ =3D> tcg}/translate.c | 0 target/s390x/{ =3D> tcg}/translate_vx.c.inc | 0 target/s390x/{ =3D> tcg}/vec.h | 0 target/s390x/{ =3D> tcg}/vec_fpu_helper.c | 0 target/s390x/{ =3D> tcg}/vec_helper.c | 0 target/s390x/{ =3D> tcg}/vec_int_helper.c | 0 target/s390x/{ =3D> tcg}/vec_string_helper.c | 0 25 files changed, 21 insertions(+), 19 deletions(-) rename target/s390x/{ =3D> tcg}/cc_helper.c (100%) rename target/s390x/{ =3D> tcg}/crypto_helper.c (100%) rename target/s390x/{ =3D> tcg}/excp_helper.c (100%) rename target/s390x/{ =3D> tcg}/fpu_helper.c (100%) rename target/s390x/{ =3D> tcg}/insn-data.def (100%) rename target/s390x/{ =3D> tcg}/insn-format.def (100%) rename target/s390x/{ =3D> tcg}/int_helper.c (100%) rename target/s390x/{ =3D> tcg}/mem_helper.c (100%) create mode 100644 target/s390x/tcg/meson.build rename target/s390x/{ =3D> tcg}/misc_helper.c (100%) rename target/s390x/{ =3D> tcg}/s390-tod.h (100%) rename target/s390x/{ =3D> tcg}/tcg_s390x.h (100%) rename target/s390x/{ =3D> tcg}/translate.c (100%) rename target/s390x/{ =3D> tcg}/translate_vx.c.inc (100%) rename target/s390x/{ =3D> tcg}/vec.h (100%) rename target/s390x/{ =3D> tcg}/vec_fpu_helper.c (100%) rename target/s390x/{ =3D> tcg}/vec_helper.c (100%) rename target/s390x/{ =3D> tcg}/vec_int_helper.c (100%) rename target/s390x/{ =3D> 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" =20 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 =20 #include "hw/qdev-core.h" -#include "target/s390x/s390-tod.h" +#include "tcg/s390-tod.h" #include "qom/object.h" =20 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" =20 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', )) =20 -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')) =20 gen_features =3D executable('gen-features', 'gen-features.c', native: true, @@ -60,6 +45,8 @@ endif =20 s390x_user_ss =3D ss.source_set() =20 +subdir('tcg') + target_arch +=3D {'s390x': s390x_ss} target_softmmu_arch +=3D {'s390x': s390x_softmmu_ss} target_user_arch +=3D {'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_v= x.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_helpe= r.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_helpe= r.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 --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655476804172.82411549973915; Wed, 7 Jul 2021 03:57:56 -0700 (PDT) Received: from localhost ([::1]:52652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Fb-0002lM-Nc for importer@patchew.org; Wed, 07 Jul 2021 06:57:55 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?/zrUjyCtw1Kd6ePZ2e4L6AabPOP6ePV99zOFMGGgOxeLc438jzprY2uiKYUf?= =?us-ascii?Q?bYw7Pp3Hi2IipQPRiVpxlupGlPGG9yVkn3fvejC8zNYksj+gAmJ1VWmzbjSu?= =?us-ascii?Q?9iOZU6yxsql21RK90yHowrVLeuhFUOkRAalYQCl1RiO6NOSxbfQU3+3xn9KH?= =?us-ascii?Q?aw4bnRYtL05cFGgC0e9HZJodP4rhFP7r5sNNDkWNQpgurBHifrlyx6AkWM3T?= =?us-ascii?Q?G+KZ3BWKBZcgU/Dj3yfrb+qiAuwc+mPw4NqXlETndkFPTHi0tVsGlf9u3qQL?= =?us-ascii?Q?m6/WJoXYUsHf/XvaJfPp78Nak9JBZEotXzvLfCxE6EfClIUAKiiTMRbe9HKC?= =?us-ascii?Q?xKWgEzSI2m5dOBRa+OiN4q7e1sSW++2yuuI04QrjuVSXJHJFXSQU49mB8R8a?= =?us-ascii?Q?qzkMoipSl1JLmhCv9l57vZbbO6S8nznBIO2c9VE9GOVeAXgJ0ZXclQCTUy9l?= =?us-ascii?Q?AUsXDV0L/rFgPwV8om/U7U2b3gxyfYB1L5+0unpU6PPtUYfz3ru1Ug41Yxjq?= =?us-ascii?Q?uJM/o/wjV6NKq6tEa2vs77dydL+cgXtvbx2IMnSYiI7/caKW7HVwtgTRd+3y?= =?us-ascii?Q?KdBtcqUoHdph1LQT0q+QFB4UzpM95DbDKr4zzuPgnaH1Xdw6dPKBfC4KUDer?= =?us-ascii?Q?lJigZ1TPU1vYGGzUkaetmdT2DhRPP+ukBaLbvhNmasf1ZZaysu5U9Pcq9mRB?= =?us-ascii?Q?grQpLDb2pNXDfVvya88EI/1HZJP0ScnZBZ22OCakNfpmTaW1gShIlo8GJ5ih?= =?us-ascii?Q?pbDiwyy14PWoq+Ka7Kpjb2sCGHhjW+lsVTQBNR/1brBv5+adMEtgZfpFARLl?= =?us-ascii?Q?BrINfgGGaiqwDD2J9cdyU5YwIX75GHcdfZ8FSfC0OWAbOD1T3NPx0xfarRcq?= =?us-ascii?Q?dV2gL2jG6Od5WvSwQYlwFfm+33BbLimfYXLS8B/PO/pw9djWk/CjWm87MMwe?= =?us-ascii?Q?UgCOleY/pKpCMskhAoEzJACrof1oU6hHmTjCgVru+CJOEp1TfVGykRv6YBVP?= =?us-ascii?Q?bVj7lZTzjVuJ7j3erBWQ4BIcbM6HMT1wVO/wyCpkgsVpIsgqjktkf17viXSN?= =?us-ascii?Q?DsQ9nCX24o3Zd8RGga/Ysi7MQQmqZvtqCPzIbs3tyFS9SAGti1rPYftC2NtL?= =?us-ascii?Q?Fgn7mYvyLPwB8n16GJasHSJ9TQb8FkMZyY6wRqHgWZySOVvjc5D6xeD/LqWp?= =?us-ascii?Q?Phf20B0gPcH90oIC2D5TpvFWe+8bZiOV/HdbShTMA9/eP2VG/Zz3rTEtCoNU?= =?us-ascii?Q?8qfxpL/bXTkM0t9RDQmLeYVxal4Giu3tSJOhHcdjKdj7k+crqaB+ySX+H5C4?= =?us-ascii?Q?vjezv65JZrJyXQS43uavV0np?= 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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655479542100001 Content-Type: text/plain; charset="utf-8" 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 =3D S390_CPU(s); + uint64_t spsw; + + if (!s390_is_pv()) { + spsw =3D ldq_phys(s->as, 0); + cpu->env.psw.mask =3D 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 ^=3D PSW_MASK_SHORTPSW; + cpu->env.psw.addr =3D 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 =3D 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 =3D S390_CPU(cs); + + cpu_synchronize_state(cs); + panic_info =3D g_malloc0(sizeof(GuestPanicInformation)); + + panic_info->type =3D GUEST_PANIC_INFORMATION_TYPE_S390; + panic_info->u.s390.core =3D cpu->env.core_id; + panic_info->u.s390.psw_mask =3D cpu->env.psw.mask; + panic_info->u.s390.psw_addr =3D cpu->env.psw.addr; + panic_info->u.s390.reason =3D 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 =3D CPU(obj); + GuestPanicInformation *panic_info; + + if (!cs->crash_occurred) { + error_setg(errp, "No crash occurred"); + return; + } + + panic_info =3D 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 =3D CPU(obj); + S390CPU *cpu =3D S390_CPU(obj); + + cs->start_powered_off =3D true; + object_property_add(obj, "crash-information", "GuestPanicInformation", + s390_cpu_get_crash_info_qom, NULL, NULL, NULL); + cpu->env.tod_timer =3D + timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_tod_timer, cpu); + cpu->env.cpu_timer =3D + 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 =3D S390_CPU(dev); + MachineState *ms =3D MACHINE(qdev_get_machine()); + unsigned int max_cpus =3D ms->smp.max_cpus; + + if (cpu->env.core_id >=3D 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 =3D cpu->env.core_id; + return true; +} + +void s390_cpu_finalize(Object *obj) +{ + S390CPU *cpu =3D 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 =3D { + .get_phys_page_debug =3D s390_cpu_get_phys_page_debug, + .get_crash_info =3D s390_cpu_get_crash_info, + .write_elf64_note =3D s390_cpu_write_elf64_note, + .legacy_vmsd =3D &vmstate_s390_cpu, +}; + +void s390_cpu_class_init_sysemu(CPUClass *cc) +{ + S390CPUClass *scc =3D S390_CPU_CLASS(cc); + + scc->load_normal =3D s390_cpu_load_normal; + cc->sysemu_ops =3D &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 =3D 0; + + CPU_FOREACH(cpu) { + uint8_t state =3D S390_CPU(cpu)->env.cpu_state; + if (state =3D=3D S390_CPU_STATE_OPERATING || + state =3D=3D S390_CPU_STATE_LOAD) { + if (!disabled_wait(cpu)) { + nr_running++; + } + } + } + + return nr_running; +} + +unsigned int s390_cpu_halt(S390CPU *cpu) +{ + CPUState *cs =3D CPU(cpu); + trace_cpu_halt(cs->cpu_index); + + if (!cs->halted) { + cs->halted =3D 1; + cs->exception_index =3D EXCP_HLT; + } + + return s390_count_running_cpus(); +} + +void s390_cpu_unhalt(S390CPU *cpu) +{ + CPUState *cs =3D CPU(cpu); + trace_cpu_unhalt(cs->cpu_index); + + if (cs->halted) { + cs->halted =3D 0; + cs->exception_index =3D -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 !=3D cpu_state) { + kvm_s390_set_cpu_state(cpu, cpu_state); + } + cpu->env.cpu_state =3D 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, assig= n); + } 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" =20 @@ -72,33 +62,6 @@ static bool s390_cpu_has_work(CPUState *cs) return s390_cpu_has_int(cpu); } =20 -#if !defined(CONFIG_USER_ONLY) -/* S390CPUClass::load_normal() */ -static void s390_cpu_load_normal(CPUState *s) -{ - S390CPU *cpu =3D S390_CPU(s); - uint64_t spsw; - - if (!s390_is_pv()) { - spsw =3D ldq_phys(s->as, 0); - cpu->env.psw.mask =3D 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 ^=3D PSW_MASK_SHORTPSW; - cpu->env.psw.addr =3D 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) } } =20 -#if !defined(CONFIG_USER_ONLY) -static void s390_cpu_machine_reset_cb(void *opaque) -{ - S390CPU *cpu =3D 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 =3D bfd_mach_s390_64; @@ -191,9 +145,6 @@ static void s390_cpu_realizefn(DeviceState *dev, Error = **errp) { CPUState *cs =3D CPU(dev); S390CPUClass *scc =3D S390_CPU_GET_CLASS(dev); -#if !defined(CONFIG_USER_ONLY) - S390CPU *cpu =3D S390_CPU(dev); -#endif Error *err =3D NULL; =20 /* 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) } =20 #if !defined(CONFIG_USER_ONLY) - MachineState *ms =3D MACHINE(qdev_get_machine()); - unsigned int max_cpus =3D ms->smp.max_cpus; - if (cpu->env.core_id >=3D 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 =3D cpu->env.core_id; #endif =20 cpu_exec_realizefn(cs, &err); @@ -228,7 +165,7 @@ static void s390_cpu_realizefn(DeviceState *dev, Error = **errp) } =20 #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); } =20 -#if !defined(CONFIG_USER_ONLY) -static GuestPanicInformation *s390_cpu_get_crash_info(CPUState *cs) -{ - GuestPanicInformation *panic_info; - S390CPU *cpu =3D S390_CPU(cs); - - cpu_synchronize_state(cs); - panic_info =3D g_malloc0(sizeof(GuestPanicInformation)); - - panic_info->type =3D GUEST_PANIC_INFORMATION_TYPE_S390; - panic_info->u.s390.core =3D cpu->env.core_id; - panic_info->u.s390.psw_mask =3D cpu->env.psw.mask; - panic_info->u.s390.psw_addr =3D cpu->env.psw.addr; - panic_info->u.s390.reason =3D 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 =3D CPU(obj); - GuestPanicInformation *panic_info; - - if (!cs->crash_occurred) { - error_setg(errp, "No crash occurred"); - return; - } - - panic_info =3D 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 =3D CPU(obj); @@ -295,169 +194,12 @@ static void s390_cpu_initfn(Object *obj) =20 cpu_set_cpustate_pointers(cpu); cs->exception_index =3D EXCP_HLT; -#if !defined(CONFIG_USER_ONLY) - cs->start_powered_off =3D true; - object_property_add(obj, "crash-information", "GuestPanicInformation", - s390_cpu_get_crash_info_qom, NULL, NULL, NULL); - cpu->env.tod_timer =3D - timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_tod_timer, cpu); - cpu->env.cpu_timer =3D - timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_cpu_timer, cpu); - s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu); -#endif -} =20 -static void s390_cpu_finalize(Object *obj) -{ #if !defined(CONFIG_USER_ONLY) - S390CPU *cpu =3D 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 } =20 -#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 =3D 0; - - CPU_FOREACH(cpu) { - uint8_t state =3D S390_CPU(cpu)->env.cpu_state; - if (state =3D=3D S390_CPU_STATE_OPERATING || - state =3D=3D S390_CPU_STATE_LOAD) { - if (!disabled_wait(cpu)) { - nr_running++; - } - } - } - - return nr_running; -} - -unsigned int s390_cpu_halt(S390CPU *cpu) -{ - CPUState *cs =3D CPU(cpu); - trace_cpu_halt(cs->cpu_index); - - if (!cs->halted) { - cs->halted =3D 1; - cs->exception_index =3D EXCP_HLT; - } - - return s390_count_running_cpus(); -} - -void s390_cpu_unhalt(S390CPU *cpu) -{ - CPUState *cs =3D CPU(cpu); - trace_cpu_unhalt(cs->cpu_index); - - if (cs->halted) { - cs->halted =3D 0; - cs->exception_index =3D -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 !=3D cpu_state) { - kvm_s390_set_cpu_state(cpu, cpu_state); - } - cpu->env.cpu_state =3D 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, assig= n); - } 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); } =20 -#ifndef CONFIG_USER_ONLY -#include "hw/core/sysemu-cpu-ops.h" - -static const struct SysemuCPUOps s390_sysemu_ops =3D { - .get_phys_page_debug =3D s390_cpu_get_phys_page_debug, - .get_crash_info =3D s390_cpu_get_crash_info, - .write_elf64_note =3D s390_cpu_write_elf64_note, - .legacy_vmsd =3D &vmstate_s390_cpu, -}; -#endif - #ifdef CONFIG_TCG #include "hw/core/tcg-cpu-ops.h" =20 @@ -515,9 +246,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *= data) dc->user_creatable =3D true; =20 device_class_set_parent_reset(dc, s390_cpu_reset_full, &scc->parent_re= set); -#if !defined(CONFIG_USER_ONLY) - scc->load_normal =3D s390_cpu_load_normal; -#endif + scc->reset =3D s390_cpu_reset; cc->class_by_name =3D s390_cpu_class_by_name, cc->has_work =3D s390_cpu_has_work; @@ -526,7 +255,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *= data) cc->gdb_read_register =3D s390_cpu_gdb_read_register; cc->gdb_write_register =3D s390_cpu_gdb_write_register; #ifndef CONFIG_USER_ONLY - cc->sysemu_ops =3D &s390_sysemu_ops; + s390_cpu_class_init_sysemu(cc); #endif cc->disas_set_info =3D s390_cpu_disas_set_info; cc->gdb_num_core_regs =3D S390_NUM_CORE_REGS; @@ -546,7 +275,11 @@ static const TypeInfo s390_cpu_type_info =3D { .instance_size =3D sizeof(S390CPU), .instance_align =3D __alignof__(S390CPU), .instance_init =3D s390_cpu_initfn, + +#ifndef CONFIG_USER_ONLY .instance_finalize =3D s390_cpu_finalize, +#endif /* !CONFIG_USER_ONLY */ + .abstract =3D true, .class_size =3D sizeof(S390CPUClass), .class_init =3D 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', )) =20 # 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, u= int64_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) "W= arning: Unable to set cpu %d state %" PRIu8 " to KVM: %s" kvm_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamat= ch) "fd: %d sch: @0x%x assign: %d vq: %d" =20 -# cpu.c +# cpu-sysemu.c cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PR= Iu8 cpu_halt(int cpu_index) "halting cpu %d" cpu_unhalt(int cpu_index) "unhalting cpu %d" --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16256556092603.3972363546453153; Wed, 7 Jul 2021 04:00:09 -0700 (PDT) Received: from localhost ([::1]:33218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Hk-0000sE-4P for importer@patchew.org; Wed, 07 Jul 2021 07:00:08 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?czKCAI/7pn4mviDYZAA4ljkau39lM2baYkgbOwCHrKhGlcm6iFeku6qrqs0U?= =?us-ascii?Q?6x+SbAIFVB+NvcntecSurpCzQVySUrtu1XXOTuFPoKWQTe+jxThB6hn+kGQM?= =?us-ascii?Q?fs6cEePt+gxlnsCoFtqoClLSry7TE9swp498+oLrVdNs8Bb1aoqf0E53d0eC?= =?us-ascii?Q?HfQzckd7G63bM2mVqHu9IuiiQkvdyL4iDGwXjBAHFKbAewCG//1ULODhAaLD?= =?us-ascii?Q?4VlzaPOzhUpgS9kmtn3nV5ySVV0FTFmyUxGugzf5xNlOUArBTe3YAxa4vOph?= =?us-ascii?Q?7zQeQ6vE9iGq1cnT50xv4F4WK/62nT6JU/cIaFdVojz9v+fcye//4XtkZrAl?= =?us-ascii?Q?AKFlwby0zTqs9yotjLXsUBZn811yzTd6j87YwVoqDnkDtlIgXKSBPaQeQkLv?= =?us-ascii?Q?ETCYRNWYzKIMeawVmUoJZ94WuniLi4uINR78e1NnxMpKmUoVSXCSDtWtAhJN?= =?us-ascii?Q?26dxg5Z81ybJYcZ2ej7rb66mXXgoDCJ94/16knteZ+shr5HUSqXnXI4QOoif?= =?us-ascii?Q?3GFTa551Yitkjo8HwCXtAhiexmjLQz2y3YPks1JuIF9WzX5rPnEVxOVitKNs?= =?us-ascii?Q?fnmhSagSSN+5evi0NfNNidjATMcYipZc/880S1PlRpWsSeCSjtWe99OLVx2b?= =?us-ascii?Q?zaleMl7BYTA6QlhK8HytjWNsAtiZi4ldNN+bOmfTQjc2nSEDLbKY+VM3JMhR?= =?us-ascii?Q?6mDl7QEPwkdsk55fX+4C0TrRWhumscZrrI41zspWZiA9mCEU8kVSA6g4HQ0t?= =?us-ascii?Q?8Fy8f/fA9/sOqDfktwh6bE1lHoBX7Xn37qLKpm3H+x+68vK2Al03YtHLLvbi?= =?us-ascii?Q?4eF4Z/Hdqbz+/LcgZmxVNyDphbL7XlnvfeqP6E1UVxq78X3UFS6K4kZ68UId?= =?us-ascii?Q?Tcd0xi4mXKKYuFyksXmxat3VTewa92xEFr07ulVn4vCEbut0LLQSG+Rpv97E?= =?us-ascii?Q?TXF9U8LhLzgtBOEjjfFHY+0e6jigVzvwd0PfWqxkk7hF76WPwm2W1Ge4ZIkw?= =?us-ascii?Q?iDGBguRomI9R9FQLzR/JOS5AdPfGc+mmE5/ISJpI9kp0YDx1pxqVwkSU6VeT?= =?us-ascii?Q?akAUTq/iWj4oZ1ixOVFqgU9/xSgTd591FXYYljejNubwsLaSOj5mjdS7ivPZ?= =?us-ascii?Q?qaf9W6znAUqV5ZyddyIAXGI+ZuBMUIa1DclXF9k+5HiCwI6pXDQXeifikkSc?= =?us-ascii?Q?cMsx4SJCCd6nEhzRTVZwjU6FqfxDYZlWFQ/Z6oRAcMo02n0yoe+UjfWGqEng?= =?us-ascii?Q?iM89AgEuO4hGpiAh8nBaQhmQoDod3uteSZ2RL8HBv+rywfm+QnKiVBRGIMLV?= =?us-ascii?Q?ne+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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655611580100001 Content-Type: text/plain; charset="utf-8" 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 =3D S390_CPU(cs); + CPUS390XState *env =3D &cpu->env; + int i; + + qemu_fprintf(f, "PSW=3Dmask %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 =3D 0; i < 16; i++) { + qemu_fprintf(f, "R%02d=3D%016" PRIx64, i, env->regs[i]); + if ((i % 4) =3D=3D 3) { + qemu_fprintf(f, "\n"); + } else { + qemu_fprintf(f, " "); + } + } + + if (flags & CPU_DUMP_FPU) { + if (s390_has_feat(S390_FEAT_VECTOR)) { + for (i =3D 0; i < 32; i++) { + qemu_fprintf(f, "V%02d=3D%016" PRIx64 "%016" PRIx64 "%c", + i, env->vregs[i][0], env->vregs[i][1], + i % 2 ? '\n' : ' '); + } + } else { + for (i =3D 0; i < 16; i++) { + qemu_fprintf(f, "F%02d=3D%016" PRIx64 "%c", + i, *get_freg(env, i), + (i % 4) =3D=3D 3 ? '\n' : ' '); + } + } + } + +#ifndef CONFIG_USER_ONLY + for (i =3D 0; i < 16; i++) { + qemu_fprintf(f, "C%02d=3D%016" PRIx64, i, env->cregs[i]); + if ((i % 4) =3D=3D 3) { + qemu_fprintf(f, "\n"); + } else { + qemu_fprintf(f, " "); + } + } +#endif + +#ifdef DEBUG_INLINE_BRANCHES + for (i =3D 0; i < CC_OP_MAX; i++) { + qemu_fprintf(f, " %15s =3D %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[] =3D { + [CC_OP_CONST0] =3D "CC_OP_CONST0", + [CC_OP_CONST1] =3D "CC_OP_CONST1", + [CC_OP_CONST2] =3D "CC_OP_CONST2", + [CC_OP_CONST3] =3D "CC_OP_CONST3", + [CC_OP_DYNAMIC] =3D "CC_OP_DYNAMIC", + [CC_OP_STATIC] =3D "CC_OP_STATIC", + [CC_OP_NZ] =3D "CC_OP_NZ", + [CC_OP_ADDU] =3D "CC_OP_ADDU", + [CC_OP_SUBU] =3D "CC_OP_SUBU", + [CC_OP_LTGT_32] =3D "CC_OP_LTGT_32", + [CC_OP_LTGT_64] =3D "CC_OP_LTGT_64", + [CC_OP_LTUGTU_32] =3D "CC_OP_LTUGTU_32", + [CC_OP_LTUGTU_64] =3D "CC_OP_LTUGTU_64", + [CC_OP_LTGT0_32] =3D "CC_OP_LTGT0_32", + [CC_OP_LTGT0_64] =3D "CC_OP_LTGT0_64", + [CC_OP_ADD_64] =3D "CC_OP_ADD_64", + [CC_OP_SUB_64] =3D "CC_OP_SUB_64", + [CC_OP_ABS_64] =3D "CC_OP_ABS_64", + [CC_OP_NABS_64] =3D "CC_OP_NABS_64", + [CC_OP_ADD_32] =3D "CC_OP_ADD_32", + [CC_OP_SUB_32] =3D "CC_OP_SUB_32", + [CC_OP_ABS_32] =3D "CC_OP_ABS_32", + [CC_OP_NABS_32] =3D "CC_OP_NABS_32", + [CC_OP_COMP_32] =3D "CC_OP_COMP_32", + [CC_OP_COMP_64] =3D "CC_OP_COMP_64", + [CC_OP_TM_32] =3D "CC_OP_TM_32", + [CC_OP_TM_64] =3D "CC_OP_TM_64", + [CC_OP_NZ_F32] =3D "CC_OP_NZ_F32", + [CC_OP_NZ_F64] =3D "CC_OP_NZ_F64", + [CC_OP_NZ_F128] =3D "CC_OP_NZ_F128", + [CC_OP_ICM] =3D "CC_OP_ICM", + [CC_OP_SLA_32] =3D "CC_OP_SLA_32", + [CC_OP_SLA_64] =3D "CC_OP_SLA_64", + [CC_OP_FLOGR] =3D "CC_OP_FLOGR", + [CC_OP_LCBB] =3D "CC_OP_LCBB", + [CC_OP_VC] =3D "CC_OP_VC", + [CC_OP_MULS_32] =3D "CC_OP_MULS_32", + [CC_OP_MULS_64] =3D "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" =20 #define CR0_RESET 0xE0UL #define CR14_RESET 0xC2000000UL; =20 +void s390_cpu_set_psw(CPUS390XState *env, uint64_t mask, uint64_t addr) +{ +#ifndef CONFIG_USER_ONLY + uint64_t old_mask =3D env->psw.mask; +#endif + + env->psw.addr =3D addr; + env->psw.mask =3D mask; + + /* KVM will handle all WAITs and trigger a WAIT exit on disabled_wait = */ + if (!tcg_enabled()) { + return; + } + env->cc_op =3D (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 =3D env->psw.mask; + + if (tcg_enabled()) { + uint64_t cc =3D calc_cc(env, env->cc_op, env->cc_src, + env->cc_dst, env->cc_vr); + + assert(cc <=3D 3); + r &=3D ~PSW_MASK_CC; + r |=3D cc << 44; + } + + return r; +} + static void s390_cpu_set_pc(CPUState *cs, vaddr value) { S390CPU *cpu =3D 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 =3D env->psw.mask; -#endif - - env->psw.addr =3D addr; - env->psw.mask =3D mask; - - /* KVM will handle all WAITs and trigger a WAIT exit on disabled_wait = */ - if (!tcg_enabled()) { - return; - } - env->cc_op =3D (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 =3D env->psw.mask; - - if (tcg_enabled()) { - uint64_t cc =3D calc_cc(env, env->cc_op, env->cc_src, - env->cc_dst, env->cc_vr); - - assert(cc <=3D 3); - r &=3D ~PSW_MASK_CC; - r |=3D cc << 44; - } - - return r; -} - -void s390_cpu_dump_state(CPUState *cs, FILE *f, int flags) -{ - S390CPU *cpu =3D S390_CPU(cs); - CPUS390XState *env =3D &cpu->env; - int i; - - qemu_fprintf(f, "PSW=3Dmask %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 =3D 0; i < 16; i++) { - qemu_fprintf(f, "R%02d=3D%016" PRIx64, i, env->regs[i]); - if ((i % 4) =3D=3D 3) { - qemu_fprintf(f, "\n"); - } else { - qemu_fprintf(f, " "); - } - } - - if (flags & CPU_DUMP_FPU) { - if (s390_has_feat(S390_FEAT_VECTOR)) { - for (i =3D 0; i < 32; i++) { - qemu_fprintf(f, "V%02d=3D%016" PRIx64 "%016" PRIx64 "%c", - i, env->vregs[i][0], env->vregs[i][1], - i % 2 ? '\n' : ' '); - } - } else { - for (i =3D 0; i < 16; i++) { - qemu_fprintf(f, "F%02d=3D%016" PRIx64 "%c", - i, *get_freg(env, i), - (i % 4) =3D=3D 3 ? '\n' : ' '); - } - } - } - -#ifndef CONFIG_USER_ONLY - for (i =3D 0; i < 16; i++) { - qemu_fprintf(f, "C%02d=3D%016" PRIx64, i, env->cregs[i]); - if ((i % 4) =3D=3D 3) { - qemu_fprintf(f, "\n"); - } else { - qemu_fprintf(f, " "); - } - } -#endif - -#ifdef DEBUG_INLINE_BRANCHES - for (i =3D 0; i < CC_OP_MAX; i++) { - qemu_fprintf(f, " %15s =3D %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[] =3D { - [CC_OP_CONST0] =3D "CC_OP_CONST0", - [CC_OP_CONST1] =3D "CC_OP_CONST1", - [CC_OP_CONST2] =3D "CC_OP_CONST2", - [CC_OP_CONST3] =3D "CC_OP_CONST3", - [CC_OP_DYNAMIC] =3D "CC_OP_DYNAMIC", - [CC_OP_STATIC] =3D "CC_OP_STATIC", - [CC_OP_NZ] =3D "CC_OP_NZ", - [CC_OP_ADDU] =3D "CC_OP_ADDU", - [CC_OP_SUBU] =3D "CC_OP_SUBU", - [CC_OP_LTGT_32] =3D "CC_OP_LTGT_32", - [CC_OP_LTGT_64] =3D "CC_OP_LTGT_64", - [CC_OP_LTUGTU_32] =3D "CC_OP_LTUGTU_32", - [CC_OP_LTUGTU_64] =3D "CC_OP_LTUGTU_64", - [CC_OP_LTGT0_32] =3D "CC_OP_LTGT0_32", - [CC_OP_LTGT0_64] =3D "CC_OP_LTGT0_64", - [CC_OP_ADD_64] =3D "CC_OP_ADD_64", - [CC_OP_SUB_64] =3D "CC_OP_SUB_64", - [CC_OP_ABS_64] =3D "CC_OP_ABS_64", - [CC_OP_NABS_64] =3D "CC_OP_NABS_64", - [CC_OP_ADD_32] =3D "CC_OP_ADD_32", - [CC_OP_SUB_32] =3D "CC_OP_SUB_32", - [CC_OP_ABS_32] =3D "CC_OP_ABS_32", - [CC_OP_NABS_32] =3D "CC_OP_NABS_32", - [CC_OP_COMP_32] =3D "CC_OP_COMP_32", - [CC_OP_COMP_64] =3D "CC_OP_COMP_64", - [CC_OP_TM_32] =3D "CC_OP_TM_32", - [CC_OP_TM_64] =3D "CC_OP_TM_64", - [CC_OP_NZ_F32] =3D "CC_OP_NZ_F32", - [CC_OP_NZ_F64] =3D "CC_OP_NZ_F64", - [CC_OP_NZ_F128] =3D "CC_OP_NZ_F128", - [CC_OP_ICM] =3D "CC_OP_ICM", - [CC_OP_SLA_32] =3D "CC_OP_SLA_32", - [CC_OP_SLA_64] =3D "CC_OP_SLA_64", - [CC_OP_FLOGR] =3D "CC_OP_FLOGR", - [CC_OP_LCBB] =3D "CC_OP_LCBB", - [CC_OP_VC] =3D "CC_OP_VC", - [CC_OP_MULS_32] =3D "CC_OP_MULS_32", - [CC_OP_MULS_64] =3D "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', )) =20 s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files(= 'kvm-stub.c')) --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655771749162.3273907143223; Wed, 7 Jul 2021 04:02:51 -0700 (PDT) Received: from localhost ([::1]:41642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15KM-0006Np-KK for importer@patchew.org; Wed, 07 Jul 2021 07:02:50 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?63ChQ9jWOoAuQdRvVfWHoT27Xv92gxoJqeknMd3qz0J7lSJKhyjcRSzwNKmK?= =?us-ascii?Q?NQy+8sqVswIGVmAVD0IjxePPlfyoGNupCCLPEE5fCf/6mIklBDDF+RMfrGbJ?= =?us-ascii?Q?sOslT6Wv6tUsjgn99YjG8RCqBrnztVsOBoORc3MsITRFj7X70kdeCmedLuuD?= =?us-ascii?Q?r4FPar7/oo/s68pZHt1a2MAoueGYpU7Ay0bRP/hLUBvSJ2LnF4BEsS4nFXjQ?= =?us-ascii?Q?yd5yUThwxNKpEA+Z4OIGb+WM4YYh83zl0LLcQUP2GW2ewVzS9HHJM8KlIES6?= =?us-ascii?Q?nf33kW1Fn7hfJOwF4HmbJI5rMU6i1a4bH6WXPbw55+Hw4o4HUoECXEWFvTCT?= =?us-ascii?Q?Xs6GbXI8oahpkwAUPgCY+Z4SRb6SrNXzdnx3LkfFGduJpv1lUHTGlbqfgoth?= =?us-ascii?Q?woBGynTwObrRa3zcAamDaZCoKL+6DBNBnrJ/Kjb9+AV74Bnrw09wh1FYNbNp?= =?us-ascii?Q?w9lbihRwXWN8MIC2COxqpmn6i9cjoS3KHuekjKaEe0WHzt9fQ1phWg//1dHa?= =?us-ascii?Q?jgXedGvgvS/vjsN2E30mwVe9mlF4HaVbZexJtiQdCMEJRzjasiuCRvy737Kl?= =?us-ascii?Q?dP4BI7tY49UgsSCUO69xP2eHswaTldi8nJhf27lQNPQURSwNmwaedWtCON3E?= =?us-ascii?Q?qmz9DsLpJBk2CzuWqTZOV4eOP6r4ZmTfLfgDQ6AZ63+9J/v91saTy7H19g4R?= =?us-ascii?Q?8BHX0Cz0sfPED2o5j5jrG3jZwRvjkX6h2kEJQAYIhPrVIwEWOhm5XoelhuNU?= =?us-ascii?Q?BoTvv6HCI0hUi2u60Go213Ij93hT2aUmg+KnXoYJz2Pg16Oe+68Jco4ApKPi?= =?us-ascii?Q?GQSmMk0/P/iF7VJkxDhgWRu/AoM/UgpdvtfSSTvN1hS+gaDio05WDcMGCdj9?= =?us-ascii?Q?XgQJUi+bv4wFSfFTIczCS/sTIByAlKLITBzPkDos7AWRK5K5H5n9evknLtmt?= =?us-ascii?Q?fkJPZGh2D+aV/4V4ZRKJe1UJC9v+FQ42vuJlAbxOMb5pwHuieJlp3bq6NL5G?= =?us-ascii?Q?3bfmugJa0i8GmAUH4gd5ESDHPQyVrtK/DRBbAGx8jkEOz/0b5UCgG0VBVqtq?= =?us-ascii?Q?YYYfGq7nDUPSpNjYXT7FBP5GSU07/szM6BWmT8XbOQw9pTVZSHl12ehGJ7zv?= =?us-ascii?Q?IsIwnqm2mq2uXY8idU5NGiiRCkzdYqur89UqLDgn9jNV70Avno2QnuAkUajC?= =?us-ascii?Q?3JFcBL98oJOJBbcL0ds+kXowyyWpBVz9ZKzg45s6Vx7AUwuw9p+uA7e7wlyy?= =?us-ascii?Q?m053mx6nnt5gAbuDqfIomDUQT6Y/bbhCu+TsJT43YUwZrnXHa2JUecdNZ2RL?= =?us-ascii?Q?1U2JGQe4OFa3YiGqXWucIynr?= 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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655773200100001 Content-Type: text/plain; charset="utf-8" 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 =20 -#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, h= waddr 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) =20 s390x_softmmu_ss =3D ss.source_set() s390x_softmmu_ss.add(files( + 'helper.c', 'arch_dump.c', 'diag.c', 'ioinst.c', --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655842857245.7971226484549; Wed, 7 Jul 2021 04:04:02 -0700 (PDT) Received: from localhost ([::1]:46482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15LV-00016q-RM for importer@patchew.org; Wed, 07 Jul 2021 07:04:01 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?EwFIAnO5I4svr5I88NRTG4VDv72SgMTKKe0dFmkGMw5ng+Teoj5XRAE6epeV?= =?us-ascii?Q?SLjqlQgEF2hNByAKmmelPTnnC2ZiM+GDC5OLKJwW6nhrIgGVdcnUQIURqnTr?= =?us-ascii?Q?6IcRrzUZCjuab+iCeBsUlnmT82f0sDw5TX4qJHcV3KsX5eFCNWsJTZWaZgNL?= =?us-ascii?Q?4uftj9xit6Vh1GRgcZ7PacbBwnVwsAwhxikcaXQtwwDgDeCyMSTzJUSeKnh0?= =?us-ascii?Q?xLOT78y3sazv1G9wCPeMKldjxS2E2W69qqh7ogdpy/gDd8pu6xkvX2L3HaCt?= =?us-ascii?Q?woBAjDFdMZeqTRLi8s0wC+VkZ2jdMQ5vQFncDKpPfT/W9zszGW/cjwyc9YqC?= =?us-ascii?Q?UBTBTdKScDkk4C9YAxeWSeDtl6pALwjLvM93gLy6ugmnf7/TB7m5G62bebp2?= =?us-ascii?Q?wa1uv4G1myXvKIDUX3Wgd8sQ2Pcw+gE4OjnrfYFnUFfcsM8HSnvxadT2t1Oo?= =?us-ascii?Q?AqNCeWKtB3Vxn/zychXxGpyKVsiXIjvAHlzMOeB6mir5rOGbLkKphn3r7gmB?= =?us-ascii?Q?MjGYXDL7M2FMGREWSTXUMGb2skzu5Gn+93WeB8Pt3axg2yvG1tXHq9ECtL3+?= =?us-ascii?Q?zTuHGRWw2pNZjCcBJpqcFiwlQEjgvg2YwD0DsOtVgZbmwxw6DHe6m3U4Lsed?= =?us-ascii?Q?VMjZtpdT82v/33PKY+ofC8nzN4+jjQj5t8SiDaUWCpAWJp1aSKIWLsmCdoI/?= =?us-ascii?Q?TbNIjbGziOYEGBi8Qxz7VWazj9qZz9wSi8+iDd7Dv5ZoW2QfTuGgYcuadOzy?= =?us-ascii?Q?OqvltMjNC2KYwfLNLwZmGTA5ifZ900X17VlL6EnK+1fb4uEph2wDMTdPfLjv?= =?us-ascii?Q?bDV6mSif1oGEQV0YGa0oUkXOz2Sm+Y4JwM/BtMF3l4AI0a/EiKq/e+xBeWcg?= =?us-ascii?Q?ZY/gSAlvAka83Vz77WmmPQeznWN3VWd80zqbzvQgEeXeid+crP+L7vYxsfzZ?= =?us-ascii?Q?eAVGVJZG6ORoV3tr9NbqNk020zLZEg0wGjjlURZGQ9Rp6mMcNizIMKx+Pc8/?= =?us-ascii?Q?kBGrTNbaX1+75Q4xSqfDXmLlpX9MJYCfxygElgJEh7+F3fDCaFl+zZjJALPV?= =?us-ascii?Q?DxduA4SeZBTZFLN8LSx23KVx204xgFz8R0OHVgDnP8y1Hsq3sl8JBywg47Nf?= =?us-ascii?Q?STkBfYcXu9ar9apn/Ly1tGJCnwG4LdLUjHLcInuhR1mb2oR4sg4iPcwoe6dW?= =?us-ascii?Q?7cQXA8MpM9nRQZu3FO9IQRZ0lGvgTQWziNmc64BpsK7wYtpuXxf9fMb8rPNb?= =?us-ascii?Q?51cu829bfYxAHddpXmnx7hj4aYqgX7Byd/FdgNJj06rxqfWn6CcsM0FdCEa4?= =?us-ascii?Q?AIGjBEmoovlTXY0z+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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655844998100001 Content-Type: text/plain; charset="utf-8" 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" =20 int handle_diag_288(CPUS390XState *env, uint64_t r1, uint64_t r3) @@ -168,7 +169,7 @@ out: return; } =20 - 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] =3D DIAG_308_RC_INVAL_FOR_PV; --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655372729234.1929552925078; Wed, 7 Jul 2021 03:56:12 -0700 (PDT) Received: from localhost ([::1]:46690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Dv-0007G2-I7 for importer@patchew.org; Wed, 07 Jul 2021 06:56:11 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?J5E0pVAjkwaOhD9TX/d+v3SzYtVjRZEfE44200MwmpwLKlFcEycG8/jlPUqr?= =?us-ascii?Q?u4cryAc+kdGUZzlC7mjk5hwMZJjq2dUnjNGSyOk07Bd4OyGrkFOrgRoddevt?= =?us-ascii?Q?TLuuAQhRDRB/nvjyHLfw/X+Cd1fvtoUm3aSspaCH1WuAEeMCEjisJ45+du8l?= =?us-ascii?Q?NHRGxhuKI4PsDGrAcw8xzesGNzQqIMEGf8nNs0SLpgFml6zChsIexhiy7+G0?= =?us-ascii?Q?sRiIDy749dH3UZnpNmbUno56p9faVP/Wo7c8mE5YjGFix9mMVumyhZwFvU1E?= =?us-ascii?Q?n6BdXJAh9yQVBsx2xGjsxY/lq20flEar0bEcyupb7W9uLWzdsTfC3vidhfgk?= =?us-ascii?Q?K6lFBDJRjR1Xa0SAsVEQAJeVcyZ3tSH/0CRjetg6xAzKA76EKxHo9xZ9SI8x?= =?us-ascii?Q?HeujQxlW1zlYS/wVuW5paihabTfzPzXm2FagTYmhclnAjQ0VazgmsH7tWv2g?= =?us-ascii?Q?4iRXGXthk8Lv1YWwZ87nJz2qgsNztEFqGBQ2woQSWKLAyzVDG2sHHmFCuOHx?= =?us-ascii?Q?NH9ZCaXfpjqBdSCWTAKvnLkNwk5i1ZaM5UgrjUqNhzIFXL6FTsZpq7hfAZCo?= =?us-ascii?Q?mojjtnSYy5lfkDDodlV/97o8MM/dqhWev0XRZIj2hGdjTwfHjpToZ36EJ6mZ?= =?us-ascii?Q?DkuyEw7I94anbmJRMpS9hHjJe++CxrlEEC2pD9F/L/vRwtgDbRue3vE5Gdol?= =?us-ascii?Q?E4UiJ/QfS4v84o7z2VAtruV7fx2C92ysbujVlNUVMLUO8vOVmhCy8POAzEex?= =?us-ascii?Q?+gCSj9pfiswxZBjJGbW1OdgE2FhbZZwx2L+XyYXwRoztw98BCCTdu3gYY/w+?= =?us-ascii?Q?C5hgqpsTY0DCSCCg4tTSWTcpaYBEXOWX8u5mUUY+hpU/GIwDfNR+pr970Sl2?= =?us-ascii?Q?vN/GDQukE+3K2zBzLZgiFi4h4Rx5BC0x/Lf8pAQu8/qPmHv4n5i0VfIoUQc9?= =?us-ascii?Q?Bsax46rP6SPwJvMGcPkFRpqxDASkhVW653pPkPe2Er9tExHSVZmIb4cZN7On?= =?us-ascii?Q?3gYizM93/cVgerA4+E+AN86uscwo3v8JIQimIMUFSn7vNECxTJ1VZ1aNo64S?= =?us-ascii?Q?msE9llB4quj4/cBc9Dqq0GbOVBr8yJFkVJgJJlGsrxCKnYLiONgaKXPdHwzl?= =?us-ascii?Q?/CD0wG1LTtWGK+xgUX1xTvllFkevDwNWIBznCxKy/QCEVh/+IrTq47Askfpn?= =?us-ascii?Q?1V9VhQLELAq0MwUxZW0I6ZlJ5UfYd3xNYkq8a10bbNware5NljznC4sT1jWe?= =?us-ascii?Q?JoRCy/vG7xu8rsyr7CEvbrMmtjh80osijWQc5xCmNyyK3c6pZV3xiLDSD3Me?= =?us-ascii?Q?avm4CmD/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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655373069100001 Content-Type: text/plain; charset="utf-8" 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 late= r. - * 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_co= de) -{ -} - -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', )) =20 -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')) =20 gen_features =3D executable('gen-features', 'gen-features.c', native: true, build_by_default: false) --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655524758506.28078695799195; Wed, 7 Jul 2021 03:58:44 -0700 (PDT) Received: from localhost ([::1]:55302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15GN-0004mr-Nd for importer@patchew.org; Wed, 07 Jul 2021 06:58:43 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?pNGy8wjya1206ZiRCITIIg8dc4qm/MkdX+q+am2a5YCeUQwCJt0oF/ypGg8S?= =?us-ascii?Q?kfDT3364gjoKvjp7XdWO+b9jLb2LTEI/++v4VBr51zM5q/80kBJ6XOAOx+kn?= =?us-ascii?Q?AyXgCV6URvjZ8zQIqVOeS0E7LHp+GUahjK5g9x4Afctim9aW66/MaAD3qjzC?= =?us-ascii?Q?2DaUdws8oXNZmrAz5Up9L1Bow4Fvsg25d0aZCP6EwvGGu40M76++0iWTgKBC?= =?us-ascii?Q?9acg9MhB/EIUFli9EK+9BzMx+xZmpYvteD36AfTS4XOhETVtxX2GsKHoQifK?= =?us-ascii?Q?qPlTCI5jWNmPKU/cizg0+S/06tWGgLVQnKQZCTde86FpUeuTRMIB5XPQWR1P?= =?us-ascii?Q?aOj08NTtHZwr6wTOY8ADm5rccPG2ErbxOuxpW+omtExoGraNjItuTGN8mqc/?= =?us-ascii?Q?x08h6QKgeRTmQnTao+WBwazvU0G5XziawhDTqNvuZ4DysBvufqxIVqc3yIBa?= =?us-ascii?Q?/dRw8661be80dlAcOOdXB3EC3gjFcU98/JwfI2YP9Uw9e0Zc/uB52hTlFYFp?= =?us-ascii?Q?gYzaAwPVWZBdVpfPItr0wbqN3427XY3FIiCyQWapFazAnm6cEOMIsXlfudxS?= =?us-ascii?Q?0x+37TmISD0tqasDNyDME93cws8bcqOG7SxL+6BYbTFxnbPXlw7WKDKWO/L0?= =?us-ascii?Q?nrNvw66MbU7fH6/eygEXr2kCc427JJI8y3CkXNOloUiMMHAR9dapjYE5NYgA?= =?us-ascii?Q?hV1Vmc4a4sAOr4v3foVzuQm4qjJPlXlapCb0Wytfq0oogvbd93sDP5xoSF3X?= =?us-ascii?Q?rW7rvd5GOR5bis1DPfUZ0HMNV3bAVZIqdpWX0MvzZv5GJjHWjngUVXa+WCDg?= =?us-ascii?Q?QW8B0fdp8lo8OujpNp0garqbpWdezfuzzJ2Jffgu6ZVdQNmCDIo0SjX6Q8HN?= =?us-ascii?Q?zdKUwZmJkGQ/ECVa70bRuAvi1VgdXHnzS9+OPvvPxzx+2eEkwPH176263B7G?= =?us-ascii?Q?Y0v4UTyQP+imdv1ii7pkp99V3KDbDinGJq6Bd+0Jlo1IyMpR+8ZZC8yp8G3V?= =?us-ascii?Q?3bwHIMZ6E9SPV5kzpdZ9GJ3hLkwmslWaUogFQ6LQDIFiVnCSrdJa4QiuzNc5?= =?us-ascii?Q?HiwlQpOjKWBNGd2Zgrac2uZX/pojjjB/Y9ciGcx1mMbGr4pc4vHf/ni2x28M?= =?us-ascii?Q?hQSsY1WE2ycmZQKCO6RQhJGoaGPRS80/q6Qra5jB/iPtXcGYlvzh7THgsZIz?= =?us-ascii?Q?XjohIQVu1UEWI3hHEBPGpOLUbvJZU3pqu3XMJ5aZmTMtVZnbv40Uu+K75Nv3?= =?us-ascii?Q?dnDyboz9qzBcpRz9qi4AyKdKn3RqOHhRi3Ro2yx4LlbI6SCj1ppbhXzx0kCs?= =?us-ascii?Q?CQK2FdvzzOaf/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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655525245100001 Content-Type: text/plain; charset="utf-8" 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/{ =3D> kvm}/kvm.c | 0 target/s390x/{ =3D> 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/{ =3D> kvm}/kvm.c (100%) rename target/s390x/{ =3D> 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 @@ */ =20 #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" =20 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" =20 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" =20 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 @@ =20 #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() =3D=3D '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) "W= arning: Unable to set cpu %d state %" PRIu8 " to KVM: %s" +kvm_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamat= ch) "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', )) =20 -s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c')) - gen_features =3D executable('gen-features', 'gen-features.c', native: true, build_by_default: false) =20 @@ -32,22 +30,10 @@ s390x_softmmu_ss.add(files( 'cpu-sysemu.c', )) =20 -# 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() =3D=3D '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 =3D ss.source_set() =20 subdir('tcg') +subdir('kvm') =20 target_arch +=3D {'s390x': s390x_ss} target_softmmu_arch +=3D {'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" =20 -# 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) "W= arning: Unable to set cpu %d state %" PRIu8 " to KVM: %s" -kvm_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamat= ch) "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 %" PR= Iu8 cpu_halt(int cpu_index) "halting cpu %d" --=20 2.32.0 From nobody Fri May 17 04:49:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=quarantine dis=none) header.from=suse.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625655794368320.15957098700835; Wed, 7 Jul 2021 04:03:14 -0700 (PDT) Received: from localhost ([::1]:42230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m15Kj-0006m8-2p for importer@patchew.org; Wed, 07 Jul 2021 07:03:13 -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 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 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 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 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= 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; 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> Content-Transfer-Encoding: quoted-printable 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 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: =?us-ascii?Q?qkMy1F6WXy4Jt+fYdRViy+22hUkVWTGqPjTjvi0UNjwS3CuNx8imZiKDQdBv?= =?us-ascii?Q?0nKL2LKqsXPUazkIsWzLYT7pOSYr/auK6ll7AG8r4t7fs6ekon8HK6zPkEbD?= =?us-ascii?Q?6Ph4D6MrumgXa0pUamk1s6G+N2UuOLU+YV95WPuShA6MDaC6gBvBxKMye1NG?= =?us-ascii?Q?aNU5fBEzGMgOygw8HFRDenq2VMWoO2GXnGOlkAiuqalSOoANhhWIGvhg7jr+?= =?us-ascii?Q?rPPHJ/7aRZsrW9zXHj7eDoPtdlaRIE7YJCkACXsJW1o3DE5Zx9dtrsbGAEBW?= =?us-ascii?Q?P+3lDPGSblPcZ7NkMCz+dOLdY4Ht5EzcEQzLoyuifJydD4p4O3qsQBTE7cjC?= =?us-ascii?Q?NJp3ScY1+QbpN+fh/9ZivIihpiLqCSuS+tzQiw9c2M0dxLgt2hBjcjWuHlI+?= =?us-ascii?Q?Zaqo6DOAfUtkuTQAugJiFLvZhDJCTe9UtcW/YbtWS/VDczJzxIUgpqVaHwi1?= =?us-ascii?Q?kO9A6rdvvbTjQLF9BUwqx65dBGoTrbSanaAsoRGO4sq5YnRiXTSgiYfiaqcN?= =?us-ascii?Q?VqmjdSR6UDYOagiWjWEQ2i98K9wPqQFc7v1XgXOWbqrKN0Y3NG5KGd8k1b3S?= =?us-ascii?Q?F54LrP6Zb6ju1jORn7NMSrUf/cla6LV3lvMNjmoELqtjmIFeLn6eNYhjuT2g?= =?us-ascii?Q?itZKdovTFhL3QILkRtsxQl4d/Xl8p0Kvc/c5HGbvFPh1qKO8f3Y99zGJjKMu?= =?us-ascii?Q?epUiWmEkXxBND4cTnQsa3nMevZj5TODhAztH8pCdgAq9aX3IY6wOMgaIp8Hp?= =?us-ascii?Q?NQvYaXlEx6F+z7JcPXEKSi/rwFF5revJrkQ7p1G4OPFfpB+XJrE4z5zYIlla?= =?us-ascii?Q?RPGNV94SsvvfjpBfzFuan/TYq7kohIOqHwz3ATdl8IW12dSQsJkupR7qb3oO?= =?us-ascii?Q?1MHRxKz37aqdrDTY6iP0DVGFZ6Z7Lz4wjqkpJNZa4Xczfe9Z7cV4vcQae9u6?= =?us-ascii?Q?AOyoHFPmvw4BBlXsjgTiD5+F+prQLaC1EHMyMoISzEJh3PF3dfrR/fUUyjQE?= =?us-ascii?Q?70GQzXvW8EiguwpIsjlBmwa3taDhiVI3fOxByxKjXTMTAKAwiK/bTbfuphfa?= =?us-ascii?Q?ko7mCm//g+0LT0qf6zoLqR9NSsEBtOWRZOy7UADgCr9al4jTWz3Ly5F7GpQj?= =?us-ascii?Q?skYvXNZXrLlYbrpGQiBcnXeRUrvXLhf98oEn0Vf/oDhGpOk9RQEyWYC/cYxn?= =?us-ascii?Q?lrbvijFQMf0zXaZMF/xONNQsfasXNmQOesa7O7Q5pB9r6yr3TKAX0xtU/sFp?= =?us-ascii?Q?whNOLKCTfvP6r/vRKz/We5wr2k3co0x1jK1s/ai4HNT4mVSB/LoUqsh7fnc/?= =?us-ascii?Q?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 (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1625655795628100001 Content-Type: text/plain; charset="utf-8" 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" =20 #define CPUDEF_INIT(_type, _gen, _ec_ga, _mha_pow, _hmfai, _name, _desc) \ @@ -414,381 +407,6 @@ void s390_cpu_list(void) } } =20 -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 =3D=3D 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 =3D opaque; - CpuDefinitionInfoList **cpu_list =3D &cpu_list_data->list; - CpuDefinitionInfo *info; - char *name =3D g_strdup(object_class_get_name(klass)); - S390CPUClass *scc =3D S390_CPU_CLASS(klass); - - /* strip off the -s390x-cpu */ - g_strrstr(name, "-" TYPE_S390_CPU)[0] =3D 0; - info =3D g_new0(CpuDefinitionInfo, 1); - info->name =3D name; - info->has_migration_safe =3D true; - info->migration_safe =3D scc->is_migration_safe; - info->q_static =3D scc->is_static; - info->q_typename =3D g_strdup(object_class_get_name(klass)); - /* check for unavailable features */ - if (cpu_list_data->model) { - Object *obj; - S390CPU *sc; - obj =3D object_new_with_class(klass); - sc =3D S390_CPU(obj); - if (sc->model) { - info->has_unavailable_features =3D 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 =3D { - .list =3D NULL, - }; - - list_data.model =3D 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 *i= nfo, - Error **errp) -{ - Error *err =3D NULL; - const QDict *qdict =3D NULL; - const QDictEntry *e; - Visitor *visitor; - ObjectClass *oc; - S390CPU *cpu; - Object *obj; - - if (info->props) { - qdict =3D qobject_to(QDict, info->props); - if (!qdict) { - error_setg(errp, QERR_INVALID_PARAMETER_TYPE, "props", "dict"); - return; - } - } - - oc =3D cpu_class_by_name(TYPE_S390_CPU, info->name); - if (!oc) { - error_setg(errp, "The CPU definition \'%s\' is unknown.", info->na= me); - return; - } - if (S390_CPU_CLASS(oc)->kvm_required && !kvm_enabled()) { - error_setg(errp, "The CPU definition '%s' requires KVM", info->nam= e); - return; - } - obj =3D object_new_with_class(oc); - cpu =3D S390_CPU(obj); - - if (!cpu->model) { - error_setg(errp, "Details about the host CPU model are not availab= le, " - "it cannot be used."); - object_unref(obj); - return; - } - - if (qdict) { - visitor =3D qobject_input_visitor_new(info->props); - if (!visit_start_struct(visitor, NULL, NULL, 0, errp)) { - visit_free(visitor); - object_unref(obj); - return; - } - for (e =3D qdict_first(qdict); e; e =3D 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 *mo= del, - bool delta_changes) -{ - QDict *qdict =3D qdict_new(); - S390FeatBitmap bitmap; - - /* always fallback to the static base model */ - info->name =3D 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_fe= at); - } - - /* 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_fea= t); - } - } 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 =3D QOBJECT(qdict); - info->has_props =3D true; - } -} - -CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType= type, - CpuModelInfo *model, - Error **errp) -{ - Error *err =3D NULL; - CpuModelExpansionInfo *expansion_info =3D NULL; - S390CPUModel s390_model; - bool delta_changes =3D 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 =3D=3D CPU_MODEL_EXPANSION_TYPE_STATIC) { - delta_changes =3D true; - } else if (type !=3D 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 =3D g_new0(CpuModelExpansionInfo, 1); - expansion_info->model =3D 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 =3D (strList **) opaque; - - QAPI_LIST_PREPEND(*last, g_strdup(name)); -} - -CpuModelCompareInfo *qmp_query_cpu_model_comparison(CpuModelInfo *infoa, - CpuModelInfo *infob, - Error **errp) -{ - Error *err =3D 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 =3D g_new0(CpuModelCompareInfo, 1); - - /* check the cpu generation and ga level */ - if (modela.def->gen =3D=3D modelb.def->gen) { - if (modela.def->ec_ga =3D=3D modelb.def->ec_ga) { - /* ec and corresponding bc are identical */ - gen_result =3D CPU_MODEL_COMPARE_RESULT_IDENTICAL; - } else if (modela.def->ec_ga < modelb.def->ec_ga) { - gen_result =3D CPU_MODEL_COMPARE_RESULT_SUBSET; - } else { - gen_result =3D CPU_MODEL_COMPARE_RESULT_SUPERSET; - } - } else if (modela.def->gen < modelb.def->gen) { - gen_result =3D CPU_MODEL_COMPARE_RESULT_SUBSET; - } else { - gen_result =3D CPU_MODEL_COMPARE_RESULT_SUPERSET; - } - if (gen_result !=3D 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 =3D 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_M= AX); - s390_feat_bitmap_to_ascii(added, &compare_info->responsible_proper= ties, - list_add_feat); - if (bitmap_empty(missing, S390_FEAT_MAX)) { - feat_result =3D CPU_MODEL_COMPARE_RESULT_SUBSET; - } else if (bitmap_empty(added, S390_FEAT_MAX)) { - feat_result =3D CPU_MODEL_COMPARE_RESULT_SUPERSET; - } else { - feat_result =3D CPU_MODEL_COMPARE_RESULT_INCOMPATIBLE; - } - } - - /* combine the results */ - if (gen_result =3D=3D feat_result) { - compare_info->result =3D gen_result; - } else if (feat_result =3D=3D CPU_MODEL_COMPARE_RESULT_IDENTICAL) { - compare_info->result =3D gen_result; - } else if (gen_result =3D=3D CPU_MODEL_COMPARE_RESULT_IDENTICAL) { - compare_info->result =3D feat_result; - } else { - compare_info->result =3D CPU_MODEL_COMPARE_RESULT_INCOMPATIBLE; - } - return compare_info; -} - -CpuModelBaselineInfo *qmp_query_cpu_model_baseline(CpuModelInfo *infoa, - CpuModelInfo *infob, - Error **errp) -{ - Error *err =3D 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 =3D=3D modelb.def->gen) { - if (modela.def->type =3D=3D modelb.def->type) { - cpu_type =3D modela.def->type; - } else { - cpu_type =3D 0; - } - max_gen =3D modela.def->gen; - max_gen_ga =3D MIN(modela.def->ec_ga, modelb.def->ec_ga); - } else if (modela.def->gen > modelb.def->gen) { - cpu_type =3D modelb.def->type; - max_gen =3D modelb.def->gen; - max_gen_ga =3D modelb.def->ec_ga; - } else { - cpu_type =3D modela.def->type; - max_gen =3D modela.def->gen; - max_gen_ga =3D modela.def->ec_ga; - } - - model.def =3D 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 =3D g_new0(CpuModelBaselineInfo, 1); - baseline_info->model =3D 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] =3D { @@ -900,7 +518,7 @@ static void check_compatibility(const S390CPUModel *max= _model, "available in the configuration: "); } =20 -static S390CPUModel *get_max_cpu_model(Error **errp) +S390CPUModel *get_max_cpu_model(Error **errp) { Error *err =3D NULL; static S390CPUModel max_model; @@ -925,39 +543,6 @@ static S390CPUModel *get_max_cpu_model(Error **errp) return &max_model; } =20 -static inline void apply_cpu_model(const S390CPUModel *model, Error **errp) -{ -#ifndef CONFIG_USER_ONLY - Error *err =3D NULL; - static S390CPUModel applied_model; - static bool applied; - - /* - * We have the same model for all VCPUs. KVM can only be configured be= fore - * 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 =3D true; - if (model) { - applied_model =3D *model; - } -#endif -} - void s390_realize_cpu_model(CPUState *cs, Error **errp) { Error *err =3D NULL; diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sys= emu.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 =3D=3D 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 =3D opaque; + CpuDefinitionInfoList **cpu_list =3D &cpu_list_data->list; + CpuDefinitionInfo *info; + char *name =3D g_strdup(object_class_get_name(klass)); + S390CPUClass *scc =3D S390_CPU_CLASS(klass); + + /* strip off the -s390x-cpu */ + g_strrstr(name, "-" TYPE_S390_CPU)[0] =3D 0; + info =3D g_new0(CpuDefinitionInfo, 1); + info->name =3D name; + info->has_migration_safe =3D true; + info->migration_safe =3D scc->is_migration_safe; + info->q_static =3D scc->is_static; + info->q_typename =3D g_strdup(object_class_get_name(klass)); + /* check for unavailable features */ + if (cpu_list_data->model) { + Object *obj; + S390CPU *sc; + obj =3D object_new_with_class(klass); + sc =3D S390_CPU(obj); + if (sc->model) { + info->has_unavailable_features =3D 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 =3D { + .list =3D NULL, + }; + + list_data.model =3D 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 *i= nfo, + Error **errp) +{ + Error *err =3D NULL; + const QDict *qdict =3D NULL; + const QDictEntry *e; + Visitor *visitor; + ObjectClass *oc; + S390CPU *cpu; + Object *obj; + + if (info->props) { + qdict =3D qobject_to(QDict, info->props); + if (!qdict) { + error_setg(errp, QERR_INVALID_PARAMETER_TYPE, "props", "dict"); + return; + } + } + + oc =3D cpu_class_by_name(TYPE_S390_CPU, info->name); + if (!oc) { + error_setg(errp, "The CPU definition \'%s\' is unknown.", info->na= me); + return; + } + if (S390_CPU_CLASS(oc)->kvm_required && !kvm_enabled()) { + error_setg(errp, "The CPU definition '%s' requires KVM", info->nam= e); + return; + } + obj =3D object_new_with_class(oc); + cpu =3D S390_CPU(obj); + + if (!cpu->model) { + error_setg(errp, "Details about the host CPU model are not availab= le, " + "it cannot be used."); + object_unref(obj); + return; + } + + if (qdict) { + visitor =3D qobject_input_visitor_new(info->props); + if (!visit_start_struct(visitor, NULL, NULL, 0, errp)) { + visit_free(visitor); + object_unref(obj); + return; + } + for (e =3D qdict_first(qdict); e; e =3D 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 *mo= del, + bool delta_changes) +{ + QDict *qdict =3D qdict_new(); + S390FeatBitmap bitmap; + + /* always fallback to the static base model */ + info->name =3D 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_fe= at); + } + + /* 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_fea= t); + } + } 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 =3D QOBJECT(qdict); + info->has_props =3D true; + } +} + +CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType= type, + CpuModelInfo *model, + Error **errp) +{ + Error *err =3D NULL; + CpuModelExpansionInfo *expansion_info =3D NULL; + S390CPUModel s390_model; + bool delta_changes =3D 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 =3D=3D CPU_MODEL_EXPANSION_TYPE_STATIC) { + delta_changes =3D true; + } else if (type !=3D 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 =3D g_new0(CpuModelExpansionInfo, 1); + expansion_info->model =3D 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 =3D (strList **) opaque; + + QAPI_LIST_PREPEND(*last, g_strdup(name)); +} + +CpuModelCompareInfo *qmp_query_cpu_model_comparison(CpuModelInfo *infoa, + CpuModelInfo *infob, + Error **errp) +{ + Error *err =3D 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 =3D g_new0(CpuModelCompareInfo, 1); + + /* check the cpu generation and ga level */ + if (modela.def->gen =3D=3D modelb.def->gen) { + if (modela.def->ec_ga =3D=3D modelb.def->ec_ga) { + /* ec and corresponding bc are identical */ + gen_result =3D CPU_MODEL_COMPARE_RESULT_IDENTICAL; + } else if (modela.def->ec_ga < modelb.def->ec_ga) { + gen_result =3D CPU_MODEL_COMPARE_RESULT_SUBSET; + } else { + gen_result =3D CPU_MODEL_COMPARE_RESULT_SUPERSET; + } + } else if (modela.def->gen < modelb.def->gen) { + gen_result =3D CPU_MODEL_COMPARE_RESULT_SUBSET; + } else { + gen_result =3D CPU_MODEL_COMPARE_RESULT_SUPERSET; + } + if (gen_result !=3D 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 =3D 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_M= AX); + s390_feat_bitmap_to_ascii(added, &compare_info->responsible_proper= ties, + list_add_feat); + if (bitmap_empty(missing, S390_FEAT_MAX)) { + feat_result =3D CPU_MODEL_COMPARE_RESULT_SUBSET; + } else if (bitmap_empty(added, S390_FEAT_MAX)) { + feat_result =3D CPU_MODEL_COMPARE_RESULT_SUPERSET; + } else { + feat_result =3D CPU_MODEL_COMPARE_RESULT_INCOMPATIBLE; + } + } + + /* combine the results */ + if (gen_result =3D=3D feat_result) { + compare_info->result =3D gen_result; + } else if (feat_result =3D=3D CPU_MODEL_COMPARE_RESULT_IDENTICAL) { + compare_info->result =3D gen_result; + } else if (gen_result =3D=3D CPU_MODEL_COMPARE_RESULT_IDENTICAL) { + compare_info->result =3D feat_result; + } else { + compare_info->result =3D CPU_MODEL_COMPARE_RESULT_INCOMPATIBLE; + } + return compare_info; +} + +CpuModelBaselineInfo *qmp_query_cpu_model_baseline(CpuModelInfo *infoa, + CpuModelInfo *infob, + Error **errp) +{ + Error *err =3D 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 =3D=3D modelb.def->gen) { + if (modela.def->type =3D=3D modelb.def->type) { + cpu_type =3D modela.def->type; + } else { + cpu_type =3D 0; + } + max_gen =3D modela.def->gen; + max_gen_ga =3D MIN(modela.def->ec_ga, modelb.def->ec_ga); + } else if (modela.def->gen > modelb.def->gen) { + cpu_type =3D modelb.def->type; + max_gen =3D modelb.def->gen; + max_gen_ga =3D modelb.def->ec_ga; + } else { + cpu_type =3D modela.def->type; + max_gen =3D modela.def->gen; + max_gen_ga =3D modela.def->ec_ga; + } + + model.def =3D 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 =3D g_new0(CpuModelBaselineInfo, 1); + baseline_info->model =3D 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 =3D NULL; + static S390CPUModel applied_model; + static bool applied; + + /* + * We have the same model for all VCPUs. KVM can only be configured be= fore + * 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 =3D true; + if (model) { + applied_model =3D *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', )) =20 s390x_user_ss =3D ss.source_set() +s390x_user_ss.add(files( + 'cpu_models_user.c', +)) =20 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); =20 =20 --=20 2.32.0