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

Re: [PATCH v3 4/9] xen/riscv: setup fixmap mapping



On Mon, 2024-08-05 at 17:13 +0200, oleksii.kurochko@xxxxxxxxx wrote:
> On Mon, 2024-07-29 at 15:35 +0200, Jan Beulich wrote:
> > > +    }
> > > +
> > > +    BUG_ON(pte_is_valid(*pte));
> > > +
> > > +    tmp = paddr_to_pte(LINK_TO_LOAD((unsigned long)&xen_fixmap),
> > > PTE_TABLE);
> > 
> > I'm a little puzzled by the use of LINK_TO_LOAD() (and
> > LOAD_TO_LINK()
> > a
> > little further up) here. Don't you have functioning __pa() and
> > __va()?
> Can __pa() and __va() be used in this case?
> 
> According to comments for other architectures, these macros are used
> for converting between Xen heap virtual addresses (VA) and machine
> addresses (MA). I may have misunderstood what is meant by the Xen
> heap
> in this context, but I'm not sure if xen_fixmap[] and page tables are
> considered part of the Xen heap.

One more thing: can we use __pa() and __va() in setup_fixmap()?

As I understand it, to define __pa() and __va(), the DIRECTMAP mapping
should be mapped first. However, this requires information about RAM
banks, which is provided in the device tree file. But we can't map
device tree without fixmap. Am I missing something?

~ Oleksii



 


Rackspace

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