Re: [RFT][PATCH v2 8/9] vfio/ccw: Add kmap_local_page() for memcpy

2022-07-08 Thread Eric Farman
On Tue, 2022-07-05 at 23:27 -0700, Nicolin Chen wrote: > A PFN is not secure enough to promise that the memory is not IO. And > direct access via memcpy() that only handles CPU memory will crash on > S390 if the PFN is an IO PFN, as we have to use the > memcpy_to/fromio() > that uses the special S3

Re: [RFT][PATCH v2 8/9] vfio/ccw: Add kmap_local_page() for memcpy

2022-07-06 Thread Jason Gunthorpe
On Tue, Jul 05, 2022 at 11:27:58PM -0700, Nicolin Chen wrote: > A PFN is not secure enough to promise that the memory is not IO. And > direct access via memcpy() that only handles CPU memory will crash on > S390 if the PFN is an IO PFN, as we have to use the memcpy_to/fromio() > that uses the speci

[RFT][PATCH v2 8/9] vfio/ccw: Add kmap_local_page() for memcpy

2022-07-05 Thread Nicolin Chen
A PFN is not secure enough to promise that the memory is not IO. And direct access via memcpy() that only handles CPU memory will crash on S390 if the PFN is an IO PFN, as we have to use the memcpy_to/fromio() that uses the special S390 IO access instructions. On the other hand, a "struct page *" i