[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 13/16] hw/arm/smmuv3: Add CMDs related to stage 2
From: |
Mostafa Saleh |
Subject: |
Re: [RFC PATCH 13/16] hw/arm/smmuv3: Add CMDs related to stage 2 |
Date: |
Thu, 16 Feb 2023 13:58:19 +0000 |
Hi Eric,
On Thu, Feb 16, 2023 at 12:56:52PM +0100, Eric Auger wrote:
> > @@ -1174,14 +1174,35 @@ static int smmuv3_cmdq_consume(SMMUv3State *s)
> > case SMMU_CMD_TLBI_NH_VA:
> > smmuv3_s1_range_inval(bs, &cmd);
> > break;
> > + case SMMU_CMD_TLBI_S12_VMALL:
> > + uint16_t vmid = CMD_VMID(&cmd);
> > +
> > + if (!STAGE2_SUPPORTED(s->features)) {
> if you add such checks for S2, may you should consider adding similar
> ones for existing S1?
Yes, I will go through the other commands and do the same for stage-1
only commands.
> > + smmu_inv_notifiers_all(&s->smmu_state);
> > + smmu_iotlb_inv_vmid(bs, vmid);
> > + break;
> > + case SMMU_CMD_TLBI_S2_IPA:
> > + if (!STAGE2_SUPPORTED(s->features)) {
> > + cmd_error = SMMU_CERROR_ILL;
> > + break;
> > + }
> > + /*
> > + * As currently only either s1 or s2 are supported
> > + * we can reuse same function for s2.
> > + */
> > + smmuv3_s1_range_inval(bs, &cmd);
> Shouldn't we rename the function then?
I guess we can rename it smmuv3_s1_s2_range_inval, we will have to
revisit this when nesting is supported.
Thanks,
Mostafa
[RFC PATCH 14/16] hw/arm/smmuv3: Add stage-2 support in iova notifier, Mostafa Saleh, 2023/02/05
[RFC PATCH 11/16] hw/arm/smmuv3: Read VMID from STE, Mostafa Saleh, 2023/02/05
[RFC PATCH 12/16] hw/arm/smmuv3: Add VMID to tlb tagging, Mostafa Saleh, 2023/02/05