Re: [PATCH v1 04/10] vfio/type1: Prepare is_invalid_reserved_pfn() for PG_reserved changes

2019-11-08 Thread Dan Williams
On Fri, Nov 8, 2019 at 2:22 AM David Hildenbrand wrote: > > On 08.11.19 08:14, David Hildenbrand wrote: > > On 08.11.19 06:09, Dan Williams wrote: > >> On Thu, Nov 7, 2019 at 2:07 PM David Hildenbrand wrote: > >>> > >>> On 07.11.19 19:22, David Hildenbrand wrote: > > > > Am

Re: [PATCH v1 04/10] vfio/type1: Prepare is_invalid_reserved_pfn() for PG_reserved changes

2019-11-08 Thread David Hildenbrand
On 08.11.19 19:29, Dan Williams wrote: On Fri, Nov 8, 2019 at 2:22 AM David Hildenbrand wrote: On 08.11.19 08:14, David Hildenbrand wrote: On 08.11.19 06:09, Dan Williams wrote: On Thu, Nov 7, 2019 at 2:07 PM David Hildenbrand wrote: On 07.11.19 19:22, David Hildenbrand wrote: Am

Re: [PATCH v1 04/10] vfio/type1: Prepare is_invalid_reserved_pfn() for PG_reserved changes

2019-11-08 Thread David Hildenbrand
On 08.11.19 08:14, David Hildenbrand wrote: On 08.11.19 06:09, Dan Williams wrote: On Thu, Nov 7, 2019 at 2:07 PM David Hildenbrand wrote: On 07.11.19 19:22, David Hildenbrand wrote: Am 07.11.2019 um 16:40 schrieb Dan Williams : On Thu, Oct 24, 2019 at 5:12 AM David Hildenbrand wrote:

Re: [PATCH v1 04/10] vfio/type1: Prepare is_invalid_reserved_pfn() for PG_reserved changes

2019-11-07 Thread David Hildenbrand
On 08.11.19 06:09, Dan Williams wrote: On Thu, Nov 7, 2019 at 2:07 PM David Hildenbrand wrote: On 07.11.19 19:22, David Hildenbrand wrote: Am 07.11.2019 um 16:40 schrieb Dan Williams : On Thu, Oct 24, 2019 at 5:12 AM David Hildenbrand wrote: Right now, ZONE_DEVICE memory is always

Re: [PATCH v1 04/10] vfio/type1: Prepare is_invalid_reserved_pfn() for PG_reserved changes

2019-11-07 Thread Dan Williams
On Thu, Nov 7, 2019 at 2:07 PM David Hildenbrand wrote: > > On 07.11.19 19:22, David Hildenbrand wrote: > > > > > >> Am 07.11.2019 um 16:40 schrieb Dan Williams : > >> > >> On Thu, Oct 24, 2019 at 5:12 AM David Hildenbrand > >> wrote: > >>> > >>> Right now, ZONE_DEVICE memory is always set

Re: [PATCH v1 04/10] vfio/type1: Prepare is_invalid_reserved_pfn() for PG_reserved changes

2019-11-07 Thread David Hildenbrand
On 07.11.19 19:22, David Hildenbrand wrote: Am 07.11.2019 um 16:40 schrieb Dan Williams : On Thu, Oct 24, 2019 at 5:12 AM David Hildenbrand wrote: Right now, ZONE_DEVICE memory is always set PG_reserved. We want to change that. KVM has this weird use case that you can map anything from

Re: [PATCH v1 04/10] vfio/type1: Prepare is_invalid_reserved_pfn() for PG_reserved changes

2019-11-07 Thread David Hildenbrand
> Am 07.11.2019 um 16:40 schrieb Dan Williams : > > On Thu, Oct 24, 2019 at 5:12 AM David Hildenbrand wrote: >> >> Right now, ZONE_DEVICE memory is always set PG_reserved. We want to >> change that. >> >> KVM has this weird use case that you can map anything from /dev/mem >> into the guest.

Re: [PATCH v1 04/10] vfio/type1: Prepare is_invalid_reserved_pfn() for PG_reserved changes

2019-11-07 Thread Dan Williams
On Thu, Oct 24, 2019 at 5:12 AM David Hildenbrand wrote: > > Right now, ZONE_DEVICE memory is always set PG_reserved. We want to > change that. > > KVM has this weird use case that you can map anything from /dev/mem > into the guest. pfn_valid() is not a reliable check whether the memmap > was

[PATCH v1 04/10] vfio/type1: Prepare is_invalid_reserved_pfn() for PG_reserved changes

2019-10-24 Thread David Hildenbrand
Right now, ZONE_DEVICE memory is always set PG_reserved. We want to change that. KVM has this weird use case that you can map anything from /dev/mem into the guest. pfn_valid() is not a reliable check whether the memmap was initialized and can be touched. pfn_to_online_page() makes sure that we