[GIT PULL] Please pull powerpc/linux.git powerpc-6.7-1 tag

2023-11-02 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull powerpc updates for 6.7. There's one conflict, where we added Documentation/powerpc/kvm-nested.rst while upstream moved Documentation/powerpc to Documentation/arch/powerpc. Resolution is just to add it in the new location.

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

2023-11-02 Thread Xu Yilun
On Fri, Oct 27, 2023 at 11:21:51AM -0700, Sean Christopherson wrote: > --- a/Documentation/virt/kvm/api.rst > +++ b/Documentation/virt/kvm/api.rst > @@ -6723,6 +6723,26 @@ array field represents return values. The userspace > should update the return > values of SBI call before resuming the

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

2023-11-02 Thread Huang, Kai
On Thu, 2023-11-02 at 08:44 -0700, Sean Christopherson wrote: > On Thu, Nov 02, 2023, Paolo Bonzini wrote: > > On 11/2/23 10:35, Huang, Kai wrote: > > > IIUC KVM can already handle the case of poisoned > > > page by sending signal to user app: > > > > > >   static int kvm_handle_error_pfn(struct

Re: [PATCH v3 4/4] PCI: layerscape: Add suspend/resume for ls1043a

2023-11-02 Thread Frank Li
On Thu, Nov 02, 2023 at 11:09:00PM +0530, Manivannan Sadhasivam wrote: > On Tue, Oct 17, 2023 at 03:31:45PM -0400, Frank Li wrote: > > ls1043a add suspend/resume support. > > Implement ls1043a_pcie_send_turnoff_msg() to send PME_Turn_Off message. > > Implement ls1043a_pcie_exit_from_l2() to exit

Re: [PATCH v3 3/4] PCI: layerscape: Rename pf_* as pf_lut_*

2023-11-02 Thread Frank Li
On Thu, Nov 02, 2023 at 11:03:14PM +0530, Manivannan Sadhasivam wrote: > On Tue, Oct 17, 2023 at 03:31:44PM -0400, Frank Li wrote: > > 'pf' and 'lut' is just difference name in difference chips, but basic it is > > a MMIO base address plus an offset. > > > > Rename it to avoid duplicate pf_* and

Re: [PATCH v3 2/4] PCI: layerscape: Add suspend/resume for ls1021a

2023-11-02 Thread Frank Li
On Thu, Nov 02, 2023 at 10:58:09PM +0530, Manivannan Sadhasivam wrote: > On Tue, Oct 17, 2023 at 03:31:43PM -0400, Frank Li wrote: > > ls1021a add suspend/resume support. > > > > Implement callback ls1021a_pcie_send_turnoff_msg(), which write scfg's > > SCFG_PEXPMWRCR to issue PME_Turn_off

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

2023-11-02 Thread Sean Christopherson
On Thu, Nov 02, 2023, David Matlack wrote: > On Thu, Nov 2, 2023 at 9:03 AM Sean Christopherson wrote: > > > > On Thu, Nov 02, 2023, Paolo Bonzini wrote: > > > On 10/31/23 23:39, David Matlack wrote: > > > > > > Maybe can you sketch out how you see this proposal being extensible > > > > > > to >

Re: [PATCH v3 2/4] PCI: layerscape: Add suspend/resume for ls1021a

2023-11-02 Thread Manivannan Sadhasivam
On Tue, Oct 17, 2023 at 03:31:43PM -0400, Frank Li wrote: > ls1021a add suspend/resume support. > > Implement callback ls1021a_pcie_send_turnoff_msg(), which write scfg's > SCFG_PEXPMWRCR to issue PME_Turn_off message. > > Implement ls1021a_pcie_exit_from_l2() to let controller exit L2 state. >

Re: [PATCH v3 1/4] PCI: layerscape: Add function pointer for exit_from_l2()

2023-11-02 Thread Frank Li
On Thu, Nov 02, 2023 at 10:28:08PM +0530, Manivannan Sadhasivam wrote: > On Tue, Oct 17, 2023 at 03:31:42PM -0400, Frank Li wrote: > > Since difference SoCs require different sequence for exiting L2, let's add > > a separate "exit_from_l2()" callback. This callback can be used to execute > > SoC

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

2023-11-02 Thread Sean Christopherson
On Thu, Nov 02, 2023, Paolo Bonzini wrote: > On 10/31/23 23:39, David Matlack wrote: > > > > Maybe can you sketch out how you see this proposal being extensible to > > > > using guest_memfd for shared mappings? > > > For in-place conversions, e.g. pKVM, no additional guest_memfd is needed. > > >

Re: [PATCH v3 3/4] PCI: layerscape: Rename pf_* as pf_lut_*

2023-11-02 Thread Manivannan Sadhasivam
On Tue, Oct 17, 2023 at 03:31:44PM -0400, Frank Li wrote: > 'pf' and 'lut' is just difference name in difference chips, but basic it is > a MMIO base address plus an offset. > > Rename it to avoid duplicate pf_* and lut_* in driver. > "pci-layerscape-ep.c" uses "ls_lut_" prefix and now you are

Re: [PATCH v3 4/4] PCI: layerscape: Add suspend/resume for ls1043a

2023-11-02 Thread Manivannan Sadhasivam
On Tue, Oct 17, 2023 at 03:31:45PM -0400, Frank Li wrote: > ls1043a add suspend/resume support. > Implement ls1043a_pcie_send_turnoff_msg() to send PME_Turn_Off message. > Implement ls1043a_pcie_exit_from_l2() to exit from L2 state. > Please use the suggestion I gave in patch 2/4. >

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

2023-11-02 Thread Paolo Bonzini
On Thu, Nov 2, 2023 at 4:38 PM Sean Christopherson wrote: > Actually, looking that this again, there's not actually a hard dependency on > THP. > A THP-enabled kernel _probably_ gives a higher probability of using > hugepages, > but mostly because THP selects COMPACTION, and I suppose because

Re: [PATCH v3 1/4] PCI: layerscape: Add function pointer for exit_from_l2()

2023-11-02 Thread Manivannan Sadhasivam
On Tue, Oct 17, 2023 at 03:31:42PM -0400, Frank Li wrote: > Since difference SoCs require different sequence for exiting L2, let's add > a separate "exit_from_l2()" callback. This callback can be used to execute > SoC specific sequence. > I missed the fact that this patch honors the return value

Re: [PATCH v13 15/35] fs: Export anon_inode_getfile_secure() for use by KVM

2023-11-02 Thread Christian Brauner
On Fri, Oct 27, 2023 at 11:21:57AM -0700, Sean Christopherson wrote: > Export anon_inode_getfile_secure() so that it can be used by KVM to create > and manage file-based guest memory without need a fullblow filesystem. > The "standard" anon_inode_getfd() doesn't work for KVM's use case as KVM >

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

2023-11-02 Thread David Matlack
On Thu, Nov 2, 2023 at 9:03 AM Sean Christopherson wrote: > > On Thu, Nov 02, 2023, Paolo Bonzini wrote: > > On 10/31/23 23:39, David Matlack wrote: > > > > > Maybe can you sketch out how you see this proposal being extensible to > > > > > using guest_memfd for shared mappings? > > > > For

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

2023-11-02 Thread Sean Christopherson
On Thu, Nov 02, 2023, Paolo Bonzini wrote: > On 11/2/23 10:35, Huang, Kai wrote: > > IIUC KVM can already handle the case of poisoned > > page by sending signal to user app: > > > > static int kvm_handle_error_pfn(struct kvm_vcpu *vcpu, > > struct > > kvm_page_fault *fault)

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

2023-11-02 Thread Sean Christopherson
On Thu, Nov 02, 2023, Xiaoyao Li wrote: > 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.

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

2023-11-02 Thread Paolo Bonzini
On 10/31/23 23:39, David Matlack wrote: Maybe can you sketch out how you see this proposal being extensible to using guest_memfd for shared mappings? For in-place conversions, e.g. pKVM, no additional guest_memfd is needed. What's missing there is the ability to (safely) mmap() guest_memfd,

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

2023-11-02 Thread Sean Christopherson
On Thu, Nov 02, 2023, Kai Huang wrote: > 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:

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

2023-11-02 Thread Sean Christopherson
On Thu, Nov 02, 2023, Paolo Bonzini wrote: > 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: > > > > Can you post a fixup patch? It's not clear to me exactly what behavior > > > >

Re: [PATCH v13 22/35] KVM: Allow arch code to track number of memslot address spaces per VM

2023-11-02 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:23 PM Sean Christopherson wrote: > > Let x86 track the number of address spaces on a per-VM basis so that KVM > can disallow SMM memslots for confidential VMs. Confidentials VMs are > fundamentally incompatible with emulating SMM, which as the name suggests > requires

Re: [PATCH v13 12/35] KVM: Prepare for handling only shared mappings in mmu_notifier events

2023-11-02 Thread Fuad Tabba
On Thu, Nov 2, 2023 at 2:41 PM Sean Christopherson wrote: > > On Thu, Nov 02, 2023, Fuad Tabba wrote: > > Hi, > > > > On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson > > wrote: > > > > > > Add flags to "struct kvm_gfn_range" to let notifier events target only > > > shared and only private

Fbdev issue after the drm updates 'drm-next-2023-10-31-1'

2023-11-02 Thread Christian Zigotzky
Hello, There is a fbdev issue with the virtio-gpu-pci and virtio-vga. (The penguins are not displayed at boot time) Error message:  [    0.889302] virtio-pci :00:02.0: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-2) The kernel 6.6 final doesn't have this issue. Please

