From nobody Sun Feb 8 22:07:47 2026 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=1626295126; cv=none; d=zohomail.com; s=zohoarc; b=aLel6iKPeTEHbi3DmcnWWrYAjjdRp6znJwbFPWZA0Fng7IVmHEXo5f8+CryaSATfv1SLHVQgpRz1buVOUC1kgiIstSgST9IYHJrivKMCsp+VUKa/wA416+5Uq3q6LNqaqLgDkwyIFP93+73ymva7ATuZbLRNcA2YceHXlMw3beg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626295126; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yWceiZFDgebIWTda4wCRP6HVoSGyuXNhbWaAMklJuU4=; b=SJwh985gPfgH7OvuqtakIhmHXcYwFAId8DAnoy/t5eUwkaAYMW5BlTwIiV/LiOLF89wTEGn4ri1u9KyHh5tyTsTXPI6dhRkNVGWoLfG2umXNcuEi6XmC2IWYKjWbHaAmWgbn30T0v8x2yY+z8X5ib4D4fa2IcVKKEh2CZTBUgt8= 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 1626295126752770.8538788978859; Wed, 14 Jul 2021 13:38:46 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.156216.288291 (Exim 4.92) (envelope-from ) id 1m3leJ-0001PA-MZ; Wed, 14 Jul 2021 20:38:31 +0000 Received: by outflank-mailman (output) from mailman id 156216.288291; Wed, 14 Jul 2021 20:38:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m3leJ-0001Ot-IL; Wed, 14 Jul 2021 20:38:31 +0000 Received: by outflank-mailman (input) for mailman id 156216; Wed, 14 Jul 2021 20:38:29 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m3leH-0000KG-P6 for xen-devel@lists.xenproject.org; Wed, 14 Jul 2021 20:38:29 +0000 Received: from mail-pj1-x102e.google.com (unknown [2607:f8b0:4864:20::102e]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b0fc6f99-c991-48af-81dc-bde2f387e0f9; Wed, 14 Jul 2021 20:38:23 +0000 (UTC) Received: by mail-pj1-x102e.google.com with SMTP id me13-20020a17090b17cdb0290173bac8b9c9so4648017pjb.3 for ; Wed, 14 Jul 2021 13:38:23 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:4c02:4c00::1]) by smtp.gmail.com with ESMTPSA id b17sm1785084pfm.54.2021.07.14.13.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 13:38:22 -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 X-Inumbo-ID: b0fc6f99-c991-48af-81dc-bde2f387e0f9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yWceiZFDgebIWTda4wCRP6HVoSGyuXNhbWaAMklJuU4=; b=hfEkg6QA9LY0LfkLt5VFa/JybLvpNyp0rnCm5h88rFmYdt+6X+5BP1z76USxtHzlm7 iF3mACEVxenNV58/ihKM+C47W5M9ENeZQMvx+bGS2W1ZsYeUc754e3FCBR6PB1IIYL4M GHHkFw0cWN6rjQsgqzZEJ2N1Ix5qBoRatpjkztMzdNH+v8zycQw2koCriewHEL+GPgzx 4APKd0Y2KBVJWiyjUcyrhWuOGCpbaThY+kyiWFMgny7PMEaU8BzZ+G6RV0dRkOI7Q5eO sXxq69m9/nLzj8yn2PTFv9Xz3eTTaeAZvf9GgefwM74cHsYuMRWwU7XkdYx3z0R6Sx92 4WSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=yWceiZFDgebIWTda4wCRP6HVoSGyuXNhbWaAMklJuU4=; b=AzhjlTHW5/txQUQQsPbN14zK7lZjbWVGiuoTsKqthu4849ivcSGYT5sKfzlLtbwXOi qfrmZYFmZXMBZYzEhIZIAe4KzVtBmILeLYlO5BFuR8vwwMDUMkqwa6ERa9pqzPRUoXCk 3p3gl/gh/kGcxQ8rZYcqd0XjhXnOuwNg2tvDIsvdsO+J5CjTSJg441i0As+6D7xmIleM 9mZye4UjTzaCHJd+MNMBB0+SorgSgZAJ2LE0zPPPHhjie2VVpgmSsfCq/qmH8syUQ/PS 6uoumg3vSIMdghs9a0fWVpO560QpRXvW6MfrRGmxrjRbAwet2iPohirTXQi8vFc9rROB sVrA== X-Gm-Message-State: AOAM533Gqrw4J5/DsF9LSJl9MdOyM4YKDFM+X/mmDUKMVs+YP3w0pYMF JQ+zxAsemk+ZBncHTi4AduvUzY3/Hqrty/BJ X-Google-Smtp-Source: ABdhPJxcv28P9SX6dmui/eaRLIuu9pZdMquhwOF+f/Jq46jqsVCHyEjAilVQ4c2cIAyfR5EdnTGWNA== X-Received: by 2002:a17:90a:2ec1:: with SMTP id h1mr5693893pjs.4.1626295102934; Wed, 14 Jul 2021 13:38:22 -0700 (PDT) Sender: Bobby Eshleman From: Bobby Eshleman To: xen-devel@lists.xenproject.org Cc: Bobby Eshleman , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Wei Liu , Elena Ufimtseva , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Jun Nakajima , Kevin Tian Subject: [PATCH v2 4/4] x86/debug: move domain_pause_for_debugger to debugger.c Date: Wed, 14 Jul 2021 13:37:47 -0700 Message-Id: X-Mailer: git-send-email 2.30.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1626295128748100001 Content-Type: text/plain; charset="utf-8" The function domain_pause_for_debugger() is conditionally compiled if CONFIG_CRASH_DEBUG=3Dy. Instead of placing an extra #ifdef inside domain.c, this commit moves domain_pause_for_debugger() into x86/debugger.c which is only built by Kbuild given CONFIG_CRASH_DEBUG=3Dy. Signed-off-by: Bobby Eshleman Acked-by: Jan Beulich --- Changes in v2: - constify struct vcpu *curr xen/arch/x86/debugger.c | 12 ++++++++++++ xen/arch/x86/domain.c | 14 -------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/debugger.c b/xen/arch/x86/debugger.c index 985c1275b4..54e81b99f4 100644 --- a/xen/arch/x86/debugger.c +++ b/xen/arch/x86/debugger.c @@ -15,6 +15,18 @@ #include #include =20 +void domain_pause_for_debugger(void) +{ + const struct vcpu *curr =3D current; + struct domain *d =3D curr->domain; + + domain_pause_by_systemcontroller_nosync(d); + + /* if gdbsx active, we just need to pause the domain */ + if ( curr->arch.gdbsx_vcpu_event =3D=3D 0 ) + send_global_virq(VIRQ_DEBUGGER); +} + bool debugger_trap_entry( unsigned int vector, const struct cpu_user_regs *regs) { diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 5b948ff270..450b2ca831 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -2540,20 +2540,6 @@ static int __init init_vcpu_kick_softirq(void) } __initcall(init_vcpu_kick_softirq); =20 -#ifdef CONFIG_CRASH_DEBUG -void domain_pause_for_debugger(void) -{ - struct vcpu *curr =3D current; - struct domain *d =3D curr->domain; - - domain_pause_by_systemcontroller_nosync(d); - - /* if gdbsx active, we just need to pause the domain */ - if ( curr->arch.gdbsx_vcpu_event =3D=3D 0 ) - send_global_virq(VIRQ_DEBUGGER); -} -#endif - /* * Local variables: * mode: C --=20 2.30.0