[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 04/13] target: arm: Move all interrupt and excepti
From: |
Samuel Ortiz |
Subject: |
Re: [Qemu-arm] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file |
Date: |
Tue, 27 Nov 2018 16:35:51 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Tue, Nov 20, 2018 at 01:45:03PM +0000, Peter Maydell wrote:
> On 13 November 2018 at 16:52, Samuel Ortiz <address@hidden> wrote:
> > Most of them are TCG dependent so we want to be able to not build them
> > in order to support TCG disablement with ARM.
> >
> > Signed-off-by: Samuel Ortiz <address@hidden>
> > Tested-by: Philippe Mathieu-Daudé <address@hidden>
> > Reviewed-by: Robert Bradford <address@hidden>
> > ---
> > target/arm/excp_helper.c | 550 +++++++++++++++++++++++++++++++++++++++
> > target/arm/helper.c | 531 -------------------------------------
> > target/arm/Makefile.objs | 2 +-
> > 3 files changed, 551 insertions(+), 532 deletions(-)
> > create mode 100644 target/arm/excp_helper.c
>
> You'll find that you need to rebase as there is a recent change
> that your moved copies are missing: commit e24ad484909e7.
> (I have just discovered git diff's --color-moved option which
> is great for checking this sort of code-movement patch.)
>
> What is your plan for dealing with the way that the KVM code
> for injecting a breakpoint exception into the guest works
> by calling the do_interrupt code ?
> (see target/arm/kvm64.c:kvm_arm_handle_debug(),
> which calls cc->do_interrupt(cs).) This patch moves those
> functions to a file which won't be compiled and a later one
> in the series seems to stop cc->do_interrupt being set at all
> if CONFIG_TCG is not defined. That will result in QEMU crashing
> when it tries to inject an exception, won't it?
Yes, indeed.
So it seems we need to inject an exception back into the guest when
doing hardware assisted debugging and when we have not set any
breakpoint from QEMU. So it's essentially handling the debugging from
the guest case.
Would returning an error when that happens be an acceptable solution? So
when building qemu for arm64 with TCG disabled, one would basically no
longer be able to debug from the guest. Something along those lines:
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index 0a502091e7..3e8a871272 100644
--- a/target/arm/kvm64.c
+++ b/target/arm/kvm64.c
@@ -1079,6 +1079,11 @@ bool kvm_arm_handle_debug(CPUState *cs, struct
kvm_debug_exit_arch *debug_exit)
__func__, debug_exit->hsr, env->pc);
}
+ if (!tcg_enabled()) {
+ error_report("guest debugging not supported");
+ return false;
+ }
+
/* If we are not handling the debug exception it must belong to
* the guest. Let's re-use the existing TCG interrupt code to set
* everything up properly.
- [Qemu-arm] [PATCH 00/13] Support disabling TCG on ARM, Samuel Ortiz, 2018/11/13
- [Qemu-arm] [PATCH 13/13] target: arm: Do not build TCG objects when TCG is off, Samuel Ortiz, 2018/11/13
- [Qemu-arm] [PATCH 12/13] target: arm: Makefile cleanup, Samuel Ortiz, 2018/11/13
- [Qemu-arm] [PATCH 10/13] target: arm: Move watchpoints APIs to helper.c, Samuel Ortiz, 2018/11/13
- [Qemu-arm] [PATCH 09/13] target: arm: Move CPU state dumping routines to helper.c, Samuel Ortiz, 2018/11/13
- [Qemu-arm] [PATCH 08/13] target: arm: Move all VFP helpers into their own file, Samuel Ortiz, 2018/11/13
- [Qemu-arm] [PATCH 11/13] target: arm: Define TCG dependent functions when TCG is enabled, Samuel Ortiz, 2018/11/13
- [Qemu-arm] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file, Samuel Ortiz, 2018/11/13
- Re: [Qemu-arm] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file, Peter Maydell, 2018/11/20
- Re: [Qemu-arm] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file,
Samuel Ortiz <=
- Re: [Qemu-arm] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file, Peter Maydell, 2018/11/27
- Re: [Qemu-arm] [Qemu-devel] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file, Samuel Ortiz, 2018/11/28
- Re: [Qemu-arm] [Qemu-devel] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file, Peter Maydell, 2018/11/28
- Re: [Qemu-arm] [Qemu-devel] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file, Samuel Ortiz, 2018/11/28
- Re: [Qemu-arm] [Qemu-devel] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file, Samuel Ortiz, 2018/11/28
Re: [Qemu-arm] [PATCH 04/13] target: arm: Move all interrupt and exception handlers into their own file, Peter Maydell, 2018/11/20
[Qemu-arm] [PATCH 05/13] target: arm: Move the DC ZVA helper into op_helper, Samuel Ortiz, 2018/11/13
[Qemu-arm] [PATCH 03/13] target: arm: Move all v7m helpers into their own file, Samuel Ortiz, 2018/11/13