From patchwork Fri Jan 6 08:28:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 639690 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp665019pvb; Fri, 6 Jan 2023 00:49:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXvT/PkTtoOoewUADl2hZWoHFMDEI/bpf5NKv3Lfbki8lgdeqJiks1dwW//KubBtynKktA2i X-Received: by 2002:ac8:65cc:0:b0:39c:da20:634 with SMTP id t12-20020ac865cc000000b0039cda200634mr86328441qto.62.1672994967677; Fri, 06 Jan 2023 00:49:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672994967; cv=none; d=google.com; s=arc-20160816; b=y2ZOXUjkjgmCVNVGs+m/Dfs62XhB0/0izgMcf76mvsX/Iw+iLN+On8LEyxhc5VwWIu aVbrgr+bf7FksAxEqLTiJwd7xyZ/nmfxi2STyoFq9GEJNRDu0ArF/a7hNoIvxu/QOAv9 VDNT5mmhZZunySSLQQ8HSZLdHF9T6qsV4psiN9dgifJHWw+34BiWqTdRZb+krTiUxOWw UKpQ81K4tb2z4WeS81ECUPLlHPDTGQKXQjelbBLI3bvL+CWxahn6+66Tz4flIRZmVqLM qyBtl5+/lyEfaDkb96C2XcBAURYVFxPhqcCOZxQfu0q/YqQ3ERRwjWPb+x2U2YFuxsAu zRbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uOu604Z5UFAJTAsQ53c878BA+fal4cCtG/JMpcQgNcs=; b=vLkgnM1TIi6Te4/RYad10SOr81Y3ruNLcmMOJbOEfbE7gfJrR7PEJrSgzc48BthtBz zhXN/gHc9SJlIWf0laESyg96wz5Fg7OOpvtOtSDBIC8/mDYh+KwRHEGsnjv9EcBIUD3M YMUP7HPP35YCTQ9YQCFoiQZT3wybWMEiJtYFgYTmcDGGp/71Ll1nqSvXPeiEUrtXlT1r s8UjVifns3CGx6TbsmApYkvavm8gAvN81GPagbl+O36RwMcZGTsUgO4TtWpafJ1DsrJB WCBjo0aEicydJ0pR5zVn/4NrvGzwExh4TLDEGwJVdRvX6x9Ff5Ozst7tOBaL2A1oC52+ 66Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GY++GEBO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d18-20020a05622a15d200b0035cee17b7edsi361016qty.587.2023.01.06.00.49.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jan 2023 00:49:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GY++GEBO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDi6C-0002ZE-SX; Fri, 06 Jan 2023 03:29:12 -0500 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 1pDi63-0002WD-HD for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDi62-0005US-1E for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672993741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uOu604Z5UFAJTAsQ53c878BA+fal4cCtG/JMpcQgNcs=; b=GY++GEBOS4ABmlSX9ZeOj9I3RHLgi3yDIMlWrby7rROJ4Nc4i4vEkGchNTvFqdItz+KpRE esV2YtydT93u2kO/C8OZ5BEw1+qL2q5tFNiQ43oLW6f7+nGPGpSdMH1WW4Y+3nk06DcEyG VBd9QmmePtum3ZO7qadIt9bfYkZX2To= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-557-tQfkrrY2O6iXtcoRpeWvuw-1; Fri, 06 Jan 2023 03:29:00 -0500 X-MC-Unique: tQfkrrY2O6iXtcoRpeWvuw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AFE63101A52E; Fri, 6 Jan 2023 08:28:59 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 91492492B06; Fri, 6 Jan 2023 08:28:58 +0000 (UTC) From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Nikita Ivanov Subject: [PULL 02/15] tests/vm: Update get_default_jobs() to work on non-x86_64 non-KVM hosts Date: Fri, 6 Jan 2023 09:28:40 +0100 Message-Id: <20230106082853.31787-3-thuth@redhat.com> In-Reply-To: <20230106082853.31787-1-thuth@redhat.com> References: <20230106082853.31787-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé On non-x86_64 host, if KVM is not available we get: Traceback (most recent call last): File "tests/vm/basevm.py", line 634, in main vm = vmcls(args, config=config) File "tests/vm/basevm.py", line 104, in __init__ mem = max(4, args.jobs) TypeError: '>' not supported between instances of 'NoneType' and 'int' Fix by always returning a -- not ideal but safe -- '1' value. Fixes: b09539444a ("tests/vm: allow us to take advantage of MTTCG") Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221209164743.70836-1-philmd@linaro.org> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/vm/basevm.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 2276364c42..23229e23d1 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -569,8 +569,7 @@ def get_default_jobs(): # more cores. but only up to a reasonable limit. User # can always override these limits with --jobs. return min(multiprocessing.cpu_count() // 2, 8) - else: - return 1 + return 1 parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter, From patchwork Fri Jan 6 08:28:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 639686 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp660056pvb; Fri, 6 Jan 2023 00:34:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXvOEFoPavVFxwDiE4oEkCSvRHm9gKiRZI8VIMccxtQlKu/CLJhYGiZiMuKr6M4HJsv/OXki X-Received: by 2002:a0c:f906:0:b0:531:be1a:89af with SMTP id v6-20020a0cf906000000b00531be1a89afmr29547304qvn.6.1672994041345; Fri, 06 Jan 2023 00:34:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672994041; cv=none; d=google.com; s=arc-20160816; b=Q96k8xIvxqkFiC1lwSDEkJe8jNWFoQGGXElt3WS31ZhT7U1+XRip8xJ6BEog0ErOxQ wRxs0OqfHCLezTpk2VPeyC/eH8mZnGJEKwUd68IQuYMKznsB2+wMb7U3OVNoEdVOoTkx OclwCnynvvMn94vimyk7VDxKsDX+K9FJjmb40c2xRQmiA3vPx0CLP5u8/uE+3K/FlF+4 il1aYTsXJ7m3hKvdM+TQpRWpv9UY+VsjRmn4Ee3GaPaC1zaWiGptjZEmEBJkKI4ltVp2 9LxDK/dN00qKulwd+tP+l9KvujSnN1riPl3NOsOvhT77akf8d29+NpUfsAtpnF1yzvvH 32eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Xl/kPsma4+CokXD027GgAKWxG1Cp4Q3btDYha9T9ayI=; b=YEWObLnAnxh2TQqR9qlR8/fXt/EaDEBtn5LauMbGv9SeYCmG06QLIDX2XAzmKabBAN ziIwl+4IpnhLDKtFY8UTAe6O/6eHKTOvwvJLorFlKrKHhl0h4I/XU8NUQkTEOWFa9S35 m18ZH5GGsjOmszT2Vq1N0SrWX89bpYKfljMEpsr4H7/NCzW0PlatKq4hzLW9Sa5U+G9C 1YnXPGj5M0ouXCYOlDRUvTOSPrLVFrp2QnICnFxYuLKhEmcqpDCqy+2+OTb1pf30cUey xNwQZfIjBk1uxldl9cXzGMO7nrTcAPftOnLrNhY+//zczDGbTbX8WyAg7p7H+46JGkgR 5BDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YdjABc7u; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c9-20020a056214224900b004ad311da286si252302qvc.280.2023.01.06.00.34.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jan 2023 00:34:01 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YdjABc7u; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDi68-0002XC-O2; Fri, 06 Jan 2023 03:29:08 -0500 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 1pDi67-0002X0-60 for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDi65-0005VB-Fl for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672993744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xl/kPsma4+CokXD027GgAKWxG1Cp4Q3btDYha9T9ayI=; b=YdjABc7uQ8x9lJR7aShyNC6mLBp4dGds9YoC/AYI9Hdh5406l5MHOeLo68YKkOUaghnGnS V3p3FkPyspyWHA3/O4ILdedUM0MDfdZAdFGXdgoDwtoqhP5ODxouAdmYZqHyk+zXmkNwfn HqzLikdx40yB87E/mwazaaRXDXsriJk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-475-abkVrsUKMc-LIQeczTJrTQ-1; Fri, 06 Jan 2023 03:29:02 -0500 X-MC-Unique: abkVrsUKMc-LIQeczTJrTQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7B0C9183B3C8; Fri, 6 Jan 2023 08:29:02 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71357492B06; Fri, 6 Jan 2023 08:29:01 +0000 (UTC) From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Nikita Ivanov Subject: [PULL 04/15] exec/memory: Expose memory_region_access_valid() Date: Fri, 6 Jan 2023 09:28:42 +0100 Message-Id: <20230106082853.31787-5-thuth@redhat.com> In-Reply-To: <20230106082853.31787-1-thuth@redhat.com> References: <20230106082853.31787-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Instead of having hardware device poking into memory internal API, expose memory_region_access_valid(). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221217152454.96388-2-philmd@linaro.org> Reviewed-by: Eric Farman Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- include/exec/memory-internal.h | 4 ---- include/exec/memory.h | 4 ++++ hw/s390x/s390-pci-inst.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 9fcc2af25c..100c1237ac 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -38,10 +38,6 @@ void flatview_unref(FlatView *view); extern const MemoryRegionOps unassigned_mem_ops; -bool memory_region_access_valid(MemoryRegion *mr, hwaddr addr, - unsigned size, bool is_write, - MemTxAttrs attrs); - void flatview_add_to_dispatch(FlatView *fv, MemoryRegionSection *section); AddressSpaceDispatch *address_space_dispatch_new(FlatView *fv); void address_space_dispatch_compact(AddressSpaceDispatch *d); diff --git a/include/exec/memory.h b/include/exec/memory.h index 91f8a2395a..c37ffdbcd1 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -2442,6 +2442,10 @@ void memory_global_dirty_log_stop(unsigned int flags); void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled); +bool memory_region_access_valid(MemoryRegion *mr, hwaddr addr, + unsigned size, bool is_write, + MemTxAttrs attrs); + /** * memory_region_dispatch_read: perform a read directly to the specified * MemoryRegion. diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 9abe95130c..2eee5db7e1 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "exec/memop.h" -#include "exec/memory-internal.h" +#include "exec/memory.h" #include "qemu/error-report.h" #include "sysemu/hw_accel.h" #include "hw/s390x/s390-pci-inst.h" From patchwork Fri Jan 6 08:28:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 639685 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp658381pvb; Fri, 6 Jan 2023 00:29:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXtIDby7CiGtIkKJBpR3e3nExbcCedmlN0WS+qSnt+aC48ANpgdyopSkZEmKqjsKkXsNWryv X-Received: by 2002:adf:fb91:0:b0:27c:88f3:8cb8 with SMTP id a17-20020adffb91000000b0027c88f38cb8mr22346631wrr.25.1672993774712; Fri, 06 Jan 2023 00:29:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672993774; cv=none; d=google.com; s=arc-20160816; b=VC+cng03sx938I7Eu3LagKDs42C5dW/fxu0R11iyzGMcKIYXz0T62M8M5cU52p+Qti bCJjm1Bcte1uYFkJOSHjP1pjWfPql0bYJBaj6TY1N97kgTGHamOWg9UwOrFCjBldDLjL z394prqbw5rQu/TFvKXTo1qiPWASCowHMtnVcJ8DxEbAmavdYM8+/zIx1zN1Kje3Kc81 D4nZ8WG1uumQ5fviPxFxXZXVDf2yWI1mS1bHuue9KsoSUN9CpSu03GdVJLoDDT/PLbjW mzylSDj+Nsaif9QRVQ8KwGd45CPn/GY3q/3dapayYTU5JzlwUM7zmWC68dPQVs/cMDNk EJyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YECT37xFnoENI7l6yJNtVYwVr86adRzuuOKbFfDnvY8=; b=xhwT5aNQMPkvSe7q+Nrxu86/Dzdz9bdHg01eCvlCBkviT4jO+kLqOS3/7Yb8L8cLtk 8gFr287j+H/ZgGaKi+qLR3UI+v9JNarEszjd/gp6dV40RZ/GTwxDT6YRWw2li6pG6xqR dZCEK3wMomK9oLF6tCjJJwaw7WHuFtWNJrEUt9HnD6ffLGxEZVHY/2B3nOO5eeP6V7OH gSbiIbpKLkk7nZX+dhNa+RFep4xEE6obGiTtTThmZv+z5Y3j/cuT2na5d8UDhoa8gbuR 4QT9v+isFYz68TT2nHZyLWnkhXo7tdCLyrFNqr9en2RKeTAwUBLwW9HLoD21rk49T7vM jyfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=G42y6+JM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l18-20020adfe9d2000000b0028223adb232si454985wrn.887.2023.01.06.00.29.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jan 2023 00:29:34 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=G42y6+JM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDi6B-0002Z1-I6; Fri, 06 Jan 2023 03:29:11 -0500 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 1pDi69-0002Xj-Na for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:09 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDi68-0005VX-7P for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672993747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YECT37xFnoENI7l6yJNtVYwVr86adRzuuOKbFfDnvY8=; b=G42y6+JM2RZtc5Iwr9tD1Cpd+U8liZLZjPXGFpA/sgu9QHjK1+ysIgjK1TnR0bQpaOo6bj ZUjpfIzIwVnyKiit0kGw+ok1/bFH2W34+rGV7Ajq51hkKJhz1fq1TFb23hiq8MGC6KtmBC B9CEN+CokwOt0bu+cyfdkvhjHC0TGys= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-615-KHWM2W1JO2OpKPFe7uJvuw-1; Fri, 06 Jan 2023 03:29:04 -0500 X-MC-Unique: KHWM2W1JO2OpKPFe7uJvuw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 22FA8101A52E; Fri, 6 Jan 2023 08:29:04 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id F2434492B06; Fri, 6 Jan 2023 08:29:02 +0000 (UTC) From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Nikita Ivanov Subject: [PULL 05/15] hw/s390x/pv: Restrict Protected Virtualization to sysemu Date: Fri, 6 Jan 2023 09:28:43 +0100 Message-Id: <20230106082853.31787-6-thuth@redhat.com> In-Reply-To: <20230106082853.31787-1-thuth@redhat.com> References: <20230106082853.31787-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Protected Virtualization is irrelevant in user emulation. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221217152454.96388-4-philmd@linaro.org> Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- target/s390x/cpu_features.c | 4 ++++ target/s390x/cpu_models.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index 5528acd082..2e4e11d264 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -14,7 +14,9 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "cpu_features.h" +#ifndef CONFIG_USER_ONLY #include "hw/s390x/pv.h" +#endif #define DEF_FEAT(_FEAT, _NAME, _TYPE, _BIT, _DESC) \ [S390_FEAT_##_FEAT] = { \ @@ -107,6 +109,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type, feat = find_next_bit(features, S390_FEAT_MAX, feat + 1); } +#ifndef CONFIG_USER_ONLY if (!s390_is_pv()) { return; } @@ -147,6 +150,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type, default: return; } +#endif } void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type, diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index c3a4f80633..065ec6d66c 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -23,8 +23,8 @@ #include "qemu/qemu-print.h" #ifndef CONFIG_USER_ONLY #include "sysemu/sysemu.h" -#endif #include "hw/s390x/pv.h" +#endif #define CPUDEF_INIT(_type, _gen, _ec_ga, _mha_pow, _hmfai, _name, _desc) \ { \ @@ -236,6 +236,7 @@ bool s390_has_feat(S390Feat feat) return 0; } +#ifndef CONFIG_USER_ONLY if (s390_is_pv()) { switch (feat) { case S390_FEAT_DIAG_318: @@ -259,6 +260,7 @@ bool s390_has_feat(S390Feat feat) break; } } +#endif return test_bit(feat, cpu->model->features); } From patchwork Fri Jan 6 08:28:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 639687 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp662779pvb; Fri, 6 Jan 2023 00:41:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXsqxU9T1tMjQ2HHthw6cLE5/09/kevdmgyrm4DENX8k4xJIsWG4q0gri5axF1b560gl1iZL X-Received: by 2002:a05:622a:5814:b0:3a5:af69:408a with SMTP id fg20-20020a05622a581400b003a5af69408amr94249592qtb.67.1672994502764; Fri, 06 Jan 2023 00:41:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672994502; cv=none; d=google.com; s=arc-20160816; b=QR1D3AASuSXpXpOx9xpDD0w2VldAYX2cLLmvdy3KTdGy9j81k0D8A3HPbzJFdolZHV CfwTVtcw+iSOrveGBn/cZT+XVa25Ze2qD+gNgvQgLp9nrSugpAkankUOE+DToAezxohN T2WDuvBsn2C4CUY0pYwrmdEDVDcVn2z9lbgkD+VTKjOcaPrVFn0mIFfvIuGyoTdhUFQa e8mE3Je9cuhlhMiGvrtXMmE+x17/JwClPu29pJZadQk2f4p8aUwIHocvvfWZ2ov/yg6D sR2FD0L2xlTwF7zolkveHTRMA/3WakaZlwwrQ8ixYxWthV0ajURhg3T5hut2tj+mIE6W YPwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XvopRvA2Ire6tw68tl0QZAL+5rm/yyv2GuLTv6UHOLU=; b=XVM3IY1iCHFE9WYIp00LRMqvbGi1A/ikF+aq1OfA5ZF3flI1l8Joj1kQja5rNKuKaJ oUEt2if2pIUIzeF983NUgqnMW5wKKj3rONW9mM3kLXQsfE7GOz1nS4UCn+d9YPfwLDfU YcFsyQDifkdghZTjpVUFoaM6xXC1qEyG72vKzGopKADZnpvr1lzY3MoQU0HI36xsA7/f I3172G1SuqEG0dzwnSR+iptqtF4tb7RekEMdgll1UOTfBxp1mlpkOCo6SEUoOpAjYbGH 0eGu/nYxO5fjbaADFASq19nsrFMPuYpMQwcQ7JfrvJIZ2Bpq3WYrFk7psadrG07dQ4U3 hoog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LGQk8NUs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n21-20020ac86755000000b003a5c553fa7asi283207qtp.567.2023.01.06.00.41.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jan 2023 00:41:42 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LGQk8NUs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDi6C-0002ZI-TH; Fri, 06 Jan 2023 03:29:12 -0500 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 1pDi6A-0002YU-NK for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDi69-0005Vc-AK for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672993748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XvopRvA2Ire6tw68tl0QZAL+5rm/yyv2GuLTv6UHOLU=; b=LGQk8NUsjMH8FhWziSYSaYtvJ0Jh3QAM86wL654voVB3rakq7URUOK6tMdE/9lYGXuzAlm aKDI9QFhUCe5b9EJ5R1pPl17u2sTiJudIf+S1U6jV+rb6imjBEaY8xbxFlwcPuIaJtYN4L oFgFZnCOv/4h7SQ5TyrhprciDVPDyzE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-622-s4tOCdAAN62t-CPW4VO1rA-1; Fri, 06 Jan 2023 03:29:05 -0500 X-MC-Unique: s4tOCdAAN62t-CPW4VO1rA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 383981C05141; Fri, 6 Jan 2023 08:29:05 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76724492B06; Fri, 6 Jan 2023 08:29:04 +0000 (UTC) From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Nikita Ivanov Subject: [PULL 06/15] target/s390x/tcg/misc_helper: Remove unused "memory.h" include Date: Fri, 6 Jan 2023 09:28:44 +0100 Message-Id: <20230106082853.31787-7-thuth@redhat.com> In-Reply-To: <20230106082853.31787-1-thuth@redhat.com> References: <20230106082853.31787-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_SPACE_RATIO=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221217152454.96388-5-philmd@linaro.org> Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- target/s390x/tcg/misc_helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index 71388a7119..576157b1f3 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -23,7 +23,6 @@ #include "qemu/main-loop.h" #include "cpu.h" #include "s390x-internal.h" -#include "exec/memory.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "qemu/timer.h" From patchwork Fri Jan 6 08:28:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 639688 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp663029pvb; Fri, 6 Jan 2023 00:42:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXu42c3fwQIkTvXJZiYx5wRa6R0G59SIIbji2SqVoOaa+MqlfxyRmCOwXAHBmx3JXLMKcAhc X-Received: by 2002:a05:6214:92b:b0:532:1db4:405c with SMTP id dk11-20020a056214092b00b005321db4405cmr728178qvb.34.1672994549582; Fri, 06 Jan 2023 00:42:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672994549; cv=none; d=google.com; s=arc-20160816; b=Rp5PX5mk16wCtdyU64ZOa4OfHFyVey9NsB/6dGfgKSqGPmFmJ7cXmarK4LijTEYyMJ QRGsPod7bnv8OFuM5kV4Lgj7hcaMvEYqTNH8BZ29wqUJ8M0Ae4AjASCLy75Qqe14T5iS +CfoZBfwYKZcz1P3z199vur3tqh4jX1UVQ2/t2j/0t7ZuUdGWKIOhwVYt6V7ua0h5MHU ALboSEt7VcIcvUb1QVMfXaquCIehHAwxHWfKon1blxT/gNBgAJAoEZqxe1/ldYekXiM3 2l6Qfh3df4H5P+1o9NDnrzVl0S1COjgepggodet6YGsIdFfinCN3cAQceuW9fddhY42b l2wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AwB4aiB09gx95VbzFzeO2ug7F4610xROqTdQI7f4w6U=; b=olPE8PZ78UOOdGrLHCOiTbQ9QzMqiVJeIbExLxMb+lEF0O1YL3NM+5YY522Kq5GGT4 4uvZlOnoEpPlm5SXyCTg0AkTT9/U5AwSiX7KYeyYgy9VGlOMacwOFd9jZWldCOsZ7Ez1 AB0aA6gIS4dxndCx29Slq397sSk7JnzJ8rPoc9bTEUCC0bTH2Yu9ath+6nvsZOUklow5 7GM3/BlGZBpxb7H7CVzTCLAx4dU9G1ohFS+DtbZvTszmIZBuWnIA7JvIMVXG0dAhKpsa WF7mYzuCJ12zc/zcxB2Go4S+tgb4ZxbRF2LTlabff3PzqavVsy5vrU1dwgkSYA79sQsW ABLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hq6pc1iB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jr10-20020a0562142a8a00b00531aecc05c9si249100qvb.201.2023.01.06.00.42.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jan 2023 00:42:29 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hq6pc1iB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDi6D-0002aJ-WB; Fri, 06 Jan 2023 03:29:14 -0500 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 1pDi6A-0002YW-RT for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDi69-0005Vb-EP for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672993748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AwB4aiB09gx95VbzFzeO2ug7F4610xROqTdQI7f4w6U=; b=hq6pc1iBb2iNWyOdm05/Xo7xBu+lof2rJPnghktV5n/j+ZlhkTS9Wp3XCB1ys0J9DQ3ERe Cx5o+jhcx/6SJw3p4Cu1vliTo2pFmRqYaRRYIuw0EJihKpyuukoopyzXsxYEdWQtqcuRNw MkUH61lTKCfyq78r6/foE40IsckLEvE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-90-gWVs1xClOvG2LEUxTL4dFw-1; Fri, 06 Jan 2023 03:29:07 -0500 X-MC-Unique: gWVs1xClOvG2LEUxTL4dFw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C53951C05141; Fri, 6 Jan 2023 08:29:06 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id A75E7492B06; Fri, 6 Jan 2023 08:29:05 +0000 (UTC) From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Nikita Ivanov Subject: [PULL 07/15] target/s390x/tcg/excp_helper: Restrict system headers to sysemu Date: Fri, 6 Jan 2023 09:28:45 +0100 Message-Id: <20230106082853.31787-8-thuth@redhat.com> In-Reply-To: <20230106082853.31787-1-thuth@redhat.com> References: <20230106082853.31787-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221217152454.96388-6-philmd@linaro.org> Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- target/s390x/tcg/excp_helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index fe02d82201..bc767f0443 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -21,15 +21,15 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "cpu.h" -#include "s390x-internal.h" #include "exec/helper-proto.h" -#include "qemu/timer.h" #include "exec/exec-all.h" #include "exec/cpu_ldst.h" -#include "hw/s390x/ioinst.h" -#include "exec/address-spaces.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #ifndef CONFIG_USER_ONLY +#include "qemu/timer.h" +#include "exec/address-spaces.h" +#include "hw/s390x/ioinst.h" #include "hw/s390x/s390_flic.h" #include "hw/boards.h" #endif From patchwork Fri Jan 6 08:28:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 639689 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp664914pvb; Fri, 6 Jan 2023 00:48:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXtmFzETf8ziBLtnSSgTrzNQss27niechb3ato6eWQ3cNWpOH4+8b5EZJOerOd31tpWV4kQo X-Received: by 2002:a0c:f951:0:b0:532:1f43:de0e with SMTP id i17-20020a0cf951000000b005321f43de0emr327631qvo.29.1672994939170; Fri, 06 Jan 2023 00:48:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672994939; cv=none; d=google.com; s=arc-20160816; b=As+5W5fY6swio12nojECxGLwdaW1ZEUnhMyaDsVu/vwF7E5tMZbzeVBvo/TQpR8t+J G6XcnvA4oj1lgVWatJo37W70Gofq9zO4EfgjcnbuZVqlqrheLhiydPgeQNCDYQs56ilu h4skiDs7QDr6l3+q3ye++GwP41ngvlrf72s4Fi7qgus5xVQsB81//6CHEp8F8TTvG7qE gMYvVH5cNXIAS4q5bWJYj0Hq7sQYS0kZFK+eWRZLNn4pcLUViO4x48BOxlTJbhkQookv iWAH5aDnFNLCYFtLCc+GJ4CqSBnX0FfT4huM/aIxZOP68Yy894BrvJq/2mWsi27aZBYN g09Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5rN5prbiwNVkagky0f0m4bmXXLWIfA30meh3PusUxRo=; b=qaaeA+pSeq8PTac7S2K7p2mk/cBUZhggcQ7ked4Bdqq+IKGIqEl3j+Cc9OyhJZgJOg RtgPNCBvaK89lz2LJpGEfX16k/wv32AB8yUIwB3QaNzyRrDBLOxi397iXI5TRWbFHzuc yx/vGXU5CxWoHy8bWUEhYojytyLUAbDcZnLDCA4LX6LhH4euDU4Wf5PpZKdAS5v3+Jga 9R3bvIJGgRoucTFrj4EswiOeejYdC6ru+b/JvsVq9GDhMLcZWVw5O9wZ9D+cOQItIHH5 VV0rn2oUx4Vei3eoQXIGBviyVjVMALkP5IYpY/4rQNqMeLBKcSxH0io9ecfk2W3r8LjI xOiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ubaoqm61; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 70-20020a370849000000b006fb9adac69bsi239403qki.736.2023.01.06.00.48.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jan 2023 00:48:59 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ubaoqm61; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDi6E-0002aQ-No; Fri, 06 Jan 2023 03:29:14 -0500 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 1pDi6C-0002ZA-Bp for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDi6A-0005Vw-RE for qemu-devel@nongnu.org; Fri, 06 Jan 2023 03:29:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672993750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5rN5prbiwNVkagky0f0m4bmXXLWIfA30meh3PusUxRo=; b=Ubaoqm6133cPrk2ENGln906dChB4NY8E9ZGgjd+L+DTls8KVFFS49OgoLsQLP223soHeVy ar3oqwxqpb7TUfQj6SWPWe/d8M8JUTXPB/91krDOdt4NyMPDiO6FB1SHyigun7gsb0sEWj 2wlsSbhovGjVdaRR6BWx3mdhcWJbbcg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-636-xOi0dPlUNeiwaX3S54cT1w-1; Fri, 06 Jan 2023 03:29:08 -0500 X-MC-Unique: xOi0dPlUNeiwaX3S54cT1w-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 22263101A521; Fri, 6 Jan 2023 08:29:08 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F9D9492B06; Fri, 6 Jan 2023 08:29:06 +0000 (UTC) From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Nikita Ivanov Subject: [PULL 08/15] target/s390x: Restrict sysemu/reset.h to system emulation Date: Fri, 6 Jan 2023 09:28:46 +0100 Message-Id: <20230106082853.31787-9-thuth@redhat.com> In-Reply-To: <20230106082853.31787-1-thuth@redhat.com> References: <20230106082853.31787-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé In user emulation, threads -- implemented as CPU -- are created/destroyed, but never reset. There is no point in allowing the user emulation access the sysemu/reset API. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221220145625.26392-5-philmd@linaro.org> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- target/s390x/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 96562c516d..b10a8541ff 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -26,7 +26,6 @@ #include "s390x-internal.h" #include "kvm/kvm_s390x.h" #include "sysemu/kvm.h" -#include "sysemu/reset.h" #include "qemu/module.h" #include "trace.h" #include "qapi/qapi-types-machine.h" @@ -35,6 +34,9 @@ #include "fpu/softfloat-helpers.h" #include "disas/capstone.h" #include "sysemu/tcg.h" +#ifndef CONFIG_USER_ONLY +#include "sysemu/reset.h" +#endif #define CR0_RESET 0xE0UL #define CR14_RESET 0xC2000000UL;