Hi,Andy

> -----Original Message-----
> From: Andy Lutomirski [mailto:l...@amacapital.net]
> Sent: Thursday, December 24, 2015 9:40 AM
> To: Zheng, Lv
> Cc: Chen, Yu C; Moore, Robert; Wysocki, Rafael J; Brown, Len; Andy
> Lutomirski; Lv Zheng; linux-kernel@vger.kernel.org; Linux ACPI; H. Peter
> Anvin; Borislav Petkov
> Subject: Re: [PATCH v4 7/7] ACPI / x86: introduce acpi_os_readable() support
> 
> On Tue, Dec 22, 2015 at 7:25 PM, Zheng, Lv <lv.zh...@intel.com> wrote:
[cut]
> 
> It seems a bit unfortunate to me that the ACPICA debugger lets userspace
> choose what address to dump rather than dumping by pathname, but given
> that constraint, I guess this function is needed.
> 
> Can you do something like checking virt_addr_valid and then using
> virt_to_pfn and page_is_ram?  If that's not enough (e.g. if it doesn't work 
> for
> vmalloc addresses and you need those), you could try to do something like
> slow_virt_to_phys, but you'd need to do some extra checks to avoid the
> BUG in the function.
> 
[Yu] This is a  good method,  firstly virt_addr_valid can  exclude the vaddr of 
vmalloc/kmap
, then slow_virt_to_phys can check if this vaddr has a valid pte physical 
address, but I guess
we need another non-BUG_on version of slow_virt_to_phys,  I'll try to test with 
your suggestion,
thanks!
Yu


N�����r��y����b�X��ǧv�^�)޺{.n�+����{����zX����ܨ}���Ơz�&j:+v�������zZ+��+zf���h���~����i���z��w���?�����&�)ߢf��^jǫy�m��@A�a���
0��h���i

Reply via email to