From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7AC2CCA551A for ; Wed, 13 Sep 2023 09:15:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgLxu-00049h-GG; Wed, 13 Sep 2023 05:15:19 -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 1qgLxr-00047t-VB; Wed, 13 Sep 2023 05:15:16 -0400 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgLxj-0005Tf-8r; Wed, 13 Sep 2023 05:15:15 -0400 Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6c0f2addaefso1537123a34.2; Wed, 13 Sep 2023 02:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694596497; x=1695201297; darn=nongnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=G3w5yIpwhY+I6554KNWUDhdjV7BQ5x1Kg/Kbnew7tEk=; b=IlbXNnKuJ8EZctoLqb6BuSm+okI0ez6W0Ark+12cZ5uVqVMfN75ghn3B11UdRsm+S1 TbP9tOASnx+8abiu8gdue8XXxsXi2dH01Mt0q4u2kgTHrYvySZBknkuLt8GLSxdGNc0i RPszEhK5BGtqk4K6Q5bYV3TcTuqsik9e+bSelVQ9VaRoys8D2aFv8tE77yqe/wLslday r27tP7ggSD+nIst0mffEZtnVWT/9SLyZ5w/Hz6J0XHCjGfY0Nbt0noi1VdDk34OZI1w+ fOpAQF+N8DOTP54d6SXAgh19Fkgac9mYw2e/W/dNEAW10X3TDI9Jlt/pK+bJPwUfKTJD HuAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694596497; x=1695201297; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=G3w5yIpwhY+I6554KNWUDhdjV7BQ5x1Kg/Kbnew7tEk=; b=BafqGGReGKVOt0vp603EHle8FA+rswkthSFwPatkfZlz3NJrTO8/kpKkrozAEKoayO pu1iz7/FU3jFyDtnwWMRSqKbzzmAjuIxPuUvVXu/MnDtO8a7WHARtYaLL10QBJnGxyQ5 McNKKUqfbKmP0rh19VTuVdeUiMJmULXqPXKTX86dAMfVBspA0lbpNZUJXfm2coAEZ/zv 06HAGNL5s9OCMLqTA71wHK1RA3rynzQoL/ANLVZd84fHkDS/KOwYj+eeZlg1A7YuYgPs PmyL27CwtZeDXhj8nfqFu3lm3/k3fbxo1mbDLbPcHxueswwScbxciA+x3cG2fidtY1jm ay7w== X-Gm-Message-State: AOJu0YzDRhkW+POvk68wqrp6oGXMmIper2VxKo3XKR8BgIe35u4Gw3Zy JeIzKZRmSFgA3JKJry5+VDc= X-Google-Smtp-Source: AGHT+IFGkyvWdDB3ZCQ/uHBly/7wo13+AsvoNYqSa8U34IEVGJ4FgTHUxXJZZEk2mGUPceo5gjUA6Q== X-Received: by 2002:a9d:65d7:0:b0:6b8:9932:b8ad with SMTP id z23-20020a9d65d7000000b006b89932b8admr2124323oth.1.1694596497177; Wed, 13 Sep 2023 02:14:57 -0700 (PDT) Received: from [192.168.68.107] ([177.9.182.82]) by smtp.gmail.com with ESMTPSA id x6-20020a05683000c600b006b9ad7d0046sm4733699oto.57.2023.09.13.02.14.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Sep 2023 02:14:56 -0700 (PDT) Message-ID: <014ba528-db84-3a81-f2c1-0306965d40b9@gmail.com> Date: Wed, 13 Sep 2023 06:14:48 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 4/4] target/ppc: Prohibit target specific KVM prototypes on user emulation To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , qemu-devel@nongnu.org Cc: Nicholas Piggin , Daniel Henrique Barboza , qemu-ppc@nongnu.org, Richard Henderson , kvm@vger.kernel.org, Paolo Bonzini , Kevin Wolf , David Gibson , =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , Michael Tokarev , Greg Kurz References: <20230912113027.63941-1-philmd@linaro.org> <20230912113027.63941-5-philmd@linaro.org> Content-Language: en-US From: Daniel Henrique Barboza In-Reply-To: <20230912113027.63941-5-philmd@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::32c; envelope-from=danielhb413@gmail.com; helo=mail-ot1-x32c.google.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, NICE_REPLY_A=-1.473, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 9/12/23 08:30, Philippe Mathieu-Daudé wrote: > None of these target-specific prototypes should be used > by user emulation. Remove their declaration there, so we > get a compile failure if ever used (instead of having to > deal with linker and its possible optimizations, such > dead code removal). > > Suggested-by: Kevin Wolf > Signed-off-by: Philippe Mathieu-Daudé > --- Reviewed-by: Daniel Henrique Barboza > target/ppc/kvm_ppc.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h > index 440e93f923..ffda8054b2 100644 > --- a/target/ppc/kvm_ppc.h > +++ b/target/ppc/kvm_ppc.h > @@ -13,6 +13,10 @@ > #include "exec/hwaddr.h" > #include "cpu.h" > > +#ifdef CONFIG_USER_ONLY > +#error Cannot include kvm_ppc.h from user emulation > +#endif > + > #ifdef CONFIG_KVM > > uint32_t kvmppc_get_tbfreq(void);