From patchwork Tue Sep 15 17:46:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 305334 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C38BC433E2 for ; Tue, 15 Sep 2020 18:03:34 +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 CB6A320936 for ; Tue, 15 Sep 2020 18:03:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zpmEWgCi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB6A320936 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIFIh-0007NF-Jg for qemu-devel@archiver.kernel.org; Tue, 15 Sep 2020 14:03:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIF2V-0001aU-CO for qemu-devel@nongnu.org; Tue, 15 Sep 2020 13:46:48 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:35623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIF2P-0007Ev-VA for qemu-devel@nongnu.org; Tue, 15 Sep 2020 13:46:47 -0400 Received: by mail-pj1-x1044.google.com with SMTP id jw11so172716pjb.0 for ; Tue, 15 Sep 2020 10:46:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CgkxfpFluTt5zP00GcUYEwa3CAXm7Xk+FBHChzy0F2A=; b=zpmEWgCirF8KjwwQDSKJfwZgkuT2iVXS1NlOvSRVb5Cx9hsFkzLmlLp2iJ0viknk8z vL19KqKveWhVkIzu78X5ZuF0Mt0a+oHW8KltVIw8UH0OE3BD+n5rG2n8IfiaSLfWRJiE LwvP7fjuTmsyMZcILNY9cfQ57pf/yIMovVtq4k5+7BOIkW0CX+ydSEXlYRB6MZ7PE7Ok eDXa+gTqE5yRCUgC1pPoK5u9l4VVO+6D1rqYdz7QMUKMGpZjr4aex5v2q+1ae83LsiNJ kV9Md5alKRKPcJXdZI2BXjXEtSGBM5giVGXj0QlYy7gCP9n2nrXjZMs0oj/0Mq67zBAo q44Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CgkxfpFluTt5zP00GcUYEwa3CAXm7Xk+FBHChzy0F2A=; b=HyXxg6rcpJMMUY3CU8uWx35Gwg0HuOq/ZqHQJOLPY6MYsSrWcBxpOBw32u46DMz0sk a1ExFBKUTSQ37ot3OV9zIUV7SyESdcrv+qbiJrTBSp+J/u7aTCSbq2ASSIxvygJq1TKq PV+/dXQ7utQtEkppKAAr1VTr/GRYo/LfZE7RvHtCRnoL9QwVPVJEfkDpWW9n8PQfEowr A0IVtPk/hT+HPgA5gfNJQjc+mEYXhVNEcD4w6hTzBaf05WkuWKcCxDPc4W86LMLVl/If 868lLTkjyKxS/t9WAVmuabblmaH3zMayASpSDYIm+bQsoyVzD5DSnYy1QbkqghejzbNg 7LYA== X-Gm-Message-State: AOAM5311mKxRwKBqE1XVcWH4S5ZkZjdzW85YxlXsNvc0u5uBGkuVfJZk OYGQfEbmK+OvJyy4Ep9iyc02OIGvw4Sh5g== X-Google-Smtp-Source: ABdhPJyll2fcIIC5yI7+NxgqoA40WIZITpzxLKEIM79bPHRfk1jspxv1JfACnk5r/pEfQ2rq1Py4hw== X-Received: by 2002:a17:902:6bc1:b029:d0:cbe1:e76e with SMTP id m1-20020a1709026bc1b02900d0cbe1e76emr20802506plt.21.1600191997994; Tue, 15 Sep 2020 10:46:37 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id cf7sm147896pjb.52.2020.09.15.10.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:46:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 1/5] qom: Allow objects to be allocated with increased alignment Date: Tue, 15 Sep 2020 10:46:31 -0700 Message-Id: <20200915174635.2333553-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200915174635.2333553-1-richard.henderson@linaro.org> References: <20200915174635.2333553-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1044.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: -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: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?b?w6k=?= , Eduardo Habkost Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" It turns out that some hosts have a default malloc alignment less than that required for vectors. We assume that, with compiler annotation on CPUArchState, that we can properly align the vector portion of the guest state. Fix the alignment of the allocation by using qemu_memalloc when required. Signed-off-by: Richard Henderson --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost --- include/qom/object.h | 4 ++++ qom/object.c | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 056f67ab3b..d52d0781a3 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -770,6 +770,9 @@ struct Object * @instance_size: The size of the object (derivative of #Object). If * @instance_size is 0, then the size of the object will be the size of the * parent object. + * @instance_align: The required alignment of the object. If @instance_align + * is 0, then normal malloc alignment is sufficient; if non-zero, then we + * must use qemu_memalign for allocation. * @instance_init: This function is called to initialize an object. The parent * class will have already been initialized so the type is only responsible * for initializing its own members. @@ -807,6 +810,7 @@ struct TypeInfo const char *parent; size_t instance_size; + size_t instance_align; void (*instance_init)(Object *obj); void (*instance_post_init)(Object *obj); void (*instance_finalize)(Object *obj); diff --git a/qom/object.c b/qom/object.c index 387efb25eb..2e53cb44a6 100644 --- a/qom/object.c +++ b/qom/object.c @@ -50,6 +50,7 @@ struct TypeImpl size_t class_size; size_t instance_size; + size_t instance_align; void (*class_init)(ObjectClass *klass, void *data); void (*class_base_init)(ObjectClass *klass, void *data); @@ -114,6 +115,7 @@ static TypeImpl *type_new(const TypeInfo *info) ti->class_size = info->class_size; ti->instance_size = info->instance_size; + ti->instance_align = info->instance_align; ti->class_init = info->class_init; ti->class_base_init = info->class_base_init; @@ -691,13 +693,21 @@ static void object_finalize(void *data) static Object *object_new_with_type(Type type) { Object *obj; + size_t size, align; g_assert(type != NULL); type_initialize(type); - obj = g_malloc(type->instance_size); - object_initialize_with_type(obj, type->instance_size, type); - obj->free = g_free; + size = type->instance_size; + align = type->instance_align; + if (align) { + obj = qemu_memalign(align, size); + } else { + obj = g_malloc(size); + } + + object_initialize_with_type(obj, size, type); + obj->free = (align ? qemu_vfree : g_free); return obj; } From patchwork Tue Sep 15 17:46:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 273663 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DD6CC43461 for ; Tue, 15 Sep 2020 17:54:12 +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 13C3B20936 for ; Tue, 15 Sep 2020 17:54:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TaLlC9Xd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13C3B20936 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIF9f-0004wP-1d for qemu-devel@archiver.kernel.org; Tue, 15 Sep 2020 13:54:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIF2V-0001ab-Ni for qemu-devel@nongnu.org; Tue, 15 Sep 2020 13:46:48 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:47050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIF2Q-0007FK-5w for qemu-devel@nongnu.org; Tue, 15 Sep 2020 13:46:47 -0400 Received: by mail-pg1-x542.google.com with SMTP id 34so2333369pgo.13 for ; Tue, 15 Sep 2020 10:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RffEK/rCiFhZmvHDae5MdJFHwlUbrlsn383XqLguch4=; b=TaLlC9XdIVfTMoQm3rz9h/eHKJYEEY+maapHUWmfYg/CZP3Dz3/SdTzBVaw1ml86vE gPqqTz+H7PsSeJ+8SELjbzYbsq4T65vIl11jt68HGDCZ31O0FX7aKNR4PW0SjI/n3wvc XVCuZ6M431p1qRphP6wjKgx+uVOKzM3AvbbwhYdrnkNNvmrALWNp7tKAGd3DiDatt8p4 47izxgxnZpQ1kR/BkzKF2eDMtNZaGPt0BtTf1rBDiDofVVMXFgGmAtXCG+wSV+iLuYL8 BrFwEgMGnlR2x6QCxdi6GC76nB7rzIZ6hSCy/eWynkghxhXQNVcYoGTDoZwrb6hj6usl SBzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RffEK/rCiFhZmvHDae5MdJFHwlUbrlsn383XqLguch4=; b=VUlzjGPD9qrCby7V+KLsD+IhdG+IONNemREQgH0lnpZARY6sPpR2TDkmS1sYR+u9D7 FzlXNASZjgCsWiS3q6tfxgMMGS0pSRwboBAf+yj7DvYYkxKoKWcsSogsQ8LCWv61JeJX rc+SQ8ZU9YImcxk9gwMY1Hl2e1s7h6hbba2wGPZIP392NrkUqYL7qEZpv/UI22Ox6xdM K2dt1i3JNrNrtKk4cNWc1g/bNqqIfgEEvV1Qx0JdDTMXpX+mFxYwFG5v7OVRM+Df7J5Q f0j1VX1/sp8f+xbr1FFkgrpXY9bdJqiwpcMGdv3Hqj7IkJH5aRto806pPulT1sx8vQO3 VbLg== X-Gm-Message-State: AOAM533cHMtpbCtOCyxms7MFw1B20RMvnMFSxH1d48nm47jH/1g9o6dX 3Yl7cTO6Vyjn9ot0K5gMMc3cGmow06pT9Q== X-Google-Smtp-Source: ABdhPJwxEn9zOSSmBwCSb95LTyQRoFcMQL2b33a9knKWkJeswQIGY1tuX9NHghBe/v1NldTsV5aj0w== X-Received: by 2002:a63:1a05:: with SMTP id a5mr16172117pga.145.1600191999169; Tue, 15 Sep 2020 10:46:39 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id cf7sm147896pjb.52.2020.09.15.10.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:46:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 2/5] target/arm: Set instance_align on CPUARM TypeInfo Date: Tue, 15 Sep 2020 10:46:32 -0700 Message-Id: <20200915174635.2333553-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200915174635.2333553-1-richard.henderson@linaro.org> References: <20200915174635.2333553-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::542; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x542.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: -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=unavailable 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: , Cc: Peter Maydell , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fix alignment of CPUARMState.vfp.zregs. Signed-off-by: Richard Henderson --- Cc: Peter Maydell Cc: qemu-arm@nongnu.org --- target/arm/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 7b5ea65fab..a7643deab4 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2290,6 +2290,7 @@ void arm_cpu_register(const ARMCPUInfo *info) TypeInfo type_info = { .parent = TYPE_ARM_CPU, .instance_size = sizeof(ARMCPU), + .instance_align = __alignof__(ARMCPU), .instance_init = arm_cpu_instance_init, .class_size = sizeof(ARMCPUClass), .class_init = info->class_init ?: cpu_register_class_init, @@ -2305,6 +2306,7 @@ static const TypeInfo arm_cpu_type_info = { .name = TYPE_ARM_CPU, .parent = TYPE_CPU, .instance_size = sizeof(ARMCPU), + .instance_align = __alignof__(ARMCPU), .instance_init = arm_cpu_initfn, .instance_finalize = arm_cpu_finalizefn, .abstract = true, From patchwork Tue Sep 15 17:46:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 273666 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3940C43461 for ; Tue, 15 Sep 2020 17:48:54 +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 67850208E4 for ; Tue, 15 Sep 2020 17:48:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kBFG5zie" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67850208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIF4X-0003yG-HT for qemu-devel@archiver.kernel.org; Tue, 15 Sep 2020 13:48:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIF2T-0001Zt-J7 for qemu-devel@nongnu.org; Tue, 15 Sep 2020 13:46:46 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:45202) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIF2Q-0007Ff-5d for qemu-devel@nongnu.org; Tue, 15 Sep 2020 13:46:45 -0400 Received: by mail-pg1-x542.google.com with SMTP id 67so2337500pgd.12 for ; Tue, 15 Sep 2020 10:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zb/g+Fvikq2LApYjpqfoFSuv71lvaud3AwPVH756moE=; b=kBFG5ziek6umJHHOGvYzci5tJyE9CPxBb6vyI3flzI+ZOz6WbjSG/Wt04UvpyBvaAR fheuhKJCdS3ddA3Iqi7AEyg3ahujPUjSSdolxW5sFeWOjUjDcJPKhAXll19vd8xMs3l+ nu/cc4lk1gw9w4LyG9uZh4m2Em9aATGCK5N0ne8ICYdYTgy0T5tVXMMJvziUAt8Sz2aU 5JCm+QrJ6esuUsXdvIkQ2ke5PnbWLTDJljWGmjevW+xzYLcYE1v6OdgjUPL1so8NCca5 dAvDWrIPKB9NyNreuRIJ9rEdXfFpX9B5O+eoVWRhM4ifRSMi6RTJFQHMqbRKRtBQXZ/F 3ZEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zb/g+Fvikq2LApYjpqfoFSuv71lvaud3AwPVH756moE=; b=Xep6c+rhBlH2sU/1jjL9HP/2zd1XJXHvBuFJe1R+YbFvpldK5urxp/DavwfoTcbYpA gLf/ZKMW1PcDZ/lG11N2bVeMB92FxHMGjFOd8/t2orqDw8wrgX7ZiyPVs5OsvokMvJn3 vGnYcBcDosWi1sy9YK4WUM8fLeXe4HRcAr7RQvaDqSzwKhd3B3CPVzRMndIoN7DzGMFG fiELTgFa1o1ebcdErd2akN8Uf7PmhJlkvoWrSI0XX+cREAjHEuyFVRkoqQOuO8scMruB LAWnUL86omvF5nCnlniO/ITAYe0rUJIF9gigvd3jWhNlt/9LEQJFssOMRBFJWlKC96Hc ByTg== X-Gm-Message-State: AOAM532MGpDCMA/0nHa1RwqZr2ie/37waUA7PJDMNUdr9srDw4uQpEjG SmZg2lWXRcv2B9NjWJ/VaZCiMClWh8IFTA== X-Google-Smtp-Source: ABdhPJw3BWkw4aLiFSYzXDuopVcGZbso73fpig8yQTG4xurwAInnErlR3N8xpKuQ0CpSrXRjVjgRNg== X-Received: by 2002:a63:1016:: with SMTP id f22mr15540135pgl.226.1600192000425; Tue, 15 Sep 2020 10:46:40 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id cf7sm147896pjb.52.2020.09.15.10.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:46:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 3/5] target/ppc: Set instance_align on PowerPCCPU TypeInfo Date: Tue, 15 Sep 2020 10:46:33 -0700 Message-Id: <20200915174635.2333553-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200915174635.2333553-1-richard.henderson@linaro.org> References: <20200915174635.2333553-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::542; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x542.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: -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: , Cc: qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fix alignment of CPUPPCState.vsr. Signed-off-by: Richard Henderson --- Cc: David Gibson Cc: qemu-ppc@nongnu.org --- target/ppc/translate_init.c.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/target/ppc/translate_init.c.inc b/target/ppc/translate_init.c.inc index 230a062d29..accb4f2fae 100644 --- a/target/ppc/translate_init.c.inc +++ b/target/ppc/translate_init.c.inc @@ -10960,6 +10960,7 @@ static const TypeInfo ppc_cpu_type_info = { .name = TYPE_POWERPC_CPU, .parent = TYPE_CPU, .instance_size = sizeof(PowerPCCPU), + .instance_align = __alignof__(PowerPCCPU), .instance_init = ppc_cpu_instance_init, .instance_finalize = ppc_cpu_instance_finalize, .abstract = true, From patchwork Tue Sep 15 17:46:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 273662 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2A2AC433E2 for ; Tue, 15 Sep 2020 18:07: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 E430920936 for ; Tue, 15 Sep 2020 18:07:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wIMVXKQ7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E430920936 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIFMI-0001Wp-15 for qemu-devel@archiver.kernel.org; Tue, 15 Sep 2020 14:07:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIF2b-0001fO-3J for qemu-devel@nongnu.org; Tue, 15 Sep 2020 13:46:53 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:45324) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIF2T-0007G1-8J for qemu-devel@nongnu.org; Tue, 15 Sep 2020 13:46:52 -0400 Received: by mail-pf1-x441.google.com with SMTP id k15so2351090pfc.12 for ; Tue, 15 Sep 2020 10:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dqbg1+YUD56oz0mEVRHEVZEpbEBWoWejpoX6YFZKEQU=; b=wIMVXKQ7A9wqMV6ahF3x93b67teFXTMtRtMBgKFJlMtmwUbP0oEe3XInieb3KuYQOG KiyAECgOBhhGh7lAmlBzF9JA5F2+IcEz84xSlAh78slltADr9TJS8wQ4+Mb51fSZ0fF1 OMINPJCzzzJwcHshlmNwReuj4YtxvFSIV0gWOJ2NM3OsWbc/L0Dvy4hN90ohEvJzokBO LjH/0YIMQ/q3+yir565kq1rzenX9UoEYl6c1XsGUpkuTBKTvtLCIOFP6ROTC5Be4gCNn t1gu72yQqYlI7hg+aznPw4jeectTZnlwy+2oIwhTeh6tLoSCMTUQCrCAL7D5ua+H5itn UthQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dqbg1+YUD56oz0mEVRHEVZEpbEBWoWejpoX6YFZKEQU=; b=Z2rgEU+1IHY8SzeBLgcroxZ5Jdj4GKocBvuUGhmajMHEzr9O9YT10QBPaNB+eARB9z DcDanMfniVjW3xMkC5mnWBFwdeJhfp9pf/HXhdV7AKsOzkyjWvpu3Rc1YEOOTGfd4yKd AuB88eSBMj6ZbXjICqNucVAyBuzSp89hBfq8aaJ5+D5a5uQ9Zu+0EUMz62gOArDtvc/p L/qwUkCRsSzAcFGehuk1IX1YQftOA9+DfMdahIMJ+qWo8zZhLxGpEWlRoe/Zk7akvCKF ra7LAz2I3kMPnmiGcOdGmTTN9WeaD1xjyTuAm7Ogs4gWWjnFqeo61Ob6lGoSS3xSCwd5 FC5A== X-Gm-Message-State: AOAM531M/HO8LOZ8dEQ1t41jl2qI+Ta+W7fkFGpqZo2KlFLj/lkjDPDW +eIuppnZcfFcxfHi1/qc2zK1RHGRSc3lzg== X-Google-Smtp-Source: ABdhPJzeP40a2R73hVlHspFFH3oT/sMTNQWEuJ4nQfNH1+17WZu5COItofZZYVlIQKycfXM1e7MZYg== X-Received: by 2002:a65:624d:: with SMTP id q13mr10219029pgv.237.1600192001890; Tue, 15 Sep 2020 10:46:41 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id cf7sm147896pjb.52.2020.09.15.10.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:46:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 4/5] target/riscv: Set instance_align on RISCVCPU TypeInfo Date: Tue, 15 Sep 2020 10:46:34 -0700 Message-Id: <20200915174635.2333553-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200915174635.2333553-1-richard.henderson@linaro.org> References: <20200915174635.2333553-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::441; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x441.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: -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=unavailable 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: , Cc: qemu-riscv@nongnu.org, Alistair Francis Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fix alignment of CPURISCVState.vreg. Signed-off-by: Richard Henderson --- Cc: Alistair Francis Cc: qemu-riscv@nongnu.org --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 57c006df5d..0bbfd7f457 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -628,6 +628,7 @@ static const TypeInfo riscv_cpu_type_infos[] = { .name = TYPE_RISCV_CPU, .parent = TYPE_CPU, .instance_size = sizeof(RISCVCPU), + .instance_align = __alignof__(RISCVCPU), .instance_init = riscv_cpu_init, .abstract = true, .class_size = sizeof(RISCVCPUClass), From patchwork Tue Sep 15 17:46:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 305336 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06C6BC43461 for ; Tue, 15 Sep 2020 17:52:38 +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 46B08206B6 for ; Tue, 15 Sep 2020 17:52:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TFRm7GpV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46B08206B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIF88-000286-Aj for qemu-devel@archiver.kernel.org; Tue, 15 Sep 2020 13:52:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIF2b-0001fa-6w for qemu-devel@nongnu.org; Tue, 15 Sep 2020 13:46:53 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:42447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIF2T-0007GS-9J for qemu-devel@nongnu.org; Tue, 15 Sep 2020 13:46:52 -0400 Received: by mail-pf1-x442.google.com with SMTP id d6so2362768pfn.9 for ; Tue, 15 Sep 2020 10:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JotyD3Qtuzk8QZcm87RVQJeRfD10PDp771HanSJw7Xg=; b=TFRm7GpV/Tqur/hNAsBGULyP9RhpLzW9LMYgch50eVr8abDtCo4Hl71F83GUwogm4P uomGjLgkG/WUsxXuKVlv8Zv3fa1L0wGbbmYgi51MzdmA/3w/O0mJhKAIlILFFU5mY8fW MKWQEcHH/wExKtXgqdWkEjqQ6XMNqqjZnSU9BWgwDGfPKlmgr1KJprX+w300tk3T8KYW 48/Yk1YxAIyNy5WN+BhFrXlAX3yzjxDSkZaK+pqChSUu0PgU4eVffvIxxDatBkz4Zkjq sOo7RuFsvLxvCpwiVPLSf0ys6+abKNULT3eGKEkB9HZSE2l1roTKtqb3ZaVDgT3n4sva inUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JotyD3Qtuzk8QZcm87RVQJeRfD10PDp771HanSJw7Xg=; b=XGxrGd4nqBIxdQJ+AuMcIHb/dglK5ra3q57zUGlNsAhxPp/DggMlPUaVdvGxVJjx3/ Ev/q89sNvRGTUJWWee/bQC1/m+QHqTFMJWvGKCtPcdc59v2P54s/SHPy5GdMpb+SFuPV 1fyALv5+Dyf2o5Ahw/Q59bSor0nOmk9Fa6c4edofRnYi7OoobGCMm0cqMgkGn2LLb324 0uUsv3Kh1GjvrmObq74Vp5hhtn7vUAjmLnRNRAiur0yivIGbgl/xl+u8Zqr2vzQmpcHh 51JYoXm3Qbcy3tXcOn/DR9MpzCcfJjDUo7QSP93BbTFGKVRMi2fuos9s9n32KLuTCiN5 Z5Lw== X-Gm-Message-State: AOAM532kReuvGz6E+QrBoczHwS8skF2fPloUYhJF3vxuECZCw55V+3Vz xgUntXaw7lJdOfsDH41eRYAO1+hEtm4Jow== X-Google-Smtp-Source: ABdhPJxXH6KOyPteR7lyoeVqBO5q8aZL4gQu9BXNKdb5awaGSTtuAVl5sndjARHnyma8PCEOWyGTIw== X-Received: by 2002:a65:5ac1:: with SMTP id d1mr13618608pgt.230.1600192003205; Tue, 15 Sep 2020 10:46:43 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id cf7sm147896pjb.52.2020.09.15.10.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:46:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 5/5] target/s390x: Set instance_align on S390CPU TypeInfo Date: Tue, 15 Sep 2020 10:46:35 -0700 Message-Id: <20200915174635.2333553-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200915174635.2333553-1-richard.henderson@linaro.org> References: <20200915174635.2333553-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -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=unavailable 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: , Cc: qemu-s390x@nongnu.org, Cornelia Huck , David Hildenbrand Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fix alignment of CPUS390XState.vregs. Signed-off-by: Richard Henderson --- Cc: David Hildenbrand Cc: Cornelia Huck Cc: qemu-s390x@nongnu.org --- target/s390x/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 749cd548f0..e350edc9f5 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -517,6 +517,7 @@ static const TypeInfo s390_cpu_type_info = { .name = TYPE_S390_CPU, .parent = TYPE_CPU, .instance_size = sizeof(S390CPU), + .instance_align = __alignof__(S390CPU), .instance_init = s390_cpu_initfn, .instance_finalize = s390_cpu_finalize, .abstract = true,