From nobody Sat May 18 04:13:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1713118934; cv=none; d=zohomail.com; s=zohoarc; b=BQ3K9+0YDVbdIvVWQjW3uMxs3rj3D+2rlaI/HzcfYaFkBPUvSA8E1j3sJoLqpiwr2J9LaRcdG57LzTCMuMbHkaQAyyaWkpguKazk+Hpqjs4X1+C3cnzyevwEkiAqyj22GZselCpj789smzQHicAwPkp8cW4v04sHJ8DOc55X9Es= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1713118934; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PZA8gV0BBs2cpErMwaLb8X15x2R7+Izkch+dcq6waB4=; b=RHKXpVc0RPsUIgIw8YP732myJF5IqtZ7eZFiwX1WicGp1IfIylXZLkJ/yYBf82hhXxGwOv3JwTQCedCmjzAtGfzOjqYW57y3hPTaApVmw+qvqgBQzaVMSBHasdb6j2akER10086NtGfKOhyh773JnjDZvsOib00kpAMV9F5M8x4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1713118934379483.1723445704555; Sun, 14 Apr 2024 11:22:14 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.705686.1102509 (Exim 4.92) (envelope-from ) id 1rw4Tz-0007ID-Jk; Sun, 14 Apr 2024 18:21:39 +0000 Received: by outflank-mailman (output) from mailman id 705686.1102509; Sun, 14 Apr 2024 18:21:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rw4Tz-0007I6-H1; Sun, 14 Apr 2024 18:21:39 +0000 Received: by outflank-mailman (input) for mailman id 705686; Sun, 14 Apr 2024 18:21:38 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rw4Ty-0007Hz-MM for xen-devel@lists.xenproject.org; Sun, 14 Apr 2024 18:21:38 +0000 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [2a00:1450:4864:20::12a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d4fa71f3-fa8b-11ee-b908-491648fe20b8; Sun, 14 Apr 2024 20:21:37 +0200 (CEST) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-518c59b41ccso784879e87.3 for ; Sun, 14 Apr 2024 11:21:37 -0700 (PDT) Received: from lab.home (dynamic-2a00-1028-83a4-4bca-c0bb-96ff-feed-9d50.ipv6.o2.cz. [2a00:1028:83a4:4bca:c0bb:96ff:feed:9d50]) by smtp.gmail.com with ESMTPSA id cw21-20020a170906479500b00a52182471a2sm4509634ejc.13.2024.04.14.11.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 11:21:36 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d4fa71f3-fa8b-11ee-b908-491648fe20b8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713118897; x=1713723697; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PZA8gV0BBs2cpErMwaLb8X15x2R7+Izkch+dcq6waB4=; b=CLHn5+qxaP9ZxJmM2U2LKNrc8dosw5tdgvVwmuPpyoBcu8XEovbVg2sdqY7kwDzjIr 6m49KQwmEm7Wkvpe9+p8h/4X+ZYuL9WYVbJkuIOI0+m6/vgnI1NNSYAHYtrPavr7sVO8 HPX9vWmfFMLfra/UTKvWgS8KIaF+ACEwJ7eBNiRqcm9jgNDzD9agEtQ4qvIs6DE1sr/0 7vJuPEjBQeMkv8IAHNKaSgrLwOZgcWBffelz+R9Xnlnw/S+02DiEAd3YZ+xLZwIN9n3T bOFSZE7a/v6Y+30qanx9JHN0ubO3J943/kBDCUOf13gzJMBY8D7a6kzTnJQ8m/QW0ni5 5a5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713118897; x=1713723697; 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=PZA8gV0BBs2cpErMwaLb8X15x2R7+Izkch+dcq6waB4=; b=QZKQlDE0DSA17VAfVho+ik2qB3k92iClq9IW/rxptXzk8vrb39ONVJSE747wWl5XNf xUuBPKutt4qgLgI1WoMyc8tVK1Spg9cAAw3PBgdU0T7MlIs+YckT/50WgTcHcGBYldMm 1Ra9N7cTqLex94McjXGMFa9hJQMJMgdXPpTyBkbS7TAXmIUFcfv4G4cmylxKlLHQgigZ rKb/FXKdrZ1pveQ2PAjQ6VXzaabk9BFAvipA2YlizGttKM/3+SgM4pcX5ep7QtEgVtIo OSGCjqaLxwcaDF5qIbuvn6HhztMoDchwa3dGlhKsxxZyrn2ngK15qQuqa/wOr1ZZxjU5 QcIA== X-Gm-Message-State: AOJu0YyQzwSWVpxNO66A7WAQREKaPgYjkieTWzihCChhz0+moAxDm5id oXqI/JnpPTNWZmQKZ2/ZCp7XfPRXSHMa9A9Sfu89wgQ1/eHu6+7keFZQkqMH X-Google-Smtp-Source: AGHT+IFK9OXHMFYtHhakU/lLByCUOH+K/meWAJ/WJbxxgxn69rPlS5theOGe8+c82Hdg+jKoWWxLsg== X-Received: by 2002:ac2:5b43:0:b0:517:b2b:6ca7 with SMTP id i3-20020ac25b43000000b005170b2b6ca7mr4655372lfp.59.1713118896495; Sun, 14 Apr 2024 11:21:36 -0700 (PDT) From: "=?UTF-8?q?Petr=20Bene=C5=A1?=" X-Google-Original-From: =?UTF-8?q?Petr=20Bene=C5=A1?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Petr=20Bene=C5=A1?= , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH] x86/monitor: allow fast-singlestepping without enabling singlestep monitor Date: Sun, 14 Apr 2024 18:21:14 +0000 Message-Id: <4dfbc4c3cfdd36601e0b9b100fa6cd02682be3c6.1713118660.git.w1benny@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1713118942906100001 From: Petr Bene=C5=A1 Reorder the condition checks within the HVM_MONITOR_SINGLESTEP_BREAKPOINT case to enable fast singlestepping independently of the singlestep monitor being enabled. Previously, fast singlestepping required the singlestep monitor to be explicitly enabled through xc_monitor_singlestep, even though it operates entirely within Xen and does not generate external events. Signed-off-by: Petr Bene=C5=A1 Acked-by: Tamas K Lengyel --- xen/arch/x86/hvm/monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/monitor.c b/xen/arch/x86/hvm/monitor.c index 4f500beaf5..2a8ff07ec9 100644 --- a/xen/arch/x86/hvm/monitor.c +++ b/xen/arch/x86/hvm/monitor.c @@ -178,8 +178,6 @@ int hvm_monitor_debug(unsigned long rip, enum hvm_monit= or_debug_type type, break; =20 case HVM_MONITOR_SINGLESTEP_BREAKPOINT: - if ( !ad->monitor.singlestep_enabled ) - return 0; if ( curr->arch.hvm.fast_single_step.enabled ) { p2m_altp2m_check(curr, curr->arch.hvm.fast_single_step.p2midx); @@ -188,6 +186,8 @@ int hvm_monitor_debug(unsigned long rip, enum hvm_monit= or_debug_type type, curr->arch.hvm.fast_single_step.p2midx =3D 0; return 0; } + if ( !ad->monitor.singlestep_enabled ) + return 0; req.reason =3D VM_EVENT_REASON_SINGLESTEP; req.u.singlestep.gfn =3D gfn_of_rip(rip); sync =3D true; --=20 2.34.1