[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v5 2/8] hw/arm/smmuv3: smmuv3 emulation model
From: |
Auger Eric |
Subject: |
Re: [Qemu-devel] [RFC v5 2/8] hw/arm/smmuv3: smmuv3 emulation model |
Date: |
Thu, 27 Jul 2017 22:25:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
Hi Tomasz,
On 13/07/2017 14:57, Tomasz Nowicki wrote:
> Hi Eric,
>
> On 09.07.2017 22:51, Eric Auger wrote:
>> From: Prem Mallappa <address@hidden>
>>
>> Introduces the SMMUv3 derived model. This is based on
>> System MMUv3 specification (v17).
>>
>> Signed-off-by: Prem Mallappa <address@hidden>
>> Signed-off-by: Eric Auger <address@hidden>
>>
>> ---
>> v4 -> v5:
>> - change smmuv3_translate proto (IOMMUAccessFlags flag)
>> - has_stagex replaced by is_ste_stagex
>> - smmu_cfg_populate removed
>> - added smmuv3_decode_config and reworked error management
>> - remwork the naming of IOMMU mrs
>> - fix SMMU_CMDQ_CONS offset
>>
>
> [...]
>
>> +
>> +static void smmu_update_qreg(SMMUV3State *s, SMMUQueue *q, hwaddr reg,
>> + uint32_t off, uint64_t val, unsigned size)
>> +{
>> + if (size == 8 && off == 0) {
>> + smmu_write64_reg(s, reg, val);
>
> Based on my observation we never get here.
>
> If I read the code correctly,
> memory_region_dispatch_{write|read}()->memory_region_{write|read}_accessor()
> will cut all 8-bytes accesses into 4-bytes slices. However, this makes
> my SMMUv3 register handling happy:
>
> static const MemoryRegionOps smmu_mem_ops = {
> .read = smmu_read_mmio,
> .write = smmu_write_mmio,
> .endianness = DEVICE_LITTLE_ENDIAN,
> .valid = {
> .min_access_size = 4,
> .max_access_size = 8,
> },
> + .impl = {
> + .min_access_size = 4,
> + .max_access_size = 8,
> + },
Yes indeed: without the .impl setting, only 4byte accesses are performed
by access_with_adjusted_size() which sets access_size_max to 4.
Thanks a lot.
Best regards
Eric
> };
>
> Thanks,
> Tomasz
- [Qemu-devel] [RFC v5 0/8] ARM SMMUv3 Emulation Support, Eric Auger, 2017/07/09
- [Qemu-devel] [RFC v5 1/8] hw/arm/smmu-common: smmu base class, Eric Auger, 2017/07/09
- [Qemu-devel] [RFC v5 3/8] hw/arm/virt: Add SMMUv3 to the virt board, Eric Auger, 2017/07/09
- [Qemu-devel] [RFC v5 2/8] hw/arm/smmuv3: smmuv3 emulation model, Eric Auger, 2017/07/09
- [Qemu-devel] [RFC v5 4/8] hw/arm/virt: Add 2.10 machine type, Eric Auger, 2017/07/09
- [Qemu-devel] [RFC v5 5/8] hw/arm/virt-acpi-build: Add smmuv3 node in IORT table, Eric Auger, 2017/07/09
- [Qemu-devel] [RFC v5 6/8] hw/arm/virt: Add tlbi-on-map property to the smmuv3 node, Eric Auger, 2017/07/09
- [Qemu-devel] [RFC v5 7/8] target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route, Eric Auger, 2017/07/09
- [Qemu-devel] [RFC v5 8/8] hw/arm/smmuv3: VFIO integration, Eric Auger, 2017/07/09
- Message not available
- Re: [Qemu-devel] [RFC v5 0/8] ARM SMMUv3 Emulation Support, Tomasz Nowicki, 2017/07/14