From nobody Sat May 18 21:26:48 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 1624976585488900.8755647177826; Tue, 29 Jun 2021 07:23:05 -0700 (PDT) Received: from localhost ([::1]:34080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEdk-00042o-8k for importer@patchew.org; Tue, 29 Jun 2021 10:23:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEab-0007sh-9j for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:19:49 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:46667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEaZ-0003Up-Gj for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:19:49 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2112.outbound.protection.outlook.com [104.47.17.112]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-5-_vh21rK5O_mCAQVKINx1hw-1; Tue, 29 Jun 2021 16:19:45 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VE1PR04MB7295.eurprd04.prod.outlook.com (2603:10a6:800:1ac::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Tue, 29 Jun 2021 14:19:43 +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.4264.026; Tue, 29 Jun 2021 14:19:43 +0000 Received: from localhost (1.169.28.175) by HKAPR03CA0036.apcprd03.prod.outlook.com (2603:1096:203:c9::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.8 via Frontend Transport; Tue, 29 Jun 2021 14:19:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wmk4J4tkx1lA70aVIYeEXvrh31NYRHUZ2+idETr5EeM=; b=AL6WzUAjf+svP/E1Q/1/8UcF3P6WCYdeg+f+0ysWeBbA/9TVX7PLzAJSoLWS/5yn1OUl6P IPEuRONVIDv64cVM6b94D0+VYhTgkShY/CE3qeoQUiOS6YXsiaK/KI7WAW3TBjxRKxxldq 1cQlf9Jxx/r3ofdTzfxdo2ec9IIPSbc= X-MC-Unique: _vh21rK5O_mCAQVKINx1hw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B0h/K9QwozNiHiOuemqSlhcJMnChKqghjRxXBzK4TZPaRVug2raWU7OQq0N4onGvxwZVQtkvVgfU/tn4wpAVndeAO4D852EpGJDzkUISn6B/Tr0UajSM03WV+tVzIJcAfo2ajU9CAesI56rfgOYRUHRlFI0ni26Ix6CwVVCjXfTW+i3mbIa3FsVa9KIIYEYgFealDHL0HbKGxUOf8+DbswSoIgPSul99MCHPHQsv80KkoxoGcQZY5/in7jaZZ3khsNApfpjMNbyheIX+NAwzAVspuU18wHnMPPL5jajPApnMUx5rbk8DzT6hWIp3DmUN8lNksUcgcEXA+JWXn1Ggow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jnRUYohirJo6bc9I7z1rJ/LBlkcgpHD1uUbF8MRUBvY=; b=hXUBjld6k9e10pPHt2g8BoRTsA2M6DGSyA6bTMsq1dsg6P9EqNEIjqE3gcDWf9bJ1HVE/uOBc118+gQRf5RpxraSYkkFs++xFXCebFuySheDTQsuKGCjcpThx+51OzSpuUFTsb30V2mBr4sAfD/nlLNdU57g0qQKeSSg09WmKCosIwxZKB8Im9pYuo40CrE0a182wJ/nJMsU/wAf7dzZiyfB6gIRtJZzXTw9BTqfPWfZ+Pyrm+w9QSuGt4iA4gKzx75qrv8MMVqITkNsv0ge9e6tDez2hiDQqTLbXGajg/bjvzItP4J6zOjH1TsXaFPvnm+YS0pGULXbXFF5fyLkhg== 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: [RFC v6 01/13] target/s390x: meson: add target_user_arch Date: Tue, 29 Jun 2021 22:19:19 +0800 Message-ID: <20210629141931.4489-2-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HKAPR03CA0036.apcprd03.prod.outlook.com (2603:1096:203:c9::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: 1c40ce31-9aa4-4ef8-4404-08d93b08f060 X-MS-TrafficTypeDiagnostic: VE1PR04MB7295: 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: 2khI0VdifgpDCEQ07jazdu9eDP2yAJAhe6nycjfCTKVx7Dq3EIem3A3aHYh5Ip+a1vg/CETUo5NejMiIil/RbwhTWYQXClF2/zbg66H5o9d0NMRsCO7hgbR55wmn+owwkHB4FfLoSTamTZ8EcgcqbY5Z9M809Hdy6iluvwOTvw0UtfhcbVaYueSIYliEiSFBm0GZbPmZ6zahgnI3VjXWLsco1cvgb4gXF5kGTtkh2m8rwl8GWJDjcXekWD5CoKnHA1rc4u4sLPYz+Dn+sSBfqzrf2VNuxgX6GVHtPbC+PBrTT23q3N9Bf412gh7hkzg/PWkJoWh5Q8DiBmdC6E8AFf5D31xRRGg5In4Bf8ydj4lDmd4DZ04GhZtqR1CB8f6YUmOu+8eGBJZFbTH/0VH7z7hQdOMqKoI57Ia9ZMe1uGwYLU6Xg+V4D/cqtsxH63ji2Q0O7q4Q4guUj0kM7OTfTJQ61AhGiIT0VYBhr+IjtcoRQ+0KusNKw4EZ7WsL6GVK4xhuhsXAOQNjQoAdwKnXRN9Vs5wXCzSfKJe999w9xu4Yu55YdsXLFz6HlSmN7Ed3fRi5mNeiEGmROJxEbprNaQMwHWHObjcwB9z/hzWi0edFfvIzEsq3lN0Rm91sJ6bkaVnzfHYXH6DyFGt//opTPC/xTSJrwq9Qoc025ATEWRFQ53Z62G1CUZ1/Gpkczsitn3eO0eA3q8EtVk3BJGbqHg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(136003)(346002)(376002)(396003)(39850400004)(2906002)(316002)(4744005)(4326008)(8676002)(36756003)(66946007)(6496006)(54906003)(8936002)(66476007)(83380400001)(66556008)(1076003)(16526019)(86362001)(6666004)(2616005)(38100700002)(186003)(956004)(6486002)(478600001)(5660300002)(26005)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?NyE41HcbLDSeoyaGqfLRfU73c65kf9LHRj/m6wwzx+XQuu3MMEZR59mw0OBU?= =?us-ascii?Q?fWu8EQIrsnaQpDf6OWKl48JOc7WghlBzC/9GHBJ6m/FhBSgozhLsjI+kSiE5?= =?us-ascii?Q?dM6bnkWCuUj48oHQGEwvD9IdLw1TrvSX1Zd2GCLuci2hv4WUOPogR2lNjR/m?= =?us-ascii?Q?PxKF0GjBSwM+E1qY4XkuHpcIAv3MQYZpt+TVlhAhTqnKOn/9BCAcwgoxYIgg?= =?us-ascii?Q?eN5jVdyC05kfWh0CvwJNW0YCQSd0DMz2bTsQlHOG2aGBPVIjNYolUFwKx70x?= =?us-ascii?Q?IfEoRaxR3xpHRdEzCdz5FPraWHmWbiFoLTLjZj0mu7pBPvDXNfE7zM0S/NgN?= =?us-ascii?Q?lAWNgy6dEJEwXEd4G89GXfBYKlCB/foXUSN9DAOlL3oG7PPw/75wm2sJgIUK?= =?us-ascii?Q?BOjSx5XeoqZKBseyvs1Fjn7ePVL9luxtO0klhX4WW2U/f/odsflMSoilSBUi?= =?us-ascii?Q?dWhtYy5LGKzsjW3kENoED/Pd4Z3mPWoK8XiZvGrwOqAUfmWmCeTPgGScFdxK?= =?us-ascii?Q?uKRv4r6bnHHypu/KYHYQbgMJdatajp33TduI3vtl1P0vWPy3XlflMnqJKQI+?= =?us-ascii?Q?UbxLbiTelRxHmCupriXEe51xM9HZgm0R/n0FM4a/pMYHzPoCJRmF+uCX1uM3?= =?us-ascii?Q?ALBJ5ITLb3ddNF/I398yI+aCccY6F//7gpOkNZdXv1htNM0lGmVZO+sqRnLU?= =?us-ascii?Q?k4roP1Kr6LA94qGh5Yu6LZ8UnDqkIZnZFPn1/CaR83oO2I5Lz/z5Ug1BoDQf?= =?us-ascii?Q?H0s8g57OU7l92NSREfKOWoIC402Si/azppSS4HrW2qil9cAwJbUqP4cUkNlX?= =?us-ascii?Q?yuug6diNYzL5buwjrwTvvk6lG62xzAg0os1+/p5WgTS18WGWaHrU2bmcLUGC?= =?us-ascii?Q?AsCpRmb2pfDQ1rd5ovV0sS9ObWv8OgpOGo6jv6cGdh6YKgRp13DCHhqCKZTl?= =?us-ascii?Q?QNym7RX9IhAS1WUMBKAgfY23yp88jzEkF+ox13EFxRsW6j8kbKXUo2WEWLqp?= =?us-ascii?Q?h5voFVFGVevtiudEyB4XwfJj3jnkLwy4sjxUjGnlfpKoHfSTAfN+w3n2vYLm?= =?us-ascii?Q?a9BNWxHcBu8jm2BivM6B3TpoYxdaUTtONVHT55KpA7LSFJ1Q81g94CVGsEbG?= =?us-ascii?Q?7nMhV1DSAn5jPPOUlii8pYM2qOyi3YqAHnlJY3zi/VLmLYK6on+c+dhGQkD1?= =?us-ascii?Q?cDw4SgQuEiv+HuDWA+xztvlzll0rNqUBaGcXWcq+Up5pWQUQ9TE0dDXvfnsR?= =?us-ascii?Q?pXRNM+ZfkVJ4F432rVK1t9T+TvxCOrdBuX49U6vQEpdXmA/7XQak7bLzsi1P?= =?us-ascii?Q?NAbHIBabPVvWubkJv+a69ZWh?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c40ce31-9aa4-4ef8-4404-08d93b08f060 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:19:42.9512 (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: 78jNm8aBQtlnKCFsD/bLotvY2MJ21k1eMUvXFaWPg+4CtojCp0JUju/MzFYjkq/q X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7295 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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 --- 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 Sat May 18 21:26:48 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 1624976530664523.6396381229772; Tue, 29 Jun 2021 07:22:10 -0700 (PDT) Received: from localhost ([::1]:59882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEcr-0002Jr-An for importer@patchew.org; Tue, 29 Jun 2021 10:22:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEag-000869-2S for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:19:54 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:21182) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEae-0003YP-A2 for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:19:53 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2105.outbound.protection.outlook.com [104.47.17.105]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-21-6aHBbskJPNecvegVthr06g-1; Tue, 29 Jun 2021 16:19:49 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VE1PR04MB7295.eurprd04.prod.outlook.com (2603:10a6:800:1ac::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Tue, 29 Jun 2021 14:19:48 +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.4264.026; Tue, 29 Jun 2021 14:19:48 +0000 Received: from localhost (1.169.28.175) by HKAPR03CA0022.apcprd03.prod.outlook.com (2603:1096:203:c9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.12 via Frontend Transport; Tue, 29 Jun 2021 14:19:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ejnA0XeLS8mP5uKqVtQafxU3Oq3hXVKd93VxdEgF05A=; b=mlESrapBZdKQ8zyQA4wgSv4kKokfOwPCVJGgkqnlEveVb8pptlIp8ZSgY0JeHF4Q2PU1c6 EzIrE6GdYe/gCFEpu2kaqjenKOsDiG1lWx6zHPrBgZ08XQa1nVzqVoPiRkL4HPo12gjjpG YQaTmcDaGSYCuEw9IMUDpsGh6pK5D3c= X-MC-Unique: 6aHBbskJPNecvegVthr06g-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=duO7POqHt+o2Pn0tnwjxhE7MJ/FU1edUsAFIP7VS1De3YM8XgioqGgKhw453os95pmjVK18aJmBaMgdNBU5qOhPU4DUNE3t4BCoJFptshus++LDEEcEYdsbaavD9G0Xi63WiQ0Kqw9EnjPhyQ6n97pZuOVQF20e5R+ojbcI6uo39y/c87ccdhSznNdeYOwFoO5DXFJjgksSTuD1hr6RhgtR7Hq9rxe10c7Bz4eEBg63FLuMXF1xegUcQ4+Mc0gMrT5ar1Wa1QQM4/e6pZkzl9sFtwYElKkG34PiYUsNsGZr4rNmWzzvGLaxlDZu0J9w2bZW3BGDSpAB53dK8kgwIrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zc+NdAtMX+OVdXw+G6Nf9o3ckvzhqYycZb1Wm6H0L5g=; b=g7dm/hZqhTP+aO9/CJNdwtfxe4kVNn+pxyrDHGD9Md3hnCW7eb4uTcAdyrRR+1CFcw/CMLiHMQep30+79ugXQTJ7Uo3yjSE2pLFzh1HHzti9ks//VUDfRIGGAQW580uy1iA4kGsRWZxcVI014fSCeB0+kiJ9YHTZAdMe04IzYZzWxgeI31bAi/Es4a+7MdJy6ZwoxpKNFuxpCML7166TwjNRgSxG0lyAstyDDN0jQSS4haPMbTzPuQ+/peR80pFk8H4u9ILZkiS2js31YPBKRNHyC37rjc2qDdMInP9DB3BaMbYCN7CteoJDEqtCpez1Vt4iPFHvqTorgkP/5S8Q8g== 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: [RFC v6 02/13] hw/s390x: rename tod-qemu.c to tod-tcg.c Date: Tue, 29 Jun 2021 22:19:20 +0800 Message-ID: <20210629141931.4489-3-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HKAPR03CA0022.apcprd03.prod.outlook.com (2603:1096:203:c9::9) 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: 5db6df9e-efde-4550-4011-08d93b08f3ec X-MS-TrafficTypeDiagnostic: VE1PR04MB7295: 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: Ere/bwLmkebZpme5Dp9rTAwjtZpoU0Z/AE4+hlYBVhP0UZ0I/pBN9RFlObXcOoL3fRIQHu/R8zxo59Ct5K1uZjOK2uy8bZQOsVMNVHM//whMy21p0VORrk8ra+b0D4oIK0+n8SuboZY7tUNcyUUUBQYZJtaTpO/dxOYoySKOT4TfOq0Kikfqw+dcVI9Wtg31/rmVKsHWSH9Q59fEsna+PplsQXXM9AZaOI5TYYo88T7lGSjExXp+Mv4QUmlTpLb0Jj2vFCHYxnB2tdziEL7dpbmGfP/coIQjAY26KqBKwT17+Q2rvtneWuihrcNIh5FSaPzCpQN0/WG1eP9YFKkeqafbTowDHcvmaaT2c68u8vHREkbgukEDsPqLYeDWFlBgBN0LP7gUkjWTbgBJFgeQdI7O4XpO1iPGNw+bfcnvv2hO4rAPeMBdlwxY34Dp/4H8Js8JHDe94YYGgXXkh3iN4nWsAk8bFyJNvIfk8OAeoH+epC+FLDbxj6s9bnMHCqgNs/bSAzL8VpHlPENbmDGpy6z0Ykf5qnU++StG3Ba2qKhFuo1JtG523nsc7btw3KLdHWz28+oEVNJRPZDYsnMh5dJ9ztm7D2aqYNKeTUTLtEMr97DgEulREcCgtJS1/z3UH6Amy9WW0g+f9lw7FVRwmafFCGPxkl+q5OAk+z29MaxAy2EKu1IIcUir0XV/uA63J5vvpbue3aA2S/OYA4zyoA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(136003)(346002)(376002)(396003)(39850400004)(2906002)(316002)(4744005)(4326008)(8676002)(36756003)(66946007)(6496006)(54906003)(8936002)(66476007)(83380400001)(66556008)(1076003)(16526019)(86362001)(6666004)(2616005)(38100700002)(186003)(956004)(6486002)(478600001)(5660300002)(26005)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?u54OmKvrU0pDJwsVDVJ5BOVJNk25nX23N7uyENYOveF4E65o9++cLfv8sH8Y?= =?us-ascii?Q?Hy9s8jZkyaS3Ttr7Hyc/L8SNS9+0MvZv4i/Iw0pN+lq/sQe+fe0p4WPP/zcB?= =?us-ascii?Q?TQHA8LEtJGHHb2vJMZy9ziInoIv2VUi9KQy4qxCM9+/gArXyL/IG3d3Xei4m?= =?us-ascii?Q?kpEvYdbXlXAuo3vWs+pASAFbpHzRcLurZltc3SLRzyFCS9ViCuEMMKgAPlpl?= =?us-ascii?Q?HZ2L9BvjKNnACuO/9kE6PtIZU97agqwOGuBQnc07OfDi4NTphfGBYYmf3D3e?= =?us-ascii?Q?VWBLlXO433fetG0Ay/3lQM7dI3m6WLvhhpGs75Sqi0+fSTv+aheoyNYKi+yT?= =?us-ascii?Q?1790f8DsYCeSvjLkmoUB4EkeVq+rnTcF7XgEfN2o4PTRPmVlEHd92oQpklny?= =?us-ascii?Q?mgL0jmNuzfFq9pKps/7HcYM8EX2DIfEfvgZEtf1n1VLoSYh5ivUZ4T91iYcl?= =?us-ascii?Q?Yyep94T2vjzTAjHq0sEpOh489+DOLP/Yy4cbPq9BnOOQLH10HOOxMkMRT9hZ?= =?us-ascii?Q?6VTsPOI29W0HiTZW9fdGHgITi40Xbg6CdyGwkbTdpTPzBEhno1TPiJvIQ715?= =?us-ascii?Q?FvaCBPLrUmj7fcR1nAieDgye7ATE+IG19qxwUmWOpXjQtaLUzV34NMD82rNl?= =?us-ascii?Q?alGvSwdku7VKMo8Y6Y8eAUEQJh4Ci8DSDzqN4MHSUB6Gcbg9/1OTkUF8TB55?= =?us-ascii?Q?iuajFL5+JEBltPpyqldV5EQ4Ed3TPE5GOOobuvLeesORKsL20i7ZdVTFMG4W?= =?us-ascii?Q?He0dgfkAx00IFXv2QY3s/gxtfGJmsGaUnkL+fjDk63qSX61ZEa+4WBYNZZLb?= =?us-ascii?Q?pct5eENZhaj1IIxT9xBHRpLAdvaYVpI73YVurrfZ4+RXQWSafQ50JXN//jTt?= =?us-ascii?Q?cOdmSZkqXADSM3scIeYF36fJhlaR69NfKARxN0VdJ9hUWl4arENZnsrksN3H?= =?us-ascii?Q?o+r/E0NyXuXuhnUXemGBzNknhSQghwCGYqo1MKf+U1rHJGGsLcECGqOKih0m?= =?us-ascii?Q?3hhvykFlFLeAr5OWoqVY+hp/NeUggpJqvM2J777M7p2A3ya12VqzEhkkn5ZA?= =?us-ascii?Q?lLALPbYdcBJ3Bz0jMBPAIZ/zQpjfNLTsFT6aV4dgU015i9R/GEcLWeoPOWHv?= =?us-ascii?Q?ycAml/RiwfG2XMHoBwvVi51s6vS+AmwqxxGSIrF4y13GbF5NuxTwubvIx6I1?= =?us-ascii?Q?jkLtJgOhZWet1JT2JC8UnhvicLIKw98BqiTeEbtXAnQBcYYAXPDR1Z4d80ay?= =?us-ascii?Q?/16YT87E4sW8pT/cG/d/ue3mQAxkl8wr3oihwoeBnDmPfl4DVxFaf6cdLSsI?= =?us-ascii?Q?FZ7obV27PZYNPLBHmJf0Eo+C?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5db6df9e-efde-4550-4011-08d93b08f3ec X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:19:48.9098 (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: xbv/zVBMDEIWNUyW2nAXjrY1nT+z5HA3j4EJn9VzK9nnH/usWh1vhf75AhJA4ezH X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7295 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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 Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen Reviewed-by: Thomas Huth --- hw/s390x/meson.build | 2 +- hw/s390x/{tod-qemu.c =3D> tod-tcg.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename hw/s390x/{tod-qemu.c =3D> tod-tcg.c} (100%) diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build index 327e9c93af..02e81a9467 100644 --- a/hw/s390x/meson.build +++ b/hw/s390x/meson.build @@ -16,7 +16,7 @@ s390x_ss.add(files( 'sclp.c', 'sclpcpu.c', 'sclpquiesce.c', - 'tod-qemu.c', + 'tod-tcg.c', 'tod.c', )) s390x_ss.add(when: 'CONFIG_KVM', if_true: files( diff --git a/hw/s390x/tod-qemu.c b/hw/s390x/tod-tcg.c similarity index 100% rename from hw/s390x/tod-qemu.c rename to hw/s390x/tod-tcg.c --=20 2.32.0 From nobody Sat May 18 21:26:48 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 1624976755628817.5564305327173; Tue, 29 Jun 2021 07:25:55 -0700 (PDT) Received: from localhost ([::1]:41794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEgT-0001Cf-Sm for importer@patchew.org; Tue, 29 Jun 2021 10:25:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEao-0008Vx-SL for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:02 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:57014) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEam-0003e8-P8 for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:02 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2051.outbound.protection.outlook.com [104.47.0.51]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-31-DEduSXoOO7O9XSntx2H3Vg-1; Tue, 29 Jun 2021 16:19:58 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VE1PR04MB6445.eurprd04.prod.outlook.com (2603:10a6:803:11c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Tue, 29 Jun 2021 14:19:55 +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.4264.026; Tue, 29 Jun 2021 14:19:55 +0000 Received: from localhost (1.169.28.175) by HKAPR03CA0033.apcprd03.prod.outlook.com (2603:1096:203:c9::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.8 via Frontend Transport; Tue, 29 Jun 2021 14:19:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gSBbX1WXaZu+QwP+EK4Jb0gewy9eheCKRm2hVCQfCLs=; b=h0B4EYnH345vdGQSlnDxby6zwd1cH1t+VeeyBtd4oFE3tJ4g9WIuagc3OWbHH+4HUlJXZX /IIHUcQAYvp4+uaD7GSfN3HNd+6wv1aCO5qyIXR5mWCeYimqCip0Ro7ZVXGqnAVGaytwSx xdGj3pL5wn59fznthQ+AZFWI64IBPcY= X-MC-Unique: DEduSXoOO7O9XSntx2H3Vg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LXa4jXlaUUS/TQ38+jKRDIn1EeUD+0I5aBJPON9uuGAY5LwxyCSnNT1f2twDTrPpbJWQOb/LRRiWEWU+UuM1PEd5p/fyIve4O7Eb3ACEjwbXIvaXJTuYPXu/xOuKGpNNWe5tZNgS7d/w9l5E42iaPH29Xp/uHHZ4+bRCuB/1ojP6wctnTF30QpxQWEkKldCUDnrUFsVCaJ7q7n5LQdKcK71L4PWbmmhRywEfa7jbyvtu7qqsRMk9aVl1tSNxMz5Bd5Cv8ueHwpgwfREEynO7eUDjS3D4NpVx7eE2VC/iUHvrSXGk2sfQwyCKffa/LJsHykbA03HhFuejJ97OF3JG2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CsJ4x9wsHMPluQQrp0HAkUlVSXc/ogjdBWddnj//TUk=; b=Z1QkJ8IMhPLk5owaZLr374iP/DK9h/Er187+hUWN9ByOFQ+XYn1Nsah85N/yfeTdvKcQDIYu/xeGFq+kqSiFNHQh+8Pej54b0iuLPoKSgdodBuznyRnr1vGlQ9KC4OWMEW5xsZdbl2f0Yzj4SG3LZP138HR7Tqd7R7HvY9DEYKICavW+P3gLD5VzDSq76ZvBV9HRhlfbpKvk9AdUO5UQu6hdubAWcF8D+ZQPRmvMowQA/Q+rW0OwYGPXC5hKnnNz+7KyHlVondTIJHo0aGEVFCTXnR/Jy9so/Ti2jKHC1+xiMa1qnURSimdjuH+It8Nfs6yYv/FUYCdfLElNhkyf2Q== 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: [RFC v6 03/13] hw/s390x: only build tod-tcg from the CONFIG_TCG build Date: Tue, 29 Jun 2021 22:19:21 +0800 Message-ID: <20210629141931.4489-4-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HKAPR03CA0033.apcprd03.prod.outlook.com (2603:1096:203:c9::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: 067ed03f-5716-4aa2-2d53-08d93b08f80a X-MS-TrafficTypeDiagnostic: VE1PR04MB6445: 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: 82KFtMul7vC1017vS0u5ZEiC3VU4YKb9UHVvwz51ro4H80dmI1njQEhfnlIue5RNSzMitOZHuCTbPTbluBmjUuJ7zckKkWg9Ktg0DgzkViASyUOZr91Q/khwoFtBSyh/BWQuqy8a2aEbi3jGhGEsM9rsiuK6XVElBxTAKvEIsYwYMcq2X/nTnLCich3YwshL9hwlPzhjKt8fwaaEojWJ3CHN6k57W7ApjY0J+ewhBsfoIe4foNPDdFi6eKyNQ8m7uQvMAHXJgyUpruJJUEGBncOMA0VfVcD/M424UzyL3oVcl5SZ2vjZMH4ez8UVc50p6tAT+3QVk4X1p3bvtvbOAGpA2cbXShz8HnvXs3WyW2s4+xL8N0NpsyDz2lC18kCUqq44uKd5HppXbTnhUI685m+5doHZdqte36ihYMUykt9VpWG0j1V2RkfVUHVwxEKxG2IxlAheQ+M0+SnXgKP7XFEPvaesHLTRPh0fOT+CwXNPV5c0IwGJ1MQgWVZp0rcJ3AmkIyCk1dZDOKZBByAW0DP4E8rL2I9tZnQ8Qw/5dPES1/vgQdwKPrDNPeafiLBqO2Y2Zg49/VJVzUUZEZ5jUYohGfkK4H4r/iDe9YUtV/JKDaX+gSvSevsKRM0IvJGGkIun9Aic0eOBdPIzOUyWkwZcdlCTvwRFO47hKDsywRrIfWwQkFB8N+3MY8dO5qxH 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)(366004)(136003)(396003)(376002)(39850400004)(38100700002)(6496006)(86362001)(186003)(4326008)(2616005)(6666004)(956004)(16526019)(8936002)(54906003)(8676002)(66946007)(26005)(36756003)(6486002)(1076003)(66556008)(66476007)(5660300002)(83380400001)(2906002)(316002)(478600001)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?20UUSsUIX2244CG60mvHv5lBpBOPcY1KKay3U7jQth+/YhrAnbGN50lrlww7?= =?us-ascii?Q?kwwhxJPRjVXUOs8JXiRL5Fe7iGpL9mYDjbCYxMUBY2Gy1nprFUsO7+8BT2Tb?= =?us-ascii?Q?PZhwAvSKuBtTGKPyWt1wyBdBUw20O9aso44lL9DXEKvd5wj6uRLxcwZ+hG+E?= =?us-ascii?Q?+aFHzhWISJpA3Xzw46IEsl6cRFBRRvJONSfcXSJBi2zEkwUnjhSOxczHDdV6?= =?us-ascii?Q?XORlC0cg+McsTWGPFXBYA8yOZRvGzysqDZaj9+0T4OLSld4fC+qO3ggt/Rul?= =?us-ascii?Q?RWl/dTN0b4RK7uGRGz1o6wne2LdNg1SoRXfFHM0EL1J2bUTtC6DgD6iVBGyh?= =?us-ascii?Q?k0YXHZYdm9aZ9u1PCV2o+A3duYOK+mziABGOO3LtRluz9m4OA3c1jZ9inkGc?= =?us-ascii?Q?R3dCaSUBtnlETOroCWSxrjLXuL/Gz8Dd4tdwrk5iS8F7dqT80HKaIsowF7QH?= =?us-ascii?Q?DfZUP/zUeNwtRrKk1As9fIcRUBtjDgIxlvTGpotG1todYqP6GoSMvvrAYSGu?= =?us-ascii?Q?qX4qDQzy/rrOWpy1nEwzv1IuMB770YfMz6zw472mLWHbKO9jKjgB44foNTwh?= =?us-ascii?Q?sKEEU7N/CPvUPKIpfXAysqeSjeOYcj/BV5FBwUSY/ExXEjQeuQ41MYlsf6qI?= =?us-ascii?Q?gP6qRoXt6YCDdS2S1CqlxObWebL7gket28bNKp+bxa8jMU6dg7zmznVwpvx6?= =?us-ascii?Q?2ZFpp6d8AioXQQWPNV6etPge7pA6NUCtz14GIT5fmQGWexHkncHZA31TMhGj?= =?us-ascii?Q?1bH9mB8kW8rN0RSF5SY7+bdwksqQLKZ62GfP1TNRNLOIVFirVjohPap4peYk?= =?us-ascii?Q?fZwYthnD6lAvlCgNEoJ1uaXgdbnS1FntpskwTmNljHbElwOmVfdyfm8k3Ljj?= =?us-ascii?Q?Qb09uYtieuEL/8ml5HMosVP1nUPhMo9tVecSuybLhNO5LW04RJ8TqQRF2Mnq?= =?us-ascii?Q?fMv5/g8/Vlpk+dCToELzyA6GwIzuKxzZGFkPtywZ4HX6kz7b+PKLv3C5yLvb?= =?us-ascii?Q?lOfH8ewNFTOsivXEAPw/6g36u/1Ncw+SS6b7iTke/E3jxDjaNIiMtmEPOIjD?= =?us-ascii?Q?hXyMwJwdXOY994YYZ66mFp5OKcDqeMeSR2TVni6o+GFd/WGI2iUrjXh4WBY2?= =?us-ascii?Q?l9zsy1mevN2Ne6c2hInjjPwVPCoi+a325sOeQv0pLUMzvq2mGQmdRG9aCxOk?= =?us-ascii?Q?VrLc+2+vAko+pqiPBGoPdBnUzXo8pskOGbrYmcV424rqQ8VkB9xnCck146ua?= =?us-ascii?Q?7cA9X+2rvH7gJErOizcDYS5ptFP3885aTrSU282+Gs7PyWYmV9XDxiusJYiQ?= =?us-ascii?Q?FizMR6x2cPsJdywAaZB7b2jr?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 067ed03f-5716-4aa2-2d53-08d93b08f80a X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:19:55.7928 (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: sRF41w8XzXM3Z9uhOFq9Y0LTzEDqFnGoHhep4RsliUBPIpOEksiouQ3S3fGvlyuW X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6445 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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 Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen 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 Sat May 18 21:26:48 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 1624976914710984.6948317197382; Tue, 29 Jun 2021 07:28:34 -0700 (PDT) Received: from localhost ([::1]:50306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEj3-0007PY-MY for importer@patchew.org; Tue, 29 Jun 2021 10:28:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEat-0000JB-Kp for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:07 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:60793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEar-0003gD-Gg for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:07 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2056.outbound.protection.outlook.com [104.47.0.56]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-26-odSOvGG-MdKZRHTJ7vcmXQ-1; Tue, 29 Jun 2021 16:20:02 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VE1PR04MB6445.eurprd04.prod.outlook.com (2603:10a6:803:11c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Tue, 29 Jun 2021 14:20:01 +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.4264.026; Tue, 29 Jun 2021 14:20:01 +0000 Received: from localhost (1.169.28.175) by HKAPR03CA0036.apcprd03.prod.outlook.com (2603:1096:203:c9::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.8 via Frontend Transport; Tue, 29 Jun 2021 14:20:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0ffHu05ns0a4PVzRntMRhGeR7DMvg0pTAyQfKBKaZz4=; b=QzV9LrXLhA0zN1ZgAHxk9qxAhQ5sBCfI7PHCY/2EodX2A8hui/HUf9EE+KgCzxmpzK9e56 hvp5bsizjCYYMz7g2LX0Bam23yg2Yl9902pS2jsn8pO3ksUv0AihAPHLrAE/BGWL7Lo1oy T1y36tnE7J27ZXxqSTaUac+FLZB5RyA= X-MC-Unique: odSOvGG-MdKZRHTJ7vcmXQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ddXYNudVK3Ef5HBBKXYY1OWetLAzUF6F1UoBP+A3t9Fil9OaMFBrWL7XcaiOi/y9tlbOU73ZszDs/XaTu25MWKuo2DVoTFX3IdP8Gc++ttypuV4SNY8Qpa0OmYhI3j6c3F+c1EDRkkRm8VbOH9cN9dPIh+3XMBlT3wGAMNhbgHDnSfKIdi5DN6eNTu2t/8Cg06XDEdfVBMmfwy+rV1Opa81ifciifz6580rmF/Exz793dT+WgCbVMU6LHIwvOO3TrHd/5H+SSA+VS0U0lBEED+F4aW94aQ93F8F+hJ9NiCg4RXz38cYzNU4hIjRJf1rQek28rfk0bYJVI7xRVqhGfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cr9a3tWzY9nE2P88NC50Jvm5gSYST+el4uIWz6Llkeo=; b=Vvl5GOL/+UaGSjTAPNXVtdKGJJkWoSvT+L8IKjssOfJq/dkSSogw+ZTBGp50RyA0MwfTGF/CME7skhPoVFTZqNdks+LT7DnfZdC1Z1YTeuizJo58WQ3Llk+Yh0cKaQt1JrjWtQ3BWdFNKb1unLjjEiOLF9zHcJ9d/r81OHmmjnHPN9PW2XfkSh94WwbsIuq9LwYY9DMPoUpUq2sx1m72+tUg8zqSzhe0tdeGTvecXOsxo6niZ2g8OEuj1w0dV+zx+TB9XbOrSwEvVaIqZiXZu8gSBZy6BOOJHHyc9y4lnQT1IEWeg3avrfklMuVb1Y2zno3uhb8GQNN6GcF2K7JsSA== 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: [RFC v6 04/13] hw/s390x: tod: make explicit checks for accelerators when initializing Date: Tue, 29 Jun 2021 22:19:22 +0800 Message-ID: <20210629141931.4489-5-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HKAPR03CA0036.apcprd03.prod.outlook.com (2603:1096:203:c9::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: 37228138-6957-4d94-aa04-08d93b08fb31 X-MS-TrafficTypeDiagnostic: VE1PR04MB6445: 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: cAobbe89FKP4Q9yEuRJGOrJfxVSRddGtE1mu1fxM9tXzGHSBMn1j2z0iqpddarqi6N4tkj9sY4nzcpecFv2W3n7guKPIlWeS5DT4V2cQ/j4b3BF0/xrydNtExURN/JvTXvZe9G70zCYO+qSn0owfonGX7gMjKV7HBkAoct/oh+OhayMZdSkO/QxTwT6PHf1yZjDjeo4Vpwo93j0s1MM7PlmvQ/PA7vmTaB9Z3K0Y80bLbHR0a7d5UOFyEeL4qTwfQejlspi/LctH4RsNjbgUTUTYe1Z/u2b/UdLjhQ8ZuaIBhdxJUKW26KHR5HxxIrBAIzhvNn2l43XhJqClRRPooaVj0I0dcm9LyJp9nnwDhMOgFccJNE9XDyAFevJBqUSjtx4frUR4S+zql+ixRJVa9Qm1bNqoukKOx/o7l+mS68fzBaQ0a7LMWMpA7xZWeeBwLnKpesLG2hBQbZXtKzsPPREKgkO5FqW/VtZSX34CxH7mIQxUqLgXf8JdP2PGeS3BrmZXOYAcKAHKV0zdtahZBn+mXEtwZo2NuFDkQHrQ6xASothFMDq6fk7givsM1cucyad5TGeL/V9o7UyHX7E5VXFHJ2zjG0KnGATC6QmN6Fvs9Buc85X2HUsR1apPjuzbyiFV/HiYLDQXRKWqZ189Wp+PigCBe7Ge4UHMARCF9pM0d+SVRPBiEkUu5X74WeGSLLRtYyAGh4qQ4iqShtiXJQ== 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)(366004)(136003)(396003)(376002)(39850400004)(38100700002)(6496006)(86362001)(186003)(4326008)(2616005)(6666004)(956004)(16526019)(8936002)(54906003)(8676002)(66946007)(26005)(36756003)(6486002)(1076003)(66556008)(66476007)(5660300002)(83380400001)(2906002)(316002)(478600001)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?7E0ba0/UsBfyGMfgLAuZStyEa7nFS8gTwrp6rrhJ8/0OoaU5Vkeoudu9iy3V?= =?us-ascii?Q?QzhZMwHLsPmELl7700XKAYnkwfRsB9DDvQmBZtuqjf2LbXsbHzO65KNxEz7c?= =?us-ascii?Q?VOur0UzUQcPT4eTC7R4w04RcIx0qt1TGXihOTEqHUCoAX0eMrK0qY1lbxUJo?= =?us-ascii?Q?DhGx+RygNds2ZYEO0pxfozj82Ge6pjm4eHqTo2hd7MD+jnFsGpZDJYvXfP11?= =?us-ascii?Q?zAcUBq+Q/EbQLHSjmbKDpOedJgtAYdbQBi8A7ODSbMjzu8qk3omrU6iSdzcA?= =?us-ascii?Q?DQtWGpJHIfebQ9o9v/gjIc/fUzcq/DX9nKBLWdAr4y8d4HzB3IEZVSOtwHeK?= =?us-ascii?Q?LSQI31fgQpRjTxGn968r7NxHJneiDFHFn6rRICHucCUtPbEBHELJJQfAHhV0?= =?us-ascii?Q?bYrpU7iCBWYuizxe3AYklV2TOTDLJ74BCuiItIDC4rNihms8qx+zNClDPZZP?= =?us-ascii?Q?1mn320R2whqa7JokKm5ogP5qhTySQhRDdkm6IE3CqKGKE8Rr9uWT0phMf+pp?= =?us-ascii?Q?vi0m98PlPHJ91Dmmpo8wg/n6dWQx68rtSwZSWnCepxhVj9aWlmHTZ5+jlr1h?= =?us-ascii?Q?EbaDdnadg3u3gBEEykzaUbcQPhnLa7ZMBk8+vsL5HBGD1Cp4I5TcrFhcnNH7?= =?us-ascii?Q?khcbm60kfU3tMMGUj0q1ZdWro6MPjTmBOPh0L4+H14wlUtNq06HMnKLnciKd?= =?us-ascii?Q?JkNiskFh82PvlR+/AG8NQjPF2I2XcHFuJVVNZrm0pbJPlA2D3ZHvPxMPiVXU?= =?us-ascii?Q?7IN2Pk2keYWJ6f9qPMOL3yLLkwg2szSlo2HG5hrehJJMRtceWNDQXN7Pj67G?= =?us-ascii?Q?FdUwBUSvpptRrEamDzh2Rm1ipiuEBnTuwwOIqMl7VYUGIosYYXU6J3GSDel7?= =?us-ascii?Q?4dvf+JmjruIEQrJlXS9K/rYIHoLdsIVfjYSqqAubWiuH9V0pLLyCFxlXkQvU?= =?us-ascii?Q?6VLVrcU0H8RV+22PLifAC/WQmn4qQMH9UrN3f6z19wq+la1gdSWlOFIzVxUF?= =?us-ascii?Q?lixifFC4jO5GQe+tq8MmRsE23j/gQdhQHlYrp+PInHgjSjYmCYFCyNqGMP2e?= =?us-ascii?Q?s7xJrtxU8+gp4FSLhox02fABcDaF2I1I4AUI8HmoHN+Zasg3+UEiKyB2UWZ6?= =?us-ascii?Q?LiH5D1SegFpKFY7czCz8m0uFM9DHiMNA1XmKZQUvDbO6kv1P5VFyLuYZLYkV?= =?us-ascii?Q?7n23GRHjn0AczYrv2WDO3inGtPeOUFWb8qcsJrjp+fSSZ0q152cOo1MS5QbA?= =?us-ascii?Q?ckruLjSa/B3UFUXRJwxKGu30I4stRmaxW9XNoU22lOWfOsa8OEj4LCfsbh4o?= =?us-ascii?Q?kLGB4Lecc+pxa23Cy7CMLNoM?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37228138-6957-4d94-aa04-08d93b08fb31 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:20:01.0898 (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: t/F8x0g8AOfeV22b3nik7syvhoNVAVFYp18iIVx4t/pQSn9SVPWFjnfaTELC3vnd X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6445 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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 Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen 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 Sat May 18 21:26:48 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 1624976711673980.9373717163711; Tue, 29 Jun 2021 07:25:11 -0700 (PDT) Received: from localhost ([::1]:39372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEfm-0007vF-Dq for importer@patchew.org; Tue, 29 Jun 2021 10:25:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEb0-0000Wt-9Z for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:14 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:49344) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEay-0003ka-98 for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:14 -0400 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02lp2053.outbound.protection.outlook.com [104.47.6.53]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-17-u7BKxNZXOWSPC0ZMoXoLIQ-1; Tue, 29 Jun 2021 16:20:09 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VE1PR04MB6445.eurprd04.prod.outlook.com (2603:10a6:803:11c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Tue, 29 Jun 2021 14:20:08 +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.4264.026; Tue, 29 Jun 2021 14:20:08 +0000 Received: from localhost (1.169.28.175) by HKAPR03CA0006.apcprd03.prod.outlook.com (2603:1096:203:c8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.12 via Frontend Transport; Tue, 29 Jun 2021 14:20:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NZ8IVP+/zApoEh+BqT+JPVGDDLxpay6YbMz/EFtjrqw=; b=YUWz9tIaSwhD1RUWi/QkNqE99Rrzr6ervp30SJ0sdUBSvsjPE42LiS1i+l7uB3WocpLo3H gYzXcQ1Dk8abuSEzGOL4dosBTQHcjDqmxQgnwUyYkog0BL3nHvPg86PTkthjrvC9xuJFAE CBYzG3FG7XhkdqWWFt5aG2+Jbb51LQs= X-MC-Unique: u7BKxNZXOWSPC0ZMoXoLIQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nnmoC3GDnC6SNfizo7IT2Xy2RC5U3+vcBufZFIisZb++OiEMVhMpSfFqG+dXT4rmS1vrJXWVdT6O0C9NP/CSSXiJHWm/di3xX2j7m9oIxfHXMykd+kO4SaeXC42ScCctGc4OnBSwF4XpeJxLRCtzPOqbvw6cQpxP3YNy6oADznjwy2rZArO02UxukkarXBmjijiJzSCtVfAIbAzvGPGHVMYdTF8SGpPUvzVJSExR2J0uAgpPzmUZSv5iBLca4zYpoG61Wge3kqy3BzNDAi/1TRTbDV9+G+FSjU7YMX8MeS9oVwFNlpcsJBZlHbN9enBlhIn1BZy7B6MIiZ7Udu9dZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ytOf7LW+TZaAePb2wsSPx9rQQg7/l+IzunlUfKZET34=; b=fA2z2ca2mDrGsx1K/fy2jXYC+cjr48an9b+kUJ0a6xuZ3PgqEh58k4xFD4iTdcsmziUNBACHcR3FSBgvYDemeqQpMkFDr5+RzFzzqvqA92207MrmlqSAZBagXKrxoYlLF9VM0W5njrNyahIpnw5kn6VZC9Wt5xdGK24N7iHedUEiWWQjvgQ0YZ2JryYSJmzPeT5xCuSA2Dxcgg+7Mzf6JslxUTBKR1UMq9NHlZvjmuJbC/M4EwD6oa8ic5WoBZbAVaYIjnglJouyiwmT9HCUEkwx0TwxJKwjVQkPimqrlscWNxp97i3IAjl9JHYngKKkbkivAwE1bxz0ZkZmyBFrcA== 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: [RFC v6 05/13] target/s390x: remove tcg-stub.c Date: Tue, 29 Jun 2021 22:19:23 +0800 Message-ID: <20210629141931.4489-6-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HKAPR03CA0006.apcprd03.prod.outlook.com (2603:1096:203:c8::11) 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: a9bd9a0e-d46e-46cb-ba7c-08d93b08ff48 X-MS-TrafficTypeDiagnostic: VE1PR04MB6445: 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: dbGpT67fCCjUXXFAb9Ml1iMpePqPe3CM36dVzWfgQnd4d/z4mXOsSRQOfOQnaINUjWPaz4ktiQFLV9+qdcoE6jXXwzCHvn5RSC/+r+5o9UV4MxozyW2yKcqQ4iAVmHinLNL3EpAq/KBImjpfeHhEfzR6Ko3VjW1ttT479VshP7jsbqyCEjDzKLbB5eOnKcZ9bM/ZpizcdGb+z0Qo9lJ9ht6fz8FoNtzqrNCcuKhNgRtpDmAzPOrk0I9aqCErKH/GjHU5tsermy5Z5oALBe0a8oClfFVcOwNOYaX498RjdW3OP7TE/5NyiQKKkUTj4MciLX1YdtsoNUQKPTqQTf+z5aTKcA5Kjciai4JtEOsCwfRbYKXWvb3uNUOOqxXGLvHcEGOPsroz8VSD2ZEuAxnbtTij757fPXQOLyxd5WTgwzKEHdq6yNf/8Myp3Uetymmj4dzL4ct4R/lGgWRozELsz9/UUecCHZDYsB6vXwchnrk2DWVuCb0ypevtzp9lX3caQjTC2zzRcdkQ0uF3K0ybpvtNG6aXSDOmu3HybCZEKwmvSsJ1glvHGsErM8qVjAEMMAJcCGZSkL0E2mSUJZqiy7TJN2MMBgHfBYupWRcsW0AV2c8IhOM1rNFnGs7oDgp5oZIjCoGZgEcZhJWqyacumw8vE+1Gw659zjyH/bkSksmcFqzI//IFgVtIE94U9+C68HRvgfy8zAqDKNgnDTFKHg== 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)(366004)(136003)(396003)(376002)(39850400004)(38100700002)(6496006)(86362001)(186003)(4326008)(2616005)(6666004)(956004)(16526019)(8936002)(54906003)(8676002)(66946007)(26005)(36756003)(6486002)(1076003)(66556008)(66476007)(5660300002)(83380400001)(2906002)(316002)(478600001)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?XyWeQVNZzbQAc/45jc2WAKuyJaUZ6zXmnCA9rGXD4LeGucnsYxNflFbcRjGe?= =?us-ascii?Q?9VMWVsGDVIhKrzqyuc77RlIHIFIm7K6uB2zMqTryo0joMYewVd+jRHcL0Kuh?= =?us-ascii?Q?kbpJUQA3Zcptx4L5uzNVCruV7IjzFhUd9w9VpdwWyvU7KEN8XnUzPJAzkjd6?= =?us-ascii?Q?ws5LHRfiDP4kCav2rS2TL21FtBeBdKf0BkfRy2rY1wP/g58wl/pRn0jJlZBZ?= =?us-ascii?Q?xm3jboeRe09nA9s1PWVezUR9vJpJGxVNAadkBPT9P305rBgYqgLOGCjHoycL?= =?us-ascii?Q?5JH8u9krM8zjpaNmKhNDxwhzTlPdGiqu/kxS9WKUQMBbawnqGkZxi44yVnky?= =?us-ascii?Q?jWDq2HhDCRSxA2+KOHOlvkSu8ELBwUmzaax/2F7mwCsl9DQQTHW2xzsmSVmb?= =?us-ascii?Q?N2OL/Fkcw/PkFvneD+gaOVscAEsA9vkEb4tphRE5fqmYx5au9PHBa74pYOZf?= =?us-ascii?Q?WWhE3wG+2+7NsZeOOzN+O6FXKW7LMghO4hnUtXrZk/cYZgb7NwriQJ/h8/Kg?= =?us-ascii?Q?wYYSdctWurdNaHJVNa398P5G9Lo1XvN7ajzMJlMLibTLBd4lA4Uq+k20PHFV?= =?us-ascii?Q?hXJjVSg3ubCQ1JLKFVvrSYL774vSP8f5Qp2wv83fC64pfj3UwMWsa4qiqRYT?= =?us-ascii?Q?+q+Xw8nv4z5/zsFB3OjJAhHM1bjqdg6H6B+i4wOtnAThV3MHNxaVHrlRphYK?= =?us-ascii?Q?rQSEBGZ2sR6F1h6XamiSDWAOD0pGulVY3NXaIDRIreOgEdqX6E/H5zojMFc2?= =?us-ascii?Q?Cx+3j+yVdCrLn2bAvcPMGKVpXqH8cma6yJrf87HrgOcovE557mcws4snv32l?= =?us-ascii?Q?YauL3fqSD9ZnMs1SmCrbUbRTEEsrwuE2Qr2paGUobKpHcR54Jq4l4v4nDamO?= =?us-ascii?Q?g87gyvqoE0oMgMCZvdxWDZvMyc7Nof/QVNGJfqK9J7MDrp/3tz+poQR60cnz?= =?us-ascii?Q?OU2qJLQfVJRboLFvCX6WaDepgda2BN3091WnLJgJsCTANZ9De+mdzxnqbsTN?= =?us-ascii?Q?xox5vLvRVHraK1C5ceVNh3UuH/k+Jx+YfMrJ5aWNbLb818+84dJOo/0SIa0s?= =?us-ascii?Q?3eDkjEsvRGc9OCjbKWBVRSwa9kYysb7iG3vDXu5D7g5BpaJmDiNT5FWpWqgV?= =?us-ascii?Q?9dBggWVDFfx7liOIWgcWLxfdYna4SmPsEd11Y199RAT/buQBRvn+aYWMQmYX?= =?us-ascii?Q?ImbI8OH9G2gMdFfDwqGuEcws1fUzUhsmG/6V68qjMxcDMLi4adXdSHi74INw?= =?us-ascii?Q?G89NfGtyUU4ClPA8+tFOi8HGw1sQAM6ywR63iSXo/j67i0LUNl3X7RpOiZ/V?= =?us-ascii?Q?iOBiTyQ+NH3YBjX7J8qusO1x?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9bd9a0e-d46e-46cb-ba7c-08d93b08ff48 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:20:07.9498 (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: c5bWl/IankhugczBkA51nw8Njlwg8I99PvwvP9jtHDtZ/NgOlQ+Ynkxt1hIvNyPw X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6445 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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 Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen 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 Sat May 18 21:26:48 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 1624977100387410.187248963153; Tue, 29 Jun 2021 07:31:40 -0700 (PDT) Received: from localhost ([::1]:58992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEm2-00057U-CN for importer@patchew.org; Tue, 29 Jun 2021 10:31:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEb6-0000jt-EX for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:20 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:21980) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEb3-0003o5-Ci for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:20 -0400 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02lp2059.outbound.protection.outlook.com [104.47.6.59]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-31-wvTT9DfbO5afQMhYrmJUEA-1; Tue, 29 Jun 2021 16:20:15 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VE1PR04MB6445.eurprd04.prod.outlook.com (2603:10a6:803:11c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Tue, 29 Jun 2021 14:20:13 +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.4264.026; Tue, 29 Jun 2021 14:20:13 +0000 Received: from localhost (1.169.28.175) by HKAPR03CA0017.apcprd03.prod.outlook.com (2603:1096:203:c8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.14 via Frontend Transport; Tue, 29 Jun 2021 14:20:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976416; 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=cqI+zNKMQFLe2BIr5BybrJJnmrCvv5f06Zjp/CScFUY=; b=W0ggxPFGhXnKjLbaOkFpJn1PCEbKXi+dE6Iixk8kwBal/AzlSP8691px1nt5DHCFyDaXcT WVMbSYuunjYSt89qVfZ+vzWuwtt0RU4Nw9r6xPRjqFMCrvBZy4jb/WoV0rrungQ5gAJB14 a7JkTJEOC6v1tfpgFI4wNqwP3ti5EcQ= X-MC-Unique: wvTT9DfbO5afQMhYrmJUEA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h/mY/+/U2v2+/adZrj4l1eijNZvqpjqtinI+j8OwvGf+0m6jTPpFeZV2BKxCq3aMenxW9p7Lv3fPWYC4Td2d3StJvM3r6MhFqtw3uvLWcnBDMAJEzB5M4Ak+jMvSyIaDZuh7tS3zU/USoKbULAjHk78gZ02xtKMqOive30+fEQCkNgQkkRDvEdvY9jVGsPTCPZV4vi4aNAU/jQ+aFb/bqspmJT6zhObbHMZ+iQw/YEKbL/HtG2m3c3sNJEzslzukrXD62zHxTwd42ANYVQSKa6Hu2kQzld7DfGekJqMHVV1ZHyUNdCStYOE7mMDCeMSu3aoZQp8V+XA9CD8kIyFKaA== 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=Nr8a1bWkBqZHY8HLvos8AstBesZYYUOBSz5czgJRH30=; b=aFef+R/bigj0i1lCXYa7A6t7CYx3azojIH6NRHe0CXTy10QY2fGXIUj1hKCSgOgtIzZjCeQFT8MT3yUPEcOf1RdZEPaJmu1Eodi+5vWQ+cD+8DHHEIabn47as8jTPq/C5hoFD5zOY5kk8ZWhzwt4bM1KGcGGMEC5D4MQpsU0d3ESyIga7NuQp8kUvm7Jqcz/wagfPjksYFDJbrmwnO8JJs8ny3ufSq8gnQZDi7VObfTbyWQs1bo1M2TvKK+Q9amc+vT00+3AnGbvF/aHO1fRzyX9kc6i+Pnh5t9MSOna6o5X90qNZ53reByQOyC+O5SO3WBzaPEKVOocA925/z/OLQ== 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: [RFC v6 06/13] target/s390x: start moving TCG-only code to tcg/ Date: Tue, 29 Jun 2021 22:19:24 +0800 Message-ID: <20210629141931.4489-7-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HKAPR03CA0017.apcprd03.prod.outlook.com (2603:1096:203:c8::22) 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: 1ca05be0-b55e-467f-f687-08d93b0902a6 X-MS-TrafficTypeDiagnostic: VE1PR04MB6445: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S7OzffjovdKmOwxPPm+BDFvK3WckGM/zIwSBi8p7smSdJNklNBv/zuMwuIi5dQEUyNYNgPRPZqonsKoExhVtYqiiOzSZ0FymQH0Fza5TqlItBDXobHRzAgrpTJw7Hh8K3y2+lKq8letMb2S2acfH/Nx9K9yUZ5NlSjKpLPKMon6ofQaHC6fPCsuVe8mi2A4XHZLNCYlMzUNSIynuSO7NRetILWeVnaLb+DaFDdm03LyWC6/2rIej9Kb46fvm4a23/WYGIWgaOT6g8KYVLuO5ppiiR8mMeTuH8CAsJTQVRDJup8CvRl0xRumHyqfDMyUlkf7UYJqJ+q+TLLct1ow5exUD4C8SOZM0VUfIz6IvB60PIgjH0dbe7oG+givj2ij8hFxwKyAIs+llOyEQgGsUZXU7O3GGHQ6CmiJqIdXEi69M9ObUCRjmfF50Gbo2XCjqIE5eY+ax7IwrBxEP/OcG83oEX1Y0HPCEMcjOHyywudmWx+Em7gAyT4N5L6PvSqbgW4kodyCR8gGU4djiFKO9hCeaTy499bG2eVeqjnT6JNcV5T7h9bb13YbVjEoaSwJk/uJq4qbniHi0vSqnCzuEQ2ROukePS+p42mp3kD9tNMZTuPUq0wQXpzGtsdnPQdIYOPBZ/ksNXv9atjb/qz/OKg8YYakBKPTfj2hXGNjf5sR9MYxt+Q+0BueWtRYIb6BWaxnwBy0f3J9xOZEF2tyiAg== 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)(366004)(136003)(396003)(376002)(39850400004)(38100700002)(6496006)(86362001)(186003)(4326008)(2616005)(6666004)(956004)(16526019)(30864003)(8936002)(54906003)(8676002)(66946007)(26005)(36756003)(6486002)(1076003)(66556008)(66476007)(5660300002)(83380400001)(2906002)(316002)(478600001)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?fIdg1+2P5oBO0/elB1cKwrhDzkiXFSsXCmxwtnU9bFa5/KHTJZQlmMGIXRm2?= =?us-ascii?Q?Z61j0O4C4IFNnWRM/lNkuXA9z+nw9Nk9aIZNzUHQG1sQCYH2LFU8GYRkjqyw?= =?us-ascii?Q?6LKNNWP2sVkWkH/X/M7rC4rF+16eyulqKraUuPKz1Q+4tgZsiya0WStWxx3v?= =?us-ascii?Q?ThzsjV0W4sIUGSKZ8mIoUBIzhgzbJY+nSWam7JLpaRBRDVRDJ+YJjNJAzfss?= =?us-ascii?Q?fGMrrhabncnteZPFRC3jOdSTDaOzLh4eio62+SUpDwks0yuS94GD9cTyBuvQ?= =?us-ascii?Q?X+u2gEpYjlNvfrUbu5cQz+i4L2vy+wfZkJsl3oS5eNmNUk+z9E42Dy6KiuYY?= =?us-ascii?Q?T+M7VrdwWkalKVlULIDiKWQCYi6oBEiJAzJtvTbnbEz4Ytpgy1hBLLLi2acJ?= =?us-ascii?Q?bL/tbZAFOX/OrgJwUFpctgDey/eLwu81JLlL/CsFzkbU/jZ0HJh2ZCCFB1tk?= =?us-ascii?Q?7cnrjz8ZVwJwP+MTVChTZAP/hskkBRagWuIRnOZvF6mCMP8BiuS9x/MP/HXZ?= =?us-ascii?Q?22oWhZk5vd+9ZpCWkSbRtUzzwemJ471o4HWUdPeueZ7AbbGjtUo6v+b4XExd?= =?us-ascii?Q?JVQZDuLRaLIofRQ8pvAAVVS9M2pCL87pI2Q9nwW4WvfiQXcP7P+o2/dyAl7I?= =?us-ascii?Q?hXI/eeUPPohd6rR8IeJZTAJ442VKtPW1fyDY5nTOLhA6taiETvO8sc6Ez76y?= =?us-ascii?Q?rF/GQTyl/3HPqDSFjMAwV8JKiM7oFjI2COQRoI0p2QymKCMxmVXvXMM6B6eA?= =?us-ascii?Q?FFo7PGbQceH3va4RXxKbtOPqKhbiNfarHYSCz/x6V4+Ds2enyceP6Ffzt3sP?= =?us-ascii?Q?dWnGaSbcAp/5ulMmpJZ9P4J3nyxc01q/JG6hjN9d99BXSF/tla3FeM3m44Ui?= =?us-ascii?Q?ayAvbaHrX2XlQm3L+tjmU1bqGv/CQeCMuY/HY/KhzhWDMXn1sQFKDQ6DBzOA?= =?us-ascii?Q?PUxd/WVw8Pg6LD51W69Q4lLsE75FLD0PL2PyQCvnGSYELM1HRIHlDQRW3vPT?= =?us-ascii?Q?Sy0Q3vcwcRLShazsGukPq7GUqV0pjwg5AHqe9MWOVYw6O5+3swx5pVYdUGyz?= =?us-ascii?Q?lZreD/FXxnrA3CYC8EvzkivjpWxAhtS4p0bTuX1EBXV7Ifj1/RBekDf2c5ek?= =?us-ascii?Q?yf551lkI1aPWwAlQgEwec2zc8bK+u0dUswPUcOBti3xxZc9u9DTPHUPTjv9v?= =?us-ascii?Q?ps0a0Prtfip7XAHI1JyftN7cq3i7cKdsB3+xtG767baKy9RlFY4LClpyCPT+?= =?us-ascii?Q?TEocwwW8ZMK3W6eafDnqtXdZgAbfhQPUvmPNefZtUQ6LGYieIXeuMaDJXKC3?= =?us-ascii?Q?ozK/1+/KmUbzNjpyTUZB83Uh?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ca05be0-b55e-467f-f687-08d93b0902a6 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:20:13.6995 (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: hXk3UAuXN7cLBqooeO6OTacnAEj9RIvI1wSGxlRGUvei1H3QCvLzjOkBUXLRe/KC X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6445 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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. The internal.h file is renamed to s390x-internal.h, because of the risk of collision with other files with the same name. After the reshuffling, update MAINTAINERS accordingly. Make use of the new directory: target/s390x/tcg/ Signed-off-by: Claudio Fontana Acked-by: David Hildenbrand Signed-off-by: Cho, Yu-Chen Acked-by: Cornelia Huck --- MAINTAINERS | 1 + hw/s390x/tod-tcg.c | 2 +- include/hw/s390x/tod.h | 2 +- target/s390x/arch_dump.c | 2 +- target/s390x/cpu.c | 2 +- target/s390x/cpu_models.c | 2 +- target/s390x/diag.c | 2 +- target/s390x/gdbstub.c | 2 +- target/s390x/helper.c | 2 +- target/s390x/interrupt.c | 4 ++-- target/s390x/ioinst.c | 2 +- target/s390x/kvm.c | 2 +- target/s390x/machine.c | 4 ++-- target/s390x/meson.build | 17 ++--------------- target/s390x/mmu_helper.c | 2 +- target/s390x/{internal.h =3D> s390x-internal.h} | 6 ++++++ target/s390x/sigp.c | 2 +- target/s390x/{ =3D> tcg}/cc_helper.c | 2 +- target/s390x/{ =3D> tcg}/crypto_helper.c | 2 +- target/s390x/{ =3D> tcg}/excp_helper.c | 2 +- target/s390x/{ =3D> tcg}/fpu_helper.c | 2 +- target/s390x/{ =3D> tcg}/insn-data.def | 0 target/s390x/{ =3D> tcg}/insn-format.def | 0 target/s390x/{ =3D> tcg}/int_helper.c | 2 +- target/s390x/{ =3D> tcg}/mem_helper.c | 2 +- target/s390x/tcg/meson.build | 14 ++++++++++++++ target/s390x/{ =3D> tcg}/misc_helper.c | 2 +- target/s390x/{ =3D> tcg}/s390-tod.h | 0 target/s390x/{ =3D> tcg}/tcg_s390x.h | 0 target/s390x/{ =3D> tcg}/translate.c | 2 +- target/s390x/{ =3D> tcg}/translate_vx.c.inc | 0 target/s390x/{ =3D> tcg}/vec.h | 0 target/s390x/{ =3D> tcg}/vec_fpu_helper.c | 2 +- target/s390x/{ =3D> tcg}/vec_helper.c | 2 +- target/s390x/{ =3D> tcg}/vec_int_helper.c | 0 target/s390x/{ =3D> tcg}/vec_string_helper.c | 2 +- 36 files changed, 50 insertions(+), 42 deletions(-) rename target/s390x/{internal.h =3D> s390x-internal.h} (98%) rename target/s390x/{ =3D> tcg}/cc_helper.c (99%) rename target/s390x/{ =3D> tcg}/crypto_helper.c (98%) rename target/s390x/{ =3D> tcg}/excp_helper.c (99%) rename target/s390x/{ =3D> tcg}/fpu_helper.c (99%) 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 (99%) rename target/s390x/{ =3D> tcg}/mem_helper.c (99%) create mode 100644 target/s390x/tcg/meson.build rename target/s390x/{ =3D> tcg}/misc_helper.c (99%) 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 (99%) 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 (99%) rename target/s390x/{ =3D> tcg}/vec_helper.c (99%) rename target/s390x/{ =3D> tcg}/vec_int_helper.c (100%) rename target/s390x/{ =3D> tcg}/vec_string_helper.c (99%) diff --git a/MAINTAINERS b/MAINTAINERS index cfbf7ef79b..082ed2b643 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -296,6 +296,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 e91b9590f5..4b3e65050a 100644 --- a/hw/s390x/tod-tcg.c +++ b/hw/s390x/tod-tcg.c @@ -16,7 +16,7 @@ #include "qemu/cutils.h" #include "qemu/module.h" #include "cpu.h" -#include "tcg_s390x.h" +#include "tcg/tcg_s390x.h" =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/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/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/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/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/interrupt.c b/target/s390x/interrupt.c index 9b4d08f2be..734f0c62de 100644 --- a/target/s390x/interrupt.c +++ b/target/s390x/interrupt.c @@ -10,12 +10,12 @@ #include "qemu/osdep.h" #include "cpu.h" #include "kvm_s390x.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/exec-all.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" #include "hw/s390x/ioinst.h" -#include "tcg_s390x.h" +#include "tcg/tcg_s390x.h" #if !defined(CONFIG_USER_ONLY) #include "hw/s390x/s390_flic.h" #endif diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index 1ee11522e1..4eb0a7a9f8 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" =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..81a8a7ff99 100644 --- a/target/s390x/machine.c +++ b/target/s390x/machine.c @@ -16,10 +16,10 @@ =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" +#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/mmu_helper.c b/target/s390x/mmu_helper.c index d492b23a17..52fdd86c63 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -19,7 +19,7 @@ #include "qemu/error-report.h" #include "exec/address-spaces.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" diff --git a/target/s390x/internal.h b/target/s390x/s390x-internal.h similarity index 98% rename from target/s390x/internal.h rename to target/s390x/s390x-internal.h index 9256275376..17edd4d13b 100644 --- a/target/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/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/cc_helper.c b/target/s390x/tcg/cc_helper.c similarity index 99% rename from target/s390x/cc_helper.c rename to target/s390x/tcg/cc_helper.c index e7a74d66dd..c2c96c3a3c 100644 --- a/target/s390x/cc_helper.c +++ b/target/s390x/tcg/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/crypto_helper.c b/target/s390x/tcg/crypto_helper.c similarity index 98% rename from target/s390x/crypto_helper.c rename to target/s390x/tcg/crypto_helper.c index ff3fbc3950..138d9e7ad9 100644 --- a/target/s390x/crypto_helper.c +++ b/target/s390x/tcg/crypto_helper.c @@ -12,7 +12,7 @@ =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/excp_helper.c b/target/s390x/tcg/excp_helper.c similarity index 99% rename from target/s390x/excp_helper.c rename to target/s390x/tcg/excp_helper.c index 9c361428c8..a61917d04f 100644 --- a/target/s390x/excp_helper.c +++ b/target/s390x/tcg/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/tcg/fpu_helper.c similarity index 99% rename from target/s390x/fpu_helper.c rename to target/s390x/tcg/fpu_helper.c index 13af158748..04517fbf9c 100644 --- a/target/s390x/fpu_helper.c +++ b/target/s390x/tcg/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/insn-data.def b/target/s390x/tcg/insn-data.def similarity index 100% rename from target/s390x/insn-data.def rename to target/s390x/tcg/insn-data.def diff --git a/target/s390x/insn-format.def b/target/s390x/tcg/insn-format.def similarity index 100% rename from target/s390x/insn-format.def rename to target/s390x/tcg/insn-format.def diff --git a/target/s390x/int_helper.c b/target/s390x/tcg/int_helper.c similarity index 99% rename from target/s390x/int_helper.c rename to target/s390x/tcg/int_helper.c index 658507dd6d..954542388a 100644 --- a/target/s390x/int_helper.c +++ b/target/s390x/tcg/int_helper.c @@ -20,7 +20,7 @@ =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/mem_helper.c b/target/s390x/tcg/mem_helper.c similarity index 99% rename from target/s390x/mem_helper.c rename to target/s390x/tcg/mem_helper.c index f6a7d29273..9bae13ecf0 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -20,7 +20,7 @@ =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/tcg/meson.build b/target/s390x/tcg/meson.build new file mode 100644 index 0000000000..ee4e8fec77 --- /dev/null +++ b/target/s390x/tcg/meson.build @@ -0,0 +1,14 @@ +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'cc_helper.c', + 'crypto_helper.c', + 'excp_helper.c', + 'fpu_helper.c', + 'int_helper.c', + 'mem_helper.c', + 'misc_helper.c', + 'translate.c', + 'vec_fpu_helper.c', + 'vec_helper.c', + 'vec_int_helper.c', + 'vec_string_helper.c', +)) diff --git a/target/s390x/misc_helper.c b/target/s390x/tcg/misc_helper.c similarity index 99% rename from target/s390x/misc_helper.c rename to target/s390x/tcg/misc_helper.c index 7ea90d414a..33e6999e15 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -22,7 +22,7 @@ #include "qemu/cutils.h" #include "qemu/main-loop.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/memory.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h" diff --git a/target/s390x/s390-tod.h b/target/s390x/tcg/s390-tod.h similarity index 100% rename from target/s390x/s390-tod.h rename to target/s390x/tcg/s390-tod.h diff --git a/target/s390x/tcg_s390x.h b/target/s390x/tcg/tcg_s390x.h similarity index 100% rename from target/s390x/tcg_s390x.h rename to target/s390x/tcg/tcg_s390x.h diff --git a/target/s390x/translate.c b/target/s390x/tcg/translate.c similarity index 99% rename from target/s390x/translate.c rename to target/s390x/tcg/translate.c index e243624d2a..75ec915cf8 100644 --- a/target/s390x/translate.c +++ b/target/s390x/tcg/translate.c @@ -30,7 +30,7 @@ =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/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 99% rename from target/s390x/vec_fpu_helper.c rename to target/s390x/tcg/vec_fpu_helper.c index 8e2b274547..1a77993471 100644 --- a/target/s390x/vec_fpu_helper.c +++ b/target/s390x/tcg/vec_fpu_helper.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "vec.h" #include "tcg_s390x.h" #include "tcg/tcg-gvec-desc.h" diff --git a/target/s390x/vec_helper.c b/target/s390x/tcg/vec_helper.c similarity index 99% rename from target/s390x/vec_helper.c rename to target/s390x/tcg/vec_helper.c index 599bab06bd..ededf13cf0 100644 --- a/target/s390x/vec_helper.c +++ b/target/s390x/tcg/vec_helper.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "vec.h" #include "tcg/tcg.h" #include "tcg/tcg-gvec-desc.h" diff --git a/target/s390x/vec_int_helper.c b/target/s390x/tcg/vec_int_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 99% rename from target/s390x/vec_string_helper.c rename to target/s390x/tcg/vec_string_helper.c index c516c0ceeb..ac315eb095 100644 --- a/target/s390x/vec_string_helper.c +++ b/target/s390x/tcg/vec_string_helper.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "vec.h" #include "tcg/tcg.h" #include "tcg/tcg-gvec-desc.h" --=20 2.32.0 From nobody Sat May 18 21:26:48 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 162497728995617.53273862242247; Tue, 29 Jun 2021 07:34:49 -0700 (PDT) Received: from localhost ([::1]:37974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEp6-0001qy-Mk for importer@patchew.org; Tue, 29 Jun 2021 10:34:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbF-0001Bv-GE for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:29 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:40220) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbB-0003uE-K9 for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:29 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2050.outbound.protection.outlook.com [104.47.12.50]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-30-kRjI5d6xPcecW4lndiLnwg-1; Tue, 29 Jun 2021 16:20:23 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR0402MB3327.eurprd04.prod.outlook.com (2603:10a6:803:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.24; Tue, 29 Jun 2021 14:20:20 +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.4264.026; Tue, 29 Jun 2021 14:20:20 +0000 Received: from localhost (1.169.28.175) by HKAPR03CA0007.apcprd03.prod.outlook.com (2603:1096:203:c8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.8 via Frontend Transport; Tue, 29 Jun 2021 14:20:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tEcmhhFqf7tA7P8B1viDrxHAllMTon/KXcUi5fYGEPI=; b=JH/z80OSmMSYUlmWZoHaVwNnesRGERCna3qKGlDtxFpSqKjIGS/IS+7orF3f2X2lAU9wGS oUO+Km6RPw6lot4DS1eUIRVWn13BlcmClmXvGPKJAmzEannWuukhRlnzSvZefL9uAKS+W3 FfPvbIG5qAYcjs7IFCcOgvdGLA0O138= X-MC-Unique: kRjI5d6xPcecW4lndiLnwg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J/8ZfTAbUmUektcNYaxb7bveMXKqdEr8sx3F+WfJvNzt36i0plKFRovmsdiX1Et40BJujCUtHb39NQvmFOU0e3vKwewLpedivulkT9Nvw9HwIs74mvqwQqHKj0QXjZ8Ffwt60z67QxlrLi/yLItBI70W1vyMgSTR+DhSpj6/pfA0rLQId+xpGIoBZ3lEUZwuFPKASnL2lh65VdhdIwmzz5dz65JYDDz1QLxlAYcmDZ2ya6DSgMhIWs5s9FDYazaFb40yYiES+y0lH5Vj7ed2i9HXgaDUmhROE2+XyQ+jluSAaAWKNWtGz+UmSP4ncnbvHCm888REcZrXI7G8g92fVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0bnZo3mcB7XRH+z3tdKyag5TPR1wZgiMCuIZrlNhyaI=; b=iQcya/hTO7gs75tATyoC9uMLdzB1lcTgM7dj6N6FtPJ1QvEj/3bWM7c+7L0r7vdtkBfHxkNSuc3W8EOoYDtpVUWGAyc7z4dK6hfr4rGI4FvSkbcoS1/BeEZfhe+Jc6x2Zl/gcmC413Irv6AgDYLzNLsmNsJ3AtUr5NDOSTohge9nAvjjS6Jh1VmNu9yu4vQUGwc3HPKUevvyxbkVuBQQDzLsghjTo1I+dEm88SljRJf4EsRDyFB5zNWVSTCIkixQnfvNNICXlgtwYU6fMU80XPROtnM2gl9R2gytIBMSjFREmftdH5CIaUImyzWZEorAXrevTy9YwL/VeLAlyPg3uA== 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 Subject: [RFC v6 07/13] target/s390x: move sysemu-only code out to cpu-sysemu.c Date: Tue, 29 Jun 2021 22:19:25 +0800 Message-ID: <20210629141931.4489-8-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HKAPR03CA0007.apcprd03.prod.outlook.com (2603:1096:203:c8::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: 55c0f6aa-4b1f-4ce3-e140-08d93b09066e X-MS-TrafficTypeDiagnostic: VI1PR0402MB3327: 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: vTzKEQCzN3bVpN5QpTlsgkSPXA62H182vVQSEJzW6+rgwGpCYY0Eh9fGI3xT4ie0XBF6goXq2gbSHGQJPRLeHODViHw8vkUnJPpVzhM/dOX0wj5l98BoLqjipgOfsP/He59djJS9vGyy6yBRr1Ko/f+eq5kcsZtz7Aogc3rpV2o5JtBw/cBIcithnhsC9RBehdeQo4drejCtxGpSYGM/eDTfwLBsJ5FNYKAogozsXqgkh5wlX84UQtzAwVw6n+Xr3HkXr+0gDTxyKqAzIG07f9Xu3U9pHtk+Gt6uaEqgBk2xktoNi0iAoG7gcRZ6Ci7/0fNhtwO2CIgY7O+P4oi526MN7BsP/CphyWVbHKxs36hKfaeW4YE6Rf7ez19Shr1oEIyRXQTHwKP3qmKK9th2AYD2manB0+SYA22/TuYU0r8LrFg2WSJC4IVgRS/CiWNNeVV1iR3AuuMgL/Sexrp6SR01/VrPp7hPrR/7EHrRuMZGYKxMjdHJ76PdG9P4X/4HN2VUCxZogG07AvywRgOzkcavOevaIU5wRhcMGkbGzoUG+KfX19bypixJ+ZC6oMLKwEh8nWnsnIsO+p4BNMFqbbauTp+b1HyrgQsvLmRUHpMwK5ZQcaVW0g0bLOs+AIc1tvM3foBKikUPttTlaZpF0WpZCPuDMlO22GZEUM14g4D7AaPSCbmPq4k/yDqTyF3aC8J+IfiL88Ggleh+Q+P4WVI+MjkT/J89tkNJ3TGlXUpFDdpK93Zavi9bRFHTsycQHmUOgaRfCpg+eDHkGIgxkw2jDyyRHE4l9dO/IlteyWLLelg/Ej+pz1M6kmMZCmmcVYqaRyoQZtYnDkqbGSLwNg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(39850400004)(396003)(136003)(376002)(346002)(83380400001)(8676002)(6496006)(6666004)(16526019)(8936002)(186003)(86362001)(2906002)(478600001)(36756003)(4326008)(956004)(2616005)(66476007)(26005)(316002)(38100700002)(5660300002)(30864003)(66946007)(66556008)(1076003)(6486002)(36456004)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Ipq74EDXz07cuHj6irQuAi7M313tcVFOeIQpUa4+zhvxJ38niYojCyHYaxSw?= =?us-ascii?Q?EL3ApPkFEwXP053BD2kq0Ixea2iuAMx5Jdb2+P4MnNM59X+1+VohDg8BQDgm?= =?us-ascii?Q?jrGTAvnJXklOEyQ6IHNlIMNEAoMe7n7LMHWfRiYhkxuYL8YGYLlO4dLMOUAe?= =?us-ascii?Q?ClQOqKUFnMO66rvF9Mx62TNIamTCWEx+6+a0rhCXlnnQ6G+kOF1gZ0dvOY63?= =?us-ascii?Q?56ScgmeUaL9tyK7y+SBtlgfFyomT5Tt8oSJu5Ky6fQABpjwqggIR2mE+gjsy?= =?us-ascii?Q?99Txw4jWD5yl1i3EDNFQB3ube8NA0X8q22z7+lzsJ0nUajR3DJge3fRv57hp?= =?us-ascii?Q?d4rjNGHAB/nL2zhLljLchgZiLOj1UMSuTLBwQbjsZr/8JzX9fSmCkaEi3eV7?= =?us-ascii?Q?fNfuVE/EN9FSlrpyAEsUxCH1mn2Dqz8JB8jJNK1zcOslkCLEnHDpGIxnZZ9O?= =?us-ascii?Q?PVKMFjDQgAk5p+BKpS0xqsh9QPeY3b05dpl+7dpnAdDCxdm0K9O/Y87tEUU5?= =?us-ascii?Q?TLKggo5I+J05zyjmyGiS00Zty9A9iCGbMtyH8BSf/YQubs4mMJX13ghJzciN?= =?us-ascii?Q?ymUklwUiEp07IdYa3ph2Lw5JWNcHt0ml3yIIfaQ6SOFjGK1e4KTWy8v7n0R8?= =?us-ascii?Q?MKCEDRNR7awDRXrXinfgdPwBSgok6WjNg1zUcDcu2aKsMxB3XLCcx1r9QW4U?= =?us-ascii?Q?gl//8Ru7ZCe7q7VT6eDnxDGZkQg9aIMBr5na8EPycrUSdhPBXSVLpCue9KfV?= =?us-ascii?Q?rnvsYcNogvqlJgL0u79vtE9GCG1Aphzi/0JnrHB1VINSI+oidTW2fNhdJXI6?= =?us-ascii?Q?g7pSi6ZzyrU61O1BzVTr1Eol8LIRGtaajyvbq+4qdCPglykGNAIuw8Cja/Ct?= =?us-ascii?Q?MPiK0YLhamCUo7/xXmS1u5cs8EbXTIMahqLzamh4U6jZhCsfldPRuSXVTuvn?= =?us-ascii?Q?obIB3t2c0zeuDui2JyVUHjHww0FPE5qlVoitSqTIETw7YvP2M0VSitpr30yJ?= =?us-ascii?Q?z1l1PqNhNGC3ScoLO01WbhL4eYpJ2C0DIWL5yGjQc2qP+GaLEnj9aApgtnV7?= =?us-ascii?Q?tfdAwk5kpklcdEBp5BkLA/naSaVnmYYtM2SZIDoHxoxOUYiKXJ19MUovRwap?= =?us-ascii?Q?NifqVdNpoOJzLzAiKgJLNCfHSwXi29AT5jSiL5ZXEBvIVgl3wJ8OoLczN7K5?= =?us-ascii?Q?QPZ8I01I9siZtfmdH5m59+Hps1LrFv7IvDPGwx73B/7z4Q3TDIW18DU/jgVz?= =?us-ascii?Q?uue2OxxK4wBeVjgldBzf+hdp/mh0E4Onm9vMV169NGji+cU9ko9S60pc6rDq?= =?us-ascii?Q?LNsntli9XCLFX/tM71pPSMQl?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 55c0f6aa-4b1f-4ce3-e140-08d93b09066e X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:20:20.2267 (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: 7SwbsiPy7sng3Bp86L8Q33Z+mnpmX0pKA9il5go0OTY43+vTwVJHLFtBnblhZ8tP X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3327 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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/trace-events | 2 +- 4 files changed, 320 insertions(+), 277 deletions(-) create mode 100644 target/s390x/cpu-sysemu.c diff --git a/target/s390x/cpu-sysemu.c b/target/s390x/cpu-sysemu.c new file mode 100644 index 0000000000..16e5301084 --- /dev/null +++ b/target/s390x/cpu-sysemu.c @@ -0,0 +1,309 @@ +/* + * QEMU S/390 CPU - System Emulation-only code + * + * Copyright (c) 2009 Ulrich Hecht + * Copyright (c) 2011 Alexander Graf + * Copyright (c) 2012 SUSE LINUX Products GmbH + * Copyright (c) 2012 IBM Corp. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "cpu.h" +#include "s390x-internal.h" +#include "kvm_s390x.h" +#include "sysemu/kvm.h" +#include "sysemu/reset.h" +#include "qemu/timer.h" +#include "trace.h" +#include "qapi/qapi-visit-run-state.h" +#include "sysemu/hw_accel.h" + +#include "hw/s390x/pv.h" +#include "hw/boards.h" +#include "sysemu/arch_init.h" +#include "sysemu/sysemu.h" +#include "sysemu/tcg.h" +#include "hw/core/sysemu-cpu-ops.h" + +/* S390CPUClass::load_normal() */ +static void s390_cpu_load_normal(CPUState *s) +{ + S390CPU *cpu =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/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 Sat May 18 21:26:48 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 1624977469679513.7445682930295; Tue, 29 Jun 2021 07:37:49 -0700 (PDT) Received: from localhost ([::1]:44014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEs0-00069D-BV for importer@patchew.org; Tue, 29 Jun 2021 10:37:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbI-0001MZ-Sn for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:32 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:52455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbF-0003wX-KN for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:32 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2057.outbound.protection.outlook.com [104.47.12.57]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-40-CGADlNtMNKSIqYI_H5urPQ-1; Tue, 29 Jun 2021 16:20:27 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR0402MB3327.eurprd04.prod.outlook.com (2603:10a6:803:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.24; Tue, 29 Jun 2021 14:20:25 +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.4264.026; Tue, 29 Jun 2021 14:20:25 +0000 Received: from localhost (1.169.28.175) by HK0PR03CA0115.apcprd03.prod.outlook.com (2603:1096:203:b0::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19 via Frontend Transport; Tue, 29 Jun 2021 14:20:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976428; 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=q7gCbWC/G4rkq5PFijvx4b5NEjxnBildx9EFN3LqVxg=; b=dA0Qhlcj1BqCIXQwlZAFY0ckybhOVDezZ/ATeOO8OxqAGERZ3rOAKFH4BVFU8s03a8Afjg LerHy2O/gj7tL4KryYZkwc9BO4W2xziajeNAi0SGjTzLR4St7Y+p3Uv6D38XYHOfSwPGoE x10lZ3ntBfgQO/3tju8foQqeCXY1nKI= X-MC-Unique: CGADlNtMNKSIqYI_H5urPQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n5l38/gkMlsFLyVppiIz56qrk/1NQ+h867dbVctHTvEYnEwBcf34xE67RwE9Ia8ducpIb/tpW2AxFxNEcLAUfW4cbPcIs8SadLL1U7N5i9Phz3ictRVZCkNWZsdNHh20Tez1ADYwO1ykxO+rl5mYoSb3sOQOJMyL2cJDqS1ogf5oQ7JQNDZ00siZL4eluljnK3ZeaWJX+rHdTcNfFOm0kIEyJKyB2P0d/fbzLRWwp1u0I9HsCHHIZEyPZFp2PyhJ+PvioOIlKEoKnmCjRj5n2tuXGuCu6MOqlJ/FE+2XEVB2YkivfBar6aPK7tAUu6b8xwzJ1hIGK9qiPzJpdmAqZA== 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=ygyZk9s/bsDHEAyF0F87a2qt2naSeG7hozDxrMDA+Ew=; b=BC4wQ3Y6o74CpL7xdrimME5aaUnTkx/NW9MDjSYrDLYG/SAwbID9rodFFNzJWKBwXJYNdUGqjCAbPI0/UjsOXg6fSCyvWdeYcRunch8LVehDeIjLuz9B7YJ6inpLgqrNX/S8gofSwNWYqk+J+HigyoiSCC8NDaI8P5UGtX/wz8ZO8e0kEHqNLi2XrOBXXqZBkNJAM1Y6P4K/T0/1ym47aBDrnz0YM3K8039YJU9lRIoDbAF+5/v4pLbHn582o5aojK+c2GhME7HG2Pz8KBfiOkVRilAJ0FQh2sHwBA9MOBjN/j8Zfeki+wRjJqPsthS+C5sXxybzmAOPRWnlOITJow== 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: [RFC v6 08/13] target/s390x: split cpu-dump from helper.c Date: Tue, 29 Jun 2021 22:19:26 +0800 Message-ID: <20210629141931.4489-9-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HK0PR03CA0115.apcprd03.prod.outlook.com (2603:1096:203:b0::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: 6ff200c9-f19d-4bc7-907b-08d93b0909e8 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3327: 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: LnPd09IW9EGztJMcrD8hPXYylv+IIle/L725fCaOxVqF3Bcz+O1ngrjeUhklN0VPESK3OyK+ShsU1mlPoYXBMH8AqhxENZJtYLAWoOOODz2zMNwXAQy6WWZddkP6+vLMvsItuqtZrLxN7/MHJE+nLHkhT0y1kG7FZXsdN9+eIi6wb3nKPfVMxTTTUFvNZLSrUV+f3JncgbRGCAOGZsSKJNwzM14FQCZyUdBlP9Kz28/x+BbtVHjERwU4MKpyMQCHc2J3WDc6b8lKIXpLCNtf3UrM5Ynmzt8pZFMYSBW+ujlBXcHRcRYWgXuZtRqmgxEndYGOcn+k2OXm6hcPb5on4BpRHbDFv6fhAos7KhHRO86+Y1wFg0BtN73SObqOCVijR7GCAz2U91TYrmRNpQbtF4dF4BdsxLx+6TELtw9yFWg0JR+8/ED33pwKrCSHwCRbI+JcX/sCqNChxgJYpUAU/eSD322m576OHHeR4Z6z0Y7Q/ogvNsc9FJ7QEvSERQVaeOHgBHcPorgqIfCD9qZI9DxTCUs2Jz3AGNGTI2O+ND57FSAVDIduCefNVCGuI8Zo/OE1r55tZfSy7xg19mu1w643+qd55h4WQFaiLmEDn49FnthEadhANFe7ASJXbjVH18h5a+t7Ac41vcFECnoL4TB/MbVFZ20EPNyogZpCQuY70ya/POySjLRVaCrvpzjDW+evd4/iPwAurw9S2I+H21eEG5C5fSscS3yQdMIXkF/ibkxqhAT13IOFvheRbFgEhDYr9voawwzoVjSJtHQiQGhAWggBA+jmJqBKI/ZXgT2Ni7whyq78VkdRDbBBHIyCBCwftIKS1WAgqts30CzVZA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(39850400004)(396003)(136003)(376002)(346002)(83380400001)(8676002)(6496006)(16526019)(8936002)(186003)(86362001)(2906002)(478600001)(36756003)(4326008)(956004)(2616005)(66476007)(26005)(316002)(38100700002)(5660300002)(66946007)(66556008)(1076003)(6486002)(54906003)(36456004)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?AfpG7gByD5BleTl3kkHu3pRi7yXsrxzARbBql2KPdc0MExoG9jLiC/rUHvm8?= =?us-ascii?Q?Qo6vAdkVnjFyuJjLwkP2hKX8T0AxhKNy8Dj2khyxtokzEAg9QIjh9978DRqd?= =?us-ascii?Q?9ujt5cgVftB6ckkQnbb+fGdmvRt8/0mfFQyd9XxCAR/KxFgMiM7I2B26fXOy?= =?us-ascii?Q?/fRLyitEhD886tY+eNEeki5auyglBRDjcSTYDno804g3jYVpuMm6+xlCjYZU?= =?us-ascii?Q?IlA7LlsU5TliWad7S/Vcdwfss4KRgSI+QbDARmrUUhp+wxIO3b35pg2O4nn6?= =?us-ascii?Q?OH8lfQJRKhRVLZYQRLecARRZHuvoUexg8DXYugN4Do2p+QCI80pqp05j9PG4?= =?us-ascii?Q?qFzwzuR3RoX3ej1FSwj+VTuuM4q2KQyLwxho2ICUx/tmnsp1wLJ6uF+IZBQi?= =?us-ascii?Q?bYFOnUxov6i2AnAD3aKLGmSwpng+S9M60IRsX/dnZvJyd0BPwYLeKSWAiPj9?= =?us-ascii?Q?Xo91YXrPhWxwUetYYqNSGfbT49cOcpHWfRTjLv4IsuNU9f1TtDKBfRHANJN7?= =?us-ascii?Q?pxPOM23MI/5AYcb3u1U68r/b4NDopY71O8LJUfoVub0MQoVXQpa9HQjlzf3+?= =?us-ascii?Q?h960SyVZT3o97k1o4HwCBGsGT7HJyisEf6Gyij/PHwf7LK72T3UTMH0QSOTD?= =?us-ascii?Q?HTtdBfU8Td0IsGh1D2bVcL/bBzod6Wd0ka31PR0siItDo4vcu2rZC8Nu5O4s?= =?us-ascii?Q?1gbQvVra23Y2xUDyih2DsMffa6uuFWFAmSJlRdkGU/uaAjJ0rNOa0biEQJ0X?= =?us-ascii?Q?MgBjbuxZAkv5hJJeLD6dETvxVDyRqYQSyTUD8xvWiHHvFe5wkmyFxcIpEN5O?= =?us-ascii?Q?tVonEAZhEHLwrSDV4oYCz/IsDpTClC3l1/fg3krhNuQ5oZ0ZUlvXC5ZI0fP6?= =?us-ascii?Q?Y20LSKk8poWOfRZj9GMTy6PkTkz9r1nL9A6Ldv7lfNH4elK0tRThvRutDv8h?= =?us-ascii?Q?U2PleHmpFFav0S8NYUnMuCR2WvAG9hUwbd3PIdNkjByzWoRfJC0v8PUSmceM?= =?us-ascii?Q?hG/jIDb5FWq83mBJ9RyCZ3xzsIuzcQDVhU17v4uTCgCcDsgtePBa/R0MYHda?= =?us-ascii?Q?yqa1AcPOEnZE3b961aCvMXrxLrHOCuIft5YlTsrhRp/Yj0d8IlSrwr0XvCgb?= =?us-ascii?Q?1I2Ppw+CmuOP5SYVVaWhl1we0QpT+64TEAQoz9Qannbtg/1a7jWNdyt8zrmD?= =?us-ascii?Q?wUkdGT4zm+CWzWZ9IIHBWdLrCNFML5T7l09yJBAwFuErcH4nPurZAF3bXKqM?= =?us-ascii?Q?jX8/DJ3AKW5/HoUA8sjX3/7IszZOIvz4iYrR+Fu7CsDkYqfUBJJrVmppCjnK?= =?us-ascii?Q?pXoYV9M1Z+2x7Hp6PsAwwk9X?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ff200c9-f19d-4bc7-907b-08d93b0909e8 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:20:25.8175 (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: K83B6VdreW+cYXjwGjji2Arw5vtMxzbVotfxL+9JGQcUpW6swF1aqisYg6o1Etzs X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3327 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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 --- target/s390x/cpu-dump.c | 176 +++++++++++++++++++++++++++++++++++++++ target/s390x/helper.c | 151 --------------------------------- target/s390x/meson.build | 1 + 3 files changed, 177 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..6f559c1913 --- /dev/null +++ b/target/s390x/cpu-dump.c @@ -0,0 +1,176 @@ +/* + * 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_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/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 Sat May 18 21:26:48 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 1624976707803227.11011129892677; Tue, 29 Jun 2021 07:25:07 -0700 (PDT) Received: from localhost ([::1]:39026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEfi-0007hZ-Dq for importer@patchew.org; Tue, 29 Jun 2021 10:25:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbM-0001a0-TR for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:36 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.111.102]:51096) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbK-00040D-Tu for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:36 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2050.outbound.protection.outlook.com [104.47.12.50]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-14-9CaijboWM9eIIaGc_jhD6Q-1; Tue, 29 Jun 2021 16:20:32 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR0402MB3327.eurprd04.prod.outlook.com (2603:10a6:803:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.24; Tue, 29 Jun 2021 14:20:31 +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.4264.026; Tue, 29 Jun 2021 14:20:31 +0000 Received: from localhost (1.169.28.175) by HK0PR03CA0102.apcprd03.prod.outlook.com (2603:1096:203:b0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18 via Frontend Transport; Tue, 29 Jun 2021 14:20:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976433; 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=VF2/59L8YDrqB5M0pqJm99DiwF+5BnjXXXlY7qJ4JBg=; b=Xfk/PgVtFdz8JEpHZZvyNZlz4W+Aeh+T6FX2Dq2uZWLuPth4Gl/qkEuh1CEmTUYd0fQzHb AIHzoOBG3i+Vy2ksYa/EIvyPVIgw4DmXJEhtrz62dl89FpYMGVP35FtoKTc9s4loSdwUyO Yx080jVaR9nZiLV4KBkEcIkWKpCa7TY= X-MC-Unique: 9CaijboWM9eIIaGc_jhD6Q-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MfM7V/IW1zKDNaP+26I5bYt+J/OTuKk1E0sJ4s1YZr4xRXZsbNPUzn2cp9GdypCGEJtCnPMDo7sAjU3ju9h2qZvxVkfELAJckWmj2i+1wnt4RzoA0z7U754Eh8IcP2bNzawt6HLUaWUyG1DJAY++2wN1vD3fols4YYKKXBdnjNYSOU4hvImFRR48vsTmKmvXcg8jWcSJWOOIRjgqAXsq98M50HLN0rHhebqpsnC3LftOlnZrBFN/CvMDI21sEqhfuxaiCZorfVzBLgcJHo50PiwmBkT47TaTJ8g7dd8lvd2ngGCLstRXISy6DMH+r876W5iDtf6qZ+u3LOqb2lDR0g== 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=3z7la4Ehh2e367qEb7S19zAe6QWma/MbhP9SUT8Tke0=; b=CRQg5CbVJPb+AO0rq+dMar63XHov0up6Ys6dojbzZPx/ES/uCCl3rCpWaKaVq60ZDfUbW7nNbbpLyfIH/LFIEEapQeL0jnW7ucQR6FUefmkRIRczuAkypp5aOhl5RoRx/Cdmm7mPK0AgJnr13xwwOhhexiyB7HACTF5y4B7p8hiW/A3+oEIIF2SemPxitirO4VobAPbEqw4+jHBdDaO/8KkexGNMCY+exqqLxAXDNHmE8eZzMxhY9aKyNpDSkrkrdqEBmedIKmm8hwwS4jBRKkE2G7xaZAUGJ+JvEKOAUgeuWYOmJ/kYBcIQ2yyrqlWRzFELyjQearmywuOB2PSxuA== 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: [RFC v6 09/13] target/s390x: make helper.c sysemu-only Date: Tue, 29 Jun 2021 22:19:27 +0800 Message-ID: <20210629141931.4489-10-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HK0PR03CA0102.apcprd03.prod.outlook.com (2603:1096:203:b0::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: 9556a71d-1d56-4784-f42a-08d93b090d3d X-MS-TrafficTypeDiagnostic: VI1PR0402MB3327: 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: pzFWBn89FvMz2azR5cgALWvukFdwk8RK3FPoNrwSRnOQJEqDOfZ+cQMn2llGlcfBPbMw/zxR8aXeIAie/Zf9HxNhAqA2oSpRs284T/tC8G4hQ/SHy6rhiK32uGc1Dia0tRM0D6KjPhkdKqHwP6Tj4J9AiSCwTW6cruryHBtwKycOD+X61QXgdF4XqdR9f7PbG1V12HsVgWesJ8T1mtVOlKEB1jjwC+8+lCKby1BYpif7ffFTRGFRF2TcpiuVxcQtqA9+t9QK8jF69OYIjlOyCnt7y8UWzKBmq9g40NcqB4fr3ydRBlok79Xg2fqIJpBa+kv6tcRo+1BSreKTZpGeGMRldFq6KaNvG/ikWV+uFNxC/DBqKRlTYN9B9MlRWfDp7UiqI5EsxqJ8aJ2EirCjQ3BCC6EfyaRHiXUDNdhlT5blBKaYiR+X94iHO3HH7U4fKZwukKo9SWQiF8VlIgcybuf2k/SXGk1fp+JdJTDaTrneyVkF1xsnBiCjOkSxHaYjS6p/QayESLnsk1bBM0XKUuqQkua7WOyyzGPDYnplPJ7YJkZ4pb7trAYcwYTWiaxjJYT6/QkkiQClfs9nZLJ0GG+oj8H48EtkNvsAg+8Ai073MbYNUJMPnBUXmCoLg5EA4XaUAURBNyYFUg8/lEyiNwoC95WnN3Jc9m/mDWAicDBQ+hoD8wfXKpiBjSILu1FCMGqLMJMlhoS8jH5BiUlDeg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(39850400004)(396003)(136003)(376002)(346002)(83380400001)(8676002)(6496006)(6666004)(16526019)(8936002)(186003)(86362001)(2906002)(478600001)(36756003)(4326008)(956004)(2616005)(66476007)(26005)(316002)(38100700002)(5660300002)(66946007)(66556008)(1076003)(6486002)(54906003)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?RzhAqJMqYouiCnt6+mltzrvgrSV6+X2XZ9M4H/7z/yM3m0k50InJJeL7H6iI?= =?us-ascii?Q?tKVuhGEwjfoy3ZRZz4VlmSbCdMuzdTSIKsGfJj7m+2sGRcxAM9x3exiKiNBv?= =?us-ascii?Q?VR6jRwVGjeQzDdLlsXezPjvjA/YsMj/P5lkIX8boODuzzfH8EMj7MpN+D7DV?= =?us-ascii?Q?85bH0MRI0KyAx3vzfABZ9PeWTByxBoZ4VLsvcXTXSI3fbtdhXPCAOLauua5m?= =?us-ascii?Q?HnLbfNkqhgFIR+IybvTO8osGkanwM/seSIGGxtJjmlYnKG5AbuECBpFSpbxw?= =?us-ascii?Q?xaidBdlBxX66iN9bx5KTTkSoh4BG7gkFd7F/IuypCuV8t6tF1QAta3+wIpEt?= =?us-ascii?Q?YxQmnPTe/umqXaBgqYxww6RW35n6VffmgcIaq6b2Tc+Z+JBJQkvuMeXzd1Rh?= =?us-ascii?Q?siBpfw3HYjBP++DgzNozlvq0+CsTiL1ugLvybMopotyPOdkYbyqtZL4hQvdf?= =?us-ascii?Q?MFi38ffEZ7LfuwmoHI5LS5UsTwgf0LFuZylmxDnGhuIf4ihMCs3d1OuQq1sf?= =?us-ascii?Q?h90kX6WavKeJd5U+zI60XJOagKEUxzo7wdvyremDSYjBfbjmMCgzENTNc+2I?= =?us-ascii?Q?m7+3+327sRP62U2ozYxG66eYp93+v3fkmTEnOCg2K4OG1wgzfQ8rR8q38HCU?= =?us-ascii?Q?WQUhD0VF7fEJjZGIfClbrOGP8G2QkPHce+ZuFPCsuviEAp61/E2HG/cFnVtJ?= =?us-ascii?Q?ldFeiF63vCs3ayqPfC/3HMLXlrORnWMzGRkhyOUOPsa2aSf56/KygH/GE4Pp?= =?us-ascii?Q?1BwEpJUrbBB0Eaa14quSwW7gHh3+7xiyx54nq1KZlVxbVHUdC08DY7xhcTJy?= =?us-ascii?Q?49R8/fdeltjr28zeXO+m4GoMqQmLxwv+DbQwnq0kqn3hJg8yA9ab9hrJRLTG?= =?us-ascii?Q?2O9Z1MrpJYTy2tY9sfRh6XEC5LIOXqCeLqsepbwf4bBnHtUNx3+3znjqOAQD?= =?us-ascii?Q?O+6MctcywMR80dqzbEx+HQjWNN+NfQAJaXGmBbMIBCt32ZR0uC2bOooBpTp0?= =?us-ascii?Q?ll2xSX9bCtW8wc8o7lOXOPq8jrNQ4wk1oFN20CcEaBY9nSVvWsrYwpPS6sLW?= =?us-ascii?Q?X3ofelet5Zm3t4OQQWM627vqoAKrhplM9qaU1XJFhnYDHeyGhiivmDOf0MbP?= =?us-ascii?Q?1+K0MPxziFWvFi3OElPXMjZVVRuPCL3NG2h/bCDdVks6y0sBnY9lIAgrvADC?= =?us-ascii?Q?XdVXVQljAmv0KtRk8zEwzKmCqwW89PH4FU7KdtFnP4CWdLIHRinH9Q5GiOwd?= =?us-ascii?Q?CCXhWeuP4Gqnzkc6hyCF/e9FvLCz7b12r47wvDPFhsabfUZ/NPA5p6cwY7L6?= =?us-ascii?Q?hm+pWTl3HHc5Kq0+w0+iXrp6?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9556a71d-1d56-4784-f42a-08d93b090d3d X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:20:31.4043 (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: wGh9jIuOwz4Hq3aox9ep5WT79wGIdnBnHe8Gi5iyx1UIe5bFuVpS8HAn4b0Fb62I X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3327 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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..a4d4665f67 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -1,5 +1,5 @@ /* - * S/390 helpers + * S/390 helpers - systemu only * * Copyright (c) 2009 Ulrich Hecht * Copyright (c) 2011 Alexander Graf @@ -27,11 +27,8 @@ #include "hw/s390x/pv.h" #include "sysemu/hw_accel.h" #include "sysemu/runstate.h" -#ifndef CONFIG_USER_ONLY #include "sysemu/tcg.h" -#endif =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 Sat May 18 21:26:48 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 1624976874364102.93530284945973; Tue, 29 Jun 2021 07:27:54 -0700 (PDT) Received: from localhost ([::1]:48332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEiP-0005zz-62 for importer@patchew.org; Tue, 29 Jun 2021 10:27:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbc-0001jl-D9 for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:52 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:24274) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbT-00044u-5e for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:50 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2056.outbound.protection.outlook.com [104.47.14.56]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-9-LFcdJKrHNvG8FLZeazpKCw-1; Tue, 29 Jun 2021 16:20:40 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR0402MB3327.eurprd04.prod.outlook.com (2603:10a6:803:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.24; Tue, 29 Jun 2021 14:20:38 +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.4264.026; Tue, 29 Jun 2021 14:20:38 +0000 Received: from localhost (1.169.28.175) by HK2PR03CA0053.apcprd03.prod.outlook.com (2603:1096:202:17::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.14 via Frontend Transport; Tue, 29 Jun 2021 14:20:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I7AfSLRN7oMwfjUsIwliox4w+6+wvPIcVnP6iNgU2+o=; b=GsP8ZADQVsUwtVbPgibb5k/WqIQ+sHd6VsA7J61rNSF2OIcTmpc5iu4gr1YmQSaKjjTEHb A7gEGWPFTPp55IvvolvNWXkkdUOCUPxCn7pkexhvRMMChTe5UwavZkomMM/rlzGUcWxfdk c0rZCzoezLbUKvbSjog2WkYVXdEbzGY= X-MC-Unique: LFcdJKrHNvG8FLZeazpKCw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FrekgM2nUMWR36ZdNAsHeU27YAtd1Y82DWvSHz9CSndo+y7lyAYPxIjBeg1NQOFXP4McWoNljHFGJdLjLSlmB4J4uzLGxpa8gJeMlJWsOXJhAwXfQVcNmN0fLsVM49JLncBIL8nr9xUck6u23/AZo5uwjXWkMVkYEvGFKwyE4t1pFY+rEaOSn+shsLtH4OF5aJcjjUSIH/FzzjCPMMIjiDJaUOibOZw8tSU1NoRvKXKtNgr5cCS3k3VtqTY1TwozNlZNi+1nEK3fKoXeeSIbTLWUZXbXv/ZBeZDdFsd4rZ201GL8d8xvU5JvUFTAIEzfbSA14W1CX8NPuNN2OEwLQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nw1yACjG9lZbj0bE06qheLUxHfn2hS48id5iWCu2OPs=; b=HEyvQ9DPuymQabZWLxQCpsNDEudd26+9ks6xUnxtxQHioAGV+gLKI+BjqUTLU4Bld/iiwyzEjvQ3p6TGTRK7hTcS0Z8atayNLr1+cLlvUO0jG6y5KWRTijxYsG8m+n6gQRo6tIlLOQUK9Ieqpi5WLyBPsePm6H+RIOwIufdVYXOCfBNzVUU3KtWUmlAFn7xDcKLdlT2r+fVstEI6MC9g2I7FeofF8g7N2f3k5Wuat835uafE8mDk1ay3rb/gFbLWGpHSUrk7SqZRjgErFuf1E/D9dLo1ZqY/kdmKyndIyQzJsLjap8XeQB6xpXrGYTltERElh2bxwcdZ+gmYAEJneA== 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 Subject: [RFC v6 10/13] target/s390x: use kvm_enabled() to wrap call to kvm_s390_get_hpage_1m Date: Tue, 29 Jun 2021 22:19:28 +0800 Message-ID: <20210629141931.4489-11-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HK2PR03CA0053.apcprd03.prod.outlook.com (2603:1096:202:17::23) To VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4b69e91b-b224-4f3d-44a7-08d93b091164 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3327: 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: khytpPEnuAvZLNKR8XC5tuMcUowECYCQyxtuCRsFUfNUrXUf7FDceYoMrgqWjYMnSL/j26xByXAtIkRkWym02QbRn+F2X5lDMHB1+AqdlcDdHnC64M7+x8A35CK38oOBBsgoUAzqaktdZhMp9QS4+TBI/qNlkd8epfPv3zYkffIMsqBH2d1047E6U5+JTcOT+TO+z6QnMIIZsnXIFF7IoEu4cxJVcys7wFvpZYJJgQr1Wg+rQnHqQi4S8c0HB4HXT6G4cBWdZldwbEwpCE/J0bACs3Wyj+Ohz4/cTNizpCWoCsqiXCbQKUnuNR809cHmh5aSFUejwQPSz9ny0xkuN2zgitGkJypvd38ebeD7OZm5uguyvRlMrQh8NnRR28sNWeQ3fUXgDPRcFSvMoH5WKi4aEIdPz1fzITmMTZMtFsVI+FXysBr8ljYvd2yAAS8M8+c3vAkdcrREB6PCtJisFO8ftF9ntumoj7vy/A7la6caMnVnrCri9fTSqc2MUJtN+ExxUQSHl5zr4exDyblBFvDJ2ZP8cLNsaU4Th21ue1IJsvBKQeVvQ5viwHN5Pci2sn+Ep7ZT/AEFje+QuM6vecyiYWDbspJjpmcfFPFZHaxYlwe42hxFlAfcVOOBcuOBFL8LifWX7ii3tNe7u8O1YFjMBUwo2mlcmg+NsWFb9y8Z8Bj4fxtSWrB5bOhYU6YsF0kbyviiMga0LDX6ZzjaGw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(39850400004)(396003)(136003)(376002)(346002)(83380400001)(8676002)(6496006)(6666004)(16526019)(8936002)(186003)(86362001)(2906002)(478600001)(36756003)(4326008)(956004)(2616005)(66476007)(26005)(316002)(38100700002)(5660300002)(4744005)(66946007)(66556008)(1076003)(6486002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?/mjZjKmBCQlZ1iVSFohPpOxcZwCjmNU85xpnHBH0eRQisEElrgbr3DCzBwPN?= =?us-ascii?Q?atmB+xCPZ04Uj5Pg7J55DelBSsaay/ICbx0Lks+qO94bNe/EaLFBYjvzIBpG?= =?us-ascii?Q?6HN+ZvSjg8jbDHIUWCbK1P5y+6YpK+3AuMSMQqXR+F5dAQ+F39Edg8pz8HWL?= =?us-ascii?Q?q7x+gRRWdDHcjNLYUCV95UrgbhC5cF4a8bOrfBO8FXnY0dPQ8bkWvOm4YfnY?= =?us-ascii?Q?DDYOZXL7HWUfJ8+l+Tp0FDri3BljbVkyNJqz0NnMF4KTlaR/3mj+NbC3685l?= =?us-ascii?Q?kDfQtTBFomKs0F2tM5V78RuYH89MMSrztzafgG2dUKB6mpvIjt+RROb0NYks?= =?us-ascii?Q?Kg0hr3epGy/nWZVuqtOoPsZqvCcFsBTXtO7AmWm3xkaacSw47walEwqIVDZp?= =?us-ascii?Q?NPwWlgdG4TFI/902LOoeIIIyBjUk7aMfkwSb9vo+FENeQIFrzByh8nxsNqEn?= =?us-ascii?Q?mBpHncgzCS4VI33chkvdaFH0SbqexLXtVF897YHTRiEEg8GxAcLbPnh9jcxJ?= =?us-ascii?Q?l2KmdKF6RS1Y3oPSV+wXo5QGIg2QsXrAi91og0X08r9SAoASVUMPxqzrPB7b?= =?us-ascii?Q?ApiaddODcRvtd9+iqNIf+Zlt+wdQS2d9JyWPeFbhlOlL1Ie6nXpsq7eRD/Oe?= =?us-ascii?Q?oIan5rJYTyF8Uf6PbOZt/cwABj4pDZrs/IBvpqjHqG5w4VDS4/zJqrZuh7n7?= =?us-ascii?Q?RB4spL9kU5FAKx4L07aa/AJ6zi0jSnlZF9oeI3nW1RZX7NHF0riGWFnHLJGe?= =?us-ascii?Q?UWbcL+0glxQGVwDOfNltwroHzU6Zl4iC5r1gpzsL1NtV6kuRJ2woA7PMWtVc?= =?us-ascii?Q?JqBe3uChymbLfWfHf0vGQZX/r+LWGH1mCci7aPVrqvCvRKWPRKR3P2R5wW5q?= =?us-ascii?Q?1M6yfsN6EKCvShU7xQlP+d8gUd4aSdQBYE3x0lxKEZsTJHXOJ9lUuIYerzHa?= =?us-ascii?Q?ZaVhDsEluySv15T5UnzxsmipBa/QKlImIkhelfIVNSojofNSi86Vw5jHfTxz?= =?us-ascii?Q?07tStuvFOZUQ7vhYADDIVccvB7RyVMmIV0fN9Z182J5gLVvIK8C8FKi33d3i?= =?us-ascii?Q?KT56/iBMrmrXMsvmDJWhm3b9DQCg8CuCLMfBJUOjgbpYVW3rzZMeIF7/sHo2?= =?us-ascii?Q?T9vfzRnjkW7AEA30udERL6pM+7mQyzlxUUFD2Xno+FFjRGz8WgI6cCbXKW6G?= =?us-ascii?Q?ZxV9BD/oUSCBhHkipKGpUUQXPAu18P7ufoSFPz2vpwA82Elyx1AOa8mOq5M/?= =?us-ascii?Q?PW6JQS7Dennfe9YXJ6GVvlpAkGDQk13lufCAYdz91k3RNjIkQ+YEFMnv/Kjx?= =?us-ascii?Q?xcVFglm0lPokDGyoSoWVjcVL?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b69e91b-b224-4f3d-44a7-08d93b091164 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:20:38.3613 (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: 4J3nNUMPwO73pFd/vObkSQ5YDkF+Z0IqvpKIt1VrWosqs1AOZOVYdo5s9AppPyIR X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3327 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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 Sat May 18 21:26:48 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 1624976855037452.4624767641652; Tue, 29 Jun 2021 07:27:35 -0700 (PDT) Received: from localhost ([::1]:47784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEi5-0005b9-JM for importer@patchew.org; Tue, 29 Jun 2021 10:27:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbg-0001m0-8b for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:56 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:34005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEba-00049V-5a for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:20:55 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2057.outbound.protection.outlook.com [104.47.12.57]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-23-xABqlnODOA2cmiOGRKGp-A-1; Tue, 29 Jun 2021 16:20:46 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR0402MB3327.eurprd04.prod.outlook.com (2603:10a6:803:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.24; Tue, 29 Jun 2021 14:20:45 +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.4264.026; Tue, 29 Jun 2021 14:20:44 +0000 Received: from localhost (1.169.28.175) by HK2PR03CA0043.apcprd03.prod.outlook.com (2603:1096:202:17::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.12 via Frontend Transport; Tue, 29 Jun 2021 14:20:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976447; 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=ftAQGf93Lc8nJbxcyJURqA5kULjKeXfad4ZcFGJTWU0=; b=HKmuN30YQZLx8waWGbKNmewNgUIPRNmmesrn/VxKka0s1wHU2kyr8p+S7EVeJdP5IwataJ /pWBYlJq1SmcNrQe0zQFc0dxb9PI6A3UKi6Hf5zVIXy6eeHHCHMI4aqXdPsoNFjqUJtDMW TCCyOtIqrtmEUVEZGd1TMQs9xRRyg8c= X-MC-Unique: xABqlnODOA2cmiOGRKGp-A-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XP3FnueoXWqBFviFBd78Ru3dTLD7Z9A7BAxm+9Gb3kShzy3yqDVmsEV5W1BWZ2rzmxfrCBxk4DwpxJyJYzqACmaOJfDDzEBxYqx+Mw4gUABEokrBxWSRVJt2NXZdJPYu3J7Ko3hCmBCKsHOHqw2hQ32Bp3qXz7qR6hyraGTxQeJ+ARNEbvUMWT2T4nRMLS0RZCgT/gS8hpcHkCbSxsgLSpWwRk0iviPvgb92pbRok+tgiaeEAgzByciUPu2yjEjMepkbS4tN2p3p4jDn8FWH5+4135X5/x0fMUIfehL1kw718OR7kaXGHkCorsDw6+4TqMJDCor79rAK8drPvknk8A== 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=E2+042NSRGxb69LXSIjNeO8HZqvRBk0T6QaQIaOGc3s=; b=lwGaBOdFIQrlcAXRGCUZsztxZJISnR1m3OPRMxHDf+IafFV9frn6FdHYcNplSg7Q1iUA/8IQAITOhRMXoSkbg3SgnMU1PpMTNS20xTkAC0ABpNDNjjS5e2FD4yYOvhuJvkp+nLuf7w8+aUkHNKadNg8g2pZNxWU0dc2+OvNpFw+EWNHdyJ/e0J6jP4iNkpVxeifKAiqxRjHbnjIdct2ZHjCs6mKEZiYF0OB6BjwtvQhlyO+jU0QpFXwT86aXIGVe89Ew7ZSkkou/xILxVx+3op1J0dY35FBVUVYZpPI3i2yHOtXMB8Z+MZ81P97QzWYY62wzDAvSPtVafPTo5khJWg== 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 Subject: [RFC v6 11/13] target/s390x: remove kvm-stub.c Date: Tue, 29 Jun 2021 22:19:29 +0800 Message-ID: <20210629141931.4489-12-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: HK2PR03CA0043.apcprd03.prod.outlook.com (2603:1096:202:17::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: 1a298fce-c04b-4381-10a8-08d93b0914b7 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3327: 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: vaCY5AckLOD7HtXviG5CnzkfkZnd7/Rrg9gHi6AfTxCLZ+lOEvuIj8UMTHgSj6BdnI/0j+mSaIKlk7fnDwaywTGg2DXRa/kTwOUil5WvG2GeZXh6hVHaCeKNfkI7Fu4KATKOfeyRn72HOngV1lR8MQAX2GuiPJPJtSlAZyojF/pKyo52PnZD7rx6uMPk3FIVRE2aBEGqH/eojJQlspnSSWdJ75GnQ8WvtNB3KxazRJDb9t4tk8ekkvmfeevLnxtKIG1vw3ZY2OI8h2KckhfkxGQhyzYZD9rNKJQe5i8PgtnPoDgujY266W0xtHtMUTEXIl5vFf6Rt9Qma8FS7iuMV/rzM0nQlOUfvOqMM7YBf22E09xGwDxtulhHCSalfV8fBYwPmkpQF7/VbTW0n/crYofSd5Kt5PjeLwcTDqFazUPI0kUziThooLVK2k+j1LuFo8XzzGWCK0UgZGpi/D8nCdLZrrvHe4ZY+RydTkJHSuSO1K1tac6Orhg8cgom72UEMVaJ3gijDAIAQTIP3en+5XN8wB1kTDsUEgqzTdc5Z233hBL4Y39Q25rCtCF0yva4oiMFYOHUj0dUVcMJwuRU/qfUiA42+71y4AIkHg1IMMS+7mCrq6bxSeJGc3SZXmGXXfGO4lRGrcDx+X7uwu+5TUS764apoZUGCWgN8SrKJxYr7yPunJpwb9LXr0Fuqc5F0TzVAJnKMplllhMVFXkvcg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(39850400004)(396003)(136003)(376002)(346002)(83380400001)(8676002)(6496006)(6666004)(16526019)(8936002)(186003)(86362001)(2906002)(478600001)(36756003)(4326008)(956004)(2616005)(66476007)(26005)(316002)(38100700002)(5660300002)(66946007)(66556008)(1076003)(6486002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?KiFhtIB/tcDQOz/sBJzRrGtQVBjNtyqZz7iDo9atQqTTVTMnIwtSD3bxVi9R?= =?us-ascii?Q?qpIHNKYxqhuko2s8CUUOz4OI8C2tgBD9yMMzicoLs3fUq8YUnEh0XqCtGx3Y?= =?us-ascii?Q?tpbR+/F/TOJ5J27XeiQ5ymk2zKytLn9vSImrfmOgVkMuaTM2VwVxTP43MbPN?= =?us-ascii?Q?w9gFQz2Ps7vIlyO/TLdu3h8U/0ofvkdkxmxfq/QSG7C28+N+6aARgHznubG2?= =?us-ascii?Q?usK57Dv51u0rpGcqQ9Ox+8q4+WOY8Hjbzlt3oC+8s9VEQf1UUClOBgOo3U3d?= =?us-ascii?Q?JNb60j4woBhq4PAhSndDRReE4JKgAKt5R1USADIeIhO2BBAYeTbvz3WazFue?= =?us-ascii?Q?+KY8URF+iaLX4QVbgid2I7uxJT93osoLb4e0hXvx8+4MEPZ3lBVv95q+baYB?= =?us-ascii?Q?LVBYNd+Afgxzj36RkPIgYLK0+fqGA3qb4qawwVi/rAmjCWLe9oKzUc3Q0/Gj?= =?us-ascii?Q?M05r4jkfjspKnWhE14wxOh5D1J4umJzTPxhvHp7GKTk3x+EnN2l1pgMSUexl?= =?us-ascii?Q?JU7TY0Mu07wSbAyGzW5Dx1wvynBD9XaKrotvaR4ErVuXTCQbv3vd9qWrdxHa?= =?us-ascii?Q?FHDoJoQ6xbxZFP7vt/LLqNu4j69tg4Uu9ZEM3+cMhLU5G/PRDnrWEIjbkn6C?= =?us-ascii?Q?Qxdbx1D49h3hWlcyKVp24vKCu3frIdgyy6pNE/b+AlzQ6Cs8PKJnaBT3w1wu?= =?us-ascii?Q?0+vIvwMZeGHHlhQaMdu1dmsLvWCcE3ekDshwwz6P8/pHya9/D3b8XiGm9WFi?= =?us-ascii?Q?zYrg2v79H7qRGNMo0KxC16WinItuTsosT6zuqNcORM+F5xtb1OSHsxR62OYb?= =?us-ascii?Q?fTopHEg1NxxfRJ4ZpIc/tW3wmiDCNVE8xIx0EDp8L2vht0+hd+nudhbf1tW+?= =?us-ascii?Q?wk+WerPg5cV8/KDKYyghF3frNnN1dmxLM1HkXzVw6Ms3OsvBcVlFUX9aOvEz?= =?us-ascii?Q?urWf/ml+UCMwLT6FtVtqfJr4IBX7xHuJlCbxZX8SlivfNfLvto73qJW5KBe4?= =?us-ascii?Q?hxjZ8BXlS6/PjquLZCQNKm3dUOV3CR/2m9UjcuFPDF4KPr5iFAqkiYY4jJVi?= =?us-ascii?Q?sdqlc325c64x0wwJWJch2cuniBw23o4dyTdg++aJY0IdM9KjzEuqTXMmxgdv?= =?us-ascii?Q?hZ/pcdR294nFGmLzLeVP+wSXgTfN84+Ui43IBtyiTK6PZveqePscJj/328I2?= =?us-ascii?Q?aqXNpE65ZTg6+sGToH+guPm5cRynswzkRFaSJM4vnnvw/7rJUDfdtWjjRfwD?= =?us-ascii?Q?hXwDEvODYspI6jq9boXvIuJm6QEpM353gldrM2M+HRLP+fiq0ci7vuw5Oxb1?= =?us-ascii?Q?tPii0MVzn4wLt2ID6XgKXHpl?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a298fce-c04b-4381-10a8-08d93b0914b7 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:20:44.1260 (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: I1wHHPPt0ABsfhllIfrOVDLENz0qp3Tz8mR7EpRxmr3t64A4qwUSrxuoXnvR6L7P X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3327 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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 082ed2b643..4e172540c0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -395,7 +395,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 Sat May 18 21:26:48 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 162497705638226.430911559295737; Tue, 29 Jun 2021 07:30:56 -0700 (PDT) Received: from localhost ([::1]:56928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyElK-0003Y8-Pp for importer@patchew.org; Tue, 29 Jun 2021 10:30:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbn-00029N-DX for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:21:03 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:37088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbj-0004Ej-Ls for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:21:03 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01lp2057.outbound.protection.outlook.com [104.47.2.57]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-17-Kux0I9MDOyqo9X9v9wdiHQ-1; Tue, 29 Jun 2021 16:20:57 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR0402MB3327.eurprd04.prod.outlook.com (2603:10a6:803:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.24; Tue, 29 Jun 2021 14:20:55 +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.4264.026; Tue, 29 Jun 2021 14:20:55 +0000 Received: from localhost (1.169.28.175) by TYAPR01CA0195.jpnprd01.prod.outlook.com (2603:1096:404:29::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18 via Frontend Transport; Tue, 29 Jun 2021 14:20:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976458; 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=4RieaPirioilf6rlUZp/smieKJ/lLqEsOWTqDfC51EM=; b=C4vt5dguO8nfN1bDjaUQoG2D2hr9ONjB+XHJyJVuP4TsqTtQpnVkuyVV7bV/9fuZPBOP9e rLCm2NZIBOEgaR6SHTyhYaucyYaJeD542gmTFrGt2I8qwrYE9+p/Wag0V+l3pzpqjejCKr lF2CLjhIC74zttlT2vV4FPJe1725a7E= X-MC-Unique: Kux0I9MDOyqo9X9v9wdiHQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HjCr5tMZkPTFvI5xr103GwweylV6phTEblj3mMBiPuM9Rgr1q1wgKACns/LkTyNtWwQGtENLBc1qPU5cUWSDZ26/Ay6gmZMkSSpO5mOhzfjQospBoHarPIq2wMDOEtPGp4ZaO6MqlKT70oOz4e1B31L9wbbiGL1gzLruhdKudY/FqSxTVzvATfs0XbnH2jQiJAU3Ch/eL3G2e+IGQXI0Bzdt3vE+y8JWnx5rQgf4KcAL2/dMD/DuHWgWTENzllQamHeSEhUPbSEYGq2WG8w3cXN2twQU1R5tSVztmhk++Gnzw3yQqpxZ8tGG5504kK7mcf+2GIKdyk1jsU+zRkRvRg== 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=aXk316ilrzyL+KrcU4fbkxjU5sXIvqTzzrF69tquBTw=; b=ZL88xzOUoz3QNPeoH5IMQkrxamBo3MNzE5wzjdBana6EwqM9yXbVuzCmaPM85fTD2mUEhOPF40NWkYrKMxcZgYhle1YpcrmSu/8V64Toua52Xqnx+WZ6rdWQ9KN3fRRdnARJKORZeuZsHwp2He1kynUxfAfz/xjBO+CJbFin35Ht2euLmGC9flUJdUn/QuD77nfkSCLiTuLzPUz9Ey28XZ39rwz0tjWS5/SBqt0FeTLv7QXIpx4EMhq3t/myof6g55EZ3SunrdylgTYS76/fwUizUxlq9++m5nyk7qeBMkHB4epC03U5sZ2himNtcbsdg7oRe6UbtDZ+QBbY7lGgAw== 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 Subject: [RFC v6 12/13] target/s390x: move kvm files into kvm/ Date: Tue, 29 Jun 2021 22:19:30 +0800 Message-ID: <20210629141931.4489-13-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: TYAPR01CA0195.jpnprd01.prod.outlook.com (2603:1096:404:29::15) 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: 5b048918-3f0e-4edd-1f11-08d93b091b4b X-MS-TrafficTypeDiagnostic: VI1PR0402MB3327: 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: H2b8QXuTo0HUttM6+72FksK3QRkEkkdLXEEB/N70s3mFWLEG7DoAeKMjHqVxU5QOOD+D+6oyBImjRnAfatMws5R0u2DF72QQXF4MNOfknPTAiAqQRm9wG0Zg4HmHh3AqeJGMG7A7N943CYiFuiSgT/EPCiWeotOSnACSJsU09/ffoJ0vxrk8gZlCEYRhIg6nS4EqwD9COsPhKM5CLXnYxwV2L/Pj2euVODKiysXX9YCRcC19OhiAmacSJhs9FZMI5BUK22G7r9BwswAGUghZenvtCmcKL9frzonz5i4Mw+uE5mMfNV1ta+Vetf8y593IuDK2ipjUpg2TphEPsS0gVkD6qeZ1B9lqfM0sMbphQuLF2PfPkPe5W3hpiH+QK6atgKxOP8APPM6iEq1bPdvgpnysg78SiWW2/Pc1vADOW93QJI9zaWMAcmz/n91/nzXRiOeFb1UeEuaGVYrs+8IL+p7vF/1zXX+8ZLPsJG9qUSHg6ACk0u5ns9tRNxvSIyKX0fzXnwG53CL8GaZnw8e0vw33XU+u4pC4Ll1VBAkB6WoHZ9JxUllPZqB2GQsXX9U18QxwbuQGga4Mnz2dISVPlC4073zKz+CdQi3Q+ghlixTbzkHOxx7gQs1hfk+iw04UWITkbkibLiONdLTF3n/lo1rAE8imEA8Lp98Jw6yB0fx79C6BkCeNHavz703UNBoY X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(39850400004)(396003)(136003)(376002)(346002)(83380400001)(8676002)(6496006)(6666004)(16526019)(8936002)(186003)(86362001)(2906002)(478600001)(36756003)(4326008)(956004)(2616005)(66476007)(26005)(316002)(38100700002)(5660300002)(30864003)(66946007)(66556008)(1076003)(6486002)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?RRSGqWoRDekfOpWfuv95dWbNNobvMm6nbCbFKXiniQZqH2Ey1qCbG+6KUMVV?= =?us-ascii?Q?AeDgFOHu9nRr1Pg7d49anczlXLwX2Mqbg90nQjF9kTlLlYCy7xgvwmVINzGb?= =?us-ascii?Q?WEvourBy45aQSdqm+T2+j0MIcVYZWRBc5yMyRwq+xO82rSmHewLK5s/UCXl9?= =?us-ascii?Q?6EQeCXdjqiXta00eEyYoPO17nEsBqkpZzTsL5e8I2z2OfEoftIeKt5a/7iCS?= =?us-ascii?Q?k3CTreLPUWbeZfKjnkhdrjsKsddHTjV/lGrNpiQoX0rO9LGXAB/0ZT7zgIw+?= =?us-ascii?Q?ViyqawxXUxJC0+y665h7vSabr+QRQ/g5VLA+uGwPumIEzNzD1d2O7zE5wXrY?= =?us-ascii?Q?u86XNfEhBf3prCdK4LhNx7OYtKfTTh8DsMvHPyegV1LZjc3xgkxakF2XF2Lq?= =?us-ascii?Q?l6qCLLlwyUIWECbir7G/YMHEmuRomaLmScZl82IPAjHaTpOnicrAtvPV93Qo?= =?us-ascii?Q?sR8xsaW6XTL0TWnm79RyR2HzLYSf3LdOXcQ8HGc0M/cmrWu94w5DxSZzKnhD?= =?us-ascii?Q?xy4LBkUn3Pd+o8zK9rEQo3TEcEdGfl2IVSLWImhag5cPnW6msw9+P8Jl4oN2?= =?us-ascii?Q?wo/HqZQ2NWO/LLVDVmCRb1lVd+gMzw3ScCV5qcM9FrbMvOntLL4fCQd13nGN?= =?us-ascii?Q?4ywUHvnNDo4Vgu4l15njCARZn4wxOy1Uthz4bQg4NsQjG9mOBoFeRCni1eSq?= =?us-ascii?Q?5M6mpIRf2ErfyU09gbz9YupxsqOmBu39TzdJkEy78bwruiMzyIgBWq8AfLjt?= =?us-ascii?Q?iR1xYgH4eYfInuc7MvAJfciDTNm76XFJBrpKSXs67ei9suHZBS3OgzosdKoN?= =?us-ascii?Q?jBodbSdZl2Xi5ra+nW5yYeEHT7kTMwFb+xeJSlSf/SFdPFvBFOwalzylViki?= =?us-ascii?Q?SyBiZ6amfu0LaKZ5l1JgfWx9vYIATxdu5ajdp7WeiwstHK+u1Lr1iQWzmDSs?= =?us-ascii?Q?VCG/XGBbj+t7eYaQ02nIryvvz+wuDzSEjDLXYhDKXLKbNEeV0pHYPYnaS/3P?= =?us-ascii?Q?4eSm+vw3DtHBWWHCgR48B5XVbYWcIEGRUtQ1gAR4tjMZjhcVmZrpKszctxSR?= =?us-ascii?Q?J+TSq9i2XMt6iT1gx1YEPLOHTVlYL8c6fiCPdiutV018+LvhevZk6sA0LOOR?= =?us-ascii?Q?IKDtZnTFi6sxVShlEVZeDnOXxu/CGjoOPBUG2U6b/w21pudXr3Bk7NEn3YO5?= =?us-ascii?Q?gSOqYRE7UT+eAEvyLpasawjK6LIB18Xw6PLzbLxOWGWvK63h7JVOrlPkczQX?= =?us-ascii?Q?T8p93S3oPBh37xaMwZG1gEw2o9haRpV2U0722Kg+Ukk6Hh/NzA3r1G8iFMUp?= =?us-ascii?Q?lZMNuJ5VTrtMwSzR8d6cO3Xv?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b048918-3f0e-4edd-1f11-08d93b091b4b X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:20:54.9997 (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: MzWPcihBnHTxITfhipbs5A3z8evbcMwOd6m/b9/eOFFrICQSB+qz8+ezyppjJChX X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3327 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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 --- 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 | 2 +- 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, 40 insertions(+), 35 deletions(-) rename target/s390x/{ =3D> kvm}/kvm.c (99%) 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 4e172540c0..5a482d65da 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -393,8 +393,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 a91b39465c..293d509c7e 100644 --- a/meson.build +++ b/meson.build @@ -1886,6 +1886,7 @@ if have_system or have_user 'target/ppc', 'target/riscv', 'target/s390x', + 'target/s390x/kvm', 'target/sparc', ] endif diff --git a/target/s390x/cpu-sysemu.c b/target/s390x/cpu-sysemu.c index 16e5301084..df2c6bf694 100644 --- a/target/s390x/cpu-sysemu.c +++ b/target/s390x/cpu-sysemu.c @@ -24,7 +24,7 @@ #include "qapi/error.h" #include "cpu.h" #include "s390x-internal.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" #include "qemu/timer.h" diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 2b2b70e1c6..9574bc9305 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -24,7 +24,7 @@ #include "qapi/error.h" #include "cpu.h" #include "s390x-internal.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" #include "qemu/module.h" diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 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 99% rename from target/s390x/kvm.c rename to target/s390x/kvm/kvm.c index 5b1fdb55c4..07dae06de8 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -27,7 +27,7 @@ #include "qemu-common.h" #include "cpu.h" #include "s390x-internal.h" -#include "kvm_s390x.h" +#include "kvm/kvm_s390x.h" #include "sysemu/kvm_int.h" #include "qemu/cutils.h" #include "qapi/error.h" diff --git a/target/s390x/kvm_s390x.h b/target/s390x/kvm/kvm_s390x.h similarity index 100% rename from target/s390x/kvm_s390x.h rename to target/s390x/kvm/kvm_s390x.h diff --git a/target/s390x/kvm/meson.build b/target/s390x/kvm/meson.build new file mode 100644 index 0000000000..d1356356b1 --- /dev/null +++ b/target/s390x/kvm/meson.build @@ -0,0 +1,17 @@ + +s390x_ss.add(when: 'CONFIG_KVM', if_true: files( + 'kvm.c' +)) + +# Newer kernels on s390 check for an S390_PGSTE program header and +# enable the pgste page table extensions in that case. This makes +# the vm.allocate_pgste sysctl unnecessary. We enable this program +# header if +# - we build on s390x +# - we build the system emulation for s390x (qemu-system-s390x) +# - KVM is enabled +# - the linker supports --s390-pgste +if host_machine.cpu_family() =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 Sat May 18 21:26:48 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 1624977755308363.43549993921204; Tue, 29 Jun 2021 07:42:35 -0700 (PDT) Received: from localhost ([::1]:55726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyEwb-0005nz-S3 for importer@patchew.org; Tue, 29 Jun 2021 10:42:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEc3-0002c9-2y for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:21:19 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:60149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyEbs-0004Ke-Sp for qemu-devel@nongnu.org; Tue, 29 Jun 2021 10:21:18 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2055.outbound.protection.outlook.com [104.47.12.55]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-5-YH2fnHa3OxWLC3qEg1qfww-1; Tue, 29 Jun 2021 16:21:06 +0200 Received: from VI1PR0402MB3744.eurprd04.prod.outlook.com (2603:10a6:803:16::25) by VI1PR0402MB3327.eurprd04.prod.outlook.com (2603:10a6:803:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.24; Tue, 29 Jun 2021 14:21:04 +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.4264.026; Tue, 29 Jun 2021 14:21:04 +0000 Received: from localhost (1.169.28.175) by TYAPR01CA0202.jpnprd01.prod.outlook.com (2603:1096:404:29::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19 via Frontend Transport; Tue, 29 Jun 2021 14:21:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1624976467; 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=Lhr+cS0cKL9GhqJiVFkSjFchs2kaDrAgrgX864tVM4Q=; b=lv0WBDMtUUTKDAt2An+TE0QJa5fyAJOfeZ3CUTtDSzg7tuFTETnqVLRjF46ePpc9wBfWEY 3Yl5LsNDzDzKOJrftbnpEoKTRTfJGQxcLNFGMEqxAIgkeAYQ4LbDg1ZJs0k/1WP1hOhxmF O6DwVa+olFtG4a/JQ7VLH0aNuAPxvLM= X-MC-Unique: YH2fnHa3OxWLC3qEg1qfww-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UqKNWkselPQEA4kyR5d9fE8ubj51dyRJMmjWVn9S+eAvoo4mgf62Rzug6anFItkZBxRuuJylHNma0Ejs6N5EaiQbEnxRShU+Gyd3RkWV6zYpjvbcLBtC782kv0cmn7C08Av8DjIdDcJE/nNOfWAy/k0Rr6Xw8L4c9GFdT0HhEIBDUcB4yLZNUbGQVatZjPNlasnNGsJMXYbpZK/ic7s4UYfkcvVRmjTiVvRD2FDTcXs7pk637d/m1nO5odLocxr82ySopSGY/ivj31AIqSx7C48QTYNKB2q197WlXBB1hfDBNQPQXOyFSHSGFsR1w8+/v/sSJyzRmHyGGlaZcII5Bg== 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=Kt3o5ePcuygQ4wnkpSba/JCCCeolu+hyNkBte0uofjo=; b=U2okywFTiqNEhutjXbON2ousxnJoLUIBpz6tcp59azCX/kpGeTeeVxzc2J5qop/aiDaVWBADK2qjHyZBaN71WWO455BGBg12W4MShxyFmZXRbZeh1t0ZkvKlKyWiAhBxKUakEwaMuCyLhUSMVCnM8qmrFnSdg5zpeU7voG4xIsxEvveHYTnduvgtPYfoHeR3bgviv2NTWhchSp4GyjiltQrZNxUNenLKmHiWQl3Yl/w1ufhXqWOB2MWV2BYnvTPIMzFfKTupqzZhTuo+BX2nRc8BNGo7bRGc6DHHq5+3meRxXLmN/jvZTYUqfwhX8xugeqnvYnXuaw5YRuTcKUYR4g== 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 Subject: [RFC v6 13/13] target/s390x: split sysemu part of cpu models Date: Tue, 29 Jun 2021 22:19:31 +0800 Message-ID: <20210629141931.4489-14-acho@suse.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210629141931.4489-1-acho@suse.com> References: <20210629141931.4489-1-acho@suse.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [1.169.28.175] X-ClientProxiedBy: TYAPR01CA0202.jpnprd01.prod.outlook.com (2603:1096:404:29::22) 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: 5cb50d9e-a338-410b-234e-08d93b092101 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3327: 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: 1TOTIkmxVZO0aZlNQLunERPGHkHblRSdFR7YblGNzBDfMv84XOGh6Fzb8EYtXsBmFIKWjwbkc60BlOGurj0D8cZIxGAL8YcAid0GjnA8IrSAWdcJFG4kMizhYqciVi+6wJpeprdA1v8edH7mR2CjzM4kFweIpeLYPd1LACDz6twV+DoX0edsM/Ke8dUxB/MGzS0WrWA6rZMU2nyNwL1JcSc6uAfhRa/cH/LEW8bduiurqwx1yqVPyJc1xS/IgkVlxNAL8wE5uW+calVXTv1sk2nPxgICzoJNJnd52gL767WBXDvU/ITiAycq7vR5nDuWeMmKWslk5/pY99CexzKSo4ewHP0OhKhREceuSpb0LwKI6AslgefJZ167rV3EjMnnRlsPCJXh729x3YrMf6O6De9s4Ao18GXRbnHwZZHajyfvowLILJtX4VsHAIqZmTayD/OEM9A9EQ/8zcxahNzxB70tsGm6E2cnusI0Pqu+MSnCRZIFy5TbWn0WLa8wHu47tYhHAVEfFm4G4MeImkFrlORuLRBHef0uRtnBrcEfNZEi21QjrX5+CJPPSVFTaauRXJft9hs5yeCnBjWN69+edWv/mG5lTZdRZnitmX5HfRIV/ayylBc3BtL1CrNoWUF4cdJ6VjY1x3rPzfZ4kSmNOqCI0W7oHy/3M44PFrdq7ZvTRUk2F64Iwx/yj33qxg+TR8P0jdzpDjC+ehcWmqWu9tWiAxEiUYE+jNEVuDJgMwY= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3744.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(39850400004)(396003)(136003)(376002)(346002)(83380400001)(8676002)(6496006)(6666004)(16526019)(8936002)(186003)(86362001)(2906002)(478600001)(36756003)(4326008)(956004)(2616005)(66476007)(26005)(316002)(38100700002)(5660300002)(30864003)(66946007)(66556008)(1076003)(6486002)(170073001)(36456004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ItYRPuYsDv2NoYfi3VGeZ7JAm0ZXaZdnSA1s6l+lmi91p0Gv6sTnwKrhq/T8?= =?us-ascii?Q?itJlFF2gJS+ajdDIdTqr5goHEOVtHQIHR0w+ejhrbOTwAH/JEgLu8sGhTO8C?= =?us-ascii?Q?Nb9Na/gvmlF7tM/5zrpetvdDWRzg1WQ9cTcZ9ifKTkivgSzWv4s08WUmEfbU?= =?us-ascii?Q?OeeNCAPo6ZOet5uaHoNamfflxEWwQX/dkA8vwvlaxBKNvxtJdhzNkrnwb9tZ?= =?us-ascii?Q?NPThcJAHWnn8S7Ck4oMi/UBDgGt2a90r6uHAUxWYcz3V2SUDQheRBZpEmVQG?= =?us-ascii?Q?mBcMR7V4MiCBtAFqYARTnhu7hBrbaLYFnWh1ALZjWS28n1qb6Me53ZlbHHVx?= =?us-ascii?Q?Ek89qCAqTjVsXj5u8KlAagEvyXMeiod20RmdXhXNbHoRHxtTD3tsE1qfmDcR?= =?us-ascii?Q?ddn1iresRiIJYk2Y+krBy01qE5At2ruDJhC25VdqtG+QE5HllQplzT+qM23d?= =?us-ascii?Q?rBgK0NU7B9TWdsgvxBAwaS1xHyYetca0OVXdP+EGxNQMjjMTpO3fRDv70BMR?= =?us-ascii?Q?2Q0o7JlLMC+kf/H+KR5SDcq60L9nplC6cdQQq6ucjxGGj0RdU4Y2Lt0suiYO?= =?us-ascii?Q?t8/zyNLg6krRx7ZNf8oYHuFlup4XRhLZ1ukClkuI/tVupih4NNEEcOS6RdLj?= =?us-ascii?Q?Ek83CRdMqFliTvlNN6Fl9us8QO1DGsI+S0etGbdU5IKZ7Dk1ZChGfqMpzgGk?= =?us-ascii?Q?xxW6u94+4ZW6Zo/ts39n684YMLJ0kLHorTJoCTi/14AjWGylOkP9fSr8zWp6?= =?us-ascii?Q?P9ematXmU66FBYAnQhxrYU/U4ptbgSIxFro4+3qTQcBfL4+vfZ3dCR98AXx1?= =?us-ascii?Q?XM2wd/sPiVNV5n7qp1f3gBNCQPTpY3otuwq813y2dwM1doCyFGX6cqgmtoKC?= =?us-ascii?Q?0qgTnIRc8DXuHJnA0zGyxGWOEA15Bms3LYQTo8dCFJOyjKpVhWKKmVRUz52y?= =?us-ascii?Q?tZmkibw7dnE59OyS1WRuQlwhqJUsIPxqEjo0GZ92lT6exriEggepjvOPOLh6?= =?us-ascii?Q?isGkXkooKG1mF6QUVCFJIVkupJf86pB1lUeIUxbm19y4xdJWn2r6K5ozDqq6?= =?us-ascii?Q?1YIKQpAFQyAuem3/JHN+qFVu9bVLNr3eMJlN8WuyuRCTLgEYxOO/hytbJTnM?= =?us-ascii?Q?TZ04rszg4x4a85dXEkoa7IyyRnF3sL1EyDlcaT+LxqKeuCLJNcriC6gDLBjx?= =?us-ascii?Q?fCtFkKqHa+kiiVFiyIpoX7sG0a3IHktvrW+zsnIxhErVDdRQLSkgofWQ+ELC?= =?us-ascii?Q?Y/vELGeDcLLs+9f00W4RQ1FH3Hbt6MfNunQ19KWWBhaVaM08FGDjb+EtT4AX?= =?us-ascii?Q?E/zhvBtIyqbtV+MwciJybbGB?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cb50d9e-a338-410b-234e-08d93b092101 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3744.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 14:21:04.8000 (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: +cqWdhnCRR1EfyshNrRSaWwYcQ0/5N65i06rYz2I1qqAPqfsOWu57EG8OxBsViLg X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3327 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @suse.com) 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 5a482d65da..8c6d88cddc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -297,6 +297,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