From patchwork Mon Mar 1 21:50:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12110679 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF71FC433DB for ; Mon, 1 Mar 2021 21:52:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3120660232 for ; Mon, 1 Mar 2021 21:52:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3120660232 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGqT9-0001r1-2F for qemu-devel@archiver.kernel.org; Mon, 01 Mar 2021 16:52:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGqRl-00006P-H1; Mon, 01 Mar 2021 16:51:21 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:42024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGqRj-0004gv-Gc; Mon, 01 Mar 2021 16:51:20 -0500 Received: by mail-ej1-x62c.google.com with SMTP id c10so4654206ejx.9; Mon, 01 Mar 2021 13:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TgU9g7sxuuToYY0NcbUASWLJoXAYrOMW28gUzw0UYX4=; b=MjUxIOyJmZt42YG/WnmTH7i+XkiKjXJtVBoVDF2uqpZcPx2bE7UBkt7K7Xedpifgzv uVVHZqkiYkq150I/IyLhHiXcxwzqKtlclERrTdetQmrEYTFL1BSksR3cbcneP6ahc2QV SX8sivvauRZ8ONUZ+XUgWH2tZgkg+myHwS+hDLUPq/+D/1ac2xGspba+rzN/nb0ewWNk j5bj1RWR3jN7JTF7d2edAziBcMKc8ifpqx2OYepTR8hChcOmRVTi+QY7tsbfpkiqBc/P 6H9fuOiffS4CqoX46+gkBwwKbfx0drAAKzKSXgHmrdPS4lVPtOgFBmz6+OBod0RTqrMP +6lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=TgU9g7sxuuToYY0NcbUASWLJoXAYrOMW28gUzw0UYX4=; b=HYlz/U3BtaoaCOgnjqteDC1Co3RLS9eNM+5Km/rYK1EwPJiGIsVugyHIwV6jyHbAw8 LgItuktg5Y42Y1nsM7vdV1VjDzcBFCN7CoW4Lf0JDnx2z2K/WVt57ka9F2PeqJdI61+G zOc/hxAAh5mHAK+LxdQLa6xEksFahQTxNVhSD/ylNm5Ka23LJsHDrkZgVW706mAywCTh EKZOoo387PoQlh5inMFiOifTMtPyeMJynKNGpKeRrG1ihw7L8n5RzJns0yGKx3wpQ+aO MdJD9WOFlVqKmbJLDggsT8nKe6O4RIQbiOfXLXfXsOq/rBmIW25HSWtynBEtb9smkKcP VjSw== X-Gm-Message-State: AOAM533Wc3xA4fwbWSDM9oiVHWmpx2S+mIHMVj9DZivytnZwfU7Q69wx /Eh/U3LNj0A7af8EiqPDyex6O3FsERA= X-Google-Smtp-Source: ABdhPJyOMhDtue9R8x/eGIqKv9n/57r+82/Iadqsps0DpOp6wVPi0IcDaksBuDT2wcEJ+AivKY7uxA== X-Received: by 2002:a17:906:cecc:: with SMTP id si12mr17899227ejb.461.1614635474708; Mon, 01 Mar 2021 13:51:14 -0800 (PST) Received: from x1w.redhat.com (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id m7sm15710201ejk.52.2021.03.01.13.51.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Mar 2021 13:51:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 00/17] cpu: Introduce SysemuCPUOps structure Date: Mon, 1 Mar 2021 22:50:53 +0100 Message-Id: <20210301215110.772346-1-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Peter Maydell , Sarah Harris , Chris Wulff , Sagar Karandikar , David Hildenbrand , Anthony Green , Mark Cave-Ayland , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Max Filippov , Alistair Francis , "Edgar E. Iglesias" , Guan Xuetao , Marek Vasut , Yoshinori Sato , "Michael S. Tsirkin" , Claudio Fontana , qemu-ppc@nongnu.org, Artyom Tarasenko , Aleksandar Rikalo , Eduardo Habkost , Richard Henderson , Greg Kurz , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Michael Rolnik , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Bastian Koppelmann , Cornelia Huck , Laurent Vivier , Michael Walle , Palmer Dabbelt , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi, This series is inspired on Claudio TCG work. Instead of separate TCG from other accelerators, here we separate sysemu operations (system VS user). Patches 1-6 are generic cleanups. Patches 7-15 move from CPUClass to SysemuCPUOps Patches 16-17 restrict SysemuCPUOps to sysemu Since v1: - Name 'sysemu' (Claudio) - change each field progressively (Richard) Regards, Phil. Supersedes: <20210226163227.4097950-1-f4bug@amsat.org> Philippe Mathieu-Daudé (17): target: Set CPUClass::vmsd instead of DeviceClass::vmsd cpu: Un-inline cpu_get_phys_page_debug and cpu_asidx_from_attrs cpu: Introduce cpu_virtio_is_big_endian() cpu: Directly use cpu_write_elf*() fallback handlers in place cpu: Directly use get_paging_enabled() fallback handlers in place cpu: Directly use get_memory_mapping() fallback handlers in place cpu: Introduce SysemuCPUOps structure cpu: Move CPUClass::vmsd to SysemuCPUOps cpu: Move CPUClass::virtio_is_big_endian to SysemuCPUOps cpu: Move CPUClass::get_crash_info to SysemuCPUOps cpu: Move CPUClass::write_elf* to SysemuCPUOps cpu: Move CPUClass::asidx_from_attrs to SysemuCPUOps cpu: Move CPUClass::get_phys_page_debug to SysemuCPUOps cpu: Move CPUClass::get_memory_mapping to SysemuCPUOps cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps cpu: Restrict cpu_paging_enabled / cpu_get_memory_mapping to sysemu cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c include/hw/core/cpu.h | 91 ++++++------------------- include/hw/core/sysemu-cpu-ops.h | 89 ++++++++++++++++++++++++ cpu.c | 19 +++--- hw/core/cpu.c | 113 +++++++++++++++++-------------- hw/virtio/virtio.c | 4 +- target/alpha/cpu.c | 11 ++- target/arm/cpu.c | 19 ++++-- target/avr/cpu.c | 9 ++- target/cris/cpu.c | 11 ++- target/hppa/cpu.c | 11 ++- target/i386/cpu.c | 29 +++++--- target/lm32/cpu.c | 10 ++- target/m68k/cpu.c | 11 ++- target/microblaze/cpu.c | 11 ++- target/mips/cpu.c | 11 ++- target/moxie/cpu.c | 11 +-- target/nios2/cpu.c | 16 ++++- target/openrisc/cpu.c | 11 ++- target/riscv/cpu.c | 13 +++- target/rx/cpu.c | 17 ++++- target/s390x/cpu.c | 15 ++-- target/sh4/cpu.c | 11 ++- target/sparc/cpu.c | 11 ++- target/tricore/cpu.c | 14 +++- target/unicore32/cpu.c | 8 ++- target/xtensa/cpu.c | 11 ++- target/ppc/translate_init.c.inc | 21 +++--- 27 files changed, 409 insertions(+), 199 deletions(-) create mode 100644 include/hw/core/sysemu-cpu-ops.h