From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168141; cv=none; d=zohomail.com; s=zohoarc; b=kcSsKp/eqjNk9SCS3C+NHp7lYZIoBBqYsXccjUfNg2QoicnwZR85LmTeLPvZaz3l1XwxfngymhV5Ls+X0IeUFDCyV2G5dmpaAyHF0cnkUbTxqMXbtNWIfF4A3SM2aQfBvyz0s3+rSYDLDpraXj0idwkuYP12iBGiZ7aZjTTOvpA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168141; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=c6ExD2X3dcz39DGT8m+VPmBHG2joiEfEyC25pZS66FA=; b=FhcpvvF/7zxVOXgm1gPZA0tN5Lori00dxxcVvOy9Tm8q6Hml31q09oUsRI2+7qtoJbXbF+xWIiYKP66cj7FFvorNtOA7gE3l9TGRgdj1H/31Q43KR7mjwtYsELMWm0bAx7yXrY6uWwEOYprLnIocQdwon5jPQgyQhzPJUP1h2co= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586168141415575.5449653360174; Mon, 6 Apr 2020 03:15:41 -0700 (PDT) Received: from localhost ([::1]:58072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOn6-0003TC-25 for importer@patchew.org; Mon, 06 Apr 2020 06:15:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50161) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOjs-0006oB-Jd for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOji-0002g5-Fv for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:20 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:42401) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOji-0002fD-9V for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:10 -0400 Received: by mail-wr1-x441.google.com with SMTP id h15so16686682wrx.9 for ; Mon, 06 Apr 2020 03:12:10 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:08 -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=c6ExD2X3dcz39DGT8m+VPmBHG2joiEfEyC25pZS66FA=; b=DOTaqpwIB1CAM2f39AnxbIyj6+33v2qPR0V28uC1RWqtslsOqYr5Tc/zAr2wqVI3Lf BL1Fb6Df+K15erLciRgvG/D8+H2qZEeO1jQKPwNxo5wPCl0REp2lgifZMeMHBTq/S2s0 +7KjxYZ//X4xDFUAnYCxaSdycFFkJprmtnCx6IizP52V5C3qoDs5UJToAArIsQz4ZJ/e nlp4ZGz+TpxM29WG338qGT7nQU2YkzJ/0LGQcbqJkSmoEj5Mkg1ufRv3HNrhT1VuAJfM Cgf6BhKZ9Wl858P/vEovCrYUmaRQw76qja/JHG0DZZJayL685r/usuc4PPxo9b0kjJPa BMMA== 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=c6ExD2X3dcz39DGT8m+VPmBHG2joiEfEyC25pZS66FA=; b=DLh31y4yJbAVmX/d64sG9eyARY0OhnD/0mUKax48ouKeLRQn4/2LRXSPKZSB4xuxd0 LeyJQ3dezkC3wsE49JzDvGHlcesCuid0O97X4ypG5XXqi4yiKMeY4X5JZyk00AmVMA06 oHG6Ttl+dCJ0gBydAFLzzimaEXNMi/o6j9bvQudjP2Mj3yiOr2TU5ayyYgnaURZSNXvS tJCm395OHxGq3rOCN0t9vC1ZMFIPCYfublFaBw6EsYRRNPJ69VBCrXC2vKmYSa92L1Je XP61bN6Y5i5qWSW4qZ7L1AJewSasTGzDY6C2tjloy54uFk6mRuN759GIsVKmNwruvqkP 7xGQ== X-Gm-Message-State: AGi0PuYUbwuvw8qgt4sp3hIn1U9nmR5dkI5tSfl+P6vwzwoCZwdJ1aAp tkgbD4m+Oehv2nX5R7EvrB3V9DFnMLZULQ== X-Google-Smtp-Source: APiQypI3bY8gXArc+U8L7W4dCEZVpbrUxwuCbR7Q74lBCRCsue1hNEjJtaKz568lfvcsXANrIaJ81g== X-Received: by 2002:a5d:5707:: with SMTP id a7mr19360994wrv.108.1586167928812; Mon, 06 Apr 2020 03:12:08 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/11] target/arm: don't expose "ieee_half" via gdbstub Date: Mon, 6 Apr 2020 11:11:55 +0100 Message-Id: <20200406101205.23027-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Alex Benn=C3=A9e While support for parsing ieee_half in the XML description was added to gdb in 2019 (a6d0f249) there is no easy way for the gdbstub to know if the gdb end will understand it. Disable it for now and allow older gdbs to successfully connect to the default -cpu max SVE enabled QEMUs. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-id: 20200402143913.24005-1-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- target/arm/gdbstub.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index d9ef7d2187c..8efc535f2a0 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -192,7 +192,12 @@ static const struct TypeSize vec_lanes[] =3D { /* 16 bit */ { "uint16", 16, 'h', 'u' }, { "int16", 16, 'h', 's' }, - { "ieee_half", 16, 'h', 'f' }, + /* + * TODO: currently there is no reliable way of telling + * if the remote gdb actually understands ieee_half so + * we don't expose it in the target description for now. + * { "ieee_half", 16, 'h', 'f' }, + */ /* bytes */ { "uint8", 8, 'b', 'u' }, { "int8", 8, 'b', 's' }, --=20 2.20.1 From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168024; cv=none; d=zohomail.com; s=zohoarc; b=RP9U/IdNxgn7RTFrS0Y0rK4zb44+/F47pWwusBo5PDHsix30Hzx38BNRTq9xL4R8YfWirrrnJA8j/hkAOtbljp0utbXXKFF7PkBQiRyypDQcMqCFp0UDaqxsnBgHbbskbcJ+IkeRyXvrioXeTmAs1jNE/R3PGTY1XAo5+M1py5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168024; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PK57Fc2V7JwfxoVRwYEuCtw0T1ACQONhmzqVf5av14o=; b=YemMIbgXCErc7QVNkNYWNFZ49Yy/4C+CwAyy/4L0fp9ipYN10KFWzKJj7Do3eX9y2KfkyK6XD4zd83DN98/WOCvZdnc/KBWYOTXMy/0Bj3TOgira9gmJz9zE+G27nnuGUkb3KgbI5eHaarc33bYDYbWw5I0GHgokKiFix8LagcM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586168024902883.1760495042421; Mon, 6 Apr 2020 03:13:44 -0700 (PDT) Received: from localhost ([::1]:58004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOlD-00082Z-Jf for importer@patchew.org; Mon, 06 Apr 2020 06:13:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50065) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOjk-0006g4-Jf for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOjj-0002hN-CW for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:12 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:50423) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOjj-0002g6-6J for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:11 -0400 Received: by mail-wm1-x343.google.com with SMTP id x25so2982198wmc.0 for ; Mon, 06 Apr 2020 03:12:11 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:09 -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=PK57Fc2V7JwfxoVRwYEuCtw0T1ACQONhmzqVf5av14o=; b=bw8u93gqMEmsEMXERPMeveWm1C06rE1kir4ArkHbjlKr+CEbLY5LnrMgoUYg3YBuuD DBAJKdaa7lYROzSoIl48WmY8LsnODvW9oE7W7I6p5PbK/DhGngGlqxhe/83dMwEiiuZb mR2xF5WOILfuCzDolwkyBOziboonJK9zWFr3FkwBV1tb7A8h5GQfCdUZOiGmNB8eJRA2 4BE1ZrG8gwNzvrqVf3fEhLrpVmS7DTpbchujMdQqijh6DZOfDXewQXo5szjhkEPXAiV3 wByoHpABLkFr2Y7uLDBSqazGMuv1JFGz9h2pAIXaG3mMOYBRRzebgOcxyvfnEb7pEw9T PjmA== 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=PK57Fc2V7JwfxoVRwYEuCtw0T1ACQONhmzqVf5av14o=; b=HyrCyvIzpp/EbGNdco/Df3/4MoBblzRW8niui4TwZIU+/67eibDFFLKMdQVKja1pRJ BZ/PN5cdTinLM/jj2xbBkStpk0NtHzVt5oK9Fny8/xBTZvFDTVFOSVaeWV/+tqHQRSF5 7RngyWzUzZ+DGUrtIMVq3UDsfhYA6lKQv/0Suy0687QqeZOijC3opxsf1xCbwfBaRioJ SqiPBvwUIUM+rDFCGsacVXopKbmPwQcpx5zbcxxim0qK+iy32uFnKiGhmJtSZy9luIYt 6g57BNHJ/nn+nfKbdbks78jb/H1C8FDNIg/L+iTKxewSbSUoJtVurhsOaVaiYKuvRdef aQxw== X-Gm-Message-State: AGi0PubHLJh6qOwtaoFriLTfZNFCFbwRFl/BQIGU/QZ+8ppKSuUMslrV 4rpqtbkVNqleN5997o1pQMOiLW2IUR+GDw== X-Google-Smtp-Source: APiQypIoECAN+jFdnVcEaoBKwcgQ4d3SJPeX188M1PM9G0Lql4BmUk4hd1LYv5A5KjaVpW0OR6qzuQ== X-Received: by 2002:a1c:9aca:: with SMTP id c193mr21176800wme.38.1586167929814; Mon, 06 Apr 2020 03:12:09 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/11] hw/arm/collie: Put StrongARMState* into a CollieMachineState struct Date: Mon, 6 Apr 2020 11:11:56 +0100 Message-Id: <20200406101205.23027-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Coverity complains that the collie_init() function leaks the memory allocated in sa1110_init(). This is true but not significant since the function is called only once on machine init and the memory must remain in existence until QEMU exits anyway. Still, we can avoid the technical memory leak by keeping the pointer to the StrongARMState inside the machine state struct. Switch from the simple DEFINE_MACHINE() style to defining a subclass of TYPE_MACHINE which extends the MachineState struct, and keep the pointer there. Fixes: CID 1421921 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200326204919.22006-1-peter.maydell@linaro.org --- hw/arm/collie.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/hw/arm/collie.c b/hw/arm/collie.c index 4992084a3f6..4b35ef4bed6 100644 --- a/hw/arm/collie.c +++ b/hw/arm/collie.c @@ -19,6 +19,16 @@ #include "exec/address-spaces.h" #include "cpu.h" =20 +typedef struct { + MachineState parent; + + StrongARMState *sa1110; +} CollieMachineState; + +#define TYPE_COLLIE_MACHINE MACHINE_TYPE_NAME("collie") +#define COLLIE_MACHINE(obj) \ + OBJECT_CHECK(CollieMachineState, obj, TYPE_COLLIE_MACHINE) + static struct arm_boot_info collie_binfo =3D { .loader_start =3D SA_SDCS0, .ram_size =3D 0x20000000, @@ -26,9 +36,9 @@ static struct arm_boot_info collie_binfo =3D { =20 static void collie_init(MachineState *machine) { - StrongARMState *s; DriveInfo *dinfo; MachineClass *mc =3D MACHINE_GET_CLASS(machine); + CollieMachineState *cms =3D COLLIE_MACHINE(machine); =20 if (machine->ram_size !=3D mc->default_ram_size) { char *sz =3D size_to_str(mc->default_ram_size); @@ -37,7 +47,7 @@ static void collie_init(MachineState *machine) exit(EXIT_FAILURE); } =20 - s =3D sa1110_init(machine->cpu_type); + cms->sa1110 =3D sa1110_init(machine->cpu_type); =20 memory_region_add_subregion(get_system_memory(), SA_SDCS0, machine->ra= m); =20 @@ -54,11 +64,13 @@ static void collie_init(MachineState *machine) sysbus_create_simple("scoop", 0x40800000, NULL); =20 collie_binfo.board_id =3D 0x208; - arm_load_kernel(s->cpu, machine, &collie_binfo); + arm_load_kernel(cms->sa1110->cpu, machine, &collie_binfo); } =20 -static void collie_machine_init(MachineClass *mc) +static void collie_machine_class_init(ObjectClass *oc, void *data) { + MachineClass *mc =3D MACHINE_CLASS(oc); + mc->desc =3D "Sharp SL-5500 (Collie) PDA (SA-1110)"; mc->init =3D collie_init; mc->ignore_memory_transaction_failures =3D true; @@ -67,4 +79,15 @@ static void collie_machine_init(MachineClass *mc) mc->default_ram_id =3D "strongarm.sdram"; } =20 -DEFINE_MACHINE("collie", collie_machine_init) +static const TypeInfo collie_machine_typeinfo =3D { + .name =3D TYPE_COLLIE_MACHINE, + .parent =3D TYPE_MACHINE, + .class_init =3D collie_machine_class_init, + .instance_size =3D sizeof(CollieMachineState), +}; + +static void collie_machine_register_types(void) +{ + type_register_static(&collie_machine_typeinfo); +} +type_init(collie_machine_register_types); --=20 2.20.1 From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168426; cv=none; d=zohomail.com; s=zohoarc; b=SppME+Ozvw84fceTWeVDAMPPIHXp7zrmamb29XgociFkAFk3aLblrcS394UlTYYnJVZOjDyO/xzz6dgaAUXyL8zk9gel1NNguSzbBTlZy/OqZQRmHp8pLv72i5GfkyU0aLhocNQfllxkPoDRjs10KSjIdHA9sWgzxdrVJ7rugJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168426; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XHntAqqIp1yfMbfyBLD5YWm//CZBIX/1MEhVYEjrpFs=; b=RJGZ3ScM64LB2X1/PieC1VNCCv+7DHHEe3U5wchyb2Wst/fs3LwuRYGA2sjC7d3BsanMVd5BmQ51+fRZTwkZunCVRVBwznE9ROLM7tDW/weCuEys2m9WVJ3kwK7Q/hQTvpAwJ8XipFZN2S1KEpyHXH7qC+Y02Qx1j7WGlhqaZHo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586168426252978.4277954598753; Mon, 6 Apr 2020 03:20:26 -0700 (PDT) Received: from localhost ([::1]:58202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOrg-000449-W1 for importer@patchew.org; Mon, 06 Apr 2020 06:20:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50075) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOjl-0006gf-Ax for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOjk-0002i1-57 for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:13 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:37830) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOjj-0002hK-Vb for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:12 -0400 Received: by mail-wr1-x431.google.com with SMTP id w10so16771017wrm.4 for ; Mon, 06 Apr 2020 03:12:11 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:10 -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=XHntAqqIp1yfMbfyBLD5YWm//CZBIX/1MEhVYEjrpFs=; b=Vcxb52GkSpRKJAWaiDHF/Bd+fmqJVXzGbyy4dxsyA2b7kvNfnXsi2yYcb+a3Trycus Y7wye9MkQzSGe6io6uTQOpslQaP0W6CkgZIdKw8uGXBWNgcNCkEedRtl9djXBh06Ci0G RBjUqTpxzHbU2xUO43PxDzTejKC7qBBmnU5w/EGlX4/TamY39XnIMObN41o8miarqwDp E8AsH1uie6cZ+xL1ZrXfqs968Y1T+fV4hiO+xV7HvMwfSwM6PGhpjwA4pA4gwD6/OMGj 3l9FPdR44PbMtH2NeitXmS+v9F88gD6151ENOegK3HMvlxOi8ph9T8nulxGKhqjXcLhu 7mQA== 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=XHntAqqIp1yfMbfyBLD5YWm//CZBIX/1MEhVYEjrpFs=; b=KWCyPUoy0scpu7bzVRghqB+U6unG09D6qiXfNbG3N2izODVQQg4n27JrQlQKiWcKyi rGAFMqewuiQiIFNDgnkzlbIXdfr6ZSx/kTmC9dD6kxgcV6ugOIXDO3USbXx1wEI1KW42 6I4PV/2e3yWDDEmXAifaiO01PBldX77VpbceSDEbn2P5BCMUjunVW5RRXwOL27g3JT6G AJlTdGe2qwfuAO067FDVSf2R2V/YAjpttkJ08cE/VSTkFUeIvXy4R48/SWwr0SFsIiL1 DOHWahYiBEBN+Tji/QGWVvSm63IYy3U1I4baIsiAHFgigO88jY0q9ZlQXhnEWOExf8gv IE9A== X-Gm-Message-State: AGi0PuZT1CwOmN3nok4pWMVyx00XJ0qSMes+THUgx+XmP2Cfu8CAvhhA k1GkbmZ0UGBIWnJU61jfgY5tqdltv59rEA== X-Google-Smtp-Source: APiQypJEbgcdvqTYjrRfS6/cN73CIWnVKpVhNpbKylDZo2eeArZhS7I7ZiZ7xrpHqzhu6eV0kYGGJg== X-Received: by 2002:a5d:4ad1:: with SMTP id y17mr22302128wrs.13.1586167930689; Mon, 06 Apr 2020 03:12:10 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/11] target/arm: PSTATE.PAN should not clear exec bits Date: Mon, 6 Apr 2020 11:11:57 +0100 Message-Id: <20200406101205.23027-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Our implementation of the PSTATE.PAN bit incorrectly cleared all access permission bits for privileged access to memory which is user-accessible. It should only affect the privileged read and write permissions; execute permission is dealt with via XN/PXN instead. Fixes: 81636b70c226dc27d7ebc8d Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200330170651.20901-1-peter.maydell@linaro.org --- target/arm/helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 163c91a1ccd..ed7eb8ab54e 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -10025,9 +10025,11 @@ static int get_S1prot(CPUARMState *env, ARMMMUIdx = mmu_idx, bool is_aa64, prot_rw =3D user_rw; } else { if (user_rw && regime_is_pan(env, mmu_idx)) { - return 0; + /* PAN forbids data accesses but doesn't affect insn fetch */ + prot_rw =3D 0; + } else { + prot_rw =3D simple_ap_to_rw_prot_is_user(ap, false); } - prot_rw =3D simple_ap_to_rw_prot_is_user(ap, false); } =20 if (ns && arm_is_secure(env) && (env->cp15.scr_el3 & SCR_SIF)) { --=20 2.20.1 From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168555; cv=none; d=zohomail.com; s=zohoarc; b=brnYQJyuIEHMj1JAREF4jskY3BX4Jh6/V7/Ax4GxNB+skBuDrTjTBYYgUCJ1PA1I6YhoP1o3VkVEk0KJZcV/DO9Xbo40lJa9qW59BKIvoyzldJY+16IBINjK8g7DkcrbtKcnLIqvskEKRF3OsDSsEH8w4oH+dAILJnoFUBmy16k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168555; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1os58X9O5B3YRJFqijwCBzsCpTekZV0iyTSPE0tYIm8=; b=a0QIwpjpiygVsBbTmnkCCPgkVCIYE+LlaEtilL3V/Ppe1hWENJYPgwDoNFzQGRQOCOuVNLoYyPB/dtasiV7XKnh4D0HYsCqjeCP7oZDt3tux7G/c945mtsBoT0zX+FKJKD/pcFwgw9yFcujcZ3tP1uNtmOJ9Fp9w0WbH1GrQccE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586168555522719.4403056972931; Mon, 6 Apr 2020 03:22:35 -0700 (PDT) Received: from localhost ([::1]:58258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOtm-0007bz-7G for importer@patchew.org; Mon, 06 Apr 2020 06:22:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50086) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOjm-0006gw-1h for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOjl-0002jK-44 for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:13 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:35193) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOjk-0002i8-UH for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:13 -0400 Received: by mail-wm1-x32c.google.com with SMTP id i19so15182442wmb.0 for ; Mon, 06 Apr 2020 03:12:12 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:11 -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=1os58X9O5B3YRJFqijwCBzsCpTekZV0iyTSPE0tYIm8=; b=DkeuX7xPkK4Pjilv/41VGb+kbIxoYiIstUwqIVxpCJCDu47Yf+zutZcQ3MVDs2ljrD GcXSxHFFGwwSz4+GDClh1q+mHSwNreyOV/DeLl/LB6KU5xjKmsGPhRxFgH1Zg4n1JUVb jKpTIIjLyR/dTQrFhbauuBma/g9317VTmOtpfulzsNvRTjSKYNrOFbd+Qf1bpD9d9iLy MgcbnoRZ8HMc7dQ+NmQD+dJsg/Le/CKY6vFiUHS9M2lppmn/s4T61dM0VYw7NqQVqZ2V uMaVDdRr2vjz4sG1y5yfxpyCUoA+91HGnxxH5jkyciVOrrdXa5paloorhoRcEx8k8UUp nypA== 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=1os58X9O5B3YRJFqijwCBzsCpTekZV0iyTSPE0tYIm8=; b=WNaEBPdWGIKptmtOKI+xcLiBfzodmaLAxFM6aBMPZcBxBtH+POxf1SwbK8yD3+vMk2 EOrdcE3GA+3T+YKSIPF6qUPckNNLJCzqX37uBWTuLKqjkuGWsBTAqIXgSIBY9aXO995Z PsfY9V6KR+KrlynKVT/MLlLuj7v+d1TT5hVPufezO+46IgAoQpQ21Bd+HPh2LWmh492I /pkgHE48UEqnKFL27vM6cXMd24S9HfJFJkDqkupidcUO3Dho1d09LpGK4MzinlIwvus6 BYQd0XVucvGeNb89WyHqhr5A2nndDi8wO69HCz+gfc7RJu/dFUyFh0J8ZsfkzRHk7qss fWwg== X-Gm-Message-State: AGi0PubfvISCrXaYrXKaqW2+ihHQ3sMpoCP/9BRUax4HngAjUFn3YXmH qbCIiqfPgZO9m7MN0MvkmyXxcTkA2uBFJQ== X-Google-Smtp-Source: APiQypJsPkDiWsWmHSLfbwlzzhoRHeTMoGAZG5p4/g1RxIvQ8XZWkomxpenIdIikvd2Fs/nQshHG0g== X-Received: by 2002:a1c:dfc2:: with SMTP id w185mr5161151wmg.1.1586167931645; Mon, 06 Apr 2020 03:12:11 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/11] target/arm: Remove obsolete TODO note from get_phys_addr_lpae() Date: Mon, 6 Apr 2020 11:11:58 +0100 Message-Id: <20200406101205.23027-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32c 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" An old comment in get_phys_addr_lpae() claims that the code does not support the different format TCR for VTCR_EL2. This used to be true but it is not true now (in particular the aa64_va_parameters() and aa32_va_parameters() functions correctly handle the different register format by checking whether the mmu_idx is Stage2). Remove the out of date parts of the comment. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200331143407.3186-1-peter.maydell@linaro.org --- target/arm/helper.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index ed7eb8ab54e..7e9ea5d20fa 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -10753,12 +10753,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, t= arget_ulong address, bool aarch64 =3D arm_el_is_aa64(env, el); bool guarded =3D false; =20 - /* TODO: - * This code does not handle the different format TCR for VTCR_EL2. - * This code also does not support shareability levels. - * Attribute and permission bit handling should also be checked when a= dding - * support for those page table walks. - */ + /* TODO: This code does not support shareability levels. */ if (aarch64) { param =3D aa64_va_parameters(env, address, mmu_idx, access_type !=3D MMU_INST_FETCH); --=20 2.20.1 From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168129; cv=none; d=zohomail.com; s=zohoarc; b=kDxkErdKqy35bQAbylW1XLJszPzFT+Vhs8a0Rvvj1Epsr2/OOPPNpo/bVRpPEgiKkf67AEXRRG30L7FRx+GwidSD7W/XI8XAPUfYif7LPQaSa0vLK8Lf5Wcwvop4Cxmp6mZTJ4sJNSrdZZKyBjQXEP/czZjwK7ZmHzGKy/K1GIc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168129; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UsmjsPrqu/tMkzebNtgKAC7Wj/hA5gO7KEKMoSm+cTo=; b=ip+OcJ2aOY5t7v7Bp/y+ne7adfdYpOGlngiykmZeQm/ZTyd/i3FjjvHwqGjLrOGPS7AkP1KANyNfuAoHA9qBPm4xU4q2i+45hwyGXDMaKPK8hUZd5I2UUOVk8VjqzlePLPgYPJH50diqaST50UQZcI+YTFuXCNtxkbaoSVzqwSc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158616812998590.57911831370086; Mon, 6 Apr 2020 03:15:29 -0700 (PDT) Received: from localhost ([::1]:58064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOmu-0003D1-QT for importer@patchew.org; Mon, 06 Apr 2020 06:15:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50100) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOjn-0006ij-CL for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOjm-0002ki-Ag for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:15 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:40186) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOjm-0002k7-4U for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:14 -0400 Received: by mail-wr1-x443.google.com with SMTP id s8so14576850wrt.7 for ; Mon, 06 Apr 2020 03:12:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:12 -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=UsmjsPrqu/tMkzebNtgKAC7Wj/hA5gO7KEKMoSm+cTo=; b=rGq0gr2T54Kd376rXedZbjxb4QI/1ZqMBU9/jImwIc8eLcou3oMlki44pt7j9KBkHH IH9F4dz/NDTuD2fWmLGxWGHWJ2ECIRaDacG8JF1UvGaOWxf8xSYSbKbozC8eeHEFRMH2 ohKg0ryuhQDROZzSEQzl8gr/rzI1dNsUr0Fe7ZwdA2TukrPdGJokgNfuvu8VKxyU27jL MU8U9qQeu5L+8Pn6DmrhVnmcYUAF1DSlcy93Ym2nTl/TxIyJhZNJ6lseR0uUgOj3cw3A O5X2ZEY42dcaUmFXeiompj2SgHBBIYhxp8nilwF4JTjglaKcaxWTnkIOjPm4nY4BzWdV nqAw== 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=UsmjsPrqu/tMkzebNtgKAC7Wj/hA5gO7KEKMoSm+cTo=; b=tKKDEYBIeOGce1On0xeJ5EE1jHF7MMB1lcjM+ZMuHNQhnLv/cIsK8RLcWJoETDqWCC YAMXIZNBEbdEaXvsjV1LxWsaMeBQ9lDYwu9Y6zT+FnMpTj2scbvmhMhtZELLnWu4D6j+ CFx57lBix8M01Kuz4gA37VyRl4z1qT/b7BOheujKqPmd7lRgm5FYQTfTHou4YbJ57KYN 5awWWiwClmI9RuHg8EuTSUg1ANJ5efC8ymol+nFQ6/R53XviOeo01TarLp7q04piKFxf 8edwHIv1vN8TlcTW9t1vLUl6PROItRPrcJWc0n8MN1ItfgAbB+dw2bZ0KLRRpOmCuymz zXQA== X-Gm-Message-State: AGi0Pua1CKYw47qbs95jCn3T/sT3pFi1CvHDoLARB010Jxyu2LmkO3uv E1cHXWqWb+hzeWoIHNm5ZBfqxdaLH1G7DA== X-Google-Smtp-Source: APiQypLHouNldcqU2CpoCyddMDnkJu1KFJ1nkmE2fUR3Q3EDvlifux4KFuBxlvKEW1ec4UquHI7TNQ== X-Received: by 2002:a05:6000:2:: with SMTP id h2mr1460205wrx.112.1586167932813; Mon, 06 Apr 2020 03:12:12 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/11] hw/gpio/aspeed_gpio.c: Don't directly include assert.h Date: Mon, 6 Apr 2020 11:11:59 +0100 Message-Id: <20200406101205.23027-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Remove a direct include of assert.h -- this is already provided by qemu/osdep.h, and it breaks our rule that the first include must always be osdep.h. In particular we must get the assert() macro via osdep.h to avoid compile failures on mingw (see the comment in osdep.h where we redefine assert() for that platform). Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Message-id: 20200403124712.24826-1-peter.maydell@linaro.org --- hw/gpio/aspeed_gpio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c index 41e11ea9b04..e52fcfd9a03 100644 --- a/hw/gpio/aspeed_gpio.c +++ b/hw/gpio/aspeed_gpio.c @@ -6,8 +6,6 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ =20 -#include - #include "qemu/osdep.h" #include "qemu/host-utils.h" #include "qemu/log.h" --=20 2.20.1 From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168762; cv=none; d=zohomail.com; s=zohoarc; b=LjhhKlkHOpPgiEOYdM9XBapj7XhdGqM17Z79EX1DZ2p9bSEw4z4FjkYPaSIOg0rcwJiU4GPay467GZhD7okrI1goJDzHvLM2ILycF2KTMwm81TSK69DsyXHgnmvXi6VCr+YvWbcpJUxTHTV/h5N38BHTX+zqvvWg2zxC2Y1IzMA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168762; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sVStBWBB/nYKZSZLm9qzTwRd2BAPghRDv9sMPC8uICQ=; b=H8QN7graXAWYtTE/wz3FPsNlN81WVRySGHmCNtz6wdkPhiKce6sI9IVG5fD+JlUsW2AKqqcdIg1YhS3M285TePRQ+W+YzarS0Xj0uKziVTj/q2WDQ/F65vxivXIqSEmv3cDJs4assk+ME3+kHqmoimLpgtkT6NCSAY26T1/1F44= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586168762454871.2820020291244; Mon, 6 Apr 2020 03:26:02 -0700 (PDT) Received: from localhost ([::1]:58320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOx7-0002iM-2t for importer@patchew.org; Mon, 06 Apr 2020 06:26:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50113) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOjo-0006jC-Ef for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOjn-0002ok-DN for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:16 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:44265) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOjn-0002mA-7M for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:15 -0400 Received: by mail-wr1-x42e.google.com with SMTP id c15so801031wro.11 for ; Mon, 06 Apr 2020 03:12:15 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:13 -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=sVStBWBB/nYKZSZLm9qzTwRd2BAPghRDv9sMPC8uICQ=; b=zM+xSxNeCpi6cl/P7qydRzmwD2hcWmp//lyl2LYNTfcwsp9wjtLXgqnOSNNvLjy7Rp HiK7Gj4Ye1pVS3VZycGGWcbxUDZYealw2QgecFUTt81WE+jZyCGJTK4Th9UdhRzIMfm8 nY79NhT8kgXaSJ2hFvl8C2xpCEql3ar4S17wMZsMDwaHlsOvBVIWyhk5kXe4OX4Yk480 IHEUjcyqnZ1ySg/w9yZDmtIalEMQz6R+oVbMKQ6KqQU9Zcr6tREozKm+KRbKVv9OBgrj 8H84yWoHaLpYheWziEvyCxLTR8yLxjwzDgpa4tCksNkJKB/kNjnZMn1xfrI5Kdmu/3HC DCCw== 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=sVStBWBB/nYKZSZLm9qzTwRd2BAPghRDv9sMPC8uICQ=; b=GU43TvJJkb7M0qcZOYUshOlQ1k5o/uvWrmDHUdddu1TRfDTjs/zNgyU5i/7CFB0lv7 TSEw7A1F5UtZERRFpA07Si0cKi8opEfpyqtc6vBEih37oLMwPB+S7/90/37llbY5liSc YBNnGzYesMFymfJXI0IDu9+olVD87LqUsVc2S6YqW2oe+bY8jWGrJlfZ/sZvSxaLL8dF chcgtIbzRYWbwtreq5qAPYk/OriQsMC1riafV9HOhF0pFMQzaCajqVFFfHWMGUs/jXnm 4V64u19xMFKou1A9nac7R56E3DOAvXS9hg1V7Smemw0wD7oLACDhfJ9R3xib+YiaYA5c oEkw== X-Gm-Message-State: AGi0PuZxtZUx447bHVbAOtxjCkZhUpr6ckZxLMQxyDOQ4RiZ6r78YwAk PHJqSoIxHdhJjNywBiig2Am2226YJDIB4A== X-Google-Smtp-Source: APiQypJcI51Rn3etkNJA9kqHzC8gv7FknwDUG3UaeEiCpb65fgXCdCIIkOXl0pbq9LRRXv9ehlp7iA== X-Received: by 2002:adf:e6ce:: with SMTP id y14mr5634343wrm.45.1586167933729; Mon, 06 Apr 2020 03:12:13 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/11] dump: Fix writing of ELF section Date: Mon, 6 Apr 2020 11:12:00 +0100 Message-Id: <20200406101205.23027-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) In write_elf_section() we set the 'shdr' pointer to point to local structures shdr32 or shdr64, which we fill in to be written out to the ELF dump. Unfortunately the address we pass to fd_write_vmcore() has a spurious '&' operator, so instead of writing out the section header we write out the literal pointer value followed by whatever is on the stack after the 'shdr' local variable. Pass the correct address into fd_write_vmcore(). Spotted by Coverity: CID 1421970. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200324173630.12221-1-peter.maydell@linaro.org --- dump/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump/dump.c b/dump/dump.c index 6fb6e1245ad..22ed1d3b0d4 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -364,7 +364,7 @@ static void write_elf_section(DumpState *s, int type, E= rror **errp) shdr =3D &shdr64; } =20 - ret =3D fd_write_vmcore(&shdr, shdr_size, s); + ret =3D fd_write_vmcore(shdr, shdr_size, s); if (ret < 0) { error_setg_errno(errp, -ret, "dump: failed to write section header table"); --=20 2.20.1 From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168225; cv=none; d=zohomail.com; s=zohoarc; b=PaDBKH9b7WyWVxq3k9Dea+97b++krxs4mIs16wq8qGV3LbYyARFTfeeJFP/tCCH39YTdUiWkBpUpHh5v1YgQpfAI4RrPckBJ8U+3B99uPRc70HmZj9VYg56NyuhzgbDxK8G71u6r1GsA4Nx7wOKcaVYRYVKjST4xsdbYnxPpQ3s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168225; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qxOK+Eo/Etx7ayjTtq9TRrRBbpvwnNBBT4MlN6HQPlU=; b=fIr3qO1OqFMBIvfJvIvtiUj4WEuUybB1GzhEXTYD5CIIQXKwx7UYdDo9IrcX5Sn6MInyiTU2d5UAzzfCO0KFGMHnpSkYuSKcV8YBFhiwaCYIjZUn/LQMB1lzUQennlvr1veKdLUkgWnZa2Fnw6pilUaAAlk013pM3XOCOKuW6fI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158616822527921.46127803097727; Mon, 6 Apr 2020 03:17:05 -0700 (PDT) Received: from localhost ([::1]:58118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOoR-0005fa-VQ for importer@patchew.org; Mon, 06 Apr 2020 06:17:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50175) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOjt-0006pm-7i for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOjo-0002q8-9V for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:21 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:46628) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOjo-0002oZ-3V for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:16 -0400 Received: by mail-wr1-x432.google.com with SMTP id j17so16628369wru.13 for ; Mon, 06 Apr 2020 03:12:16 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:14 -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=qxOK+Eo/Etx7ayjTtq9TRrRBbpvwnNBBT4MlN6HQPlU=; b=y3bcytVC/174eOXONPV+l9m74EB/h9dWnq+RcP5Gq4svgEa4yvZENRNu/CCTyHpqjh DiPQFYwtHNRvAgcmw7o9sgLhhfmJmQxuIEETimfx8liCuH4yU0l0S9Zlwa4vW3W5BDL7 9ANCztwfeqlL928mCq5tvufzYFBOfTb2mTxRmnCVZD7kXF5O6Chjvfo7QCpM56Anpb8A +Iy9iSqxRUh5WYZjd35ygReCbfObXcSnruPD+zn39jZly7bHy5n1OhxT62VsbxJfkvw+ J4f5cAVmKCiZkSBrA7JS6QfXIhvMO7raOCuz4DuwCXTNbkjlKIXdTFrQWMbk2fFKo6ru hu0w== 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=qxOK+Eo/Etx7ayjTtq9TRrRBbpvwnNBBT4MlN6HQPlU=; b=YUHpwmNYpt5gksw2n50it224oAYnfrX4uCZ1yXAdJ8gPd76ydvxVqZ7TXGhdHPCxM7 Zk6p5rM3zF6d9OO74xyGusWDRpYlBZiZP/BRC0MgmamPUa9RcP8DCl2EFJvmJ3jm+v7B nd39IMKfCBqAKp/EXNP6WFJ7fR8CGx9AmqIKQuAcwHvq/TGv6PcPu4YNB/ijR9JPtJI7 +a+vnKywSL0Qa1TRxm1eknjDZtdARUNtBfIKoZUD+UJ4LzKnfo3lAKlPGy6ttLH5yrtI UR0rBsyMuoMukSwLC8SM5rgoOI/bPRghUGDheUPvYNb+ZfZh5lyipMImz3aCXAon5S2+ Wijw== X-Gm-Message-State: AGi0PuZZk5sdIafqoWJzvNavKgETApVD2XmRlMIQTQW68yTvu9fPHItK id/JMfx4O+RWwgpY+pegNTE5acECUdnOGA== X-Google-Smtp-Source: APiQypIC51+H3M0n9O6MAvRH1hvVxsz2mG+J+8e2J5pS4EhvfrGoffyIE6ZavMjDPf0VJD12nhE0oQ== X-Received: by 2002:a5d:5141:: with SMTP id u1mr22116282wrt.146.1586167934779; Mon, 06 Apr 2020 03:12:14 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/11] dma/xlnx-zdma: Remove comment Date: Mon, 6 Apr 2020 11:12:01 +0100 Message-Id: <20200406101205.23027-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::432 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: "Edgar E. Iglesias" Remove comment. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis Reviewed-by: Francisco Iglesias Message-id: 20200402134721.27863-2-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell --- hw/dma/xlnx-zdma.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index 2d9c0a0d5e1..a6c5b2304a8 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -511,7 +511,6 @@ static void zdma_process_descr(XlnxZDMA *s) zdma_src_done(s); } =20 - /* Load next descriptor. */ if (ptype =3D=3D PT_REG || src_cmd =3D=3D CMD_STOP) { ARRAY_FIELD_DP32(s->regs, ZDMA_CH_CTRL2, EN, 0); zdma_set_state(s, DISABLED); --=20 2.20.1 From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168087; cv=none; d=zohomail.com; s=zohoarc; b=Ph0aMRaBctQYPc988vt/1ENMzE+T7aL6Y4j6DGBFvmcTjw+1oC+UFPSWKfe77bAsRo0+W6yrQLdjnd21GUB09kCLXGGo/C9Lzex/CIBVJkPCfZtavkYhEKt5paprQcwl4eosNs13OBPHjgsHQaXTj+OSuzO2NqY73PRWFFfnDiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168087; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WGk0JhktO1LmmcqBkiisXztczdE5FcLoayAA+KbaRqU=; b=dt+UPY7HwZkOxEDlAqdVGfh/mNFacOR0PYAQKBir2dc9LdOBFkh6b8q+WBf/36r672IVstRcnlXHACMV6PVQ2K0bnEyh9Mme7QsfEbibIPYMvLBzOlsCohD5rrKUmZvjuujAQJ0SImEYKaTmOnMDJ+zDo722RXLbvP7xFefjr4I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586168087202224.97118012510407; Mon, 6 Apr 2020 03:14:47 -0700 (PDT) Received: from localhost ([::1]:58044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOmD-000286-Vd for importer@patchew.org; Mon, 06 Apr 2020 06:14:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50131) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOjp-0006kX-Va for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOjp-0002rh-2v for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:17 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:55398) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOjo-0002q5-Sr for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:17 -0400 Received: by mail-wm1-x336.google.com with SMTP id r16so14045012wmg.5 for ; Mon, 06 Apr 2020 03:12:16 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:15 -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=WGk0JhktO1LmmcqBkiisXztczdE5FcLoayAA+KbaRqU=; b=n8489t6rTifoqv28F8kszo5RbV9peFZKJIrT25zK1vQqjDEtBLdVtxKYejSPD9wLBh xj406121Sc7/0tld8CNUAK0ikZDa8ppHGyCKxANbbF/vB+xwXqLL1DOuHW/EunWF+Qyv rufRmkqkNZAOwY7y9T+j0f5jnZazptvd2rmhm4MC4sRqfQrwmgYCZpASUU6dfgjmCTNR NNKVrcIcPBt+8RXyz5O48upjTBp5OUjY//HxXmJNaGayDWFilvgZjY77L/3mn0XvfKaN yombsRFyj8Mv+UbDGmv26gGX/tqS4qPopO2xndyiC7DodC02V+SQZOPU+bKBsFAU8ooW B8cA== 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=WGk0JhktO1LmmcqBkiisXztczdE5FcLoayAA+KbaRqU=; b=MDCuPGGdBppVRhobn1jVB8I4KO54EOebpZqmqXUWurnfNnnRGvPvRQmYSukp5qN56x 1QfZlcRacuLNxdySeK0JWtPIExbilxLF8zgYvXnw4IWEBoGMwS93UM3SUIpBSxPHK+Yd bDU/eafcbJbQygDKATBRDIFpLW+r9b/ThnLuDumEhiI/sFLk5uOHGQuMv39pphu9XzWI eZRxyUDMWWrqVyA6vTVPBTyjlHPGc31J+QHBZ55etYFuAmp+KUThpUK+yFgvAOi1fvsd 4aIf9NHldGGL/ApB4tkK5AOM0DaWD8W4JUclhSPU92VpBcpTks9JABbsNCP166xWLUXs Lx2Q== X-Gm-Message-State: AGi0PuZ0KyZHM1CQ/6hrF4p++cQvl0h8EkUjzlDCJdkz37UWW9mMLrtl craXUAplNaz8pvIprK5s5wQ4fLUvuPifkg== X-Google-Smtp-Source: APiQypJtKD7/UgTCW48KV5cm05PB3xgGmMb5c91KpttFcWGtDPkONKf/92wkOKL8EsJb12KyWCTiLA== X-Received: by 2002:a1c:6605:: with SMTP id a5mr21961062wmc.32.1586167935642; Mon, 06 Apr 2020 03:12:15 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/11] dma/xlnx-zdma: Populate DBG0.CMN_BUF_FREE Date: Mon, 6 Apr 2020 11:12:02 +0100 Message-Id: <20200406101205.23027-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::336 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: "Edgar E. Iglesias" Populate DBG0.CMN_BUF_FREE so that SW can see some free space. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis Reviewed-by: Francisco Iglesias Message-id: 20200402134721.27863-3-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell --- hw/dma/xlnx-zdma.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index a6c5b2304a8..6a4699757af 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -680,6 +680,12 @@ static RegisterAccessInfo zdma_regs_info[] =3D { },{ .name =3D "ZDMA_CH_DBG0", .addr =3D A_ZDMA_CH_DBG0, .rsvd =3D 0xfffffe00, .ro =3D 0x1ff, + + /* + * There's SW out there that will check the debug regs for free sp= ace. + * Claim that we always have 0x100 free. + */ + .reset =3D 0x100 },{ .name =3D "ZDMA_CH_DBG1", .addr =3D A_ZDMA_CH_DBG1, .rsvd =3D 0xfffffe00, .ro =3D 0x1ff, --=20 2.20.1 From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168030; cv=none; d=zohomail.com; s=zohoarc; b=XBJFTrZKhm74gxIQZQz84F7RP0A1X/Yrho3fe4VTNS50KGyFKhL8CIQntPuSFj7Iu8EfckJOQqPwabQBxIVU2WCmsYWHjkraET4IEH3ssSSZ7ghdXIWfbP85mfpEkP89tgplKqu3wVO3FvZD356ROE8aG+exufFc+wLWnBrayI4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168030; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5Mxtsabkw4+l/WTVOoVpBFDUZvdj1XOuvA+UEvVuiRQ=; b=kiuY8TC371lbLWueHS6qBfyUgk3l64lIjBQrg6ZFtZbx59Hl6b6TZMkqWvLL4rzCT7q9iVZk1/D4EVKq5CsUFWOj22/EU7Og5K2t4g2FRIXlTFwBtTmEfEn/IJNWxhOnc53YC/u/P6WtF95yQ4D6+nwPF5tdDpHPa/N1J53SXUo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586168030932629.8983312010197; Mon, 6 Apr 2020 03:13:50 -0700 (PDT) Received: from localhost ([::1]:58014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOlJ-0008Hy-J1 for importer@patchew.org; Mon, 06 Apr 2020 06:13:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50145) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOjq-0006lk-UW for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOjp-0002tV-TZ for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:18 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:52672) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOjp-0002rp-Ne for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:17 -0400 Received: by mail-wm1-x332.google.com with SMTP id t203so5520035wmt.2 for ; Mon, 06 Apr 2020 03:12:17 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:16 -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=5Mxtsabkw4+l/WTVOoVpBFDUZvdj1XOuvA+UEvVuiRQ=; b=U3AXRp7AIaQwzZ2uHFJCC1EDzMHUpzI8xf3HiO6hJHFObwyX/KMq5y4MbS3Foh9riP Lks2XAXLN18a0NNVTyXD2x2vEbS3FnOfAqfn60rhB+4u/b1GBILqf9MKXiw5odV3RR/v CINQfOnTL/TQB1JHeIMmNyieKVXHqH0UcJo+A2JPAlK0ovIMRZ5fZsXONinMr0SsLdQP +uE2P44JUWC7yXlMUi5cTZKM1xRLsiUgZoETN6QDHJp1tx2SgKlY6o6U8ZtwBQEqz7dZ hqWQpE0y0opuI9P//75+XFNr7j3xvVf3zBaBPVhP5NvBrwZSUAAdy/polwtd58KIvfao v4rA== 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=5Mxtsabkw4+l/WTVOoVpBFDUZvdj1XOuvA+UEvVuiRQ=; b=QWzGZ+tUhTZQU0MyAuhmWhthSaOUaZPXG1twgfj4yAlUj1qh7zRRDGG4tLiThJbk6L +/tFfB/nrPRdJ21BmkubysGZ7F0r2uAYdUTiqdxmAAZNPsUZqNSkOkvFsn5Uxn9dKCqS 0aPffx1kMGMgyYtylom8y7WVkxGSxvJrVsE4af2Wd/nbimuU3AcDz7zB2nXbzFbw0LfF mWBEL/hn0FK54kL/PKGh1/kfLnJY163bc5iFTzVam3udOBalAowsFm5+FaYOzg96GIzh THuVIVx/j4yKLvYx4i1cpXp3OShE7WPTR0Sj9UVlnLQZkuZvYcvDGuDKBhKfkbXCLjor 6kvQ== X-Gm-Message-State: AGi0PuZA2buxv/iYH3sQLSAaVluphZZ3rt9I5Aos9X61sVYPBIT7OSTa 1Iwj0pqqoOJUmmlA+K0wUdj5h6WiDoz0bw== X-Google-Smtp-Source: APiQypKaPO+w/LwGvSQL9A2a+3WVZoctjtFWdYEzPwBEXfGm6aAGdkKnXswjxR5UsyyIoArpBdaYYw== X-Received: by 2002:a1c:9cc6:: with SMTP id f189mr3827252wme.75.1586167936519; Mon, 06 Apr 2020 03:12:16 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/11] dma/xlnx-zdma: Clear DMA_DONE when halting Date: Mon, 6 Apr 2020 11:12:03 +0100 Message-Id: <20200406101205.23027-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::332 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: "Edgar E. Iglesias" Clear DMA_DONE when halting the DMA channel. Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias Acked-by: Alistair Francis Message-id: 20200402134721.27863-4-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell --- hw/dma/xlnx-zdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index 6a4699757af..dd893bc420f 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -520,6 +520,7 @@ static void zdma_process_descr(XlnxZDMA *s) if (src_cmd =3D=3D CMD_HALT) { zdma_set_state(s, PAUSED); ARRAY_FIELD_DP32(s->regs, ZDMA_CH_ISR, DMA_PAUSE, 1); + ARRAY_FIELD_DP32(s->regs, ZDMA_CH_ISR, DMA_DONE, false); zdma_ch_imr_update_irq(s); return; } --=20 2.20.1 From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168374; cv=none; d=zohomail.com; s=zohoarc; b=Xc34nFGwwSnw5kiL+fAVzVmFRXj2dP8qA+jZkFaiuRKPpr2WfSLxeJfn7xDr5jrLcRfQVpE5+XINC+PfoPehfqYXdn4tNIan3YhO6plBEYepVd1iMTlR3dy8lSr4q42d2cpyaoFDlDxEMGcTge5cEcfl8tjfid3dFJjQKw2WrN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168374; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PzdovVtNp3mfDYAEJlHSjvapxn9iZ3p1XuB2BfZl6uY=; b=A9HccsAZYyxQFl7td/Vn96b5pdt3SOJIukRqUO5KLNmX2sMHsOaM+Ghe335IJzVE3r35T7ScZlgDVz3oc4eDxRSGsxBVm78ftMA2h8Q2BpcfTF4NEjYCFEUzThrHbmlUVgMtZ8CIpnDUDJJIzivigX9kTguDVdW75/3Mgkh4kx4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586168374690126.14821611628986; Mon, 6 Apr 2020 03:19:34 -0700 (PDT) Received: from localhost ([::1]:58172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOqr-0002AZ-70 for importer@patchew.org; Mon, 06 Apr 2020 06:19:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50194) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOk0-0006y6-P9 for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOjq-0002uF-MT for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:28 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:46625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOjq-0002tb-Gr for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:18 -0400 Received: by mail-wr1-x42e.google.com with SMTP id j17so16628546wru.13 for ; Mon, 06 Apr 2020 03:12:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:16 -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=PzdovVtNp3mfDYAEJlHSjvapxn9iZ3p1XuB2BfZl6uY=; b=RqKD0wbAS9KPhFCzEL5MFw0OOpvBL8mHSXGKVyvIMdkf8f+YN4QfXULVQx+9Y/7waH aXQDmTbTm9AN6Dzoje1Tk7CWX5GLaK5pDrhbTq7ckFjaKJCzRaNvWZXVXds6rXUuCHuv +Tl7kiZrRhQyc4NesIs1UwEDPi5eeNAPiS+FoXZC1+cdbE6aM/bUHFXGB05M4Lzt4KsR +LqBZMGVqgFTx2hgqzQyfbvcbs/+30P/21c3tAmi4B27hEzsSxA+qjoLzHXr7naVxmGd 0CIiWvTK6nfn7sZz/Ra5ph/Sdaw6C5Xsi4rcinpaWcW88o+OKpzmKpIvDuyTMa1/nH8U 6XAg== 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=PzdovVtNp3mfDYAEJlHSjvapxn9iZ3p1XuB2BfZl6uY=; b=mAstC2GegkX+vZYx2RfVZmBX6BaAL+TCZzPzyOsWmApG/9/qrVG0UT7/XhJLQ+19KA X8wjUvfTrjuVRQTl4ItpyShbmgk0gdQ2BMg9ybVY7sl3WgEyvNyY57o3hXOsMDm5MM5Z z+WQ26V6upVNRhO8PXRfTj2xtKnqPuTRUfAXzypJsYPkasJe0Fz842WY1Lo2Aeu8b+w5 0ZuEoi+zEgtnWWU7RGgnyoNQwMwbViyLAMIZe8ceqUkct/qyEVUO9hr+bP39CqItzfbr 9srviaO8UqJhS73v1oKOXptTfWnRi+lXhJQ4G3ilRdAhQD90t8g+PV0m0gXW5We0GB5v ZveA== X-Gm-Message-State: AGi0Pua4MPY8cx8Ie/JprEveQD8Tkii/yuBhWDnIZ8+/gz0ygVSttlAM wE/jjVF6L9kuH6RLtB1MtPCoPcrJ4it+3w== X-Google-Smtp-Source: APiQypJGtQcyUxdD3vcX+40x5dPZbzshddXm+HySJvQ56uwUWO/Uk46mslgUtgukdmCL859jDgPs1A== X-Received: by 2002:adf:a482:: with SMTP id g2mr17787604wrb.214.1586167937426; Mon, 06 Apr 2020 03:12:17 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/11] dma/xlnx-zdma: Advance the descriptor address when stopping Date: Mon, 6 Apr 2020 11:12:04 +0100 Message-Id: <20200406101205.23027-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: "Edgar E. Iglesias" Advance the descriptor address when stopping the channel. Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias Acked-by: Alistair Francis Message-id: 20200402134721.27863-5-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell --- hw/dma/xlnx-zdma.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index dd893bc420f..e856d233f2d 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -514,7 +514,6 @@ static void zdma_process_descr(XlnxZDMA *s) if (ptype =3D=3D PT_REG || src_cmd =3D=3D CMD_STOP) { ARRAY_FIELD_DP32(s->regs, ZDMA_CH_CTRL2, EN, 0); zdma_set_state(s, DISABLED); - return; } =20 if (src_cmd =3D=3D CMD_HALT) { --=20 2.20.1 From nobody Sun May 19 10:14:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586168341; cv=none; d=zohomail.com; s=zohoarc; b=bhDj2C1B4pEwEexQWQFAjLGZSs5KTsla9XJwr6kVQxSsqvbaWYe/u3DzJDMgYZqSD7com4dEbORZDeXGtXpGtQ2+Em3JOiSEL7fqfTCeR3GBRSZ7dFtYVOllxuj3e8HBys+akPCJO5k58VyRvXC6EmvWPxzhmD8UhU/0Lh1nNZk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586168341; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lJK5pRrZeOgvwi0MkqfizMKvlaa5ce7cwoPnkorTG8c=; b=YYlduT7aZygBNPlomwfk9J6uTjj/n2kZR8mG8MXuiOReo0+FvWMtv3c+KI+XhnqdnlFpyztiajo7viMhAbcFYZ48Y9EJgc1DoNF6ruKcC+EiasoZnIIX7R6r1Dmwx6DbxS8488DwcBazwYwUsZ/pqEaMyOJ5mn20gI12TIqj/Fo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586168341272227.6520800589641; Mon, 6 Apr 2020 03:19:01 -0700 (PDT) Received: from localhost ([::1]:58160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOqJ-0000u9-MH for importer@patchew.org; Mon, 06 Apr 2020 06:18:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50171) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOjt-0006pe-5l for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOjr-0002vB-Qp for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:21 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:38752) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLOjr-0002uW-KV for qemu-devel@nongnu.org; Mon, 06 Apr 2020 06:12:19 -0400 Received: by mail-wm1-x342.google.com with SMTP id f20so6118490wmh.3 for ; Mon, 06 Apr 2020 03:12:19 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f187sm25163765wme.9.2020.04.06.03.12.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 03:12:17 -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=lJK5pRrZeOgvwi0MkqfizMKvlaa5ce7cwoPnkorTG8c=; b=ySiyOg+o85M2Kc9stcp62VnsFU8RHu0dQlx1PuxTRFZqgMy4dXokc7KfAvb6Lzugxe TyE9nHTfv5gtD9A8+CyTq5AbGaXAoswtbb8hmx/1UiD6m5+GtzJhDuph8gg6LvDwEh7D 5nT8njMPELJ7k5in10d2SnO1A3nxtw9yzSGklPkrWzxOM3h3Q6Zq/487yrQ9b3W59fdt PlckIznLiZA9Jh6g2vaHrf3g2r7v1DCQnFCwpgcHp3mPscSArxXG1VFVfk3A/oH8TgQr wuIL2K2BGZ42lKj6QbYaCh00ldBa6rNVfedz67PQAzxqpd6TJ94W0IB31JtI4iRNMslG dM0g== 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=lJK5pRrZeOgvwi0MkqfizMKvlaa5ce7cwoPnkorTG8c=; b=YHbbNHc5Akir6x/cWgid7evOHSvbzyeWyB2FUv1zFr3f5FOe5Qtobr/cyVc5lEmJrn HBDCiFDRMMWvwyPFRl0kd1n+m3mCcQ1rAJqcQYBDIjcJ7s5bMBezESbI8ZYVZvpZJWAQ Tbw6aggP4ClTChUTDB2Ukrqffo6ME/UW00iJeLgHgKFjPJDK0Lb4BjHnK6G02GQ971l6 +Vee3DZPW0uvhbYNpjJeoFXzTtPbN2xj7Eod8DVa6NGqm8AOUH7JWV9YZZrPudJ1KBSh OA7lWB1/wXxVr7oGRPOTOrU45LGwBw2zRwjMQ3/wOpWpUvUlKRQPV+Ar7fSr/mJrstTU pITw== X-Gm-Message-State: AGi0Pub4rRGqh04Iftr/r5mIyf63aMErSX7mRL6vntHGRV2I7Eplf6Fv dyHFSOteIfvMhRRqnrA6b7BJ+zQJF6d2Aw== X-Google-Smtp-Source: APiQypKFzEnKbj8ESttpcGR7zgUpUelah9zcEWwHP6ZI1wMNauknyToK3HlFtTkBoKANWVh8ekgjuQ== X-Received: by 2002:a1c:2002:: with SMTP id g2mr9047886wmg.109.1586167938289; Mon, 06 Apr 2020 03:12:18 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/11] dma/xlnx-zdma: Reorg to fix CUR_DSCR Date: Mon, 6 Apr 2020 11:12:05 +0100 Message-Id: <20200406101205.23027-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200406101205.23027-1-peter.maydell@linaro.org> References: <20200406101205.23027-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: "Edgar E. Iglesias" Reorganize the descriptor handling so that CUR_DSCR always points to the next descriptor to be processed. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis Reviewed-by: Francisco Iglesias Message-id: 20200402134721.27863-6-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell --- hw/dma/xlnx-zdma.c | 47 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index e856d233f2d..1c45367f3c6 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -333,10 +333,28 @@ static void zdma_load_src_descriptor(XlnxZDMA *s) } } =20 +static void zdma_update_descr_addr(XlnxZDMA *s, bool type, + unsigned int basereg) +{ + uint64_t addr, next; + + if (type =3D=3D DTYPE_LINEAR) { + addr =3D zdma_get_regaddr64(s, basereg); + next =3D addr + sizeof(s->dsc_dst); + } else { + addr =3D zdma_get_regaddr64(s, basereg); + addr +=3D sizeof(s->dsc_dst); + address_space_read(s->dma_as, addr, s->attr, (void *) &next, 8); + } + + zdma_put_regaddr64(s, basereg, next); +} + static void zdma_load_dst_descriptor(XlnxZDMA *s) { uint64_t dst_addr; unsigned int ptype =3D ARRAY_FIELD_EX32(s->regs, ZDMA_CH_CTRL0, POINT_= TYPE); + bool dst_type; =20 if (ptype =3D=3D PT_REG) { memcpy(&s->dsc_dst, &s->regs[R_ZDMA_CH_DST_DSCR_WORD0], @@ -349,24 +367,10 @@ static void zdma_load_dst_descriptor(XlnxZDMA *s) if (!zdma_load_descriptor(s, dst_addr, &s->dsc_dst)) { ARRAY_FIELD_DP32(s->regs, ZDMA_CH_ISR, AXI_RD_DST_DSCR, true); } -} =20 -static uint64_t zdma_update_descr_addr(XlnxZDMA *s, bool type, - unsigned int basereg) -{ - uint64_t addr, next; - - if (type =3D=3D DTYPE_LINEAR) { - next =3D zdma_get_regaddr64(s, basereg); - next +=3D sizeof(s->dsc_dst); - zdma_put_regaddr64(s, basereg, next); - } else { - addr =3D zdma_get_regaddr64(s, basereg); - addr +=3D sizeof(s->dsc_dst); - address_space_read(s->dma_as, addr, s->attr, &next, 8); - zdma_put_regaddr64(s, basereg, next); - } - return next; + /* Advance the descriptor pointer. */ + dst_type =3D FIELD_EX32(s->dsc_dst.words[3], ZDMA_CH_DST_DSCR_WORD3, T= YPE); + zdma_update_descr_addr(s, dst_type, R_ZDMA_CH_DST_CUR_DSCR_LSB); } =20 static void zdma_write_dst(XlnxZDMA *s, uint8_t *buf, uint32_t len) @@ -387,14 +391,7 @@ static void zdma_write_dst(XlnxZDMA *s, uint8_t *buf, = uint32_t len) dst_size =3D FIELD_EX32(s->dsc_dst.words[2], ZDMA_CH_DST_DSCR_WORD= 2, SIZE); if (dst_size =3D=3D 0 && ptype =3D=3D PT_MEM) { - uint64_t next; - bool dst_type =3D FIELD_EX32(s->dsc_dst.words[3], - ZDMA_CH_DST_DSCR_WORD3, - TYPE); - - next =3D zdma_update_descr_addr(s, dst_type, - R_ZDMA_CH_DST_CUR_DSCR_LSB); - zdma_load_descriptor(s, next, &s->dsc_dst); + zdma_load_dst_descriptor(s); dst_size =3D FIELD_EX32(s->dsc_dst.words[2], ZDMA_CH_DST_DSCR_= WORD2, SIZE); } --=20 2.20.1