From patchwork Fri Dec 1 14:32:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 748990 Delivered-To: patch@linaro.org Received: by 2002:adf:f9cb:0:b0:32d:baff:b0ca with SMTP id w11csp307869wrr; Fri, 1 Dec 2023 06:32:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtR4V43C9F5tVPbEkZ01+RyBwq1vM0vJaN6G5YhAXgtm/p/guv7FxfxLdXS917sqzRXp6M X-Received: by 2002:a05:622a:120c:b0:423:7669:49c3 with SMTP id y12-20020a05622a120c00b00423766949c3mr38134903qtx.19.1701441179126; Fri, 01 Dec 2023 06:32:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701441179; cv=none; d=google.com; s=arc-20160816; b=ebmBNpzEw3KFm3hNuXQ2utaQEvU7kD/+OmAZ7drwNwNn0/nRFOjHz1UU0Ay+8AzeGE 9YNtWu5SraaFpE5zf/HBxGejttoGNckchsmfMhxj5rwlNTawWO4AFr/jQYbW0XugDmju 2JJlLkLIVjTylKyqfLJhavKq6NbGSKcYsEMwGDpbQQCjDzdWqc0PBY+YgomKIkRB23Hc ur3RpldhshQLMnNMU6R+rGZgNdLAWaafnnVLQcIZybt14iQ+PMPMRJc0QvOXXkhoje8n Yn0NHYD6WU/lKjIjLrLpg+Zv6vcCUX+4AJqkoAZibzvLGJXH57XGU1dgcjlze9o+b4Kd Gg1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=H2r7iA7OoHYzxctfj3egfbT+slVUvULOjb8ti2ra+So=; fh=o3lfIpO1LiWB5YaKx2qN0pZoVgkt08VAmJbZ6Wpmxfk=; b=xBSW1dOqw1ZXKxvP47xWioqJuw3FdhWUSdeeDywW9opvUs4iiFKnMub36ChIf0kfdT 7T4iMGG1YrIoQ4T4hgeixmRCUypYC2/UhG7TYbOpdBXTtZhBuIKgU4olkES+5wymueaX XqznHwT99r09TXma+8sXC22fObF3qLbsnmDUi1V6LBv4TO3knC8o7EYqzBHmfh1RoJ8W q/sTbYBNhjfmsZuvBjN2gdu/xXXgp8hDBhN4a1BpLQEMUmTQz77pJ3Yyz+p5JiWi6dCM hhsYOLIrdKtlLOxO06Ed875qU8Okyax4ISlh86V1Yt/8m1/rsyAORGKAoMBdJzYmHjQ6 CLOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KADm7Tpl; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ex8-20020a05622a518800b0042371e315e5si3794698qtb.552.2023.12.01.06.32.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Dec 2023 06:32:59 -0800 (PST) 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=KADm7Tpl; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r94Yw-0003YN-6v; Fri, 01 Dec 2023 09:32:14 -0500 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 1r94Yu-0003Xp-GX for qemu-devel@nongnu.org; Fri, 01 Dec 2023 09:32:12 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r94Ys-0002WX-UU for qemu-devel@nongnu.org; Fri, 01 Dec 2023 09:32:12 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-33330305372so663653f8f.3 for ; Fri, 01 Dec 2023 06:32:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701441129; x=1702045929; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H2r7iA7OoHYzxctfj3egfbT+slVUvULOjb8ti2ra+So=; b=KADm7TplXpHqeQkRyKD8tPYVHOdRVOhIinLHImGZ2VcV5ReJ4tgkNKfniMY/e6eg0V wYy1gnygbp+TNUtOnvUnLKOf3NcXlJF1vYp7T/nS25i5Vs/cjvyQE4IpaLu4PeDLD5/k S02Ig2oZtt/kZ3Pi0IuJGvLAdC1xR3/4SNxuvtov2LQH2iabmMG0JuZ9vIQjkRnk2O7i Xs3V2HYRpuE0OH+1EThYclKv0A5sxlD4s2Rptxi6df6ej1VOIU0fHIHr9BKHFX7Chyo3 g05uO+X/Xegx78ScnqsgcW1dksq0N8veUpwpZ5K6YTMiUrhjfhwPlzOmt6RBZz95Eurj kb+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701441129; x=1702045929; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H2r7iA7OoHYzxctfj3egfbT+slVUvULOjb8ti2ra+So=; b=b0QolRmdEqKiPRD649JvdJDzrzS48lvpKhbJTHxG3tOu3pmW7MLm+ys2YYg4FiWWHu rNkSOcPbGDlrCEddbQbdTv2v4MZhveZFVATPWPhEO7cY4xrAFmG1Rkckry3OSHHpYXBL XYD5+zKfEec64MI5hsh3tu4nfYb/Fn1vomFH9KKYuzXzB35TS/q0IGwglwUGepUJ/WHN IHmr3dKUUDU8thT1kSTG7IuXY3tPH2Z1a0tFiUDa0P0pRN8kpQFWE3bg+SzzvN53oodR EINduUurX35Vsa95/sCff22SAEetL9WodFvT3l2S1sZi3sAPxadKJ1feqWo/vE9P+U/Y 7Zhg== X-Gm-Message-State: AOJu0Yx41oCiGVP2Q5MFpXyVdyCSOPswrfiqqWu3Yck/TFB79KsKvaY+ Xdf4Zy+jePQhszLlPyqARk4dfRMEV1tsPHG+uck= X-Received: by 2002:a5d:4e8b:0:b0:333:85e:a11f with SMTP id e11-20020a5d4e8b000000b00333085ea11fmr889298wru.59.1701441129295; Fri, 01 Dec 2023 06:32:09 -0800 (PST) Received: from m1x-phil.lan ([176.176.160.225]) by smtp.gmail.com with ESMTPSA id dq4-20020a0560000cc400b00332e7f9e2a8sm4277513wrb.68.2023.12.01.06.32.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 01 Dec 2023 06:32:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell , Paolo Bonzini , kvm@vger.kernel.org, =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.0 1/2] accel/kvm: Expose kvm_supports_guest_debug() prototype Date: Fri, 1 Dec 2023 15:32:00 +0100 Message-ID: <20231201143201.40182-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231201143201.40182-1-philmd@linaro.org> References: <20231201143201.40182-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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, T_SCC_BODY_TEXT_LINE=-0.01 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 kvm_supports_guest_debug() should be accessible by KVM implementations. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Gavin Shan --- accel/kvm/kvm-cpus.h | 1 - include/sysemu/kvm.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/kvm/kvm-cpus.h b/accel/kvm/kvm-cpus.h index ca40add32c..a232348c91 100644 --- a/accel/kvm/kvm-cpus.h +++ b/accel/kvm/kvm-cpus.h @@ -18,7 +18,6 @@ void kvm_destroy_vcpu(CPUState *cpu); void kvm_cpu_synchronize_post_reset(CPUState *cpu); void kvm_cpu_synchronize_post_init(CPUState *cpu); void kvm_cpu_synchronize_pre_loadvm(CPUState *cpu); -bool kvm_supports_guest_debug(void); int kvm_insert_breakpoint(CPUState *cpu, int type, vaddr addr, vaddr len); int kvm_remove_breakpoint(CPUState *cpu, int type, vaddr addr, vaddr len); void kvm_remove_all_breakpoints(CPUState *cpu); diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index d614878164..6ed18f2d6a 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -206,6 +206,7 @@ int kvm_has_gsi_routing(void); */ bool kvm_arm_supports_user_irq(void); +bool kvm_supports_guest_debug(void); int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr); int kvm_on_sigbus(int code, void *addr); From patchwork Fri Dec 1 14:32:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 748991 Delivered-To: patch@linaro.org Received: by 2002:adf:f9cb:0:b0:32d:baff:b0ca with SMTP id w11csp307988wrr; Fri, 1 Dec 2023 06:33:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHG54U6xXKaD/4zcdbBuykRaZlQ0Fy+oJPg+ukVOzILRnKeTlFAw87yGbgkPD1e3hg60KKW X-Received: by 2002:a0c:f8cf:0:b0:67a:44c6:2eb2 with SMTP id h15-20020a0cf8cf000000b0067a44c62eb2mr18960273qvo.8.1701441188721; Fri, 01 Dec 2023 06:33:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701441188; cv=none; d=google.com; s=arc-20160816; b=lPenlsGebtlpg72zJrR66Ud9CdI8unX6rQZ83/QqADCvHnoKVDgKNjvWC//Ror4bUu ClYmrd+wA4EOafjgBFS0weCWObeoL77rMIaVgpqGp7Zx9NY56z0JLHurGG5ah5/+3/cu uLMQiXCruLS5am2fP1Zl9HCIBFY7hBVPxyvThN1m8NDFooZ/Y28S7PBuT1K0CB7Z2wA5 1eg7+fOXf1WCLB/XunRtfpniknYtJasaQ9x8K21cVaAzrrS7/M6Zd1KQZ8LZ4zn2MCqe sqgyBKHGnHUDV114PhMvzNevKe7rnpCy/KtA+1Oq2JwBlCKtSm7zPSa+TaqZNspJ4586 32+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lzQsYOZx1lby/03o6yhLAnKTrunXv93oPFAjodmUZ7Q=; fh=o3lfIpO1LiWB5YaKx2qN0pZoVgkt08VAmJbZ6Wpmxfk=; b=svmx6vcsQdSu9BFIXvuAqx4vqjJMJK2TrMX2ku8gBc7F/JiTXjHsnVZhExrqFsMmlr ydzAd6qbyeWDiKIKbzeFJ+Pmt+MY3O7dewBUtOyY7nJJh5K7l3mChtHFPtqc2HQF98Zl GXMlki8DVrnGKoDnMfAezbSmWNljMk65f6VXw1fDRPxfZK/sjCDgCPxsKgUfHppPHWQz 5bS1Oa6AgtKIFDOZ7fktqq+IZsjv/OYR6DcoP6HaWbV17iCmTLEd1Vyyo7lPzKsOZXL7 EG+4/d76/AIrKn+F8JKYSBCMgKRrJLtDbZ2ND8GMjxzgkOR5V0BFiI3E9EIUgr+lw+TP cfbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mGNXZeGt; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h4-20020a0ceec4000000b0067a8b528717si2767607qvs.481.2023.12.01.06.33.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Dec 2023 06:33:08 -0800 (PST) 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=mGNXZeGt; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r94Z6-0003Zy-1u; Fri, 01 Dec 2023 09:32:25 -0500 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 1r94Yz-0003ZC-WD for qemu-devel@nongnu.org; Fri, 01 Dec 2023 09:32:18 -0500 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r94Yy-0002Xp-Du for qemu-devel@nongnu.org; Fri, 01 Dec 2023 09:32:17 -0500 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50bc36725bbso3210417e87.2 for ; Fri, 01 Dec 2023 06:32:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701441134; x=1702045934; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lzQsYOZx1lby/03o6yhLAnKTrunXv93oPFAjodmUZ7Q=; b=mGNXZeGt4LleZsRH7SVt8Q7wjSqera5hWc063YxmTU+nEbsPen88n1h/SbUw88OQm/ UxXn+aLHtTtynu8NZf6WyhNrXahAOe1tva4cozSwozUkraZ/7YmPCWmulVFCEsN38d7R c83VVsbPnsEFTlxshnlj+my8t6Np5jZGjB9a6VWTHJ3yrnPU0sNr312uO9zzrMECBWXU 6Jt5Ncebw6O8YzUB2o8Gf5G2blMp0PGGiSr497AImY0s2pJn+wr7pfmBPK7hpLoyGTeO kjC5ikBXWxlok9I8XXKVAC3sC8b+68ePGaQ3aA4jHADRJqjmvgm4vIfW9apwJ7N/+4Xy L2XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701441134; x=1702045934; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lzQsYOZx1lby/03o6yhLAnKTrunXv93oPFAjodmUZ7Q=; b=wgFv4OCigTzvTEHoZW8AAp2UgC5wbtUBYjkWPWPj9jsd5byed58WqdLzakfaLIpu0O xgryiyBuOlSflLNZ83TY3xkoImAqsh7Pf2ni6upR7KWgLylw5A11MpLRUbz3yHb2C72w VR+aiGlj3idnh8IL08X0om9xeaCj2xVHg9E6wMEwHk8xQNGqlM7cydn9NKn8Q0QZ3FHI AZtcbEwEEPslkZsKLH88HrWIsA/tBMJyyG0gqoFWGGfsmEJNocxS7iytfpJ80U/Gk5Ta uId7WEOpKfuvegWbK9uu+iQNd5zbRdaM15OUyALPUS4yvwZorCu9fMNOzlqixuh60Zdf EJQQ== X-Gm-Message-State: AOJu0YyKoqyoBWi0qg52H2JQxZf+WFgdjbA/CIr3hw14sE5M2ncxFLf0 yhB2GUyhS7cmcSflLnG8Uxi2C2+zJngutAkt1QQ= X-Received: by 2002:a05:6512:1598:b0:50b:d763:fe35 with SMTP id bp24-20020a056512159800b0050bd763fe35mr1096852lfb.80.1701441134581; Fri, 01 Dec 2023 06:32:14 -0800 (PST) Received: from m1x-phil.lan ([176.176.160.225]) by smtp.gmail.com with ESMTPSA id d9-20020a056000114900b00332e8dd713fsm4350612wrx.74.2023.12.01.06.32.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 01 Dec 2023 06:32:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell , Paolo Bonzini , kvm@vger.kernel.org, =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.0 2/2] target/arm/kvm: Use generic kvm_supports_guest_debug() Date: Fri, 1 Dec 2023 15:32:01 +0100 Message-ID: <20231201143201.40182-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231201143201.40182-1-philmd@linaro.org> References: <20231201143201.40182-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=philmd@linaro.org; helo=mail-lf1-x12e.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 Do not open-code the generic kvm_supports_guest_debug(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Gavin Shan --- target/arm/kvm64.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 3c175c93a7..031d20ad92 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -32,13 +32,8 @@ #include "hw/acpi/acpi.h" #include "hw/acpi/ghes.h" -static bool have_guest_debug; - void kvm_arm_init_debug(KVMState *s) { - have_guest_debug = kvm_check_extension(s, - KVM_CAP_SET_GUEST_DEBUG); - max_hw_wps = kvm_check_extension(s, KVM_CAP_GUEST_DEBUG_HW_WPS); hw_watchpoints = g_array_sized_new(true, true, sizeof(HWWatchpoint), max_hw_wps); @@ -1141,7 +1136,7 @@ static const uint32_t brk_insn = 0xd4200000; int kvm_arch_insert_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint *bp) { - if (have_guest_debug) { + if (kvm_supports_guest_debug()) { if (cpu_memory_rw_debug(cs, bp->pc, (uint8_t *)&bp->saved_insn, 4, 0) || cpu_memory_rw_debug(cs, bp->pc, (uint8_t *)&brk_insn, 4, 1)) { return -EINVAL; @@ -1157,7 +1152,7 @@ int kvm_arch_remove_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint *bp) { static uint32_t brk; - if (have_guest_debug) { + if (kvm_supports_guest_debug()) { if (cpu_memory_rw_debug(cs, bp->pc, (uint8_t *)&brk, 4, 0) || brk != brk_insn || cpu_memory_rw_debug(cs, bp->pc, (uint8_t *)&bp->saved_insn, 4, 1)) {