From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Aleksandar Rikalo" <arikalo@wavecomp.com>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Aleksandar Markovic" <amarkovic@wavecomp.com>
Subject: Re: [Qemu-devel] [PATCH 3/3] hw/mips/mips_jazz: Remove no-longer-necessary override of do_unassigned_access
Date: Fri, 2 Aug 2019 18:30:16 +0200 [thread overview]
Message-ID: <eacafaf4-07ff-48dc-f61f-92440e3809da@redhat.com> (raw)
In-Reply-To: <20190802160458.25681-4-peter.maydell@linaro.org>
On 8/2/19 6:04 PM, Peter Maydell wrote:
> Now that the MIPS CPU implementation uses the new
> do_transaction_failed hook, we can remove the old code that handled
> the do_unassigned_access hook.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> hw/mips/mips_jazz.c | 27 ++++-----------------------
> 1 file changed, 4 insertions(+), 23 deletions(-)
>
> diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
> index c64b4c78809..540943932fd 100644
> --- a/hw/mips/mips_jazz.c
> +++ b/hw/mips/mips_jazz.c
> @@ -111,18 +111,6 @@ static const MemoryRegionOps dma_dummy_ops = {
> #define MAGNUM_BIOS_SIZE_MAX 0x7e000
> #define MAGNUM_BIOS_SIZE (BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX)
>
> -static CPUUnassignedAccess real_do_unassigned_access;
> -static void mips_jazz_do_unassigned_access(CPUState *cpu, hwaddr addr,
> - bool is_write, bool is_exec,
> - int opaque, unsigned size)
> -{
> - if (!is_exec) {
> - /* ignore invalid access (ie do not raise exception) */
> - return;
> - }
> - (*real_do_unassigned_access)(cpu, addr, is_write, is_exec, opaque, size);
> -}
> -
> static void (*real_do_transaction_failed)(CPUState *cpu, hwaddr physaddr,
> vaddr addr, unsigned size,
> MMUAccessType access_type,
> @@ -184,9 +172,8 @@ static void mips_jazz_init(MachineState *machine,
> * However, we can't simply add a global memory region to catch
> * everything, as this would make all accesses including instruction
> * accesses be ignored and not raise exceptions.
> - * So instead we hijack either the do_unassigned_access method or
> - * the do_transaction_failed method on the CPU, and do not raise exceptions
> - * for data access.
> + * So instead we hijack the do_transaction_failed method on the CPU, and
> + * do not raise exceptions for data access.
> *
> * NOTE: this behaviour of raising exceptions for bad instruction
> * fetches but not bad data accesses was added in commit 54e755588cf1e9
> @@ -197,14 +184,8 @@ static void mips_jazz_init(MachineState *machine,
> * memory region that catches all memory accesses, as we do on Malta.
> */
> cc = CPU_GET_CLASS(cpu);
> - if (cc->do_unassigned_access) {
> - real_do_unassigned_access = cc->do_unassigned_access;
> - cc->do_unassigned_access = mips_jazz_do_unassigned_access;
> - }
> - if (cc->do_transaction_failed) {
> - real_do_transaction_failed = cc->do_transaction_failed;
> - cc->do_transaction_failed = mips_jazz_do_transaction_failed;
> - }
> + real_do_transaction_failed = cc->do_transaction_failed;
> + cc->do_transaction_failed = mips_jazz_do_transaction_failed;
>
> /* allocate RAM */
> memory_region_allocate_system_memory(ram, NULL, "mips_jazz.ram",
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
next prev parent reply other threads:[~2019-08-02 16:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-02 16:04 [Qemu-devel] [PATCH 0/3] target/mips: Convert to do_transaction_failed hook Peter Maydell
2019-08-02 16:04 ` [Qemu-devel] [PATCH 1/3] hw/mips/mips_jazz: Override " Peter Maydell
2019-08-02 16:20 ` Philippe Mathieu-Daudé
2019-09-09 21:41 ` Hervé Poussineau
2019-08-02 16:04 ` [Qemu-devel] [PATCH 2/3] target/mips: Switch to do_transaction_failed() hook Peter Maydell
2019-08-02 16:29 ` Philippe Mathieu-Daudé
2019-09-09 21:41 ` Hervé Poussineau
2019-08-02 16:04 ` [Qemu-devel] [PATCH 3/3] hw/mips/mips_jazz: Remove no-longer-necessary override of do_unassigned_access Peter Maydell
2019-08-02 16:30 ` Philippe Mathieu-Daudé [this message]
2019-09-09 21:42 ` Hervé Poussineau
2019-08-02 16:29 ` [Qemu-devel] [PATCH 0/3] target/mips: Convert to do_transaction_failed hook Philippe Mathieu-Daudé
2019-09-11 7:22 ` Aleksandar Markovic
2019-08-22 18:16 ` Aleksandar Markovic
2019-09-09 10:30 ` Aleksandar Markovic
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=eacafaf4-07ff-48dc-f61f-92440e3809da@redhat.com \
--to=philmd@redhat.com \
--cc=amarkovic@wavecomp.com \
--cc=arikalo@wavecomp.com \
--cc=aurelien@aurel32.net \
--cc=hpoussin@reactos.org \
--cc=peter.maydell@linaro.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).