From nobody Sat Apr 27 03:32:10 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1557309666; cv=none; d=zoho.com; s=zohoarc; b=f0OYehuEBMuZfD/2Z/Ahv5ibuj3geRfpZgau8qt7w7c/uztAkTKXwl4Xen736yfxw6Fbed0uCD5zXOFJzcJVGYppF/3JQw7pKC8KgLrEuAqEnSiFtoLZZBCYAAkOnidlyAYXzWJrgpK8/KnsWPS7nzhXvI90J6bFbn0jNFd4VVE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557309666; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=ox/VNVD0GtMHjU58WdO4oKSzermwnAq/6wdWuorqW1o=; b=BW/4by/evvW/DUl77ut9b/Zvth8RbFeV55T97eRXymb5VRUrYUMsw9yVQFsoeVyh9MhjYoAW4RsWk0L3W772cYNdjfRmg9yWuC9/siRUbkMeO3Gv7vD12Yu+02AC5jMeedsXmAzyIb8OxILZ/jEYw8HzBZhiZDSq0OoVI2Bed4Q= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1557309666501774.3913380481407; Wed, 8 May 2019 03:01:06 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hOJMX-0005e0-2x; Wed, 08 May 2019 09:59:45 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hOJMW-0005dq-8W for xen-devel@lists.xenproject.org; Wed, 08 May 2019 09:59:44 +0000 Received: from mail-lj1-x244.google.com (unknown [2a00:1450:4864:20::244]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id ffbc4b36-7177-11e9-843c-bc764e045a96; Wed, 08 May 2019 09:59:42 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id u21so7795874lja.5 for ; Wed, 08 May 2019 02:59:42 -0700 (PDT) Received: from aanisov-work.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id x2sm3779665ljx.13.2019.05.08.02.59.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 May 2019 02:59:40 -0700 (PDT) X-Inumbo-ID: ffbc4b36-7177-11e9-843c-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ub7oPvhz5Sx32zhTP0sFlTWKTefTxr3drYY/p0XkoKg=; b=V9FtBmDiOIBMtybCvbmfqXYMvt2jWqTugD+mPOjjtkJ3R+DgDLB5G9TJnHSM5NrSar EIjgEBZZJu7kU/bs1n4CZIgK7oloz5pW2yUI8Av8Zg9cGnmFhD9FJflAULU/AQuy+cCG CK0JpXxUvDeXp4nU7rMQjFZLCxtYmFEqSspzWcULMt63I/pxdYOVO3TNNg5sxbCYiT1p XuZ2AN2PbOP3B4X8OEVnGaeIwJBYbHLZvKbqYywojRbtX6ebjcdnLK/QWvUhT57kzsaQ /YDJCBloRPMK1JeJgkCh6FmfK2hRnhMuhH45A4XXX1pdc/bXBFob3IVwdK8oQ3ARqoiW h0uQ== 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; bh=ub7oPvhz5Sx32zhTP0sFlTWKTefTxr3drYY/p0XkoKg=; b=tZAX0cyGDKn6nsLsLODzPk4CXRc9ngxnuuTq27A7YYOke53DZdfD6KVexC9HgaOjgK /CWhQk2ylK6fnuZFkLixrAe3TnImpKSMMIPWCECkay1XfsYRYZoL0QFmFUwbJBYMrVVF Hpwk4GBsP2R8O60dcZtKK4xukQWpeelGr0IzG7GxA0XVYlIILoufnlQFkxRF8sIvU6oh 9wRVMRRc4rnglhov2x0XN9QY7XlLpseU9NMRJR1Zwo3pxZtvwenrwpmjymU6Zh8LHlw/ HMJQH7BLM0VUVOmvYq2kSu2As0yr5eqFlFFRjPt8BZJjKmsMbb8zwDYqvWi4LLw9juWJ Zn6g== X-Gm-Message-State: APjAAAX5cRqEyjNIjV0huCdt/m/QqcHPOrrCJWYWjybO60ld3+zDuioh hx3vUC1EbOFXbdDTcOXfR+s= X-Google-Smtp-Source: APXvYqykNxqbbMH8afa4aRzQyR8FV8CuF0npjZu0eg/E7GqRQpCSmR1ybj6TQFoYallsLDaeR4xV5w== X-Received: by 2002:a2e:7f12:: with SMTP id a18mr3473498ljd.144.1557309580986; Wed, 08 May 2019 02:59:40 -0700 (PDT) From: Andrii Anisov To: xen-devel@lists.xen.org Date: Wed, 8 May 2019 12:59:38 +0300 Message-Id: <1557309578-6436-1-git-send-email-andrii.anisov@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Xen-devel] [PATCH] xen:arm: we never get into schedule_tail() with prev==current X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: xen-devel@lists.xenproject.org, Julien Grall , Stefano Stabellini , Andrii Anisov , Dario Faggioli MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Andrii Anisov ARM's schedule_tail() is called from two places: context_switch() and continue_new_vcpu(). Both functions are always called with prev!=3Dcurrent. So replace the correspondent check in schedule_tail() with ASSERT() which is the development (debug) build guard. Signed-off-by: Andrii Anisov Acked-by: Julien Grall Reviewed-by: Dario Faggioli --- xen/arch/arm/domain.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 6dc633e..721d40e 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -305,6 +305,8 @@ static void update_runstate_area(struct vcpu *v) =20 static void schedule_tail(struct vcpu *prev) { + ASSERT(prev !=3D current); + ctxt_switch_from(prev); =20 ctxt_switch_to(current); @@ -313,8 +315,7 @@ static void schedule_tail(struct vcpu *prev) =20 context_saved(prev); =20 - if ( prev !=3D current ) - update_runstate_area(current); + update_runstate_area(current); =20 /* Ensure that the vcpu has an up-to-date time base. */ update_vcpu_system_time(current); --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel