Re: [PATCH v2 37/37] powerpc: Support execute-only on all powerpc

2023-11-01 Thread Aneesh Kumar K.V
Christophe Leroy writes: > Introduce PAGE_EXECONLY_X macro which provides exec-only rights. > The _X may be seen as redundant with the EXECONLY but it helps > keep consistancy, all macros having the EXEC right have _X. > > And put it next to PAGE_NONE as PAGE_EXECONLY_X is > somehow PAGE_NONE +

Re: [PATCH v13 09/35] KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace

2023-11-01 Thread Huang, Kai
On Wed, 2023-11-01 at 10:36 -0700, Sean Christopherson wrote: > On Wed, Nov 01, 2023, Kai Huang wrote: > > > > > +7.34 KVM_CAP_MEMORY_FAULT_INFO > > > +-- > > > + > > > +:Architectures: x86 > > > +:Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP. > > > +

Re: [PATCH v13 13/35] KVM: Introduce per-page memory attributes

2023-11-01 Thread Huang, Kai
On Fri, 2023-10-27 at 11:21 -0700, Sean Christopherson wrote: > From: Chao Peng > > In confidential computing usages, whether a page is private or shared is > necessary information for KVM to perform operations like page fault > handling, page zapping etc. There are other potential use cases for

Re: Does anyone use Appletalk?

2023-11-01 Thread Finn Thain
On Wed, 1 Nov 2023, Arnd Bergmann wrote: > > If we had not removed all localtalk support already, ipddp might have > been used to bridge between a pre-ethernet mac running macip and an IP > based AFP server (netatalk or time machine). Without localtalk support, > that is not all that

Re: [PATCH v13 09/35] KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace

2023-11-01 Thread Xiaoyao Li
On 11/2/2023 1:36 AM, Sean Christopherson wrote: KVM_CAP_MEMORY_FAULT_INFO is x86 only, is it better to put this function to ? I'd prefer to keep it in generic code, as it's highly likely to end up there sooner than later. There's a known use case for ARM (exit to userspace on missing

Re: [PATCH v13 17/35] KVM: Add transparent hugepage support for dedicated guest memory

2023-11-01 Thread Paolo Bonzini
On Wed, Nov 1, 2023 at 11:35 PM Sean Christopherson wrote: > > On Wed, Nov 01, 2023, Paolo Bonzini wrote: > > On 11/1/23 17:36, Sean Christopherson wrote: > > > > > "Allow" isn't perfect, e.g. I would much prefer a straight > > > > > KVM_GUEST_MEMFD_USE_HUGEPAGES > > > > > or

Re: [PATCH v13 17/35] KVM: Add transparent hugepage support for dedicated guest memory

2023-11-01 Thread Sean Christopherson
On Wed, Nov 01, 2023, Paolo Bonzini wrote: > On 11/1/23 17:36, Sean Christopherson wrote: > > > > "Allow" isn't perfect, e.g. I would much prefer a straight > > > > KVM_GUEST_MEMFD_USE_HUGEPAGES > > > > or KVM_GUEST_MEMFD_HUGEPAGES flag, but I wanted the name to convey that > > > > KVM doesn't >

Re: [PATCH v13 17/35] KVM: Add transparent hugepage support for dedicated guest memory

2023-11-01 Thread Paolo Bonzini
On 11/1/23 17:36, Sean Christopherson wrote: "Allow" isn't perfect, e.g. I would much prefer a straight KVM_GUEST_MEMFD_USE_HUGEPAGES or KVM_GUEST_MEMFD_HUGEPAGES flag, but I wanted the name to convey that KVM doesn't (yet) guarantee hugepages. I.e. KVM_GUEST_MEMFD_ALLOW_HUGEPAGE is stronger

Re: [PATCH v13 16/35] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-11-01 Thread Sean Christopherson
On Wed, Nov 01, 2023, Fuad Tabba wrote: > > > > @@ -1034,6 +1034,9 @@ static void kvm_destroy_dirty_bitmap(struct > > > > kvm_memory_slot *memslot) > > > > /* This does not remove the slot from struct kvm_memslots data > > > > structures */ > > > > static void kvm_free_memslot(struct kvm *kvm,

Re: [PATCH v13 03/35] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-11-01 Thread Xu Yilun
On Fri, Oct 27, 2023 at 11:21:45AM -0700, Sean Christopherson wrote: > From: Chao Peng > > Currently in mmu_notifier invalidate path, hva range is recorded and > then checked against by mmu_notifier_retry_hva() in the page fault ^ should be mmu_invalidate_retry_hva().

Re: [PATCH v13 09/35] KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace

2023-11-01 Thread Sean Christopherson
On Wed, Nov 01, 2023, Kai Huang wrote: > > > +7.34 KVM_CAP_MEMORY_FAULT_INFO > > +-- > > + > > +:Architectures: x86 > > +:Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP. > > + > > +The presence of this capability indicates that KVM_RUN will fill > >

Re: [pci:controller/xilinx-xdma] BUILD REGRESSION 8d786149d78c7784144c7179e25134b6530b714b

2023-11-01 Thread Nathan Chancellor
On Wed, Nov 01, 2023 at 10:25:25AM +0100, Arnd Bergmann wrote: > On Tue, Oct 31, 2023, at 18:14, Bjorn Helgaas wrote: > > On Tue, Oct 31, 2023 at 09:59:29AM -0700, Nick Desaulniers wrote: > >> On Tue, Oct 31, 2023 at 7:56 AM Bjorn Helgaas wrote: > > >> > arch/powerpc/xmon/xmon.c:

Re: [PATCH v13 17/35] KVM: Add transparent hugepage support for dedicated guest memory

2023-11-01 Thread Sean Christopherson
On Wed, Nov 01, 2023, Paolo Bonzini wrote: > On Wed, Nov 1, 2023 at 2:41 PM Sean Christopherson wrote: > > > > On Wed, Nov 01, 2023, Xiaoyao Li wrote: > > > On 10/31/2023 10:16 PM, Sean Christopherson wrote: > > > > On Tue, Oct 31, 2023, Xiaoyao Li wrote: > > > > > On 10/28/2023 2:21 AM, Sean

Re: [PATCH v13 08/35] KVM: Introduce KVM_SET_USER_MEMORY_REGION2

2023-11-01 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson wrote: > > Introduce a "version 2" of KVM_SET_USER_MEMORY_REGION so that additional > information can be supplied without setting userspace up to fail. The > padding in the new kvm_userspace_memory_region2 structure will be used to > pass a

Re: [PATCH v13 17/35] KVM: Add transparent hugepage support for dedicated guest memory

2023-11-01 Thread Paolo Bonzini
On Wed, Nov 1, 2023 at 2:41 PM Sean Christopherson wrote: > > On Wed, Nov 01, 2023, Xiaoyao Li wrote: > > On 10/31/2023 10:16 PM, Sean Christopherson wrote: > > > On Tue, Oct 31, 2023, Xiaoyao Li wrote: > > > > On 10/28/2023 2:21 AM, Sean Christopherson wrote: > > > > > Extended guest_memfd to

Re: [PATCH v13 17/35] KVM: Add transparent hugepage support for dedicated guest memory

2023-11-01 Thread Sean Christopherson
On Wed, Nov 01, 2023, Xiaoyao Li wrote: > On 10/31/2023 10:16 PM, Sean Christopherson wrote: > > On Tue, Oct 31, 2023, Xiaoyao Li wrote: > > > On 10/28/2023 2:21 AM, Sean Christopherson wrote: > > > > Extended guest_memfd to allow backing guest memory with transparent > > > > hugepages. Require

Re: [PATCH v13 07/35] KVM: Convert KVM_ARCH_WANT_MMU_NOTIFIER to CONFIG_KVM_GENERIC_MMU_NOTIFIER

2023-11-01 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson wrote: > > Convert KVM_ARCH_WANT_MMU_NOTIFIER into a Kconfig and select it where > appropriate to effectively maintain existing behavior. Using a proper > Kconfig will simplify building more functionality on top of KVM's > mmu_notifier

Re: [PATCH v13 05/35] KVM: PPC: Drop dead code related to KVM_ARCH_WANT_MMU_NOTIFIER

2023-11-01 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson wrote: > > Assert that both KVM_ARCH_WANT_MMU_NOTIFIER and CONFIG_MMU_NOTIFIER are > defined when KVM is enabled, and return '1' unconditionally for the > CONFIG_KVM_BOOK3S_HV_POSSIBLE=n path. All flavors of PPC support for KVM > select

Re: [PATCH v13 04/35] KVM: WARN if there are dangling MMU invalidations at VM destruction

2023-11-01 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson wrote: > > Add an assertion that there are no in-progress MMU invalidations when a > VM is being destroyed, with the exception of the scenario where KVM > unregisters its MMU notifier between an .invalidate_range_start() call and > the

Re: [PATCH v13 02/35] KVM: Assert that mmu_invalidate_in_progress *never* goes negative

2023-11-01 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson wrote: > > Move the assertion on the in-progress invalidation count from the primary > MMU's notifier path to KVM's common notification path, i.e. assert that > the count doesn't go negative even when the invalidation is coming from > KVM

Re: [PATCH v13 01/35] KVM: Tweak kvm_hva_range and hva_handler_t to allow reusing for gfn ranges

2023-11-01 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson wrote: > > Rework and rename "struct kvm_hva_range" into "kvm_mmu_notifier_range" so > that the structure can be used to handle notifications that operate on gfn > context, i.e. that aren't tied to a host virtual address. Rename the > handler

Re: [RFC PATCH v8 00/13] Add audio support in v4l2 framework

2023-11-01 Thread Hans Verkuil
On 01/11/2023 12:05, Shengjiu Wang wrote: > On Mon, Oct 30, 2023 at 9:56 AM Shengjiu Wang wrote: >> >> On Fri, Oct 27, 2023 at 7:18 PM Hans Verkuil wrote: >>> >>> Hi Shengjiu, >>> >>> Is there a reason why this series is still marked RFC? >>> >>> Just wondering about that. >> >> In the very

Re: [RFC PATCH v8 00/13] Add audio support in v4l2 framework

2023-11-01 Thread Shengjiu Wang
On Mon, Oct 30, 2023 at 9:56 AM Shengjiu Wang wrote: > > On Fri, Oct 27, 2023 at 7:18 PM Hans Verkuil wrote: > > > > Hi Shengjiu, > > > > Is there a reason why this series is still marked RFC? > > > > Just wondering about that. > > In the very beginning I started this series with RFC, So > I

Re: [PATCH v13 09/35] KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace

2023-11-01 Thread Huang, Kai
> +7.34 KVM_CAP_MEMORY_FAULT_INFO > +-- > + > +:Architectures: x86 > +:Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP. > + > +The presence of this capability indicates that KVM_RUN will fill > +kvm_run.memory_fault if KVM cannot resolve a guest page

Re: [PATCH v13 16/35] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-11-01 Thread Fuad Tabba
Hi Sean, On Tue, Oct 31, 2023 at 10:13 PM Sean Christopherson wrote: > > On Tue, Oct 31, 2023, Fuad Tabba wrote: > > Hi, > > > > On Fri, Oct 27, 2023 at 7:23 PM Sean Christopherson > > wrote: > > > > ... > > > > > diff --git a/Documentation/virt/kvm/api.rst > > >

Re: [pci:controller/xilinx-xdma] BUILD REGRESSION 8d786149d78c7784144c7179e25134b6530b714b

2023-11-01 Thread Arnd Bergmann
On Tue, Oct 31, 2023, at 18:14, Bjorn Helgaas wrote: > On Tue, Oct 31, 2023 at 09:59:29AM -0700, Nick Desaulniers wrote: >> On Tue, Oct 31, 2023 at 7:56 AM Bjorn Helgaas wrote: >> > arch/powerpc/xmon/xmon.c: release_output_lock(); >> > >> > That said, the unused functions do look

Re: [PATCH v13 09/35] KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace

2023-11-01 Thread Binbin Wu
On 10/28/2023 2:21 AM, Sean Christopherson wrote: From: Chao Peng Add a new KVM exit type to allow userspace to handle memory faults that KVM cannot resolve, but that userspace *may* be able to handle (without terminating the guest). KVM will initially use KVM_EXIT_MEMORY_FAULT to report

Re: [PATCH v13 17/35] KVM: Add transparent hugepage support for dedicated guest memory

2023-11-01 Thread Xiaoyao Li
On 10/31/2023 10:16 PM, Sean Christopherson wrote: On Tue, Oct 31, 2023, Xiaoyao Li wrote: On 10/28/2023 2:21 AM, Sean Christopherson wrote: Extended guest_memfd to allow backing guest memory with transparent hugepages. Require userspace to opt-in via a flag even though there's no