Message ID | 20210422193902.2644064-5-f4bug@amsat.org |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=pNr6/qa9; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FR7CG41TDz9sCD for <incoming@patchwork.ozlabs.org>; Fri, 23 Apr 2021 05:43:54 +1000 (AEST) Received: from localhost ([::1]:42990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1lZfEu-00075W-H4 for incoming@patchwork.ozlabs.org; Thu, 22 Apr 2021 15:43:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1lZfAg-0002D6-G5; Thu, 22 Apr 2021 15:39:30 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:41616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1lZfAe-0005GA-M1; Thu, 22 Apr 2021 15:39:30 -0400 Received: by mail-wr1-x433.google.com with SMTP id c4so7033246wrt.8; Thu, 22 Apr 2021 12:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y73DhisXrZCkQN7S3qTtV5uihkPH6tpgdxs7MXvhbiA=; b=pNr6/qa9lboCYvjEvNJDtJja3LMS+tGT7vQRd5q/INNliVyvNJdkn9qs0WhikHDZoX /q0HTEfrk1K5sqZ/ohzb8Ebykx/okt5ycDLkSdQUnrcJyB2TGE8iByH+KJFDLMGyzVv4 sDqY/LXaR9DY2DiMZtPGTVThUbv94k0DweMctT6VLs5h1ovTQNJS4THqfVZxX8FulVQ/ LxRsxM7O6DBOEbMuvxurH36Q9bDuodTTZPWKLZkF/rvY9Qmdqsdj1BMDSjptNnhwGKMs 8guGPA8+yUyGlmctG4AvoSUh/yz8ZwEj5G16legaeE9i3+PaxaomFDgk87sKdmyVIpUI OFXg== 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 :in-reply-to:references:mime-version:content-transfer-encoding; bh=Y73DhisXrZCkQN7S3qTtV5uihkPH6tpgdxs7MXvhbiA=; b=VY+5Fps9jIhTYDugZ10CbuoSdkOZjMuHzuDNDiCOcYCPJ7xQjQYHj2qCuSHMBjqzsh ix5OELE/0zUTTjYW+uAiAbQ8GuSnORWOCDYA46tHJLmNqknIeOS/JlQD7atDkEx9UTsX tBQ+8AS9Jh6g+p7fdCQehUAklbD/8wI6K9oSPy2Y4azbvibNuWU/HWJnqODwQ/tiBolY ptcMRDpdeKvuvk6PQn0+YE9QUSSoxa/p+Op0xRuuhVjPhY5+PORt3nQXwcu1mEgh+A/1 VmbcN2Ydk0AWejg8DUXwrKjxoV/Md8/GzXKUpqUrwx4ilWZhhte1Lx/P9rnoiyqgLFTT agBw== X-Gm-Message-State: AOAM532Rdx7D90oyR2Ta3y60zgI0oV4iw70QQF5w9kn8hPhHNe954aR4 R1unixedQtilFqJvEXhE3Y1+MuPB7wlgUw== X-Google-Smtp-Source: ABdhPJwJEZM1S3DhwhbP1ayv2uAsUBBJscKSE5VW0fsRFool14C3rGlWC/j/SvKr8UxCkkrrVvLjvw== X-Received: by 2002:a05:6000:1567:: with SMTP id 7mr5486wrz.47.1619120365658; Thu, 22 Apr 2021 12:39:25 -0700 (PDT) Received: from x1w.redhat.com (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id t63sm4692739wma.20.2021.04.22.12.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Apr 2021 12:39:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org> To: qemu-devel@nongnu.org Subject: [PATCH v6 04/18] cpu: Directly use get_paging_enabled() fallback handlers in place Date: Thu, 22 Apr 2021 21:38:48 +0200 Message-Id: <20210422193902.2644064-5-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210422193902.2644064-1-f4bug@amsat.org> References: <20210422193902.2644064-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x433.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-riscv@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>, Juan Quintela <quintela@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Laurent Vivier <laurent@vivier.eu>, qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Claudio Fontana <cfontana@suse.de>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
cpu: Introduce SysemuCPUOps structure
|
expand
|
diff --git a/hw/core/cpu.c b/hw/core/cpu.c index a9ee2c74ec5..1de00bbb474 100644 --- a/hw/core/cpu.c +++ b/hw/core/cpu.c @@ -71,11 +71,10 @@ bool cpu_paging_enabled(const CPUState *cpu) { CPUClass *cc = CPU_GET_CLASS(cpu); - return cc->get_paging_enabled(cpu); -} + if (cc->get_paging_enabled) { + return cc->get_paging_enabled(cpu); + } -static bool cpu_common_get_paging_enabled(const CPUState *cpu) -{ return false; } @@ -420,7 +419,6 @@ static void cpu_class_init(ObjectClass *klass, void *data) k->parse_features = cpu_common_parse_features; k->get_arch_id = cpu_common_get_arch_id; k->has_work = cpu_common_has_work; - k->get_paging_enabled = cpu_common_get_paging_enabled; k->get_memory_mapping = cpu_common_get_memory_mapping; k->gdb_read_register = cpu_common_gdb_read_register; k->gdb_write_register = cpu_common_gdb_write_register;