Re: [PATCH v13 12/35] KVM: Prepare for handling only shared mappings in mmu_notifier events

2023-11-02 Thread Sean Christopherson
On Thu, Nov 02, 2023, Fuad Tabba wrote: > Hi, > > On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson wrote: > > > > Add flags to "struct kvm_gfn_range" to let notifier events target only > > shared and only private mappings, and write up the existing mmu_notifier > > events to be shared-only

Re: [PATCH v13 21/35] KVM: Drop superfluous __KVM_VCPU_MULTIPLE_ADDRESS_SPACE macro

2023-11-02 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:23 PM Sean Christopherson wrote: > > Drop __KVM_VCPU_MULTIPLE_ADDRESS_SPACE and instead check the value of > KVM_ADDRESS_SPACE_NUM. > > No functional change intended. > > Reviewed-by: Paolo Bonzini > Signed-off-by: Sean Christopherson > --- Reviewed-by: Fuad Tabba

Re: [PATCH v13 20/35] KVM: x86/mmu: Handle page fault for private memory

2023-11-02 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:23 PM Sean Christopherson wrote: > > From: Chao Peng > > Add support for resolving page faults on guest private memory for VMs > that differentiate between "shared" and "private" memory. For such VMs, > KVM_MEM_PRIVATE memslots can include both fd-based private memory

