[Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2015-01-19 Thread Peter Maydell
Add assertion checking when cpreg structures are registered that they either forbid raw-access attempts or at least make an attempt at handling them. Also add an assert in the raw-accessor-of-last-resort, to avoid silently doing a read or write from offset zero, which is actually AArch32 CPU

Re: [Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2015-01-19 Thread Greg Bellows
On Mon, Jan 19, 2015 at 1:03 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 19 January 2015 at 18:05, Greg Bellows greg.bell...@linaro.org wrote: On Mon, Jan 19, 2015 at 9:17 AM, Peter Maydell peter.mayd...@linaro.org wrote: +if (ri-type ARM_CP_CONST) { +return

Re: [Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2015-01-19 Thread Greg Bellows
On Mon, Jan 19, 2015 at 9:17 AM, Peter Maydell peter.mayd...@linaro.org wrote: Add assertion checking when cpreg structures are registered that they either forbid raw-access attempts or at least make an attempt at handling them. Also add an assert in the raw-accessor-of-last-resort, to avoid

Re: [Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2015-01-19 Thread Peter Maydell
On 19 January 2015 at 18:05, Greg Bellows greg.bell...@linaro.org wrote: On Mon, Jan 19, 2015 at 9:17 AM, Peter Maydell peter.mayd...@linaro.org wrote: +if (ri-type ARM_CP_CONST) { +return true; +} Had to refresh my memory on this. It appears we changed the name

Re: [Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2015-01-19 Thread Peter Maydell
On 19 January 2015 at 19:05, Greg Bellows greg.bell...@linaro.org wrote: On Mon, Jan 19, 2015 at 1:03 PM, Peter Maydell peter.mayd...@linaro.org wrote: Doh. I inverted the name and polarity but forgot to change the function body. (I have no idea why that didn't blow up). Will fix (and test a

Re: [Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2015-01-19 Thread Greg Bellows
On Mon, Jan 19, 2015 at 1:07 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 19 January 2015 at 19:05, Greg Bellows greg.bell...@linaro.org wrote: On Mon, Jan 19, 2015 at 1:03 PM, Peter Maydell peter.mayd...@linaro.org wrote: Doh. I inverted the name and polarity but forgot to

Re: [Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2014-12-11 Thread Peter Maydell
On 10 December 2014 at 23:18, Greg Bellows greg.bell...@linaro.org wrote: On 10 December 2014 at 16:50, Peter Maydell peter.mayd...@linaro.org wrote: On 10 December 2014 at 22:26, Greg Bellows greg.bell...@linaro.org wrote: On 9 December 2014 at 13:46, Peter Maydell

Re: [Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2014-12-11 Thread Greg Bellows
On 11 December 2014 at 03:34, Peter Maydell peter.mayd...@linaro.org wrote: On 10 December 2014 at 23:18, Greg Bellows greg.bell...@linaro.org wrote: On 10 December 2014 at 16:50, Peter Maydell peter.mayd...@linaro.org wrote: On 10 December 2014 at 22:26, Greg Bellows

Re: [Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2014-12-10 Thread Greg Bellows
On 9 December 2014 at 13:46, Peter Maydell peter.mayd...@linaro.org wrote: Add assertion checking when cpreg structures are registered that they either forbid raw-access attempts or at least make an attempt at handling them. Also add an assert in the raw-accessor-of-last-resort, to avoid

Re: [Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2014-12-10 Thread Peter Maydell
On 10 December 2014 at 22:26, Greg Bellows greg.bell...@linaro.org wrote: On 9 December 2014 at 13:46, Peter Maydell peter.mayd...@linaro.org wrote: +static bool raw_accessors_valid(const ARMCPRegInfo *ri) +{ +/* Return true if a raw access on this register is OK (ie will not + *

Re: [Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2014-12-10 Thread Greg Bellows
On 10 December 2014 at 16:50, Peter Maydell peter.mayd...@linaro.org wrote: On 10 December 2014 at 22:26, Greg Bellows greg.bell...@linaro.org wrote: On 9 December 2014 at 13:46, Peter Maydell peter.mayd...@linaro.org wrote: +static bool raw_accessors_valid(const ARMCPRegInfo *ri) +{

[Qemu-devel] [PATCH 2/2] target-arm: Add checks that cpreg raw accesses are handled

2014-12-09 Thread Peter Maydell
Add assertion checking when cpreg structures are registered that they either forbid raw-access attempts or at least make an attempt at handling them. Also add an assert in the raw-accessor-of-last-resort, to avoid silently doing a read or write from offset zero, which is actually AArch32 CPU