qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@redhat.com>
To: Mostafa Saleh <smostafa@google.com>
Cc: qemu-devel@nongnu.org, jean-philippe@linaro.org,
	peter.maydell@linaro.org, qemu-arm@nongnu.org
Subject: Re: [RFC PATCH 10/16] hw/arm/smmuv3: Make TLB lookup work for stage-2
Date: Thu, 16 Feb 2023 17:52:44 +0100	[thread overview]
Message-ID: <e349bd12-23c9-87bd-f9ba-654c7885489c@redhat.com> (raw)
In-Reply-To: <Y+40glPkaM0aK5C/@google.com>



On 2/16/23 14:49, Mostafa Saleh wrote:
> Hi Eric,
>
> On Thu, Feb 16, 2023 at 12:32:21PM +0100, Eric Auger wrote:
>>>      SMMUTransTableInfo *tt;
>>>      SMMUTransCfg *cfg = NULL;
>>> +    uint8_t granule_sz, tsz;
>>>      IOMMUTLBEntry entry = {
>>>          .target_as = &address_space_memory,
>>>          .iova = addr,
>>> @@ -764,21 +767,40 @@ static IOMMUTLBEntry smmuv3_translate(IOMMUMemoryRegion *mr, hwaddr addr,
>>>          goto epilogue;
>>>      }
>>>  
>>> -    tt = select_tt(cfg, addr);
>> maybe we shall adapt select_tt for S2 instead of using temp? I know
>> there is a single range on S2 but well, use tt[0]?
> We can adapt select_tt for S2, but we would need to have an instance
> of SMMUTransTableInfo in SMMUS2Cfg instead of having vttb,tsz..
> inlined, as the function returns a pointer to the SMMUTransTableInfo.
> I don’t think we can reuse tt[0], as this would change when we support
> nesting, so I think we just isolate s1 and s2 from the beginning.

OK fair enough, let's wait for others' feedbakcs then.

Eric
>
>
>>> -    if (!tt) {
>>> -        if (cfg->record_faults) {
>>> -            event.type = SMMU_EVT_F_TRANSLATION;
>>> -            event.u.f_translation.addr = addr;
>>> -            event.u.f_translation.rnw = flag & 0x1;
>>> +    if (STAGE1_SUPPORTED(s->features)) {
>> maybe check the enable state instead.
> Yes, if stage-1 is not enabled, tt might not be valid, I will update it.
>
> Thanks,
> Mostafa
>



  reply	other threads:[~2023-02-16 16:53 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-05  9:43 [RFC PATCH 00/16] Add stage-2 translation for SMMUv3 Mostafa Saleh
2023-02-05  9:43 ` [RFC PATCH 01/16] hw/arm/smmuv3: Add missing fields for IDR0 Mostafa Saleh
2023-02-06 22:51   ` Richard Henderson
2023-02-15 16:16   ` Eric Auger
2023-02-05  9:43 ` [RFC PATCH 02/16] hw/arm/smmuv3: Update translation config to hold stage-2 Mostafa Saleh
2023-02-15 18:57   ` Eric Auger
2023-02-16 12:53     ` Mostafa Saleh
2023-02-05  9:43 ` [RFC PATCH 03/16] hw/arm/smmuv3: Rename smmu_ptw_64 Mostafa Saleh
2023-02-15 16:53   ` Eric Auger
2023-02-16 12:56     ` Mostafa Saleh
2023-02-16 16:44       ` Eric Auger
2023-02-05  9:43 ` [RFC PATCH 04/16] hw/arm/smmuv3: Add a system property to choose translation stage Mostafa Saleh
2023-02-15 16:29   ` Eric Auger
2023-02-16 12:58     ` Mostafa Saleh
2023-02-16 16:45       ` Eric Auger
2023-02-05  9:44 ` [RFC PATCH 05/16] hw/arm/smmuv3: Add page table walk for stage-2 Mostafa Saleh
2023-02-15 16:52   ` Eric Auger
2023-02-16 13:09     ` Mostafa Saleh
2023-02-16 16:50       ` Eric Auger
2023-02-05  9:44 ` [RFC PATCH 06/16] hw/arm/smmuv3: Parse STE config " Mostafa Saleh
2023-02-15 17:47   ` Eric Auger
2023-02-16 13:17     ` Mostafa Saleh
2023-02-05  9:44 ` [RFC PATCH 07/16] hw/arm/smmuv3: Check validity of stage-2 page table Mostafa Saleh
2023-02-15 18:53   ` Eric Auger
2023-02-16 13:20     ` Mostafa Saleh
2023-02-05  9:44 ` [RFC PATCH 08/16] hw/arm/smmuv3: Support S2AFFD Mostafa Saleh
2023-02-15 18:37   ` Eric Auger
2023-02-16 13:27     ` Mostafa Saleh
2023-02-05  9:44 ` [RFC PATCH 09/16] hw/arm/smmuv3: Don't touch CD if stage-1 is not supported Mostafa Saleh
2023-02-05  9:44 ` [RFC PATCH 10/16] hw/arm/smmuv3: Make TLB lookup work for stage-2 Mostafa Saleh
2023-02-16 11:32   ` Eric Auger
2023-02-16 13:49     ` Mostafa Saleh
2023-02-16 16:52       ` Eric Auger [this message]
2023-02-05  9:44 ` [RFC PATCH 11/16] hw/arm/smmuv3: Read VMID from STE Mostafa Saleh
2023-02-05  9:44 ` [RFC PATCH 12/16] hw/arm/smmuv3: Add VMID to tlb tagging Mostafa Saleh
2023-02-15 19:47   ` Jean-Philippe Brucker
2023-02-16 13:52     ` Mostafa Saleh
2023-02-16 10:17   ` Eric Auger
2023-02-16 13:53     ` Mostafa Saleh
2023-02-16 16:53       ` Eric Auger
2023-02-05  9:44 ` [RFC PATCH 13/16] hw/arm/smmuv3: Add CMDs related to stage 2 Mostafa Saleh
2023-02-16 11:56   ` Eric Auger
2023-02-16 13:58     ` Mostafa Saleh
2023-02-16 16:54       ` Eric Auger
2023-02-05  9:44 ` [RFC PATCH 14/16] hw/arm/smmuv3: Add stage-2 support in iova notifier Mostafa Saleh
2023-02-05  9:44 ` [RFC PATCH 15/16] hw/arm/smmuv3: Add fault configuration for stage-2 Mostafa Saleh
2023-02-15 18:55   ` Eric Auger
2023-02-16 14:01     ` Mostafa Saleh
2023-02-05  9:44 ` [RFC PATCH 16/16] hw/arm/smmuv3: Enable stage-2 support Mostafa Saleh

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=e349bd12-23c9-87bd-f9ba-654c7885489c@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=jean-philippe@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=smostafa@google.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).