From patchwork Fri Oct 25 17:53:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 838369 Delivered-To: patch@linaro.org Received: by 2002:adf:e287:0:b0:37d:45d0:187 with SMTP id v7csp426655wri; Fri, 25 Oct 2024 10:54:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW0CDrygkCw8h4Ww8pgE3NNvGgsz57O+wotCt1QEE2+3tllKjjfn8gpCAaDdAvHQTyzut+Bkg==@linaro.org X-Google-Smtp-Source: AGHT+IEkoFA/x/pMf865Vznn6m592tbKzuu1mgPJiWym42ZAhIpdhQp0X+5Ezmmllt4wuw38Aaff X-Received: by 2002:a05:620a:4050:b0:7af:c60d:a0a7 with SMTP id af79cd13be357-7b193f400acmr36805885a.50.1729878839951; Fri, 25 Oct 2024 10:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729878839; cv=none; d=google.com; s=arc-20240605; b=LIdUdciGnB3cSb8+EHgpV70I2/uPt1IZz0RLCWy0HNSb5TOMIylft0P3p2nMkrSCz6 9IyO7Whca2wHn9rJQ/Fs14lBmQV0Eq2hAgdeAf+kVf8RlfRN2PIlK5/S0nZw9yQLbt7L VvDjVKfCIt53+HrxLUSkpNH9PxRHQEsQtWaif0S207/JVwdkws9sI/MxFy4y4PjeKOSV 8r3EmhEzNTAsyhISdRpAJBul4H56MAGbfvpEYTnIOxXVPuqIg9tawdnrei/a3vPw/Mbl A2yYFMFLdiOXvIktmPb2cbuzWVvJOXkFTtBJRWPRYKKlpxj8HkfCNtIIHrDNJMaYjaPC 8JYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=eRc6bJn8Cgf6Xv6cxP4tjLk2MH+WVOQ9Tip117N8RcA=; fh=P+KU9cl4w7a8ie1womEFl1zTjsu8iWIdGv+S7NKW27o=; b=SsviikeFFzKSV/3UP+sZ6qAHZWqv3tYO82uuLzt+ZoHItc52QaTjirzNg/820Nl67F tgApp+T1Er7IN6jzOUoOVTytyXTaoAoZkVWvP9b54PMx+/ETIMWZl7zZOd6Jdplgp8FI eSNwqLFa4QHdy+eW89xLBoSCmLvun/WuMzAm2LoEQ1a7JDSIv6LnukkfA+/xwXX3lS6L NuWPuJAptgc0uoOzFTOfiBXFN7KtsncJBK50XmTeAAxVDxYJiw5yTieZpDFZ1ARTL+L4 5in2kTRPJG8UiU/ghNOazZ7aJeIRJArfEYbq+YmWSp5hL9xjS7JnysdcHUxCMcj7wkMw jWUA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xxdTa9vv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b18d3200e7si195514985a.231.2024.10.25.10.53.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Oct 2024 10:53:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xxdTa9vv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4OVS-0000ir-3Y; Fri, 25 Oct 2024 13:53:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t4OVO-0000ho-I1 for qemu-devel@nongnu.org; Fri, 25 Oct 2024 13:53:46 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t4OVN-0001fk-6I for qemu-devel@nongnu.org; Fri, 25 Oct 2024 13:53:46 -0400 Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-7ed67cfc1fcso1480464a12.1 for ; Fri, 25 Oct 2024 10:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729878822; x=1730483622; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eRc6bJn8Cgf6Xv6cxP4tjLk2MH+WVOQ9Tip117N8RcA=; b=xxdTa9vvqOAeJx+cn2pf1KjyUL/pQdHRMWmfvMHrpGwDgaWKkZNX6gYeausdi8Bui9 VaOgwUy9LauveMIHKhzL1dLnXNNLUgWc11zAz1mduK/H+vkT/Q3wo3h0QKXlMfHnly3r cco6Y1v8hLyCfhN3DQZJByKqZLOYn31ghp9agOW/93lH4TrnpO5v91tYhXw+3pes1QmG wQ5pSpuu//8ec3QabYmoi98NbXMvDDjbwETHJpjrtduTvEcgOULrVhZ47ujcZlwon10s hspNgbHDzAhkuhCrEGlpjoPt9tB67EreHgWDANDbPlCb7sFAh7hMVakHtnPlk/NggJ5q LpjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729878822; x=1730483622; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eRc6bJn8Cgf6Xv6cxP4tjLk2MH+WVOQ9Tip117N8RcA=; b=Nw8uXfW8vQm5vvitkmAE5/0E2sfL902pIbqRs7CSr6HwaVxAvdb727ufBebk7Ej60L s4KhmzCKq3DtcZhOyTT4DxApnUaWzSp471JhFFe/etth/XAupfEJgn4lMd7REGkBoGss /qoVuTF8J8QTuC1EvT5VnizsB0iguWqCyNQLvQV6ZIad24K+KNqt7Y6gt7+xqT6dGBZ5 G4U+q4hStwGS3XxksWp5t2JoIlNIZbDOEXmObBxvyuLWNHyp8UXms789GzQNGZfG+t09 L+D58BqLMA3P98zzM206RpNhDd7HjRNiIVjm7uEpDu1C49Rvjn9MA6W3eo+SYJF01VAL xkSQ== X-Gm-Message-State: AOJu0YwgxcbxgAWq0RA3u/PAzqyMUyuCRyke+1dabC8nNgy07OBrJ7fT IypuX7i6xDgw8FhKmEvC0fiVW8UVCJrcmAbSgA/XFy+BI/S0xu8udyv+BAKCAzUaxfC6yLnRkd4 gqVnm/w== X-Received: by 2002:a05:6a21:3992:b0:1d9:83cd:3d88 with SMTP id adf61e73a8af0-1d9a842ce9bmr50673637.14.1729878821942; Fri, 25 Oct 2024 10:53:41 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72057a3cf5asm1329416b3a.201.2024.10.25.10.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 10:53:41 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Eduardo Habkost , Pierrick Bouvier Subject: [PATCH v2 0/2] target/i386: fix hang when using slow path for ptw_setl Date: Fri, 25 Oct 2024 10:53:32 -0700 Message-Id: <20241025175334.2549425-1-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Most of the details are available in first patch. Second one is there to ensure we'll have a useful error message if start_exclusive is called from cpu_exec again. I'm a bit puzzled that we never triggered this hang before. Is there something wrong with the potential slow path for ptw_setl, or is it simply very uncommon? v2: - get current cpu from local variable instead of current_cpu global var. - change condition to check cpu is running as current_cpu will never be NULL. Pierrick Bouvier (2): target/i386: fix hang when using slow path for ptw_setl cpu: ensure we don't call start_exclusive from cpu_exec cpu-common.c | 3 +++ target/i386/tcg/sysemu/excp_helper.c | 4 ++++ 2 files changed, 7 insertions(+)