From: "Alex Bennée" <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>, "Paolo Bonzini" <pbonzini@redhat.com>, kvm@vger.kernel.org (open list:Overall KVM CPUs) Subject: [PATCH v3 15/15] accel/kvm: move kvm_update_guest_debug to inline stub Date: Tue, 27 Sep 2022 15:15:04 +0100 [thread overview] Message-ID: <20220927141504.3886314-16-alex.bennee@linaro.org> (raw) In-Reply-To: <20220927141504.3886314-1-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- include/sysemu/kvm.h | 16 ++++++++++++++++ accel/kvm/kvm-all.c | 6 ------ accel/stubs/kvm-stub.c | 5 ----- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 6e1bd01725..790d35ef78 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -247,7 +247,23 @@ int kvm_on_sigbus(int code, void *addr); void kvm_flush_coalesced_mmio_buffer(void); +/** + * kvm_update_guest_debug(): ensure KVM debug structures updated + * @cs: the CPUState for this cpu + * @reinject_trap: KVM trap injection control + * + * There are usually per-arch specifics which will be handled by + * calling down to kvm_arch_update_guest_debug after the generic + * fields have been set. + */ +#ifdef KVM_CAP_SET_GUEST_DEBUG int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap); +#else +static inline int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) +{ + return -EINVAL; +} +#endif /* internal API */ diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 6ebff6e5a6..423fb1936f 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -3395,12 +3395,6 @@ void kvm_remove_all_breakpoints(CPUState *cpu) } } -#else /* !KVM_CAP_SET_GUEST_DEBUG */ - -static int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) -{ - return -EINVAL; -} #endif /* !KVM_CAP_SET_GUEST_DEBUG */ static int kvm_set_signal_mask(CPUState *cpu, const sigset_t *sigset) diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c index 2d79333143..5d2dd8f351 100644 --- a/accel/stubs/kvm-stub.c +++ b/accel/stubs/kvm-stub.c @@ -46,11 +46,6 @@ int kvm_has_many_ioeventfds(void) return 0; } -int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) -{ - return -ENOSYS; -} - int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr) { return 1; -- 2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: "Alex Bennée" <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>, "Paolo Bonzini" <pbonzini@redhat.com>, kvm@vger.kernel.org (open list:Overall KVM CPUs) Subject: [PATCH v3 15/15] accel/kvm: move kvm_update_guest_debug to inline stub Date: Tue, 27 Sep 2022 15:15:04 +0100 [thread overview] Message-ID: <20220927141504.3886314-16-alex.bennee@linaro.org> (raw) In-Reply-To: <20220927141504.3886314-1-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- include/sysemu/kvm.h | 16 ++++++++++++++++ accel/kvm/kvm-all.c | 6 ------ accel/stubs/kvm-stub.c | 5 ----- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 6e1bd01725..790d35ef78 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -247,7 +247,23 @@ int kvm_on_sigbus(int code, void *addr); void kvm_flush_coalesced_mmio_buffer(void); +/** + * kvm_update_guest_debug(): ensure KVM debug structures updated + * @cs: the CPUState for this cpu + * @reinject_trap: KVM trap injection control + * + * There are usually per-arch specifics which will be handled by + * calling down to kvm_arch_update_guest_debug after the generic + * fields have been set. + */ +#ifdef KVM_CAP_SET_GUEST_DEBUG int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap); +#else +static inline int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) +{ + return -EINVAL; +} +#endif /* internal API */ diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 6ebff6e5a6..423fb1936f 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -3395,12 +3395,6 @@ void kvm_remove_all_breakpoints(CPUState *cpu) } } -#else /* !KVM_CAP_SET_GUEST_DEBUG */ - -static int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) -{ - return -EINVAL; -} #endif /* !KVM_CAP_SET_GUEST_DEBUG */ static int kvm_set_signal_mask(CPUState *cpu, const sigset_t *sigset) diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c index 2d79333143..5d2dd8f351 100644 --- a/accel/stubs/kvm-stub.c +++ b/accel/stubs/kvm-stub.c @@ -46,11 +46,6 @@ int kvm_has_many_ioeventfds(void) return 0; } -int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) -{ - return -ENOSYS; -} - int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr) { return 1; -- 2.34.1
next prev parent reply other threads:[~2022-09-27 14:24 UTC|newest] Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-27 14:14 [PATCH v3 00/15] gdbstub/next (MemTxAttrs, re-factoring) Alex Bennée 2022-09-27 14:14 ` [PATCH v3 01/15] hw: encode accessing CPU index in MemTxAttrs Alex Bennée 2022-09-28 16:42 ` Richard Henderson 2022-09-28 18:56 ` Peter Maydell 2022-10-04 13:32 ` Alex Bennée 2022-10-04 14:54 ` Peter Maydell 2022-10-31 12:08 ` Philippe Mathieu-Daudé 2022-10-31 13:03 ` Peter Maydell 2022-11-11 13:23 ` Philippe Mathieu-Daudé 2022-11-11 13:58 ` Alex Bennée 2022-11-14 10:06 ` Peter Maydell 2022-09-27 14:14 ` [PATCH v3 02/15] target/arm: ensure TCG IO accesses set appropriate MemTxAttrs Alex Bennée 2022-09-28 16:45 ` Richard Henderson 2022-09-27 14:14 ` [PATCH v3 03/15] target/arm: ensure HVF traps " Alex Bennée 2022-09-28 16:47 ` Richard Henderson 2022-10-04 10:25 ` Mads Ynddal 2022-09-27 14:14 ` [PATCH v3 04/15] target/arm: ensure KVM " Alex Bennée 2022-09-27 14:14 ` Alex Bennée 2022-09-28 16:49 ` Richard Henderson 2022-10-19 10:44 ` Philippe Mathieu-Daudé 2022-09-27 14:14 ` [PATCH v3 05/15] target/arm: ensure ptw accesses " Alex Bennée 2022-09-28 16:52 ` Richard Henderson 2022-09-27 14:14 ` [PATCH v3 06/15] target/arm: ensure m-profile helpers " Alex Bennée 2022-09-28 16:57 ` Richard Henderson 2022-09-27 14:14 ` [PATCH v3 07/15] qtest: make read/write operation appear to be from CPU Alex Bennée 2022-09-28 16:58 ` Richard Henderson 2022-09-27 14:14 ` [PATCH v3 08/15] hw/intc/gic: use MxTxAttrs to divine accessing CPU Alex Bennée 2022-09-28 17:03 ` Richard Henderson 2022-09-27 14:14 ` [PATCH v3 09/15] hw/timer: convert mptimer access to attrs to derive cpu index Alex Bennée 2022-09-28 17:04 ` Richard Henderson 2022-10-19 10:46 ` Philippe Mathieu-Daudé 2022-09-27 14:14 ` [PATCH v3 10/15] configure: move detected gdb to TCG's config-host.mak Alex Bennée 2022-09-27 14:15 ` [PATCH v3 11/15] gdbstub: move into its own sub directory Alex Bennée 2022-10-19 10:47 ` Philippe Mathieu-Daudé 2022-09-27 14:15 ` [PATCH v3 12/15] gdbstub: move sstep flags probing into AccelClass Alex Bennée 2022-10-04 10:25 ` Mads Ynddal 2022-09-27 14:15 ` [PATCH v3 13/15] gdbstub: move breakpoint logic to accel ops Alex Bennée 2022-10-04 10:25 ` Mads Ynddal 2022-09-27 14:15 ` [PATCH v3 14/15] gdbstub: move guest debug support check to ops Alex Bennée 2022-10-04 10:25 ` Mads Ynddal 2022-09-27 14:15 ` Alex Bennée [this message] 2022-09-27 14:15 ` [PATCH v3 15/15] accel/kvm: move kvm_update_guest_debug to inline stub Alex Bennée 2022-10-19 10:53 ` Philippe Mathieu-Daudé
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220927141504.3886314-16-alex.bennee@linaro.org \ --to=alex.bennee@linaro.org \ --cc=kvm@vger.kernel.org \ --cc=pbonzini@redhat.com \ --cc=qemu-arm@nongnu.org \ --cc=qemu-devel@nongnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.