From patchwork Fri Feb 26 16:32:11 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: 12106889 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 C1329C433DB for ; Fri, 26 Feb 2021 16:35:16 +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 4A3EF64EE2 for ; Fri, 26 Feb 2021 16:35:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A3EF64EE2 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]:42810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFg5D-00063A-6j for qemu-devel@archiver.kernel.org; Fri, 26 Feb 2021 11:35:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFg2e-0003sO-P6; Fri, 26 Feb 2021 11:32:38 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:43076) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFg2d-0007V4-8O; Fri, 26 Feb 2021 11:32:36 -0500 Received: by mail-wr1-x432.google.com with SMTP id w11so9141811wrr.10; Fri, 26 Feb 2021 08:32:33 -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=4uPNQ+x6dgpO2mtsJsF++IAMYIxf8tpt6ZTe02Ue5UU=; b=avPC5U10G976cv3P0prBc5nAb7/EpYG0QQUpIKGl8ukDFzuaMqeh4H7+ZGcGb/Ke5I HqJ+1frnWszvW9Y1Di/c3odqjbQOYGnAJJD/UjMwHetac4ICNfigk9RAxF8ccJj5VAoF K/wjz61R3Him+CqJ4CTMiffdY1ZpU4fj2iCnV4tTwyQ8pSZjAUEBtsWObCUgQw0kRnpC SUSiOGfMeJ1dM+wxG2I54eK70uZs0hnOT5rgkpz4VMQSGMN0+UdMhv5Iz2OV2S7fnx0w E2o8/q9+DdkRURkV8RzJNkYxqxiaQPVZfWGcQKNCWyTXZe1MktGzNOh5pzwM+bLRs9UB fDrg== 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=4uPNQ+x6dgpO2mtsJsF++IAMYIxf8tpt6ZTe02Ue5UU=; b=LKTBF4DMRV2eN0cFtN0eNN09OnvOMLnGBI+7g2U28ZwyRCRuMhaY3bISqyrJFk8vMe Cym7ElToTcR30r+GI/8C1V3Vt/pQc5iRz9N+mt86IuvfgwgCsD1WoPGVLZgQOFbaVnaf CXO7NLvoWPnIDQSxaVHtgctGvKTRWlr6iH/qhK7whmXuLV4eGubfKqxVtqqP+Qh38z/M nE5WpXPYHMK1y+dqxYZwzIsGWz3LWuLyrsyIY+vSNbMDl+LGKJjq4PmvcyPucFa0dcZb ib0+nAAA//6PVNmC033HfT6VpUYpRgLUFZYE6AZqXZocxQOsFK4R4V8VXm+UbKzqWuEJ W4vw== X-Gm-Message-State: AOAM5327oYWt2viAQTYEjMGg11qjd/Kl15OS7iN7QIqFYL4vWGBkcrD9 fUax8NRFtEnXUBrG8YY4ETWZiYaw5SM= X-Google-Smtp-Source: ABdhPJzS15zQqhZYU033d8ID3jjThbUsC93YtRmh88y75XFQICFC7O9HR5TP8+8RLiE1A2bdphM1dw== X-Received: by 2002:a5d:63ce:: with SMTP id c14mr4076765wrw.15.1614357151642; Fri, 26 Feb 2021 08:32:31 -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 y10sm5650344wrl.19.2021.02.26.08.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 08:32:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 00/16] cpu: Introduce CPUSystemOperations structure Date: Fri, 26 Feb 2021 17:32:11 +0100 Message-Id: <20210226163227.4097950-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::432; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x432.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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 , Laurent Vivier , Max Filippov , Alistair Francis , "Edgar E. Iglesias" , Guan Xuetao , Marek Vasut , Yoshinori Sato , "Michael S. Tsirkin" , Claudio Fontana , Palmer Dabbelt , 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 , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Michael Walle , qemu-ppc@nongnu.org, 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). This is part 1, overall preparation. Part 2 will make this field a pointer, similarly to commit 78271684719 ("cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass"). Regards, Phil. Philippe Mathieu-Daudé (16): 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 CPUSystemOperations structure cpu: Move CPUClass::vmsd to CPUSystemOperations cpu: Move CPUClass::virtio_is_big_endian to CPUSystemOperations cpu: Move CPUClass::get_crash_info to CPUSystemOperations cpu: Move CPUClass::write_elf* to CPUSystemOperations cpu: Move CPUClass::asidx_from_attrs to CPUSystemOperations cpu: Move CPUClass::get_phys_page_debug to CPUSystemOperations cpu: Move CPUClass::get_memory_mapping to CPUSystemOperations cpu: Move CPUClass::get_paging_enabled to CPUSystemOperations cpu: Restrict cpu_paging_enabled / cpu_get_memory_mapping to sysemu include/hw/core/cpu.h | 162 ++++++++++++++++++-------------- cpu.c | 12 +-- hw/core/cpu.c | 112 ++++++++++++---------- hw/virtio/virtio.c | 4 +- target/alpha/cpu.c | 4 +- target/arm/cpu.c | 12 +-- target/avr/cpu.c | 4 +- target/cris/cpu.c | 4 +- target/hppa/cpu.c | 4 +- target/i386/cpu.c | 20 ++-- target/lm32/cpu.c | 4 +- target/m68k/cpu.c | 4 +- target/microblaze/cpu.c | 4 +- target/mips/cpu.c | 4 +- target/moxie/cpu.c | 4 +- target/nios2/cpu.c | 2 +- target/openrisc/cpu.c | 4 +- target/riscv/cpu.c | 4 +- target/rx/cpu.c | 2 +- target/s390x/cpu.c | 8 +- target/sh4/cpu.c | 4 +- target/sparc/cpu.c | 4 +- target/tricore/cpu.c | 2 +- target/unicore32/cpu.c | 4 +- target/xtensa/cpu.c | 4 +- target/ppc/translate_init.c.inc | 10 +- 26 files changed, 218 insertions(+), 188 deletions(-)