[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-4.5 v11 4/9] xen/arm: Data abort exception (R/W) mem_events.



Hi Tamas,

On 09/29/2014 12:36 PM, Tamas K Lengyel wrote:
> @@ -776,6 +863,8 @@ static int apply_p2m_changes(struct domain *d,
>      unsigned int cur_root_table = ~0;
>      unsigned int cur_offset[4] = { ~0, };
>      unsigned int count = 0;
> +    unsigned long sgfn = paddr_to_pfn(start_gpaddr),
> +                  egfn = paddr_to_pfn(end_gpaddr);

NIT: const unsigned long

[..]

> +/* Set access type for a region of pfns.
> + * If start_pfn == -1ul, sets the default access type */
> +long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
> +                        uint32_t start, uint32_t mask, xenmem_access_t 
> access)
> +{


[..]

> +
> +    rc = apply_p2m_changes(d, MEMACCESS,
> +                           pfn_to_paddr(pfn+start), pfn_to_paddr(pfn+nr),
> +                           0, MATTR_MEM, mask, 0, a);
> +
> +    flush_tlb_domain(d);
> +    iommu_iotlb_flush(d, pfn+start, nr-start);

With your solution, when rc == 0 (i.e the call memaccess has been fully
applied), you will have one more TLB flush: one in apply_p2m_changes,
the other one here...

As this code already exists in apply_p2m_changes but in the wrong place,
why didn't you move it later?

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.