qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, shentey@gmail.com,
	Richard Henderson <richard.henderson@linaro.org>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH v2 7/8] mips: allow compiling out CONFIG_MIPS_ITU
Date: Fri, 9 Feb 2024 08:22:47 +0100	[thread overview]
Message-ID: <75ede98a-db0d-4b8c-88ff-df2f46875466@linaro.org> (raw)
In-Reply-To: <CABgObfaop4uLqpjt8bXaL6=WoAz+M-sLiU0U+F=gtHkZMTo8aw@mail.gmail.com>

On 8/2/24 09:26, Paolo Bonzini wrote:
> On Wed, Feb 7, 2024 at 8:12 PM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> Hi Paolo,
>>
>> On 7/2/24 12:14, Paolo Bonzini wrote:
>>> itc_reconfigure() is referenced from TCG, provide a stub if needed.
>>> This makes it possible to build a QEMU binary that only includes
>>> boards without a CPS device (only Malta and Boston create one).
>>>
>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>> ---
>>>    hw/mips/mips_itu-stub.c | 26 ++++++++++++++++++++++++++
>>>    hw/mips/meson.build     |  1 +
>>>    2 files changed, 27 insertions(+)
>>>    create mode 100644 hw/mips/mips_itu-stub.c
>>>
>>> diff --git a/hw/mips/mips_itu-stub.c b/hw/mips/mips_itu-stub.c
>>> new file mode 100644
>>> index 00000000000..4cc82b8461f
>>> --- /dev/null
>>> +++ b/hw/mips/mips_itu-stub.c
>>> @@ -0,0 +1,26 @@
>>> +/*
>>> + * Inter-Thread Communication Unit emulation.
>>> + *
>>> + * Copyright (c) 2016 Imagination Technologies
>>> + *
>>> + * This library is free software; you can redistribute it and/or
>>> + * modify it under the terms of the GNU Lesser General Public
>>> + * License as published by the Free Software Foundation; either
>>> + * version 2.1 of the License, or (at your option) any later version.
>>> + *
>>> + * This library is distributed in the hope that it will be useful,
>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>>> + * Lesser General Public License for more details.
>>> + *
>>> + * You should have received a copy of the GNU Lesser General Public
>>> + * License along with this library; if not, see <http://www.gnu.org/licenses/>.
>>
>> This is your code addition, so "Inter-Thread Communication Unit stubs" /
>> RH / SPDX GPLv2-or-later.
>>
>>> + */
>>> +
>>> +#include "qemu/osdep.h"
>>> +#include "hw/misc/mips_itu.h"
>>> +
>>> +void itc_reconfigure(MIPSITUState *tag)
>>> +{
>>> +    abort();
>>
>> As Zoltan suggested, g_assert_not_reached(). Indeed this path
>> can't be reached without ITU, TCG won't emit anything and will
>> call instead:
>>
>>       qemu_log_mask(LOG_UNIMP, "mthc0 %s (reg %d sel %d)\n",
>>                     register_name, reg, sel);
>>
>> I'm reluctant to add stubs, but since it helps you (hoping we
>> can figure a clean way to split architectural access to hw/ from
>> tcg/ one day):
> 
> Not sure how it's reached anyway, because the saar field of
> DisasContext is never written...

Commit 5fb2dcd179 ("target/mips: Provide R/W access to SAARI
and SAAR CP0 registers") is an incomplete frontport of
https://github.com/MIPS/qemu/commit/c9340491cc.

Commit 043715d1e0 ("target/mips: Update ITU to utilize SAARI
and SAAR CP0 registers") is an incomplete frontport of
https://github.com/MIPS/qemu/commit/e03079c699.

So this feature is working in MIPS fork since 2017, and during
2019 mainstream only got part of it merged but never completed.

5 years passed.


  reply	other threads:[~2024-02-09  7:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 11:14 [PATCH v2 0/8] mips: do not list individual devices from configs/ Paolo Bonzini
2024-02-07 11:14 ` [PATCH v2 1/8] usb: inline device creation functions Paolo Bonzini
2024-02-07 11:14 ` [PATCH v2 2/8] isa: clean up Kconfig selections for ISA_SUPERIO Paolo Bonzini
2024-02-07 11:14 ` [PATCH v2 3/8] hw/mips/Kconfig: Remove ISA dependencies from MIPSsim board Paolo Bonzini
2024-02-07 18:58   ` Philippe Mathieu-Daudé
2024-02-08  8:11     ` Paolo Bonzini
2024-02-09 12:43       ` Philippe Mathieu-Daudé
2024-02-07 11:14 ` [PATCH v2 4/8] isa: fix ISA_SUPERIO dependencies Paolo Bonzini
2024-02-07 13:09   ` BALATON Zoltan
2024-02-07 19:01   ` Philippe Mathieu-Daudé
2024-02-08 16:18   ` Bernhard Beschow
2024-02-07 11:14 ` [PATCH v2 5/8] isa: specify instance_size in isa_superio_type_info Paolo Bonzini
2024-02-07 19:03   ` Philippe Mathieu-Daudé
2024-02-08 16:10     ` Bernhard Beschow
2024-02-07 11:14 ` [PATCH v2 6/8] isa: extract FDC37M81X to a separate file Paolo Bonzini
2024-02-07 13:13   ` BALATON Zoltan
2024-02-08 16:14   ` Bernhard Beschow
2024-02-07 11:14 ` [PATCH v2 7/8] mips: allow compiling out CONFIG_MIPS_ITU Paolo Bonzini
2024-02-07 13:15   ` BALATON Zoltan
2024-02-07 13:56     ` Paolo Bonzini
2024-02-07 19:12   ` Philippe Mathieu-Daudé
2024-02-08  8:26     ` Paolo Bonzini
2024-02-09  7:22       ` Philippe Mathieu-Daudé [this message]
2024-02-09  9:15         ` Philippe Mathieu-Daudé
2024-02-07 11:14 ` [PATCH v2 8/8] mips: do not list individual devices from configs/ Paolo Bonzini
2024-02-07 13:18   ` BALATON Zoltan
2024-02-07 13:55     ` Paolo Bonzini
2024-02-08 16:16       ` Bernhard Beschow

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=75ede98a-db0d-4b8c-88ff-df2f46875466@linaro.org \
    --to=philmd@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=shentey@gmail.com \
    /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).