From patchwork Tue May 26 17:24:21 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: 11570947 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA04C1392 for ; Tue, 26 May 2020 17:25:30 +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 8150C204EF for ; Tue, 26 May 2020 17:25:30 +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="EPaLxqVz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8150C204EF 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:54376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jddKT-00011r-Iw for patchwork-qemu-devel@patchwork.kernel.org; Tue, 26 May 2020 13:25:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jddJb-0006NI-P1; Tue, 26 May 2020 13:24:35 -0400 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]:43162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jddJZ-0004M7-Qo; Tue, 26 May 2020 13:24:34 -0400 Received: by mail-ej1-x641.google.com with SMTP id a2so24647307ejb.10; Tue, 26 May 2020 10:24:32 -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=ySZN0x/gpW9u9k16b9nqnSd6Xdlq5rvuji37dlolnbk=; b=EPaLxqVztq6HHTgASgBqieyKIVpffbusau7Sb4xVVYBjsKVYH2ISfxZ9msqCjvf9Va gwi+eDTErWUymz4aH6ZjpT/h4segUpRBy/2cVdb1k6/edjAug9qgflPllShmDEL+0YAw +6DPSkzm4IVMNRepwyr99zReUvK6MMgpHWahjvaYo9xBsttDE/dWU7OEHRRZ41TuXXDH Hppx6M+QDRIqp7z5t6YdLyTECEhbywVAM4nyNwNzxuRUDCNoQj3z99qGpCkH7MgJX5gH r+6KgBG5ml22ttaaujMguaNNYAuL7CtnY/AroPSVojkFdBQx5lm0RlJV03CSAa56WfpS keTg== 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=ySZN0x/gpW9u9k16b9nqnSd6Xdlq5rvuji37dlolnbk=; b=uKqUDAf6C/ZdJy8o+l7o083DKM42IbjQKpBC7KEmDQzZXyWCmvqBGeCdkvp581jzbQ 4c4f7N8FKjaws3bg1C0yu05S0pNWYOe/nilJ2MG9D+q8gFpt9LNg/PLOCxIuKCbMnsfs DEilxuxWVB3EFZMlKV8ZkUfmkSpOLKLsiQ8vC80HqXzJaeZaAd2Jme+0OCEKzMBieA4F v8/ySqyLcCZ79wawWOYEuAWa2X1t7Pu6i1MEHpRWklcIZXrFN/fzdlOiITfze/EtNDja AUt6Wx2qDIOe0PmbdI9BXLF2dwlhAo1hmK9opCYZRCThBAw7iTjnKdN/bBYKsBQUrVqr HUuQ== X-Gm-Message-State: AOAM533eA4UaNU1RWYkNbA2a4/EH6ylcmy6IIMtiR5X9S9Rvnp/5qWB/ shoK5xNupdU9he39U5qXtxAxwQYiqE8= X-Google-Smtp-Source: ABdhPJwnH6TkfWy/1O3rgJT1eVUVOYC1sHpgM286TBTi8I1uW+9Z4O4az89O30KCWjhlPuoIaIivRA== X-Received: by 2002:a17:906:16d3:: with SMTP id t19mr2011617ejd.36.1590513871429; Tue, 26 May 2020 10:24:31 -0700 (PDT) Received: from x1w.redhat.com (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id bf15sm421357edb.46.2020.05.26.10.24.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 10:24:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 1/7] sysemu/accel: Restrict machine methods to system-mode Date: Tue, 26 May 2020 19:24:21 +0200 Message-Id: <20200526172427.17460-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526172427.17460-1-f4bug@amsat.org> References: <20200526172427.17460-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::641; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x641.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: "Edgar E . Iglesias" , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Roman Bolshakov , qemu-ppc@nongnu.org, Paolo Bonzini , David Gibson , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Restrict init_machine(), setup_post() and has_memory() to system-mode. Reviewed-by: Edgar E. Iglesias Reviewed-by: Cornelia Huck Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Roman Bolshakov --- include/sysemu/accel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h index 47e5788530..e08b8ab8fa 100644 --- a/include/sysemu/accel.h +++ b/include/sysemu/accel.h @@ -37,10 +37,12 @@ typedef struct AccelClass { /*< public >*/ const char *name; +#ifndef CONFIG_USER_ONLY int (*init_machine)(MachineState *ms); void (*setup_post)(MachineState *ms, AccelState *accel); bool (*has_memory)(MachineState *ms, AddressSpace *as, hwaddr start_addr, hwaddr size); +#endif bool *allowed; /* * Array of global properties that would be applied when specific From patchwork Tue May 26 17:24:22 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: 11570957 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A19401392 for ; Tue, 26 May 2020 17:25:49 +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 78632204EF for ; Tue, 26 May 2020 17:25:49 +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="RmnbZgNl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78632204EF 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:55308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jddKm-0001Yz-IS for patchwork-qemu-devel@patchwork.kernel.org; Tue, 26 May 2020 13:25:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jddJd-0006Uc-NN; Tue, 26 May 2020 13:24:37 -0400 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]:42035) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jddJc-0004Me-5k; Tue, 26 May 2020 13:24:36 -0400 Received: by mail-ej1-x641.google.com with SMTP id se13so24653336ejb.9; Tue, 26 May 2020 10:24:34 -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=clSLccSzglOurDqEG6EK2JpNgA9cL9mA+gQPjD7iYns=; b=RmnbZgNlrcoWUtQIG08Ub5IjrH76xxjEuapuyXwynsEuTaRnqAjXnZKzCMBVo2ydl0 3EGwHgbj0du4z4cGghu7ew5WomFU/oMW0dziJECEVYxNOzU1hzmuXj+mrEoCOKinjHYp o7Oa0IQGU+whhCosyGiqJjGvd5GwVR72DhcOLPOvlw5SWwGJ/0v5AiNdx66a57y/dE+4 FlhW/nscpDuRzc7Ml4u8xQ+0vriqkC/1I+zwknaxgx30F4kycW3buJzpL1qc2WpZvDKI Rbfg1Yf7DEYHuUCMl7rQHdSIgPDIb9GkeeuMO9hcB7Gb6uPlDhzOhvg+hMSGb3fl58hC IE+Q== 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=clSLccSzglOurDqEG6EK2JpNgA9cL9mA+gQPjD7iYns=; b=I+A95N4SdI3QCdKf/58zlFAAyhhEL+l+IZI1rHMDBG+lCq35BtuOhdM9AeuSG0iHBF LqgrmQyFY2P3dkbg1F5/YQqMkPyI6ZXIN6v/k/GQHY2WjyWPYniwgLH0SaYjyXSaAOp5 aSoikPUxAO1kn9lnV76kEZwNsnGPAZ2mgYlJJElrm75Rci72z7lCSLpuL9ijSU1LbkMs qwbDuVt9FLiJhelWmru6HgGc+yfl39WXjJXxayBnY7I0GFPDASQQfTRvkGxq6aO2bOeT aScIw00agVw/6RcxmU9NYFqSYCmj6oHli/XmdUGAWgD9fCFUDXbg93osLfRyQEeb6Uo/ sGRg== X-Gm-Message-State: AOAM533aPVu8impyvR7GmEV6PODkbl+dP9JmI9xvcnjgi19IoXTBUD2l VFcxeSFyJ/rnAaLD+Y29RfYyES08HdQ= X-Google-Smtp-Source: ABdhPJzI4iBhXst+c05iEuJsMCNjVkGbMkb5AduQO+mCmSc/126RcNhWtPHu+TyxxGGpgd/+tBziDw== X-Received: by 2002:a17:906:1d55:: with SMTP id o21mr1987258ejh.491.1590513873390; Tue, 26 May 2020 10:24:33 -0700 (PDT) Received: from x1w.redhat.com (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id bf15sm421357edb.46.2020.05.26.10.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 10:24:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 2/7] sysemu/tcg: Only declare tcg_allowed when TCG is available Date: Tue, 26 May 2020 19:24:22 +0200 Message-Id: <20200526172427.17460-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526172427.17460-1-f4bug@amsat.org> References: <20200526172427.17460-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::641; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x641.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: "Edgar E . Iglesias" , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Roman Bolshakov , qemu-ppc@nongnu.org, Paolo Bonzini , David Gibson , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" When TCG is not available, the tcg_allowed variable does not exist. Reviewed-by: Edgar E. Iglesias Reviewed-by: Cornelia Huck 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 Tue May 26 17:24:23 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: 11570967 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8FE0D1392 for ; Tue, 26 May 2020 17:27:30 +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 4E624204EF for ; Tue, 26 May 2020 17:27:30 +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="nnL9ngTs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E624204EF 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:34534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jddMP-0004df-E4 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 26 May 2020 13:27:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jddJe-0006Zb-Sm; Tue, 26 May 2020 13:24:38 -0400 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]:41912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jddJe-0004ND-4b; Tue, 26 May 2020 13:24:38 -0400 Received: by mail-ej1-x641.google.com with SMTP id x1so24673275ejd.8; Tue, 26 May 2020 10:24:35 -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=nzoy1AWlTOTo2Vla8z7lKUcDunyptX3S9k4CBZFpAHk=; b=nnL9ngTs6y+idNtc7cuTjI9ljzVR2ApgvxutfqI/6bBIhbOwxevqwNoN6EphiHe8pj bPJADMFZMlswDN/JDeoZTkYAlMwotxA04+SgM4C5axa69kI4w/D+5av0YfSUdgjQJFac dPpUTIpebKAxR8s1UsbgOEn997KcaDntXik3lNFQ7QCtTH9qIZfH3sBdQSRqjNgXr3yS 943vnvdrmlaaRvPu8IujyRN1jqbiPzDICrvwmbVDNbjQ5a9Z52woF4ZjZAGTr6l4Y7Ya FIKBX2pSHDFbkw1HPEb/Uaevr8trFo1WlLLkCxSckD7zslgbn6w5bnhxgv8VYDS1DZTh 5kpQ== 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=nzoy1AWlTOTo2Vla8z7lKUcDunyptX3S9k4CBZFpAHk=; b=d03aiKDT+KRZulQKlboSN6vpyyusXdQWrdukSIJJW9dYwrPDX8cHc+OMqNpA61RmXE E5Ql/FaOdWVVt/UFaAaeUfhSrVs/92OXzwZ22P44ns4uN44ZNZ2Eu0F4rujvBpYk8Erq oCR19RsD8bCi3ZsLJmrbusdeVf/xGsTiEgLo/Y7SHEiQGUpJ7+CfLSrmVSd5o3Oxg+V6 LiclmmIsi8LZyPj8oU/I7k9m7eBvnNiXafijogso7pQwj1+nuz3YqOxJRN1dbmeCorO/ FATUtYsf4aJskAl2+Xd1h1m5ljkM3pNgU4RpZldr6GTXauLlN9NIOCtd9aWHXBQVC1y+ B6sA== X-Gm-Message-State: AOAM532p7opN3Bdm8AYag+aijtvYI6w4Yn/IQiUgNb7LYdLqD3Pg90us OHYCUKHTxCTvS2LZnnPhBiEzvgN4SJE= X-Google-Smtp-Source: ABdhPJycANe7Wy6qzm4YTlQoJ6T4Ej8ZDStbCnFv3eXvHVa/T3usj/YjXbveJ1ln7d282lq7FB6Nqg== X-Received: by 2002:a17:906:5e08:: with SMTP id n8mr2080984eju.132.1590513874770; Tue, 26 May 2020 10:24:34 -0700 (PDT) Received: from x1w.redhat.com (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id bf15sm421357edb.46.2020.05.26.10.24.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 10:24:34 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 3/7] sysemu/hvf: Only declare hvf_allowed when HVF is available Date: Tue, 26 May 2020 19:24:23 +0200 Message-Id: <20200526172427.17460-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526172427.17460-1-f4bug@amsat.org> References: <20200526172427.17460-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::641; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x641.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: "Edgar E . Iglesias" , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Roman Bolshakov , qemu-ppc@nongnu.org, Paolo Bonzini , David Gibson , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" When HVF is not available, the hvf_allowed variable does not exist. Reviewed-by: Edgar E. Iglesias Reviewed-by: Cornelia Huck Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Roman Bolshakov --- v2: Fixed typo s/tcg_allowed/hvf_allowed/ (Edgar) --- 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 Tue May 26 17:24:24 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: 11570969 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2BA4360D for ; Tue, 26 May 2020 17:29: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 EC06A204EF for ; Tue, 26 May 2020 17:29:15 +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="KyJUyd+g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC06A204EF 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jddO7-0007PD-3h for patchwork-qemu-devel@patchwork.kernel.org; Tue, 26 May 2020 13:29:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jddJf-0006c8-Hz; Tue, 26 May 2020 13:24:39 -0400 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]:34695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jddJe-0004OL-K5; Tue, 26 May 2020 13:24:39 -0400 Received: by mail-ej1-x644.google.com with SMTP id l27so2571563ejc.1; Tue, 26 May 2020 10:24:37 -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=bosFEsOdRNCKNds18FsMsMzsl498InAUxYmyMk4mv4A=; b=KyJUyd+gePEnSqSfksBC75UrrHloRRCMmGCtrlSyNh4pEllbl10GZtOzNRj5kMmqGF 4/kQCF7wXQcRfX4wJ+k5gu4IFaye1PjSm75XwbUbPyikHilTrjbPUE22rQWfvYf9mWvE vKIXsuw59CfLbQ7JBca/eueF9jmo7EnGLp853riCO89SpSq8Ac6U78382kNXv9ysXCd9 /rlhMetMgzrMici9nUAkbWVRj3u+/i5OvvFwNT7erZJsKiSaQ/QIWwWJGtajC6YYwjnm OmnqiVC032tTQLCO8e/994q91eLyVyaFwuEFqGU4neSbe1sIxG4DSCPcV/J3hOk9tb/W 8YKQ== 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=bosFEsOdRNCKNds18FsMsMzsl498InAUxYmyMk4mv4A=; b=j6WNjX0NRh7FUDVEIydYw6jt+2kMWUC1pJCpW6i8itY3MYEhjLwAtU8XHFWQ1bWoAv GVWxKytu8JyJH15H5lxt5wo+Y88vsnc5IVuiXmounJH+TKw3to/YeF+ERMvj3MQC7ezX fEhS1cZhvVyFTBO6VAi3rjEpc1WR5y8L5fs+A4mCxKNaIt4zwy9TUgNJKsIhaAAAhgF4 Km6TH6qC4j6Ks4LVbI/QPpPSHG+uUDqL4BcKsRRNRGmWhsIb5kfloSGSxuGcFo5tSTCK ZRCbiuQJPVKslD9FvUkWaPs3yQUt8vsMvfFl61sms4cGQvEdQ4EI7di9FH83QbCF1Xxs onkQ== X-Gm-Message-State: AOAM533lGIIRvPH4l4GGFp9pFiVOTB3fYrWRJlFVu8Ud7zooDERW9HGs b3h1MZHahyT9eNRMFKM+k8Z5PsfYmQU= X-Google-Smtp-Source: ABdhPJx1VtAgGZixmMlTyYjSo7rtLtXQ7p4bq4AoWGapdhDGU2ZuPJxfwxuCL08gdVywQ2AfFWu1Hg== X-Received: by 2002:a17:906:2f8d:: with SMTP id w13mr2167656eji.102.1590513876142; Tue, 26 May 2020 10:24:36 -0700 (PDT) Received: from x1w.redhat.com (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id bf15sm421357edb.46.2020.05.26.10.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 10:24:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 4/7] target/ppc: Restrict PPCVirtualHypervisorClass to system-mode Date: Tue, 26 May 2020 19:24:24 +0200 Message-Id: <20200526172427.17460-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526172427.17460-1-f4bug@amsat.org> References: <20200526172427.17460-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::644; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x644.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: David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Roman Bolshakov , qemu-ppc@nongnu.org, Paolo Bonzini , David Gibson , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The code related to PPC Virtual Hypervisor is pointless in user-mode. Acked-by: David Gibson 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 7db7882f52..13d6976534 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 d8adc1bd49..09f8b10e27 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -10941,16 +10941,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 Tue May 26 17:24:25 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: 11570965 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8AB5960D for ; Tue, 26 May 2020 17:27:28 +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 21E39204EF for ; Tue, 26 May 2020 17:27:28 +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="IeXrjD2B" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21E39204EF 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:34414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jddMN-0004ak-4A for patchwork-qemu-devel@patchwork.kernel.org; Tue, 26 May 2020 13:27:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jddJg-0006fb-Ov; Tue, 26 May 2020 13:24:40 -0400 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]:35193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jddJf-0004Oo-UE; Tue, 26 May 2020 13:24:40 -0400 Received: by mail-ej1-x641.google.com with SMTP id y13so2738358eju.2; Tue, 26 May 2020 10:24:38 -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=xD1F0Crj0tTgMdXFMSpwQeLXu3Am6SzZrlFvxBhJ1Vo=; b=IeXrjD2BOatUygJ+ulV/wns+oAgBRzOCA0KpeZ/FkTPUQZu72bqsawXLTPVuAjMMog tUGk/hsS0oU6q0mh9JRiG84gU1aGspgivt1CjXpbodA1Mo8WOMQJ1njFmL600by792Kf 0O7E5f87ciVz39TJ5jz+x8FytpdBGn7r1wHB4zDqhu04bR/r8s+0D0mioBY7oYOmd05F Vw12XHQqutF+V6H1h4a2Yxus2QRKRtO4z55XC0wcQx0W1nDYtRaRnlzNTW3el21fwuiY +84t4PNWtMLTwO1x3LssWHxMD5gZEzDhVEiFwK0XyA2isCawWH+snwVfPrJKoUBKW5P0 D0oQ== 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=xD1F0Crj0tTgMdXFMSpwQeLXu3Am6SzZrlFvxBhJ1Vo=; b=CS7CIsw+n8DumppcJkNqHAwJIEEg+5cJH9HhgcW7tsVaA0xIM+YujZ3Kxt/g8F2rzl qc24EO1alsH9+VQRaMBF7AS/edjykWUQWmGL4BY7pl9djj8NSD3O7qrnzORMhWtV/nRQ uSL1BEL208W6Vo8t1rHPlb0egG1dC6lUg0pXtBMRc8Z6YMOcUr2lePhsvXWJ8Ao9C8KA wjucKHm8U1p/AsE50Dpk6aUedAd8WShhGC0rXRiwA0jl90BcsKYnhtivOicYyGoldKYA HxNTzSpsOzF1xbA0C8OSBte161yV5M+jFGU2h6JdQJEhZwZ7Qsr3biHiDokcR7ZPjA2x rC5g== X-Gm-Message-State: AOAM5308GVyh4jYHYO3wYvRwKePwL/TYzzL1AmHEGanBOkAqsYopb8YP oCiJgaZ8mQJ/2T8bG8x2PLFp9EMOFXs= X-Google-Smtp-Source: ABdhPJxppiXRNKxsvfWoUwG0mSxbaomcaqkEeAxC9aNhTBlgTB4SzCn+aw6WFu5ZFEgCR3Og1G+p1Q== X-Received: by 2002:a17:906:f198:: with SMTP id gs24mr1983093ejb.547.1590513877491; Tue, 26 May 2020 10:24:37 -0700 (PDT) Received: from x1w.redhat.com (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id bf15sm421357edb.46.2020.05.26.10.24.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 10:24:36 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 5/7] target/s390x: Only compile decode_basedisp() on system-mode Date: Tue, 26 May 2020 19:24:25 +0200 Message-Id: <20200526172427.17460-6-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526172427.17460-1-f4bug@amsat.org> References: <20200526172427.17460-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::641; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x641.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: David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Roman Bolshakov , qemu-ppc@nongnu.org, Paolo Bonzini , David Gibson , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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. I/O instructions are privileged, and other S instructions are decoded elsewhere. Reviewed-by: Cornelia Huck 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 Tue May 26 17:24:26 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: 11570971 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0F471392 for ; Tue, 26 May 2020 17:29:31 +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 B799E204EF for ; Tue, 26 May 2020 17:29:31 +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="BQYkABkJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B799E204EF 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:41514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jddOM-0007vC-Pg for patchwork-qemu-devel@patchwork.kernel.org; Tue, 26 May 2020 13:29:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jddJk-0006pY-9I; Tue, 26 May 2020 13:24:44 -0400 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:45450) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jddJj-0004Rw-Cw; Tue, 26 May 2020 13:24:43 -0400 Received: by mail-ed1-x544.google.com with SMTP id s19so18295103edt.12; Tue, 26 May 2020 10:24:42 -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=4W21aaZREdkuSM60kf8a80KRCL1+S7E7CeXJsG1JSx8=; b=BQYkABkJjEjV9C98u2Zf6f/JUND+40YzYHmJ4Z6TOW6foPmOSiYspzoaX9NkhlIhvR ljQhrfhe5myXFpJXo4YNmI4WQtjLZnjVbq3/xOini5RsaW+DF+vniktw7qZ5V9/d+oVK P+TgO9CxxNQILh20KerSfgGgpQc1+YQjgBSZzIbZTIDWYD9YW7gnUJ5f1LmJ9/YctfWm 0zka3w1FOy6uBlBp0WFAI0l2x67XLS9hxoh/IYkgQN6y1cRajf6HW5gPWngp+2vVeH5e S5hoIbGRTnMbg0g37fa+4EOMNwK72AYvLeIzkBv/yicQKfwEtnlwreupnae31yKm7m+H 87lw== 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=4W21aaZREdkuSM60kf8a80KRCL1+S7E7CeXJsG1JSx8=; b=rQ+YxxhkBjXEzTpIPJQui93nEwhEh1UKafCVOMP8PkYAyTkktAHpUS4faLruNYMGDB lIkBSdPE2xF31EY1j2ZGF8aTRKEn7z+zx65YCHcezeYO/+wwR3mLrL3S8RX0DnQVbjGU 5kxeiQOBiip9J7oAlKFG2IpfOxaTSjlouqTZmqdb0Ow/q/T5jnHFODflTQLllmriPBIn 4iUmPGzjBdIIdYdtAPWxnRLeCGylW9QznLxqCllR5Q/oFjwfDLBsaJyH+SwUGLwj5uVX m+diBEOoxJJnsqmI+nZidV2m3ERaycz/wG+yT5pIEmyp69ybuAbn3OTjrZN7pMedJ6B/ d+VA== X-Gm-Message-State: AOAM530d/H0qOzy37TGq8j0zQ+S9nqty0RGzvqhN3Z3BpdZgjpcN+LX9 qqwHeCpe5GyuSEY/ULIQKDp1JmEJ+go= X-Google-Smtp-Source: ABdhPJzvR5avvOpOZQYK/x/0WJuE4wXAy+JUPQr34XQMnXrAZtyvoLm89VkUPFxSol1G33VslGBLgw== X-Received: by 2002:a50:d1d3:: with SMTP id i19mr20425145edg.35.1590513881079; Tue, 26 May 2020 10:24:41 -0700 (PDT) Received: from x1w.redhat.com (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id bf15sm421357edb.46.2020.05.26.10.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 10:24:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 6/7] target/s390x/helper: Clean ifdef'ry Date: Tue, 26 May 2020 19:24:26 +0200 Message-Id: <20200526172427.17460-7-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526172427.17460-1-f4bug@amsat.org> References: <20200526172427.17460-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x544.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: David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Roman Bolshakov , qemu-ppc@nongnu.org, Paolo Bonzini , David Gibson , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" All this code is guarded checking CONFIG_USER_ONLY definition. Drop the duplicated checks. Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/helper.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 09f60406aa..9257d388ba 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -42,9 +42,6 @@ void s390x_cpu_timer(void *opaque) { cpu_inject_cpu_timer((S390CPU *) opaque); } -#endif - -#ifndef CONFIG_USER_ONLY hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr) { @@ -98,14 +95,12 @@ void s390_handle_wait(S390CPU *cpu) CPUState *cs = CPU(cpu); if (s390_cpu_halt(cpu) == 0) { -#ifndef CONFIG_USER_ONLY if (is_special_wait_psw(cpu->env.psw.addr)) { qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); } else { cpu->env.crash_reason = S390_CRASH_REASON_DISABLED_WAIT; qemu_system_guest_panicked(cpu_get_crash_info(cs)); } -#endif } } From patchwork Tue May 26 17:24:27 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: 11570963 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 705FD14C0 for ; Tue, 26 May 2020 17:26:15 +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 47AC82084C for ; Tue, 26 May 2020 17:26:15 +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="LREDIWJx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47AC82084C 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:57710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jddLC-0002ZU-DS for patchwork-qemu-devel@patchwork.kernel.org; Tue, 26 May 2020 13:26:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jddJl-0006u1-Rb; Tue, 26 May 2020 13:24:45 -0400 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]:45448) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jddJl-0004TN-2C; Tue, 26 May 2020 13:24:45 -0400 Received: by mail-ed1-x541.google.com with SMTP id s19so18295187edt.12; Tue, 26 May 2020 10:24:43 -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=lXlYd5mDWippGeVthUR2pLi5N4ankzNYCPx8o3NujjY=; b=LREDIWJxx4B3Ha0/bpf0Hk8y68xksGN7GewX10ouk3K/VyGQ6SzDZ0TI0k4ZR9j5Eu WlSoWLAuCA0NX7VNXdta0cqgKlEWX63INWLmjzHiNwfG6KyGubPS+99979AQaLKsrBFq wbbRQEDT1pp19nvVXJQT0uCIcZXfnGbYHURQs+pfnkrLnrg7STKTKhvgfzfL6BC7X1sU 8sFsi4tw9PiWIwgAiESJBsZEqPZhQH5oUU2LzL1FOEJ80iQmX9/B4n7cCEAqrR+7RnoP crV5gHm41/knqqIYrQaoc2ha/xIYcDGFvulW0hBUHhpd7L90AbAz7dtb9TvAEp++/qk8 YH0w== 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=lXlYd5mDWippGeVthUR2pLi5N4ankzNYCPx8o3NujjY=; b=fqpg0dM4nNbJIPOFfYwkUIBIKB5TJNg0qWDfTE7Z7n5GjbwSurtXIVUfdApgBXsdR3 9M/gsRU8I73SoysFdUB/PadjaT/2x9lueL0HYnndNviunqBqQZeTOObyBKkubgqn3IVr 2/9PEcZD8Spaj27KL/7JBKv2wA6NXFk5HvJOOCUq7/UzEkkS5RBiX7QVgAtu2JFJ8X5D 1oFoRZXxI2Y14Da0KDQaOLnnJMx+byZuDmicR6P9CHn3kXhETMenMZrO6WCgv0SdpGt7 zf8kG/jCzXdrysWeDNFqrrNA9Ez7UZ7y+vhf/K9fjTapH/jVYJGL+13PKBhVOvFYkeB4 QjWA== X-Gm-Message-State: AOAM530ckK1GkX6AwspRgJ1v4T0rI/0yrecNwhzljhXE4r7q9wJQSfUo kaq0naNrWrbi1LdEAbMG6sGkIDvqHmM= X-Google-Smtp-Source: ABdhPJww+rvpUSymARdYrNqFwgPT5+khuR2IHpjHQddzMvQeMt90fV3tOlMSBBEAxGxtj8uC+vpu1g== X-Received: by 2002:a05:6402:31b1:: with SMTP id dj17mr20998881edb.142.1590513882606; Tue, 26 May 2020 10:24:42 -0700 (PDT) Received: from x1w.redhat.com (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id bf15sm421357edb.46.2020.05.26.10.24.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 10:24:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 7/7] target/s390x: Restrict system-mode declarations Date: Tue, 26 May 2020 19:24:27 +0200 Message-Id: <20200526172427.17460-8-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526172427.17460-1-f4bug@amsat.org> References: <20200526172427.17460-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::541; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x541.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: David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Roman Bolshakov , qemu-ppc@nongnu.org, Paolo Bonzini , David Gibson , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" As these declarations are restricted to !CONFIG_USER_ONLY in helper.c, only declare them when system-mode emulation is used. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- v2: Keep load_psw() is /* cc_helper.c */ section (cohuck) --- target/s390x/internal.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/s390x/internal.h b/target/s390x/internal.h index c1678dc6bc..b1e0ebf67f 100644 --- a/target/s390x/internal.h +++ b/target/s390x/internal.h @@ -236,9 +236,11 @@ int s390_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs, /* cc_helper.c */ const char *cc_name(enum cc_op cc_op); -void load_psw(CPUS390XState *env, uint64_t mask, uint64_t addr); uint32_t calc_cc(CPUS390XState *env, uint32_t cc_op, uint64_t src, uint64_t dst, uint64_t vr); +#ifndef CONFIG_USER_ONLY +void load_psw(CPUS390XState *env, uint64_t mask, uint64_t addr); +#endif /* CONFIG_USER_ONLY */ /* cpu.c */ @@ -303,18 +305,18 @@ void s390_cpu_gdb_init(CPUState *cs); /* helper.c */ void s390_cpu_dump_state(CPUState *cpu, FILE *f, int flags); -hwaddr s390_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); -hwaddr s390_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); +void do_restart_interrupt(CPUS390XState *env); +#ifndef CONFIG_USER_ONLY uint64_t get_psw_mask(CPUS390XState *env); void s390_cpu_recompute_watchpoints(CPUState *cs); void s390x_tod_timer(void *opaque); void s390x_cpu_timer(void *opaque); -void do_restart_interrupt(CPUS390XState *env); void s390_handle_wait(S390CPU *cpu); +hwaddr s390_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); +hwaddr s390_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr); #define S390_STORE_STATUS_DEF_ADDR offsetof(LowCore, floating_pt_save_area) int s390_store_status(S390CPU *cpu, hwaddr addr, bool store_arch); int s390_store_adtl_status(S390CPU *cpu, hwaddr addr, hwaddr len); -#ifndef CONFIG_USER_ONLY LowCore *cpu_map_lowcore(CPUS390XState *env); void cpu_unmap_lowcore(LowCore *lowcore); #endif /* CONFIG_USER_ONLY */