From patchwork Fri Oct 25 17:58:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 838374 Delivered-To: patch@linaro.org Received: by 2002:adf:e287:0:b0:37d:45d0:187 with SMTP id v7csp428952wri; Fri, 25 Oct 2024 10:59:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVipyDwZ/JeGJqfG3UqXteEe7ygnz5XwLTZp7CgT18rzv0Zbt4R4QmiPY7TvptwpXWPJkVxVQ==@linaro.org X-Google-Smtp-Source: AGHT+IEp8DCud6xBGybNmjv+wlz72hRED6ROBYCdvFQ9lnCwrZtG7fQsyOUGHThuGgVqb9IuLCGv X-Received: by 2002:a05:620a:2a06:b0:7b1:800e:ef3f with SMTP id af79cd13be357-7b193f65594mr28089085a.65.1729879190201; Fri, 25 Oct 2024 10:59:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729879190; cv=none; d=google.com; s=arc-20240605; b=J0CaYsnRHKeVAyHAQn43Mfr5zqH4ZB7Kap04rxfkAzJkPb/06t/SKr5/igQnHUKQgM gq063Lsf8dtuOfXKIpOZHSf9vrPhi6VbzzXzBOyfp9mInWDxsOMsNJd62X6lYVKSJtNH y3RduvyX2sfP7NCT07F3qFQ4tOH2cc86mhM1rhbbBc3VbzjN3mfveAKiKEEve+9+nyXr /oJjEx3LoWw7anJNpNS1tcMb2bT7oFI5TyyjwM/I+Z1PdAWWZsEgMe0gyP8+A9AMHgqM jo7Sqedlnd5vrEQx8mI8p51MjtVNHsiU0QDHkkoeWuAdJK7Wc0tbutx7qUJFiwkWO10s wCuQ== 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=fbyh6bxZX5/ZKOxQuoyjNuxtRkdNVIccxb9KcjXQqaE=; fh=HqSudEo1Dul4VQZbaIae/fo9pZXZrQ0kGBQSdY+EFZo=; b=TTw0ndq3sWo6WsF4uzE5PXP7IMuCVwBAgexLc8dpHEyWwQZBRP0cERaf24B8qkiaV1 ORPnaVmYO0aCG0FAa1OGs3/KkcrSStpCA5y+MfixMBgCZga1YiBNTzfOTegAW0ANOafw rxqLgEB+kNLmU/W5CnK9cLBrqlK6qEbMg391Z7iEvqJQWWfkGLeb/bnJYnnTsnkhy5SX qLafLfPLzlK2jhCyh1vfokOlJpUDSYWg5DAGWc3IFc+xXE2fdxW4FBxAlAcT0iD/I160 wFJtGCjDHbDsdnvCF9SkG69t7EKvuWnE7m2E13uod+KWFLquFJSwspCjl6CzfA17Ev7x lQcA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="U7A3P/ph"; 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-7b18d31ff9asi198769785a.365.2024.10.25.10.59.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Oct 2024 10:59:50 -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="U7A3P/ph"; 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 1t4Oac-0002eu-If; Fri, 25 Oct 2024 13:59:10 -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 1t4Oaa-0002dx-Bp for qemu-devel@nongnu.org; Fri, 25 Oct 2024 13:59:08 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t4OaY-0002Kj-QW for qemu-devel@nongnu.org; Fri, 25 Oct 2024 13:59:08 -0400 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-7ea8c4ce232so1800215a12.0 for ; Fri, 25 Oct 2024 10:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729879144; x=1730483944; 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=fbyh6bxZX5/ZKOxQuoyjNuxtRkdNVIccxb9KcjXQqaE=; b=U7A3P/phcLfX3Q3cZBZW+l9PyQPCcu0e5NlEQ98b3bGkar21XNxElssXrOdFub4eLM ArElI9CBdhpM48YTaSWEROpdkA2P0a8EaNI7oWK+PhV9zQ7izw+/4gqKf1Yyfr/paeAs 5pAsIOabWoDjXaDeGU/w4g6yuanV2snpVS48hgspp/YcfUJ3HidM1AAowqwucFLNWAjl urJHcTzelwl9PYyhgB+iDCaJ301EvLBZbVRD7J56Q1DBWvFrE6bjpaw4wwgGrfJOtVIr sFf0prLLPq7use9ZkbhrlmxAvQjRIYRocy55UuQuSDR9YsjVuV7r8jhgZMKVTckJldrU J8xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729879144; x=1730483944; 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=fbyh6bxZX5/ZKOxQuoyjNuxtRkdNVIccxb9KcjXQqaE=; b=ZUfW8wJsy4kUK0wbQsCqt+sVApNy95OaOzBk/vYtdjc5Cy3WBQb7C8/yuiVhxpnNOb cMJwH8pWW7+j3DElyp8Uc3Qo3prgQcUEQ9skBtE4Sup6zE9YmshzC1UbnpCmilF6tlBa jKf/VEL7iUsG2wAptXxwzzKopdtYT3VyID1Q3reiJihR7c/kVdIuygvVNHHWM+fLlpGw GWKt/x/9UplH/kQ7sl7/wdECKOjBIWTbA+ve67/3Bmgc96yvU4XF9IerMKqIC88WiTtv Bsez7S9laO7mN2QbVMPAY9kZ11ualk8nnB/b5MkIFvIyHc1VA7wDROGvBkkOugRznjbt vTkg== X-Gm-Message-State: AOJu0YznFKhygzlD+GkAOdqsht3/jMKjRr613VQwamMoNFEYWPp/X8qf R57jIOrQrg5dcqjsYjIh7mOCKrj72Wt8/H1kkpj5RIf4Ryc6QSVGNb77lBlIlMxLie/7wqrWXFW O7AEGpg== X-Received: by 2002:a05:6a21:168e:b0:1d8:aa64:874f with SMTP id adf61e73a8af0-1d9a8511c6dmr66649637.43.1729879144617; Fri, 25 Oct 2024 10:59:04 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7edc8679eecsm1358056a12.26.2024.10.25.10.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 10:59:04 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Richard Henderson , Paolo Bonzini , Pierrick Bouvier Subject: [PATCH v3 0/2] target/i386: fix hang when using slow path for ptw_setl Date: Fri, 25 Oct 2024 10:58:55 -0700 Message-Id: <20241025175857.2554252-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::532; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x532.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 | 5 +++++ 2 files changed, 8 insertions(+)