From patchwork Tue Aug 3 04:14:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 490889 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp320714jap; Mon, 2 Aug 2021 21:46:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLOrZJlEtIKY6ezcXF4zfPSOl1oOuStTmsf7G8uU+Ju/7IRfqg8xA1SP2qAZmDDGtx634D X-Received: by 2002:a6b:490d:: with SMTP id u13mr990127iob.176.1627965967482; Mon, 02 Aug 2021 21:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627965967; cv=none; d=google.com; s=arc-20160816; b=vb0bkxjOhHijGwBNpWpV494Ic+V3/4wVPGief9JqSRJyk0rTZz9X7hHJL9UjROUVb9 7FmLjiXKUTZL40t2cxpo2ewUzi5OLCGYJ8Sl4aMprwnWDCFb5c0P1y0CSwSzR5uRZlS9 t3AOoa3Fe96hpRgY/vFrD6IIXJVw+tDBxrhK6zbt6u/w7meOS5YWdVtr+N3AwPM9nkTt whlbjDcZheYe1xCsqUeb1Br+Kv/82LJMx9ulTPNWBRmEj5VYQN9XhEGirZ+ROLbk2JpV HWFNjtsRmoEfOgnIvrq6eIu2TptVOBhWFE88YKc/o8HBa/dQVS6Ue2YLMkQYGhGwz74v VvpQ== 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:to:from :dkim-signature; bh=hlGCWa0qcgLrvcDvhZ/cxV3hMg29OCBmykjODrlctgY=; b=wT+aFHBFR2Bo+KTFgCMFk/xfYCT5/QXAZd8yBu2F58KZj8WGDGH3751CgduQnXxAfG 3XKwZJsBpVw4BJbpwBxQPy6r0+TQqePYmxvrlqPmRyJ1+vyqBZRBAflgCtdj5aUsIYrJ A9CbBKn+ybr0k03nKTLJnvEeBvzx8Q4PoHyNf0PEwBc9Rf59mav0994PI6iJb8uMCbQq 6mhCqAlZ+tZhNVcI+1kFY/ZSR+6orfDO6XSimHFh+t1xRR+MI/3CbsVXZwczWu2/i9Yi P6kJ+8pA50RuUkFHIlQ6pOsj5QZDcdWHbScXera9hZFzUBArpPSen5NArIAaovSSC+JX bkRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dLro22+l; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y1si14885265ilm.61.2021.08.02.21.46.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Aug 2021 21:46:07 -0700 (PDT) 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=@linaro.org header.s=google header.b=dLro22+l; 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=linaro.org Received: from localhost ([::1]:59778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAmJa-0004Xj-PD for patch@linaro.org; Tue, 03 Aug 2021 00:46:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAltA-0005wh-Me for qemu-devel@nongnu.org; Tue, 03 Aug 2021 00:18:48 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:34784) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mAlt9-0005KW-3E for qemu-devel@nongnu.org; Tue, 03 Aug 2021 00:18:48 -0400 Received: by mail-pl1-x629.google.com with SMTP id d1so22190715pll.1 for ; Mon, 02 Aug 2021 21:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=hlGCWa0qcgLrvcDvhZ/cxV3hMg29OCBmykjODrlctgY=; b=dLro22+lW30tYSQBdAUdCgSqgRSF1C0Wz1Nv1jDGYiqDzASPXg1LbHge0pPXtWgLKN 2hEXrkv2EHIah0rnRZ4AhAq/HAt8SbfbEtGhdmmlIH1ZiRW9/W1np5h+urD/ybs+FvPe 0AEYo5L2JzDSkFu2tg5fZyKcE6iuFR5MR02g5TNv5j+GInN/tfmrRvxszJKEpl3M6/eW +F4LuO5iZyRwm8mRPvRFyokQaT4ux+Bhwr+QVJAqisG4mKneVyQFFtn3wprf7G7/wjqb GC699L4lCP0LvZWhkfe5Vajv3MGmZDB72PZWkm8eZtH5hMCe52t/lFtNbwmzv1IKRUqJ qOkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hlGCWa0qcgLrvcDvhZ/cxV3hMg29OCBmykjODrlctgY=; b=uMpuX+O2IwHTgVyiHXpwIQ+Q1uRGuzJszL2F2T5DrdMZ+mk30prXDBYS9m5PY4r8nI w+KwP0Kg4tTmcN+KO/1/KhpE+Mrs9mui4bmDBKB+XoOMkWG0OaLGLM5SoQPCSTkPxXxz ki43HI213L8TqPEAr+7EO6RiFxgiDznCaCb6OQXJci1Qyc+M+BYKFpCb3qrIIg8DQNmI nrVoX/lD/lgpa7Rfl7xEKFDjFO0LcicMxyiesuv1onKgwBHNXaHM2nxXASV6zoI9PfeD HvLcKxgz9oU8+4jnTXegrR2Ehz0lP1p4HblsqZHQ+VtHIORa4jkcYcdTkBgzgbdj7GM1 xIzw== X-Gm-Message-State: AOAM532E9zn+tN3qIFjP2snKsSykvg67aTsaIsf5BbgN59xOJPVyiow1 6tlTUjps2HS6tmXQD3dYeFrDpDWP2erVbg== X-Received: by 2002:a17:902:d50d:b029:12c:80c1:3f29 with SMTP id b13-20020a170902d50db029012c80c13f29mr37792plg.70.1627964325896; Mon, 02 Aug 2021 21:18:45 -0700 (PDT) Received: from localhost.localdomain (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id ns18sm12091020pjb.31.2021.08.02.21.18.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 21:18:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 50/55] hw/core/cpu: Add prctl-unalign-sigbus property for user-only Date: Mon, 2 Aug 2021 18:14:38 -1000 Message-Id: <20210803041443.55452-51-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210803041443.55452-1-richard.henderson@linaro.org> References: <20210803041443.55452-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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.23 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" Actually disabled for now. Will enable for each cpu that supports the feature. Signed-off-by: Richard Henderson --- hw/core/cpu-user.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) -- 2.25.1 diff --git a/hw/core/cpu-user.c b/hw/core/cpu-user.c index 62037e8669..23786865cb 100644 --- a/hw/core/cpu-user.c +++ b/hw/core/cpu-user.c @@ -11,12 +11,27 @@ #include "qemu/osdep.h" #include "hw/core/cpu.h" +#include "hw/qdev-properties.h" #include "cpu-common.h" /* * This can't go in hw/core/cpu-common.c because that file is compiled only * once for both user-mode and system builds. */ +static Property cpu_useronly_props[] = { + /* + * Create a memory property for softmmu CPU object, so users can wire + * up its memory. The default if no link is set up is to use the + * system address space. + */ +#if 0 + DEFINE_PROP_BOOL("prctl-unalign-sigbus", CPUState, + prctl_unalign_sigbus, false), +#endif + DEFINE_PROP_END_OF_LIST(), +}; + void cpu_class_init_props(DeviceClass *dc) { + device_class_set_props(dc, cpu_useronly_props); }