Re: [PATCH 2/3] hvf: implement guest debugging on Apple Silicon hosts

2022-11-09 Thread Francesco Cagnin
> In my version, I added the sw breakpoints to `hvf_vcpu_state` so they would > follow each CPU, but it's effectively a copy of the global set of breakpoints. Ah, I missed this field, and it seems the proper one to use. I'll switch to this. > Moving it to `hvf_arch_update_guest_debug` would proba

Re: [PATCH 2/3] hvf: implement guest debugging on Apple Silicon hosts

2022-11-09 Thread Peter Maydell
On Tue, 8 Nov 2022 at 11:51, Mads Ynddal wrote: > I also noticed you are adding 1 to the WRPs and BRPs. As I interpret the > documentation, you should subtract 1 instead, given the value 0 is reserved: > > diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c > index dbc3605f6d..80a583cbd1 1006

Re: [PATCH 2/3] hvf: implement guest debugging on Apple Silicon hosts

2022-11-09 Thread Mads Ynddal
> On 8 Nov 2022, at 12.51, Mads Ynddal wrote: > > I also noticed you are adding 1 to the WRPs and BRPs. As I interpret the > documentation, you should subtract 1 instead, given the value 0 is reserved: I tested it, and you do have to add 1. I guess it's implied that you cannot have less than 2

Re: [PATCH 2/3] hvf: implement guest debugging on Apple Silicon hosts

2022-11-08 Thread Mads Ynddal
> On 8 Nov 2022, at 11.09, Francesco Cagnin wrote: > > Mads, thanks for the review and feedbacks. I worked on this a few months > ago but only managed to have it published now, I'm sorry for work being > done twice. > > I'll add support for SSTEP_NOIRQ as you suggested. > > For multi-core sys

Re: [PATCH 2/3] hvf: implement guest debugging on Apple Silicon hosts

2022-11-08 Thread Francesco Cagnin
Mads, thanks for the review and feedbacks. I worked on this a few months ago but only managed to have it published now, I'm sorry for work being done twice. I'll add support for SSTEP_NOIRQ as you suggested. For multi-core systems there's no particular issue, just I'm not familiar with all of the

Re: [PATCH 2/3] hvf: implement guest debugging on Apple Silicon hosts

2022-11-07 Thread Mads Ynddal
> On 4 Nov 2022, at 19.41, francesco.cag...@gmail.com wrote: > > From: Francesco Cagnin > > Support is added for single-stepping, software breakpoints, hardware > breakpoints and watchpoints. The code has been structured like the KVM > counterpart (and many parts are basically identical). >

Re: [PATCH 2/3] hvf: implement guest debugging on Apple Silicon hosts

2022-11-07 Thread Mads Ynddal
> On 4 Nov 2022, at 19.41, francesco.cag...@gmail.com wrote: > > From: Francesco Cagnin > > Support is added for single-stepping, software breakpoints, hardware > breakpoints and watchpoints. The code has been structured like the KVM > counterpart (and many parts are basically identical). > >