Re: [PATCH v13 18/35] KVM: x86: "Reset" vcpu->run->exit_reason early in KVM_RUN

2023-11-02 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:23 PM Sean Christopherson wrote: > > Initialize run->exit_reason to KVM_EXIT_UNKNOWN early in KVM_RUN to reduce > the probability of exiting to userspace with a stale run->exit_reason that > *appears* to be valid. > > To support fd-based guest memory (guest memory

Re: [PATCH v13 12/35] KVM: Prepare for handling only shared mappings in mmu_notifier events

2023-11-02 Thread Fuad Tabba
Hi, On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson wrote: > > Add flags to "struct kvm_gfn_range" to let notifier events target only > shared and only private mappings, and write up the existing mmu_notifier > events to be shared-only (private memory is never associated with a > userspace

Re: [PATCH v13 11/35] KVM: Drop .on_unlock() mmu_notifier hook

2023-11-02 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson wrote: > > Drop the .on_unlock() mmu_notifer hook now that it's no longer used for > notifying arch code that memory has been reclaimed. Adding .on_unlock() > and invoking it *after* dropping mmu_lock was a terrible idea, as doing so > resulted

Re: [PATCH v13 10/35] KVM: Add a dedicated mmu_notifier flag for reclaiming freed memory

2023-11-02 Thread Fuad Tabba
On Fri, Oct 27, 2023 at 7:22 PM Sean Christopherson wrote: > > Handle AMD SEV's kvm_arch_guest_memory_reclaimed() hook by having > __kvm_handle_hva_range() return whether or not an overlapping memslot > was found, i.e. mmu_lock was acquired. Using the .on_unlock() hook > works, but

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

2023-11-02 Thread Fuad Tabba
On Wed, Nov 1, 2023 at 9:55 PM Sean Christopherson wrote: > > 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 > > > >

[RFC PATCH] powerpc/book3s/hash: Drop _PAGE_PRIVILEGED from PAGE_NONE

2023-11-02 Thread Aneesh Kumar K.V
There used to be a dependency on _PAGE_PRIVILEGED with pte_savedwrite. But that got dropped by commit 6a56ccbcf6c6 ("mm/autonuma: use can_change_(pte|pmd)_writable() to replace savedwrite") With this change numa fault pte (pte_protnone()) gets mapped as regular user pte with RWX cleared

Re: [PATCH v2] powerpc/mm: Avoid calling arch_enter/leave_lazy_mmu() in set_ptes

2023-11-02 Thread Michael Ellerman
Matthew Wilcox writes: > On Tue, Oct 24, 2023 at 08:06:04PM +0530, Aneesh Kumar K.V wrote: >> ptep++; >> -pte = __pte(pte_val(pte) + (1UL << PTE_RPN_SHIFT)); >> addr += PAGE_SIZE; >> +/* >> + * increment the pfn. >> + */ >>

Re: [PATCH v13 12/35] KVM: Prepare for handling only shared mappings in mmu_notifier events

2023-11-02 Thread Paolo Bonzini
On 11/2/23 06:59, Binbin Wu wrote: Add flags to "struct kvm_gfn_range" to let notifier events target only shared and only private mappings, and write up the existing mmu_notifier events to be shared-only (private memory is never associated with a userspace virtual address, i.e. can't be

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

2023-11-02 Thread Paolo Bonzini
On 11/2/23 10:35, Huang, Kai wrote: IIUC KVM can already handle the case of poisoned page by sending signal to user app: static int kvm_handle_error_pfn(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault) { ... if

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

2023-11-02 Thread Paolo Bonzini
On 11/1/23 18:36, Sean Christopherson wrote: A good example is KVM_RUN with -EINTR; if KVM were to return something other than -EINTR on a pending signal or vcpu->run->immediate_exit, userspace would fall over. And dually if KVM were to return KVM_EXIT_INTR together with something other

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

2023-11-02 Thread Huang, Kai
On Thu, 2023-11-02 at 11:32 +0100, Paolo Bonzini wrote: > > > +#ifdef CONFIG_KVM_GENERIC_MEMORY_ATTRIBUTES > > > +static inline unsigned long kvm_get_memory_attributes(struct kvm *kvm, > > > gfn_t gfn) > > > +{ > > > + return xa_to_value(xa_load(>mem_attr_array, gfn)); > > > +} > > > > Only call

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

2023-11-02 Thread Paolo Bonzini
On 11/2/23 04:01, Huang, Kai wrote: 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

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

2023-11-02 Thread Huang, Kai
On Thu, 2023-11-02 at 03:17 +, Huang, Kai wrote: > 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 > > > >

Re: Does anyone use Appletalk?

2023-11-02 Thread John Paul Adrian Glaubitz
On Thu, 2023-11-02 at 13:13 +1100, Finn Thain wrote: > So I can't object to the removal of the localtalk code. But I do object to > the underhand manner in which it is done. I agree. I have the impression that the actual users of the affected code are never asked. It's usually a question posed

Re: [PATCH 1/2] kexec: fix KEXEC_FILE dependencies

2023-11-02 Thread Baoquan He
Hi Arnd, On 10/24/23 at 03:17pm, Arnd Bergmann wrote: > On Tue, Oct 24, 2023, at 14:44, Baoquan He wrote: > > Just add people and mailing list to CC since I didn't find this mail in > > my box, just drag it via 'b4 am'. > > > > On 10/23/23 at 01:01pm, Arnd Bergmann wrote: > > .. > > >> diff

Re: [PATCH v13 12/35] KVM: Prepare for handling only shared mappings in mmu_notifier events

2023-11-02 Thread Binbin Wu
On 10/28/2023 2:21 AM, Sean Christopherson wrote: Add flags to "struct kvm_gfn_range" to let notifier events target only shared and only private mappings, and write up the existing mmu_notifier events to be shared-only (private memory is never associated with a userspace virtual address, i.e.