From patchwork Sat May 9 13:09:02 2020 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: 283079 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 D92B9C47247 for ; Sat, 9 May 2020 13:10:33 +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 A828E214D8 for ; Sat, 9 May 2020 13:10:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hgE12GnE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A828E214D8 Authentication-Results: mail.kernel.org; dmarc=none (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]:52230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXPFQ-0006EW-Si for qemu-devel@archiver.kernel.org; Sat, 09 May 2020 09:10:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXPEN-0003rD-GJ; Sat, 09 May 2020 09:09:27 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:55746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXPEM-00030E-Nv; Sat, 09 May 2020 09:09:27 -0400 Received: by mail-wm1-x344.google.com with SMTP id e26so12984366wmk.5; Sat, 09 May 2020 06:09:24 -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=q8Yj7Svj+riGcka/Uh3qsXECOKShvQfR2c9eaJKoO3w=; b=hgE12GnE7B03Rf0Li5UMoMVIpZwMF5xdaHeVTULpTEAeAyfTIxU/73x0FkzMTfwU1G j18eIGtDShw1NpPuIcibyAKGBEv8Z+jV2kfFqO00+zmXDW3YeHpN1wFTTPAlEXSvevsN GTt8SqYZGq2Fz6QJYhaCWQZRqUoF3WMNhNvcgcmVb+1w917mRa4ESy502W8DLWAScJrO 6SyLHzlIeiDPyjJBWJnhTPBdv1EUZgShPkZ3nvVULre8KMn44FOQVM30REYOpSZUpkFZ acaIk8sfbkQh1N7LKB7gZJovLowPsd+E2L/X4weuyf+xaIZdReBPyPHRiuq+l8li+feS 3W5Q== 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=q8Yj7Svj+riGcka/Uh3qsXECOKShvQfR2c9eaJKoO3w=; b=U4Q/uqNWPpsHn5dxakZ1k9Vtl+uIxwfG/ISIfYqVpZH1ALStz8QK0u1T76VOKMNOwF zd2z3HjpRkDwxvI+E/8GEIpI2cRUTMBciT6wyU5Yh9Pt5aSFGZcJhUNBD483NHHimBib ZaJSr329IKEbdyCBptSDIFZ9n7r/XUytnbQ4A/QjMULqox8pELsQSOkSCJsYIvv8xWl+ WiNOBW87oBinLHfVIKMmxxxxLqDCSdvKk+Mfh5yRD/fUEPZMmur+bA3J85zAvB1rcjrX 6vWuv1F89p2vdovcV/dJsmlWRc9iUWi4OBM6z2pkk7RnBWMTx1ZTdfs7TwOLrmtDt0WA tvCw== X-Gm-Message-State: AGi0PuZIxJFW3RK97kjqUmKce+7h9GdonjOaa6eU5MmbDsZTgzmPnh72 +hpN01mhIYXAUIP+VjLSFOr9Br7OKbw= X-Google-Smtp-Source: APiQypL0YdzBqET4iF7tG3bgS7EpeWyVFfBof8z1hou5dM1nUjXm3UvbLE6X0Jtl9HSfA7evL3JbLw== X-Received: by 2002:a7b:c390:: with SMTP id s16mr20375629wmj.14.1589029764010; Sat, 09 May 2020 06:09:24 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id m65sm1411410wmm.17.2020.05.09.06.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 06:09:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 03/11] sysemu/tcg: Only declare tcg_allowed when TCG is available Date: Sat, 9 May 2020 15:09:02 +0200 Message-Id: <20200509130910.26335-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200509130910.26335-1-f4bug@amsat.org> References: <20200509130910.26335-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 , Chris Wulff , Sagar Karandikar , David Hildenbrand , Mark Cave-Ayland , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , Max Filippov , Alistair Francis , "Edgar E. Iglesias" , Marek Vasut , Aleksandar Markovic , qemu-ppc@nongnu.org, Aleksandar Rikalo , David Gibson , Artyom Tarasenko , Eduardo Habkost , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Stafford Horne , =?utf-8?q?Ale?= =?utf-8?b?eCBCZW5uw6ll?= , Richard Henderson , qemu-riscv@nongnu.org, Bastian Koppelmann , Cornelia Huck , Roman Bolshakov , Laurent Vivier , Palmer Dabbelt , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" When TCG is not available, the tcg_allowed variable does not exist. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/tcg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sysemu/tcg.h b/include/sysemu/tcg.h index 7d116d2e80..d9d3ca8559 100644 --- a/include/sysemu/tcg.h +++ b/include/sysemu/tcg.h @@ -8,9 +8,9 @@ #ifndef SYSEMU_TCG_H #define SYSEMU_TCG_H -extern bool tcg_allowed; void tcg_exec_init(unsigned long tb_size); #ifdef CONFIG_TCG +extern bool tcg_allowed; #define tcg_enabled() (tcg_allowed) #else #define tcg_enabled() 0 From patchwork Sat May 9 13:09:03 2020 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: 283076 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 E16ACC28CBC for ; Sat, 9 May 2020 13:14:17 +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 A749321775 for ; Sat, 9 May 2020 13:14:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GXc5WD/j" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A749321775 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]:42802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXPJ2-0006FX-R4 for qemu-devel@archiver.kernel.org; Sat, 09 May 2020 09:14:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXPEQ-00041Y-PY; Sat, 09 May 2020 09:09:30 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:52927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXPEP-0003L7-UG; Sat, 09 May 2020 09:09:30 -0400 Received: by mail-wm1-x344.google.com with SMTP id m24so3357416wml.2; Sat, 09 May 2020 06:09:28 -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=/deFlLfSBeeZSBPphjSFXwpz9fqQ8rThdLclvTAwgLE=; b=GXc5WD/jotqsaemJao8jVSg1pXJuzyf3A6lWcUqvDc3kiEcIAE+1c7w8dft4D3P4PQ 8933I0NI8h47a5aOH3PEbvKagCUFu7KMOMW/e6+ZgFYN09dkTIUFYz0DGi/pNWSL/Idm bW1Y+JkBDZBPP/47h0/q5kq3uBxu4HCBqYD2GzQrV7vp1pVMgmDVEEu5TGis/ayRRhwO 3BPIs9U0+X6XuHls3MMhYQHiz0RwtmcuL/J4tdaSIQVfdtX9kglYaQ6u7TbqNX6m607Z zy4D0ShG0JNc1PFYtgHeKfGtulBzHHIbVDJouBXhPdd3uBzxhR9LAM59/TYbj5vPjSmg L3uw== 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=/deFlLfSBeeZSBPphjSFXwpz9fqQ8rThdLclvTAwgLE=; b=ZgW7AM+TUTEGUjVIpQnYXThNrfVeXmKWRSVHR743Oiga0d04Yt6imMx/Rl/6bb9miD t4OLnEbBUSTZns01ll7/7aRecCLutTBkfSzg1pYfKtOSLtNMz00JKl8Ux65GvrZ0OAeA n2zBnzfST14JTj6TjXog/eULExXcyXRyF5zBbCc7vbfq8P6OO/8yBpGZe3+SHwqDvEO8 BoYa+y4YDRHS4YsdpXw8+elIH7u2iLrVmUzbxWUdn64YWKYuvQJFO2HpyKvU0H1129KL c/udDnu6Ll1Vb0m9GGx/XPXx2kDC4MdxMtwslld86YexYeV5FKAuTtjxr3JbLScNv5NF NPaA== X-Gm-Message-State: AGi0Pua91mmY7yvMapsXT/qt+lbJyJsTuryINUv1KneZ30Cf6/fxJ/O2 Ff/ykQpQvilcoNes64hGEn8JD4kqU0s= X-Google-Smtp-Source: APiQypIVCdAFyRkc2ubH7ow2MRfiq0XjMLNU48lJ+FFzNlFhFUf46VOfeXAxA1DxSFAhNQrANi6jWw== X-Received: by 2002:a05:600c:14d4:: with SMTP id i20mr22378257wmh.118.1589029766837; Sat, 09 May 2020 06:09:26 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id m65sm1411410wmm.17.2020.05.09.06.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 06:09:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 04/11] sysemu/hvf: Only declare hvf_allowed when HVF is available Date: Sat, 9 May 2020 15:09:03 +0200 Message-Id: <20200509130910.26335-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200509130910.26335-1-f4bug@amsat.org> References: <20200509130910.26335-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 , Chris Wulff , Sagar Karandikar , David Hildenbrand , Mark Cave-Ayland , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , Max Filippov , Alistair Francis , "Edgar E. Iglesias" , Marek Vasut , Aleksandar Markovic , qemu-ppc@nongnu.org, Aleksandar Rikalo , David Gibson , Artyom Tarasenko , Eduardo Habkost , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Stafford Horne , =?utf-8?q?Ale?= =?utf-8?b?eCBCZW5uw6ll?= , Richard Henderson , qemu-riscv@nongnu.org, Bastian Koppelmann , Cornelia Huck , Roman Bolshakov , Laurent Vivier , Palmer Dabbelt , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" When HVF is not available, the tcg_allowed variable does not exist. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/hvf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h index d211e808e9..fe95743124 100644 --- a/include/sysemu/hvf.h +++ b/include/sysemu/hvf.h @@ -18,7 +18,6 @@ #include "exec/memory.h" #include "sysemu/accel.h" -extern bool hvf_allowed; #ifdef CONFIG_HVF #include #include @@ -26,11 +25,12 @@ extern bool hvf_allowed; #include "target/i386/cpu.h" uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx, int reg); +extern bool hvf_allowed; #define hvf_enabled() (hvf_allowed) -#else +#else /* !CONFIG_HVF */ #define hvf_enabled() 0 #define hvf_get_supported_cpuid(func, idx, reg) 0 -#endif +#endif /* !CONFIG_HVF */ /* hvf_slot flags */ #define HVF_SLOT_LOG (1 << 0) From patchwork Sat May 9 13:09:04 2020 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: 283078 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 3DC27C28CBC for ; Sat, 9 May 2020 13:10:55 +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 07EE0214D8 for ; Sat, 9 May 2020 13:10:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AP4j+tgC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07EE0214D8 Authentication-Results: mail.kernel.org; dmarc=none (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]:54352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXPFm-0007O5-4Q for qemu-devel@archiver.kernel.org; Sat, 09 May 2020 09:10:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXPET-0004BD-Pd; Sat, 09 May 2020 09:09:33 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:39675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXPES-0003m1-P4; Sat, 09 May 2020 09:09:33 -0400 Received: by mail-wm1-x343.google.com with SMTP id y24so13637515wma.4; Sat, 09 May 2020 06:09:30 -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=LLYk56bTzpbED/TEaMz+Gn8C12EvT1HOdsren3t79iU=; b=AP4j+tgCGiMzt4H8rWkM9LRHLvvfy6vChYsu223j14fpzOK2Pqi5/cgs7QkpACs5vh N1zCvIR0D66ZYllrAZ2tWAaeGkrPsXt9xm6zo9skgzr2SVMt97UEzXHLUWu6N9Qtkg4/ euGDM4L2z8UAh+EJOMnGTRHFqqtsYRBZJhTTi+fip9mAE8szTB3dWn8Juth85+yQ+oDS nRW22lLT7lShq9EBYOPsyCZ4ollrQzzeo/9LMlFJ48I9X1gdie42VTArpEW7ZghsvF/V t7rd6CZDBwaKDER1Wx5YA6IC70y1YDpyUZt5/m71ZO0n6akG0hmukMSpoLbWaz03XO/+ B/7A== 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=LLYk56bTzpbED/TEaMz+Gn8C12EvT1HOdsren3t79iU=; b=pEptVyEigIZLypIRPmGlgIyCubqdYdiUm8anNOp7uJS4oFwbBCjFhql0sHnGGshxvA tUnhvfGvzzL8PObxYOgZ9N2M309trv6X+Q4UJmJ29RmmejOZBwyKyUtmfWojwo/5s9je tLOnuNOBqRes/M5Jlss1mfvGIZ9BX0eLe5JMUQ+sej92cuXgu1xSLTzchmWpaSJ/d9EG BDpxzwwDrBzO+pR117SdtYRj8WkBs5v53Wuxxdebm+MovcIL9s3AU7BN56HHItyYKQDT JIuuDUND+H4kikexM5aQrWtp/NBTXfX+VEbLvkLUPTVyxjY4WXQBjpAgSWwDT3e4NG2U JatQ== X-Gm-Message-State: AGi0PuYA2xc9bWbwxIABGQ631bV7LJy8oo/8gORty0Y3ceBZpA41edSp QJTpaZxc1IInlF4Qu34TrSFjHZDvVGc= X-Google-Smtp-Source: APiQypJ7r2t/Yta7gA62He4a86vm+KY7sXlClAQIeF/nfivQhskw9hfQngWMoh1D2O9TF+ukw3WKyQ== X-Received: by 2002:a7b:cc0e:: with SMTP id f14mr21365946wmh.39.1589029769835; Sat, 09 May 2020 06:09:29 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id m65sm1411410wmm.17.2020.05.09.06.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 06:09:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 05/11] target/ppc: Restrict PPCVirtualHypervisorClass to system-mode Date: Sat, 9 May 2020 15:09:04 +0200 Message-Id: <20200509130910.26335-6-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200509130910.26335-1-f4bug@amsat.org> References: <20200509130910.26335-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 , Chris Wulff , Sagar Karandikar , David Hildenbrand , Mark Cave-Ayland , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , Max Filippov , Alistair Francis , "Edgar E. Iglesias" , Marek Vasut , Aleksandar Markovic , qemu-ppc@nongnu.org, Aleksandar Rikalo , David Gibson , Artyom Tarasenko , Eduardo Habkost , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Stafford Horne , =?utf-8?q?Ale?= =?utf-8?b?eCBCZW5uw6ll?= , Richard Henderson , qemu-riscv@nongnu.org, Bastian Koppelmann , Cornelia Huck , Roman Bolshakov , Laurent Vivier , Palmer Dabbelt , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The code related to PPC Virtual Hypervisor is pointless in user-mode. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu.h | 4 ++-- target/ppc/kvm_ppc.h | 22 +++++++++++----------- target/ppc/translate_init.inc.c | 4 ++++ 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 6b6dd7e483..73920a9cac 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1176,6 +1176,7 @@ PowerPCCPUClass *ppc_cpu_class_by_pvr(uint32_t pvr); PowerPCCPUClass *ppc_cpu_class_by_pvr_mask(uint32_t pvr); PowerPCCPUClass *ppc_cpu_get_family_class(PowerPCCPUClass *pcc); +#ifndef CONFIG_USER_ONLY struct PPCVirtualHypervisorClass { InterfaceClass parent; void (*hypercall)(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu); @@ -1189,10 +1190,8 @@ struct PPCVirtualHypervisorClass { void (*hpte_set_r)(PPCVirtualHypervisor *vhyp, hwaddr ptex, uint64_t pte1); void (*get_pate)(PPCVirtualHypervisor *vhyp, ppc_v3_pate_t *entry); target_ulong (*encode_hpt_for_kvm_pr)(PPCVirtualHypervisor *vhyp); -#ifndef CONFIG_USER_ONLY void (*cpu_exec_enter)(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu); void (*cpu_exec_exit)(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu); -#endif }; #define TYPE_PPC_VIRTUAL_HYPERVISOR "ppc-virtual-hypervisor" @@ -1204,6 +1203,7 @@ struct PPCVirtualHypervisorClass { #define PPC_VIRTUAL_HYPERVISOR_GET_CLASS(obj) \ OBJECT_GET_CLASS(PPCVirtualHypervisorClass, (obj), \ TYPE_PPC_VIRTUAL_HYPERVISOR) +#endif /* CONFIG_USER_ONLY */ void ppc_cpu_do_interrupt(CPUState *cpu); bool ppc_cpu_exec_interrupt(CPUState *cpu, int int_req); diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index fcaf745516..701c0c262b 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -280,6 +280,17 @@ static inline bool kvmppc_has_cap_spapr_vfio(void) return false; } +static inline void kvmppc_read_hptes(ppc_hash_pte64_t *hptes, + hwaddr ptex, int n) +{ + abort(); +} + +static inline void kvmppc_write_hpte(hwaddr ptex, uint64_t pte0, uint64_t pte1) +{ + abort(); +} + #endif /* !CONFIG_USER_ONLY */ static inline bool kvmppc_has_cap_epr(void) @@ -310,17 +321,6 @@ static inline int kvmppc_load_htab_chunk(QEMUFile *f, int fd, uint32_t index, abort(); } -static inline void kvmppc_read_hptes(ppc_hash_pte64_t *hptes, - hwaddr ptex, int n) -{ - abort(); -} - -static inline void kvmppc_write_hpte(hwaddr ptex, uint64_t pte0, uint64_t pte1) -{ - abort(); -} - static inline bool kvmppc_has_cap_fixup_hcalls(void) { abort(); diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c index 2b6e832c4c..4ea0cc501b 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -10946,16 +10946,20 @@ static const TypeInfo ppc_cpu_type_info = { .class_init = ppc_cpu_class_init, }; +#ifndef CONFIG_USER_ONLY static const TypeInfo ppc_vhyp_type_info = { .name = TYPE_PPC_VIRTUAL_HYPERVISOR, .parent = TYPE_INTERFACE, .class_size = sizeof(PPCVirtualHypervisorClass), }; +#endif static void ppc_cpu_register_types(void) { type_register_static(&ppc_cpu_type_info); +#ifndef CONFIG_USER_ONLY type_register_static(&ppc_vhyp_type_info); +#endif } type_init(ppc_cpu_register_types) From patchwork Sat May 9 13:09:05 2020 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: 283077 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 CE24BC28CBC for ; Sat, 9 May 2020 13:12:52 +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 94705214D8 for ; Sat, 9 May 2020 13:12:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BvcBFgiQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94705214D8 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]:36212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXPHf-0003Bm-R2 for qemu-devel@archiver.kernel.org; Sat, 09 May 2020 09:12:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXPEW-0004HR-DX; Sat, 09 May 2020 09:09:36 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:45337) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXPEV-0004CM-Gc; Sat, 09 May 2020 09:09:36 -0400 Received: by mail-wr1-x442.google.com with SMTP id v12so5106876wrp.12; Sat, 09 May 2020 06:09:33 -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=+DgGlmxYDgp0TKp/P6BFoo5PGVwzBhcu5AKwXK50jX8=; b=BvcBFgiQIUD1+RziJDhNMsQ7Ucuo0HzKzddEWCkSr5wWeMkPLjf9T3YUgVn7TEZUW8 BeHtatd35QLZX1SyVZBXps154vdDu6tocL168dUDhvR6IdCcR/lyBozEOsD7vkG7qyXF GwQ4iLBTJ8MjVfX6GmIw020VUza87GqXIP2ErisDDxUDaiaV0WTXD+24msJH8VGk6ZZ9 KgqXgJTJbXg6vRCdSTcREyPVonO1iyvU+21nhXXeCrqDLTbo6JpzO04xrj3l4yq1T0ZP 4MviTafrpBKVsPxCgh618jx/It7wV31V6+Gz1rx4tYch2/z3kVArsHxues7KCOZvW/Jq aPiQ== 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=+DgGlmxYDgp0TKp/P6BFoo5PGVwzBhcu5AKwXK50jX8=; b=Hp0HjKAhwObViqI0WIrlAIsgnMbXtX52v7AwDnRrGEx0a7PeFovGC+OuEclqwfLLB9 ynBND0bTuRuxqV3VB1MU/YHN4xIjatn9el4J8IFqf9j2kGtxK1JN1nqo13rwgkze7Ej+ T1Bq2hytpK6TuF+58+fCcRDrs8+xooKwrVEusP5+zR2dUCarGgA4p65Azvp8wXBgbTHY 8Zq3s37gEia1VY3X3GZow7kmppikt3iGezjLCIjl4/A6JyPdBI0VVqHG00I8j0uVpJA7 Jtu7s4LpUPYRCPF3jAHMc8XrC7asQn46ZfCHPXb1LW9dUUFKwzBizk42p6T+ufEAaaK3 dT3w== X-Gm-Message-State: AGi0PuZZDL96Z+15PxPkd1xPxc7IuY/c6JHPztkrMo2zkPDVuBMOo8+J TpMIpJ+OzRUqYROAn5bPoDlOlOr2G0o= X-Google-Smtp-Source: APiQypJmQJFMZiRR9DoMibdtr9JH+Z1Pn1cDFuHjz2glYTE1zO+Rwp2YknwOdohPGFoSiQItW5g6mA== X-Received: by 2002:a5d:4c86:: with SMTP id z6mr8019146wrs.279.1589029772695; Sat, 09 May 2020 06:09:32 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id m65sm1411410wmm.17.2020.05.09.06.09.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 06:09:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 06/11] target/s390x: Only compile decode_basedisp() on system-mode Date: Sat, 9 May 2020 15:09:05 +0200 Message-Id: <20200509130910.26335-7-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200509130910.26335-1-f4bug@amsat.org> References: <20200509130910.26335-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 , Chris Wulff , Sagar Karandikar , David Hildenbrand , Mark Cave-Ayland , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , Max Filippov , Alistair Francis , "Edgar E. Iglesias" , Marek Vasut , Aleksandar Markovic , qemu-ppc@nongnu.org, Aleksandar Rikalo , David Gibson , Artyom Tarasenko , Eduardo Habkost , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Stafford Horne , =?utf-8?q?Ale?= =?utf-8?b?eCBCZW5uw6ll?= , Richard Henderson , qemu-riscv@nongnu.org, Bastian Koppelmann , Cornelia Huck , Roman Bolshakov , Laurent Vivier , Palmer Dabbelt , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The decode_basedisp*() methods are only used in ioinst.c, which is only build in system-mode emulation. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/internal.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/s390x/internal.h b/target/s390x/internal.h index 8c95c734db..c1678dc6bc 100644 --- a/target/s390x/internal.h +++ b/target/s390x/internal.h @@ -204,6 +204,8 @@ enum cc_op { CC_OP_MAX }; +#ifndef CONFIG_USER_ONLY + static inline hwaddr decode_basedisp_s(CPUS390XState *env, uint32_t ipb, uint8_t *ar) { @@ -225,6 +227,8 @@ static inline hwaddr decode_basedisp_s(CPUS390XState *env, uint32_t ipb, /* Base/displacement are at the same locations. */ #define decode_basedisp_rs decode_basedisp_s +#endif /* CONFIG_USER_ONLY */ + /* arch_dump.c */ int s390_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs, int cpuid, void *opaque); From patchwork Sat May 9 13:09:09 2020 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: 283075 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 29754C28CBC for ; Sat, 9 May 2020 13:15:47 +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 E43B721775 for ; Sat, 9 May 2020 13:15:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="flf4veSg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E43B721775 Authentication-Results: mail.kernel.org; dmarc=none (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]:48012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXPKU-0000WH-5B for qemu-devel@archiver.kernel.org; Sat, 09 May 2020 09:15:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXPEh-0004sO-U5; Sat, 09 May 2020 09:09:47 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:45340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXPEh-0006b1-2e; Sat, 09 May 2020 09:09:47 -0400 Received: by mail-wr1-x444.google.com with SMTP id v12so5107262wrp.12; Sat, 09 May 2020 06:09:45 -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=kJ9dbndR3EJ3N94DuL32xKff0HO4BFM4yLLW9t9p4DU=; b=flf4veSgSNp7WVQXiv7V7NrX4UAefRYgFkBmINorTlpVmyHhE7veSTufxoQW+l6Dot wR4o/pIkezvKsQqfk7pi/vw7fH8RkeyXgbJuREtSTbXGDFEouDylssuXi6SMi8W1jC5F 5aED8Ld4faiQC7wAF1M2ntUooqoguTRu/E29eqc9poBI//e0zx/vU6BrIVDw5CAtIRJQ U1HvgPNfo1scPphSCiVyayMiZg9brfMjvP3CZScx0xnjDbgj7SjIjb3Aon3WxpxEpyNk 8Tgzh6WxdSkr+gT7kxZVlRfnD7P4SSu4HY+r7qtPXUW500nMnbMXQG11g89ahQXrW1ih IqKg== 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=kJ9dbndR3EJ3N94DuL32xKff0HO4BFM4yLLW9t9p4DU=; b=hYA51jR8pZ/PL8K7HablazVaKXoEBGkUuhOQXN1e1ALamv/GaU6LkD23pQu7j2msnH hNwDNEssAnvv2+OVxEtRcP1eeiQ7zknfcD6yGy5IQxeJYdMKDD6eYwJhMGlK/ux4LWuO hqRVDk3m5f1ZN31132vVuvk/KMt1TBbgxx2X97YWeD/TPiGzJgrPG6q1La7HxXCz6rjI dUGbMfk8V7NXfrlLxYMrOT52snpZXS1PJGf00KNaP0VAj+XR/BobCXkVy+5QD/4X8iW8 nO8AU7nmuMC2Oct6Ih2703Vwb07pho3zYwIvwRndTcJ+BQ0dtRw/d6f9vy2vYpjVvANs URNg== X-Gm-Message-State: AGi0PuY2GKowuEDM8U3qY1HqeuqAQKpbKvSzeg3ZMGtmLo0yO+SN0XSs fUrcHa0XScTrvg632DgQeH4rE146QGg= X-Google-Smtp-Source: APiQypLurdSmGrp9B56qX9CNWGd9AI2ip7cdRiw9zhMpmGh5F+d4uyBrY7d4KNVvcCiBokEwwDx36g== X-Received: by 2002:a05:6000:11cd:: with SMTP id i13mr8894961wrx.95.1589029784233; Sat, 09 May 2020 06:09:44 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id m65sm1411410wmm.17.2020.05.09.06.09.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 06:09:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 10/11] exec: Use 'cpu-common.h' instead of system-mode specific 'hwaddr.h' Date: Sat, 9 May 2020 15:09:09 +0200 Message-Id: <20200509130910.26335-11-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200509130910.26335-1-f4bug@amsat.org> References: <20200509130910.26335-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 , Chris Wulff , Sagar Karandikar , David Hildenbrand , Mark Cave-Ayland , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , Max Filippov , Alistair Francis , "Edgar E. Iglesias" , Marek Vasut , Aleksandar Markovic , qemu-ppc@nongnu.org, Aleksandar Rikalo , David Gibson , Artyom Tarasenko , Eduardo Habkost , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Stafford Horne , =?utf-8?q?Ale?= =?utf-8?b?eCBCZW5uw6ll?= , Richard Henderson , qemu-riscv@nongnu.org, Bastian Koppelmann , Cornelia Huck , Roman Bolshakov , Laurent Vivier , Palmer Dabbelt , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The "exec/hwaddr.h" header is restricted to system-mode emulation. Instead, use "exec/cpu-common.h", which is meant for all modes. Signed-off-by: Philippe Mathieu-Daudé --- include/disas/disas.h | 2 +- include/hw/core/cpu.h | 2 +- include/sysemu/accel.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/disas/disas.h b/include/disas/disas.h index 36c33f6f19..531b42e002 100644 --- a/include/disas/disas.h +++ b/include/disas/disas.h @@ -1,7 +1,7 @@ #ifndef QEMU_DISAS_H #define QEMU_DISAS_H -#include "exec/hwaddr.h" +#include "exec/cpu-common.h" #ifdef NEED_CPU_H #include "cpu.h" diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index ed09d056d1..a215ae451d 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -22,7 +22,7 @@ #include "hw/qdev-core.h" #include "disas/dis-asm.h" -#include "exec/hwaddr.h" +#include "exec/cpu-common.h" #include "exec/memattrs.h" #include "qapi/qapi-types-run-state.h" #include "qemu/bitmap.h" diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h index e08b8ab8fa..e223a1d87b 100644 --- a/include/sysemu/accel.h +++ b/include/sysemu/accel.h @@ -24,7 +24,7 @@ #define HW_ACCEL_H #include "qom/object.h" -#include "exec/hwaddr.h" +#include "exec/cpu-common.h" typedef struct AccelState { /*< private >*/ From patchwork Sat May 9 13:09:10 2020 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: 283074 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 5B5C8C28CBC for ; Sat, 9 May 2020 13:17:32 +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 2770621775 for ; Sat, 9 May 2020 13:17:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tMA+dOHP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2770621775 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]:53346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXPMB-0002hC-Bs for qemu-devel@archiver.kernel.org; Sat, 09 May 2020 09:17:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXPEk-00052e-SO; Sat, 09 May 2020 09:09:50 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:33571) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXPEk-0007KQ-2k; Sat, 09 May 2020 09:09:50 -0400 Received: by mail-wm1-x344.google.com with SMTP id d207so184525wmd.0; Sat, 09 May 2020 06:09:48 -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=FhXzEDZMFN7nI/HcObjzYIjU52XHskJ+5ArXsA4s8n0=; b=tMA+dOHPorUcef3Ii8plnVwx5/I0le3h8ZG+eca+U8AHmyZPa1SS3f3WuI15TwaqMj dp9D1WaZwrnsb5FDXqtTKtmj9ql7Ri9+E8lUya6BaANZi94a9jnQGJI6G4UF9TPdagy3 OgmgfqIWppS9Pv6g6oO0G49S6T5H9O2kFz53VTuxNlRRSqGgB2PYtlmYAhUAAIgl/CYG HU4xvfI3vTtrbHl3Tih+sk24b+RCb6pHPSaM+TNWHXOX0xGVdE/7Gx1IYmx3SoM0UFHV VJQOMdVbuLbFyNLdR4Iii9ly1xsgPL8IN+1T7566Y3evQ9HqdPdME6aN9M/UwH5+GcKH jFEQ== 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=FhXzEDZMFN7nI/HcObjzYIjU52XHskJ+5ArXsA4s8n0=; b=O8iCxlCsqFws6bOvjOGDWHIrBjkPezLF/ik5kl+ewBKajosPnOhoZl2VZio1cK3YHL SYdR+xH5DEbXRjRlw+M714JqNuq1U9oNnfb9DGeKJiFPPy0A1yJxN8W7s9LTbE47NlPm zVmnNrLvifzh56Ao08sCsHo1pb61caUbaGWJjBCAT3jphIks3lMWZqRDlQQr9bKkYJBB 9ns5v0OEQQ+fDAp9CMG6a4eOfNWxkWG+RhfzxPu25tNQN8sNz4lr31fvgRdlJl3mixhT RncLJM+N45goXFyL6WS+X5fDqHPRPOtTDn2fcbyX5+iOpO5glCi+2Gkhg7G5QHn6EG0v Fvwg== X-Gm-Message-State: AGi0PubTgWopvLKhMmaA023Mfz/tcC7EXemDXMOS85J48Ssm24UGA7l7 i4xnqGNXOtk7vVJLTLb05OVQoYL3n0Y= X-Google-Smtp-Source: APiQypIPiOQOoy1QDhlipK4I1Af7DTsG6G0dwlgqBHdFcvssaN5XNM/0LHVECJmyi5GMwxGZeM77rg== X-Received: by 2002:a7b:c118:: with SMTP id w24mr20571336wmi.173.1589029787021; Sat, 09 May 2020 06:09:47 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id m65sm1411410wmm.17.2020.05.09.06.09.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 06:09:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 11/11] exec/cpu-common: Poison hwaddr type in user-mode emulation Date: Sat, 9 May 2020 15:09:10 +0200 Message-Id: <20200509130910.26335-12-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200509130910.26335-1-f4bug@amsat.org> References: <20200509130910.26335-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 , Chris Wulff , Sagar Karandikar , David Hildenbrand , Mark Cave-Ayland , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , Max Filippov , Alistair Francis , "Edgar E. Iglesias" , Marek Vasut , Aleksandar Markovic , qemu-ppc@nongnu.org, Aleksandar Rikalo , David Gibson , Artyom Tarasenko , Eduardo Habkost , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Stafford Horne , =?utf-8?q?Ale?= =?utf-8?b?eCBCZW5uw6ll?= , Richard Henderson , qemu-riscv@nongnu.org, Bastian Koppelmann , Cornelia Huck , Roman Bolshakov , Laurent Vivier , Palmer Dabbelt , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The 'hwaddr' type is restricted to system-mode. Declare it poisoned on user-mode emulation. Signed-off-by: Philippe Mathieu-Daudé --- Checkpatch complains: WARNING: architecture specific defines should be avoided #10: FILE: include/exec/cpu-common.h:7: +#ifdef __GNUC__ --- include/exec/cpu-common.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index b47e5630e7..56cfce8153 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -3,9 +3,13 @@ /* CPU interfaces that are target independent. */ -#ifndef CONFIG_USER_ONLY +#ifdef CONFIG_USER_ONLY +#ifdef __GNUC__ +#pragma GCC poison hwaddr +#endif /* __GNUC__ */ +#else #include "exec/hwaddr.h" -#endif +#endif /* CONFIG_USER_ONLY */ /* The CPU list lock nests outside page_(un)lock or mmap_(un)lock */ void qemu_init_cpu_list(void);