From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 EAA35C63777 for ; Thu, 26 Nov 2020 22:31:04 +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 6EB1B2145D for ; Thu, 26 Nov 2020 22:31:04 +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="hElLGIZy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EB1B2145D 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]:51532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiPn5-0008QQ-9Y for qemu-devel@archiver.kernel.org; Thu, 26 Nov 2020 17:31:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiPj0-0006Cv-F3 for qemu-devel@nongnu.org; Thu, 26 Nov 2020 17:26:50 -0500 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:35763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kiPix-0001E5-HZ for qemu-devel@nongnu.org; Thu, 26 Nov 2020 17:26:50 -0500 Received: by mail-ej1-x643.google.com with SMTP id f23so4959344ejk.2 for ; Thu, 26 Nov 2020 14:26:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0y4RpvpeQrQuyoRlFv0Z0WA/0BbXyrS+nASu+yXFU3o=; b=hElLGIZyKxfkWo5oFGt112j81TeN/dNGw+p6eQPpW5gD1U1gxlLNgXDXqH20REMoUB H7WH3lBucKZlCQ7UZM3tx52vobqNALWO7RXL8YglfbKxxPf7keFtYeVSoo6uNYeGzHWI EPeLAmOhV8Z5lBb0nY2OUmVzYmrqkCdC1yUaX81SrfGhhq0OfrbJQdCXTBEyKVRIy4IH ETdYQILz9JIxjGDnbstZwV5GZwrLpba5Jkqh9krRrZBL2ynI9wXm9Rqm41lwiJKKmlvX PpXno1N+zTThsK+mDjPJGkCDUhjlC1gbbC+jDoE7XQc/VdOIqHt7/Mt+2PfMk6E8rdWF 85bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0y4RpvpeQrQuyoRlFv0Z0WA/0BbXyrS+nASu+yXFU3o=; b=JSnsoLREU7/G18k+5U/utrnKYA6M2mnjNMkitxCYpT7nGHZhLZ954gROEONGDE/R46 BXUIuhDuPdydnLkv4uv5xiqujqPaOP3LKQy3O97q4cpRmN/C/JdNpdkSBUj2gfZmirU7 Lb+qMI6/+9iM+l4HjjVcX2cGbg3HrX61XuWqIohsPLICgOajgz7HhIV7GzBSsSj4NA76 dq3onOfseOb1mc83ZeMGNFKus/IJ2Km1NT+OxDG9LDXkALbN5ZBBQmdjfjBbZv57tMSv 5QUaGKxjaQdM/bd5wLs4Enpiq3VVpAk2hO0GFk6Tid5p7w5XCNwR2Hf19wovYeUyc9DA /vLA== X-Gm-Message-State: AOAM530ms0+w/WHasZXikOt3Rwb3YH5ArYVXfuzZ4sbMBEYOBoMnq+DM RKeQeINM9Rjf3T2m0/SrIuOKDyxXRnopzGfK3xsgFA== X-Google-Smtp-Source: ABdhPJw4oOxdRXdjX8imlCnocVLUlvx57b2UaU+p9G1M7KutPCFI6hHnZGXfngm1CQOQvfRfN5vM3hGmlPLf9/OjUeU= X-Received: by 2002:a17:906:d8a9:: with SMTP id qc9mr4615748ejb.482.1606429605919; Thu, 26 Nov 2020 14:26:45 -0800 (PST) MIME-Version: 1.0 References: <20201126213600.40654-1-agraf@csgraf.de> <20201126213600.40654-5-agraf@csgraf.de> <785c216b-d4b5-b65f-1ddf-4c6374b72ece@csgraf.de> In-Reply-To: <785c216b-d4b5-b65f-1ddf-4c6374b72ece@csgraf.de> From: Peter Maydell Date: Thu, 26 Nov 2020 22:26:34 +0000 Message-ID: Subject: Re: [PATCH 4/8] arm: Synchronize CPU on PSCI on To: Alexander Graf Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=peter.maydell@linaro.org; helo=mail-ej1-x643.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: Eduardo Habkost , Richard Henderson , QEMU Developers , Cameron Esfahani , Roman Bolshakov , qemu-arm , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, 26 Nov 2020 at 22:16, Alexander Graf wrote: > cpu_synchronize_state() sets the CPU registers into "dirty" state which > means that env now holds the current copy. On the next entry, we then > sync them back into HVF. > > Without the cpu_synchronize_state() call, HVF never knows that the CPU > state is actually dirty. I guess it could as well live in cpu_reset() > somewhere, but we have to get the state switched over to dirty one way > or another. > > One interesting thing to note here is that the CPU actually comes up in > "dirty" after init. But init is done on realization already. I'm not > sure why we lose the dirty state in between that and the reset. Yeah, it sounds like you need to figure out where the dirty to not-dirty transitions ought to be happening rather than just fudging things here... -- PMM