From nobody Thu Sep 19 00:18:43 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1686787548; cv=pass; d=zohomail.com; s=zohoarc; b=b2Pu62Nt7fg5dTy3waHXqDIgJEsflWqM7b4lgWamlxOeQr+uzxftQLma2otu2zjm3Fna4KiE6oL+Zb85mYigLZ5/V8rPnkhPpVJor6R0Bslb1QtmBoVjIOzsSkjiZMecWe71FCLP9WeuJc2PESPU1ZTiJDFGTXP8zqDI+iYv1Zw= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686787548; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FR4BawIl2nyLOoaRXHWpiEutGsBER4awTYitO3dxACs=; b=VRnIfDGefTPYsLDOu1Ni6g7wOuZGhs/eyyunG7jT81caqMe/+2BCm6eEeqKODMLtGwW5TzQaTyn4SvrJdue167NOKw4tFT6MKfrnUXFgN6/91Xn58KDwzZo/NovJJRkXLmrc5453CpqTbgNDWpdQ7bG46pjlh569yTSUAJ7O5ks= ARC-Authentication-Results: i=2; 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+importer2=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1686787548013406.4831846443823; Wed, 14 Jun 2023 17:05:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q9aU8-0005iS-S1; Wed, 14 Jun 2023 20:05:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9aU7-0005iB-0S for qemu-devel@nongnu.org; Wed, 14 Jun 2023 20:05:07 -0400 Received: from mail-sn1nam02on20627.outbound.protection.outlook.com ([2a01:111:f400:7ea9::627] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9aU4-0006e9-EV for qemu-devel@nongnu.org; Wed, 14 Jun 2023 20:05:06 -0400 Received: from MW4PR04CA0271.namprd04.prod.outlook.com (2603:10b6:303:89::6) by SA1PR12MB6969.namprd12.prod.outlook.com (2603:10b6:806:24c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Thu, 15 Jun 2023 00:05:00 +0000 Received: from CO1NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:303:89:cafe::fd) by MW4PR04CA0271.outlook.office365.com (2603:10b6:303:89::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.37 via Frontend Transport; Thu, 15 Jun 2023 00:05:00 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT022.mail.protection.outlook.com (10.13.175.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6500.25 via Frontend Transport; Thu, 15 Jun 2023 00:04:30 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 14 Jun 2023 19:04:27 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 14 Jun 2023 19:03:55 -0500 Received: from xsjfnuv50.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Wed, 14 Jun 2023 19:03:55 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ER2yf5I9umHz63PNCorqZKGXapXaeDX2XJJZaLw/XDpXsWbPnpoePZ/NM6w8ZpwIaEV890ElfJm2lUK3VbTuREtZufOznHXZ4s2nkcvJz8sTf5v1HJ0u49xcAHtO1r1ljGcKmb9Q5UxWaOcn26owZopsulGYzhgOrLX+OjyBZiHOaviXWE/nHVqXKHQuULVZUUYnJSirX/LzBXbC8X4WS+iYPMkju3VZ4vjgfKyY7tQto/EpQC7AB+sFiM3mOM7pmwDMhZoTfLqpkScgS+IoLjIXglzfSXfInJ11ak3xoggpVy2HIJR2YlVEBdVJyV3jzE8iZeINWuYy6p82awnuAA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FR4BawIl2nyLOoaRXHWpiEutGsBER4awTYitO3dxACs=; b=iw5299sIwsEPhUBXMO5q5LpvXBgceQh8C/YvvSm/o6jO+BuO2rNe6spreb3DOKfQ1HQfz98yJfh46Iy5rJ1XWwIOl168sMehKGeDHoNQvnyNWFsKejBkNKuE4O/Q/hJm5Jm20j1exppnbalmefD8v3rSOtxDytK5SJB+1b6vCCe6TS14x6YfYnhiOPUB6WEBb3TTo71058rXJ5N6nmfJ5+vjPnaYWqhf4m5GKD7fsG6QLWZ1fnTssyjOxaF05V7d5Bs5fbtUpqxrJFTCLY0+eUYZdX5hIg2zXT79AixN5t8H2ElP7Iz3LSW98Wx2pQbl6HQD4CwYHWXvc/XnrMdbaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=nongnu.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FR4BawIl2nyLOoaRXHWpiEutGsBER4awTYitO3dxACs=; b=G80Ir7+qKGAeT6VzGg4HMVWr7pS6LGUOYhDKBSCpFeXKbT9+e5r8FSWcybf9AWRegyGaio1+XjW0sunbtn3/8ApWaKbMhYdQ8lBg7X5zyrgMjk63Xf1EGiuh5ib5N954eTAqBLzwhXReKa825aiYkREZqeLvdGnb3c8F6yB27HE= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C From: Vikram Garhwal To: CC: , Vikram Garhwal , Stefano Stabellini , Paolo Bonzini , Richard Henderson , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum , Anthony Perard , Paul Durrant , "open list:X86 Xen CPUs" Subject: [QEMU][PATCH v8 01/11] hw/i386/xen/: move xen-mapcache.c to hw/xen/ Date: Wed, 14 Jun 2023 17:03:29 -0700 Message-ID: <20230615000340.1135-2-vikram.garhwal@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230615000340.1135-1-vikram.garhwal@amd.com> References: <20230615000340.1135-1-vikram.garhwal@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT022:EE_|SA1PR12MB6969:EE_ X-MS-Office365-Filtering-Correlation-Id: e5ff215b-b21f-46e6-d087-08db6d3428b5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0FIX13yuapYmFOj6gXBvTq20lycg/oMtM4HGdh6knZwiFgojlya4EbSiC6lijn5NiBfN1SMliwPbR0rqfcTR820RQkmciQHtn/IO7I1KmVGiUchC1UTf6ZlgI2CGEcN5mlSLDeabCAlSr5V5DFKK4ibUqgB5TEE/35o09sqF77GdDuFn+FTR3+gl7P7qPsiPf7wHQ3cOehtDMQtMMjXWUAm+0gDCif3otockWPMZS4RtMXml+iAkmrVLwZxSKSQ4lW/NicwV1QeggxiwUQhoDa+RqwLNKuHtzusYX/4JXS0hu6pxMZv8+zAOof4QQhM82Offz7sg9Za73GVQIK24icXjsbcBvf6+hajfnizmPKQexbVWTS36h6y76vn2L1ipHH40QhdtLo1LbZR5Vmsk3uYlQ26vcbtOrpQsTuBysXnGne/JTiqas5yzmXCSlHgTTA1fYGoMxN57lWq+BdBTmGZJjmJEjs/3AvK6bsmzmcnob6ahNQ1rv8nACsaICFPtKqv8qUeWW9yKV2NLdIoUor4wExwhaATwORz4LGL7gdDDBB9m5s+fPDDeXHXi8vMyBuW2BEnQ7djYPJhs+CWnyNDATZoVzIafFOe/j/NGOuxXwkuoeE7Z2dSOn+vcaCTW6k1smqvZ9sIkIkSHAJ4g0WTEuORa75DN84qHemFbI/fXXHK8zhHtEk/gahLVO3Joxbh2WpO3S9PAYhC61+C643Oal+1Kb6la2l1lxtaTW1CPD2CNr0rQ2QSdphceKfRQXe5G28HQfnnQ//mQqwvQUw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(136003)(346002)(376002)(396003)(451199021)(36840700001)(40470700004)(46966006)(36756003)(86362001)(47076005)(478600001)(4326008)(6666004)(316002)(6916009)(54906003)(70206006)(70586007)(356005)(7416002)(8676002)(5660300002)(82310400005)(40480700001)(8936002)(44832011)(41300700001)(2616005)(2906002)(82740400003)(426003)(186003)(26005)(81166007)(1076003)(83380400001)(36860700001)(336012)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2023 00:04:30.5239 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e5ff215b-b21f-46e6-d087-08db6d3428b5 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6969 Received-SPF: softfail client-ip=2a01:111:f400:7ea9::627; envelope-from=vikram.garhwal@amd.com; helo=NAM02-SN1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1686787549378100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" xen-mapcache.c contains common functions which can be used for enabling Xen= on aarch64 with IOREQ handling. Moving it out from hw/i386/xen to hw/xen to ma= ke it accessible for both aarch64 and x86. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed-by: Paul Durrant --- hw/i386/meson.build | 1 + hw/i386/xen/meson.build | 1 - hw/i386/xen/trace-events | 5 ----- hw/xen/meson.build | 4 ++++ hw/xen/trace-events | 5 +++++ hw/{i386 =3D> }/xen/xen-mapcache.c | 0 6 files changed, 10 insertions(+), 6 deletions(-) rename hw/{i386 =3D> }/xen/xen-mapcache.c (100%) diff --git a/hw/i386/meson.build b/hw/i386/meson.build index 213e2e82b3..cfdbfdcbcb 100644 --- a/hw/i386/meson.build +++ b/hw/i386/meson.build @@ -33,5 +33,6 @@ subdir('kvm') subdir('xen') =20 i386_ss.add_all(xenpv_ss) +i386_ss.add_all(xen_ss) =20 hw_arch +=3D {'i386': i386_ss} diff --git a/hw/i386/xen/meson.build b/hw/i386/xen/meson.build index 2e64a34e16..3dc4c4f106 100644 --- a/hw/i386/xen/meson.build +++ b/hw/i386/xen/meson.build @@ -1,6 +1,5 @@ i386_ss.add(when: 'CONFIG_XEN', if_true: files( 'xen-hvm.c', - 'xen-mapcache.c', 'xen_apic.c', 'xen_pvdevice.c', )) diff --git a/hw/i386/xen/trace-events b/hw/i386/xen/trace-events index 5d6be61090..a0c89d91c4 100644 --- a/hw/i386/xen/trace-events +++ b/hw/i386/xen/trace-events @@ -21,8 +21,3 @@ xen_map_resource_ioreq(uint32_t id, void *addr) "id: %u a= ddr: %p" cpu_ioreq_config_read(void *req, uint32_t sbdf, uint32_t reg, uint32_t siz= e, uint32_t data) "I/O=3D%p sbdf=3D0x%x reg=3D%u size=3D%u data=3D0x%x" cpu_ioreq_config_write(void *req, uint32_t sbdf, uint32_t reg, uint32_t si= ze, uint32_t data) "I/O=3D%p sbdf=3D0x%x reg=3D%u size=3D%u data=3D0x%x" =20 -# xen-mapcache.c -xen_map_cache(uint64_t phys_addr) "want 0x%"PRIx64 -xen_remap_bucket(uint64_t index) "index 0x%"PRIx64 -xen_map_cache_return(void* ptr) "%p" - diff --git a/hw/xen/meson.build b/hw/xen/meson.build index 19c6aabc7c..202752e557 100644 --- a/hw/xen/meson.build +++ b/hw/xen/meson.build @@ -26,3 +26,7 @@ else endif =20 specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss) + +xen_ss =3D ss.source_set() + +xen_ss.add(when: 'CONFIG_XEN', if_true: files('xen-mapcache.c')) diff --git a/hw/xen/trace-events b/hw/xen/trace-events index 55c9e1df68..f977c7c8c6 100644 --- a/hw/xen/trace-events +++ b/hw/xen/trace-events @@ -41,3 +41,8 @@ xs_node_vprintf(char *path, char *value) "%s %s" xs_node_vscanf(char *path, char *value) "%s %s" xs_node_watch(char *path) "%s" xs_node_unwatch(char *path) "%s" + +# xen-mapcache.c +xen_map_cache(uint64_t phys_addr) "want 0x%"PRIx64 +xen_remap_bucket(uint64_t index) "index 0x%"PRIx64 +xen_map_cache_return(void* ptr) "%p" diff --git a/hw/i386/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c similarity index 100% rename from hw/i386/xen/xen-mapcache.c rename to hw/xen/xen-mapcache.c --=20 2.17.1