[RFC PATCH v2 10/10] KVM: selftests: Add irqfd/interrupts test for TDX with migration

2025-06-11 Thread Ryan Afranji
From: Ackerley Tng Adds a selftest to verify interrupts sent to a TDX VM before migration are successfully handled by the migrated VM. Co-developed-by: Ryan Afranji Signed-off-by: Ryan Afranji Signed-off-by: Ackerley Tng --- tools/testing/selftests/kvm/Makefile.kvm | 1 + .../testing

[RFC PATCH v2 09/10] KVM: selftests: Add TDX support for ucalls

2025-06-11 Thread Ryan Afranji
as shared memory. Signed-off-by: Ackerley Tng Signed-off-by: Ryan Afranji --- .../testing/selftests/kvm/include/kvm_util.h | 1 + .../testing/selftests/kvm/include/x86/ucall.h | 4 +- .../testing/selftests/kvm/lib/ucall_common.c | 2 +- .../selftests/kvm/lib/x86/tdx/tdx_util.c

[RFC PATCH v2 08/10] KVM: selftests: TDX: Add tests for TDX in-place migration

2025-06-11 Thread Ryan Afranji
From: Sagi Shahar Adds selftests for TDX in-place migration. Signed-off-by: Ryan Afranji Signed-off-by: Sagi Shahar --- tools/testing/selftests/kvm/Makefile.kvm | 1 + .../testing/selftests/kvm/include/kvm_util.h | 20 + .../selftests/kvm/include/x86/tdx/tdx_util.h | 1 + tools

[RFC PATCH v2 07/10] KVM: selftests: Refactor userspace_mem_region creation out of vm_mem_add

2025-06-11 Thread Ryan Afranji
Refactor the creation and committing of userspace_mem_region to their own functions so that they can reused by future TDX migration functions. Signed-off-by: Ryan Afranji --- tools/testing/selftests/kvm/lib/kvm_util.c | 147 + 1 file changed, 89 insertions(+), 58 deletions

[RFC PATCH v2 06/10] KVM: TDX: Add core logic for TDX intra-host migration

2025-06-11 Thread Ryan Afranji
From: Sagi Shahar Adds the core logic for transferring state between source and destination TDs during intra-host migration. Signed-off-by: Sagi Shahar Co-developed-by: Ryan Afranji Signed-off-by: Ryan Afranji --- arch/x86/kvm/vmx/tdx.c | 193 - 1

[RFC PATCH v2 05/10] KVM: TDX: Allow vCPUs to be created for migration

2025-06-11 Thread Ryan Afranji
During migration, vCPUs need to be created for an uninitialized VM. This commit moves the TDX vCPU setup that requires an initialized VM out of tdx_vcpu_create() and into tdx_td_vcpu_init(). Signed-off-by: Ryan Afranji --- arch/x86/kvm/vmx/tdx.c | 21 +++-- 1 file changed, 11

[RFC PATCH v2 04/10] KVM: TDX: Implement moving mirror pages between 2 TDs

2025-06-11 Thread Ryan Afranji
From: Sagi Shahar Added functionality for moving the mirror EPT table from one TD to a new one. This function moves the root of the mirror EPT table and overwrites the root of the destination. Signed-off-by: Sagi Shahar Signed-off-by: Ryan Afranji --- arch/x86/kvm/mmu.h | 2

[RFC PATCH v2 03/10] KVM: TDX: Add base implementation for tdx_vm_move_enc_context_from

2025-06-11 Thread Ryan Afranji
From: Sagi Shahar This should mostly match the logic in sev_vm_move_enc_context_from. Signed-off-by: Sagi Shahar Signed-off-by: Ryan Afranji --- arch/x86/kvm/vmx/main.c| 12 +++- arch/x86/kvm/vmx/tdx.c | 24 arch/x86/kvm/vmx/x86_ops.h | 1 + 3 files

[RFC PATCH v2 02/10] KVM: x86: Adjust locking order in move_enc_context_from

2025-06-11 Thread Ryan Afranji
patch adjusts move_enc_context_from() to match vCPU IOCTL’s locking order to prevent deadlock warnings. Signed-off-by: Ryan Afranji --- arch/x86/kvm/svm/sev.c | 13 + arch/x86/kvm/x86.c | 14 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/arch/x86/kvm

[RFC PATCH v2 01/10] KVM: Split tdp_mmu_pages to mirror and direct counters

2025-06-11 Thread Ryan Afranji
x27;t work for mirrored pages which stores information in the secure EPT. Keeping them in separate counters makes this transfer more efficient. Signed-off-by: Sagi Shahar Signed-off-by: Ryan Afranji --- arch/x86/include/asm/kvm_host.h | 7 +-- arch/x86/kvm/mmu/tdp_mmu.c | 11 +

[RFC PATCH v2 00/10] Add TDX intra-host migration support

2025-06-11 Thread Ryan Afranji
: selftests: Add irqfd/interrupts test for TDX with migration Ryan Afranji (3): KVM: x86: Adjust locking order in move_enc_context_from KVM: TDX: Allow vCPUs to be created for migration KVM: selftests: Refactor userspace_mem_region creation out of vm_mem_add Sagi Shahar (5): KVM: Split

Re: [RFC PATCH v1 0/6] Lazy mmu mode fixes and improvements

2025-06-02 Thread Ryan Roberts
On 31/05/2025 08:46, Mike Rapoport wrote: > Hi Ryan, > > On Fri, May 30, 2025 at 04:55:36PM +0100, Ryan Roberts wrote: >> On 30/05/2025 15:47, Lorenzo Stoakes wrote: >>> +cc Jann who is a specialist in all things page table-y and especially scary >>> edge cases :

Re: [RFC PATCH v1 3/6] mm: Avoid calling page allocator from apply_to_page_range()

2025-05-30 Thread Ryan Roberts
On 30/05/2025 17:23, Liam R. Howlett wrote: > * Ryan Roberts [250530 10:05]: >> Lazy mmu mode applies to the current task and permits pte modifications >> to be deferred and updated at a later time in a batch to improve >> performance. apply_to_page_range() calls its call

Re: [RFC PATCH v1 1/6] fs/proc/task_mmu: Fix pte update and tlb maintenance ordering in pagemap_scan_pmd_entry()

2025-05-30 Thread Ryan Roberts
On 30/05/2025 17:26, Jann Horn wrote: > On Fri, May 30, 2025 at 4:04 PM Ryan Roberts wrote: >> pagemap_scan_pmd_entry() was previously modifying ptes while in lazy mmu >> mode, then performing tlb maintenance for the modified ptes, then >> leaving lazy mmu mode. But any pte

Re: [RFC PATCH v1 0/6] Lazy mmu mode fixes and improvements

2025-05-30 Thread Ryan Roberts
On 30/05/2025 15:47, Lorenzo Stoakes wrote: > +cc Jann who is a specialist in all things page table-y and especially scary > edge cases :) > > On Fri, May 30, 2025 at 03:04:38PM +0100, Ryan Roberts wrote: >> Hi All, >> >> I recently added support for lazy mmu mode

[RFC PATCH v1 6/6] Revert "arm64/mm: Permit lazy_mmu_mode to be nested"

2025-05-30 Thread Ryan Roberts
commit and reinstate the VM_WARN() if nesting is detected in future. Signed-off-by: Ryan Roberts --- arch/arm64/include/asm/pgtable.h | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index ad

[RFC PATCH v1 5/6] mm: Avoid calling page allocator while in lazy mmu mode

2025-05-30 Thread Ryan Roberts
PI to check if we are in lazy mmu mode, and if so, when calling into the page allocator, temporarily leave lazy mmu mode. Given this new API we can also add VM_WARNings to check that we exit lazy mmu mode when required to ensure the PTEs are actually updated prior to tlb flushing. Signed-off-by:

[RFC PATCH v1 4/6] mm: Introduce arch_in_lazy_mmu_mode()

2025-05-30 Thread Ryan Roberts
performing an allocation, and will additionally be used to ensure pte modification vs tlb flushing order does not get inadvertantly swapped. Signed-off-by: Ryan Roberts --- arch/arm64/include/asm/pgtable.h | 8 .../powerpc/include/asm/book3s/64/tlbflush-hash.h | 15

[RFC PATCH v1 3/6] mm: Avoid calling page allocator from apply_to_page_range()

2025-05-30 Thread Ryan Roberts
e updated to use the _nolazy variants. Signed-off-by: Ryan Roberts --- include/linux/mm.h | 6 ++ kernel/bpf/arena.c | 6 +++--- mm/kasan/shadow.c | 2 +- mm/memory.c| 54 +++--- 4 files changed, 51 insertions(+), 17 deletions(-) diff --git a/

[RFC PATCH v1 2/6] mm: Fix pte update and tlb maintenance ordering in migrate_vma_collect_pmd()

2025-05-30 Thread Ryan Roberts
ot;) Signed-off-by: Ryan Roberts --- mm/migrate_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/migrate_device.c b/mm/migrate_device.c index 3158afe7eb23..fc73a940c112 100644 --- a/mm/migrate_device.c +++ b/mm/migrate_device.c @@ -283,11 +283,1

[RFC PATCH v1 1/6] fs/proc/task_mmu: Fix pte update and tlb maintenance ordering in pagemap_scan_pmd_entry()

2025-05-30 Thread Ryan Roberts
lly clear info about PTEs") Signed-off-by: Ryan Roberts --- fs/proc/task_mmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 994cde10e3f4..361f3ffd9a0c 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -2557,10 +2

[RFC PATCH v1 0/6] Lazy mmu mode fixes and improvements

2025-05-30 Thread Ryan Roberts
es (with DEBUG_PAGEALLOC and KFENCE enabled). Applies against Linus's master branch (f66bc387efbe). Thanks, Ryan Ryan Roberts (6): fs/proc/task_mmu: Fix pte update and tlb maintenance ordering in pagemap_scan_pmd_entry() mm: Fix pte update and tlb maintenance orderi

Re: [PATCH v2] selftests/mm: add simple VM_PFNMAP tests based on mmap'ing /dev/mem

2025-05-28 Thread Ryan Roberts
On 28/05/2025 13:40, David Hildenbrand wrote: > On 28.05.25 12:53, Ryan Roberts wrote: >> On 28/05/2025 11:48, David Hildenbrand wrote: >>> On 28.05.25 12:44, David Hildenbrand wrote: >>>> On 28.05.25 12:34, Ryan Roberts wrote: >>>>> Hi David,

Re: [PATCH v2] selftests/mm: add simple VM_PFNMAP tests based on mmap'ing /dev/mem

2025-05-28 Thread Ryan Roberts
On 28/05/2025 11:48, David Hildenbrand wrote: > On 28.05.25 12:44, David Hildenbrand wrote: >> On 28.05.25 12:34, Ryan Roberts wrote: >>> Hi David, >>> >>> >>> On 09/05/2025 16:30, David Hildenbrand wrote: >>>> Let's test some basic

Re: [PATCH v2] selftests/mm: add simple VM_PFNMAP tests based on mmap'ing /dev/mem

2025-05-28 Thread Ryan Roberts
; 0) > + SKIP(return, "Cannot open '/dev/mem'\n"); > + > + /* We'll require the first two pages throughout our tests ... */ > + self->size1 = self->pagesize * 2; > + self->addr1 = mmap(NULL, self->size1, PROT_READ, MAP_SHARED, > +

Re: [PATCH] selftests/eventfd: correct test name and improve messages

2025-05-24 Thread Ryan Chung
On Thu, May 22, 2025 at 03:47:27PM -0600, Shuah Khan wrote: > On 5/13/25 01:44, Ryan Chung wrote: > > - Rename test from to > > > > ?? missing description of the change. Looks like the patch > renames the test to fix spelling error in the test name? Sorry for the missi

[RFC PATCH v2 13/13] KVM: selftests: Add tests for migration of private mem

2025-05-16 Thread Ryan Afranji
From: Ackerley Tng Tests that private mem (in guest_mem files) can be migrated. Also demonstrates the migration flow. Signed-off-by: Ackerley Tng Signed-off-by: Ryan Afranji --- tools/testing/selftests/kvm/Makefile.kvm | 1 + .../kvm/x86/private_mem_migrate_tests.c | 56

[RFC PATCH v2 12/13] KVM: selftests: Generalize migration functions from sev_migrate_tests.c

2025-05-16 Thread Ryan Afranji
From: Ackerley Tng These functions will be used in private (guest mem) migration tests. Signed-off-by: Ackerley Tng Signed-off-by: Ryan Afranji --- .../testing/selftests/kvm/include/kvm_util.h | 13 + .../selftests/kvm/x86/sev_migrate_tests.c | 48 +++ 2 files

[RFC PATCH v2 11/13] KVM: x86: Handle moving of memory context for intra-host migration

2025-05-16 Thread Ryan Afranji
: Ryan Afranji --- arch/x86/kvm/x86.c | 110 +++ include/linux/kvm_host.h | 17 ++ virt/kvm/guest_memfd.c | 25 + 3 files changed, 152 insertions(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 3a7e05c47aa8..887702781465 100644

[RFC PATCH v2 10/13] KVM: x86: Let moving encryption context be configurable

2025-05-16 Thread Ryan Afranji
Annapurve Signed-off-by: Vishal Annapurve Signed-off-by: Ackerley Tng Signed-off-by: Ryan Afranji --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm/sev.c | 2 ++ arch/x86/kvm/x86.c | 9 - 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/x86

[RFC PATCH v2 09/13] KVM: x86: Refactor common migration preparation code out of sev_vm_move_enc_context_from

2025-05-16 Thread Ryan Afranji
From: Ackerley Tng Co-developed-by: Sagi Shahar Signed-off-by: Sagi Shahar Co-developed-by: Vishal Annapurve Signed-off-by: Vishal Annapurve Signed-off-by: Ackerley Tng Signed-off-by: Ryan Afranji --- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/svm/sev.c | 29

[RFC PATCH v2 08/13] KVM: x86: Refactor common code out of sev.c

2025-05-16 Thread Ryan Afranji
: Ackerley Tng Signed-off-by: Ryan Afranji --- arch/x86/kvm/svm/sev.c | 60 ++-- arch/x86/kvm/x86.c | 62 ++ arch/x86/kvm/x86.h | 6 3 files changed, 82 insertions(+), 46 deletions(-) diff --git a/arch/x86

[RFC PATCH v2 07/13] KVM: x86: Refactor sev's flag migration_in_progress to kvm struct

2025-05-16 Thread Ryan Afranji
From: Ackerley Tng The migration_in_progress flag will also be needed for migration of non-sev VMs. Co-developed-by: Sagi Shahar Signed-off-by: Sagi Shahar Co-developed-by: Vishal Annapurve Signed-off-by: Vishal Annapurve Signed-off-by: Ackerley Tng Signed-off-by: Ryan Afranji --- arch

[RFC PATCH v2 06/13] KVM: selftests: Test transferring private memory to another VM

2025-05-16 Thread Ryan Afranji
From: Ackerley Tng Signed-off-by: Ackerley Tng Signed-off-by: Ryan Afranji --- .../kvm/x86/private_mem_migrate_tests.c | 87 +++ 1 file changed, 87 insertions(+) create mode 100644 tools/testing/selftests/kvm/x86/private_mem_migrate_tests.c diff --git a/tools/testing

[RFC PATCH v2 05/13] KVM: selftests: Add tests for KVM_LINK_GUEST_MEMFD ioctl

2025-05-16 Thread Ryan Afranji
From: Ackerley Tng Test that + Invalid inputs should be rejected with EINVAL + Successful inputs return a new (destination) fd + Destination and source fds have the same inode number + No crash on program exit Signed-off-by: Ackerley Tng Signed-off-by: Ryan Afranji --- .../testing/selftests

[RFC PATCH v2 02/13] KVM: guest_memfd: Make guest mem use guest mem inodes instead of anonymous inodes

2025-05-16 Thread Ryan Afranji
From: Ackerley Tng Using guest mem inodes allows us to store metadata for the backing memory on the inode. Metadata will be added in a later patch to support HugeTLB pages. Metadata about backing memory should not be stored on the file, since the file represents a guest_memfd's binding with a st

[RFC PATCH v2 04/13] KVM: guest_mem: Add ioctl KVM_LINK_GUEST_MEMFD

2025-05-16 Thread Ryan Afranji
From: Ackerley Tng KVM_LINK_GUEST_MEMFD will link a gmem fd's underlying inode to a new file (and fd). Signed-off-by: Ackerley Tng Co-developed-by: Ryan Afranji Signed-off-by: Ryan Afranji --- include/uapi/linux/kvm.h | 8 ++ virt/kvm/guest_memfd.c

[RFC PATCH v2 03/13] KVM: guest_mem: Refactor out kvm_gmem_alloc_view()

2025-05-16 Thread Ryan Afranji
From: Ackerley Tng kvm_gmem_alloc_view() will allocate and build a file out of an inode. Will be reused later by kvm_gmem_link() Signed-off-by: Ackerley Tng Co-developed-by: Ryan Afranji Signed-off-by: Ryan Afranji --- virt/kvm/guest_memfd.c | 61

[RFC PATCH v2 01/13] fs: Refactor to provide function that allocates a secure anonymous inode

2025-05-16 Thread Ryan Afranji
From: David Hildenbrand alloc_anon_secure_inode() returns an inode after running checks in security_inode_init_security_anon(). Also refactor secretmem's file creation process to use the new function. Signed-off-by: David Hildenbrand Signed-off-by: Ackerley Tng Signed-off-by: Ryan Af

[RFC PATCH v2 00/13] New KVM ioctl to link a gmem inode to a new gmem file

2025-05-16 Thread Ryan Afranji
Hello, RFC v2 addresses comments in RFC v1 [1]. This series is also rebased on kvm/next (v6.15-rc4). Here's the series stitched together for your convenience: https://github.com/googleprodkernel/linux-cc/tree/kvm-gmem-link-migrate-rfcv2 Changes from RFC v1: + Adds patches to make guest mem use g

[PATCH] selftests/eventfd: correct test name and improve messages

2025-05-13 Thread Ryan Chung
- Rename test from to - Make the RDWR‐flag comment declarative: “The kernel automatically adds the O_RDWR flag.” - Update semaphore‐flag failure message to: “eventfd semaphore flag check failed: …” Signed-off-by: Ryan Chung --- tools/testing/selftests/filesystems/eventfd/eventfd_test.c

Re: [PATCH 3/4] tools/selftests: expand all guard region tests to file-backed

2025-04-22 Thread Ryan Roberts
On 22/04/2025 12:07, Lorenzo Stoakes wrote: > On Tue, Apr 22, 2025 at 12:03:08PM +0100, Ryan Roberts wrote: >> On 22/04/2025 11:47, Lorenzo Stoakes wrote: >>> On Tue, Apr 22, 2025 at 11:37:57AM +0100, Ryan Roberts wrote: > > [snip] > >>>> >>>>

Re: [PATCH 3/4] tools/selftests: expand all guard region tests to file-backed

2025-04-22 Thread Ryan Roberts
On 22/04/2025 11:47, Lorenzo Stoakes wrote: > On Tue, Apr 22, 2025 at 11:37:57AM +0100, Ryan Roberts wrote: >> On 13/02/2025 18:17, Lorenzo Stoakes wrote: >>> Extend the guard region tests to allow for test fixture variants for anon, >>> shmem, and local file files

Re: [PATCH 3/4] tools/selftests: expand all guard region tests to file-backed

2025-04-22 Thread Ryan Roberts
private memory mappings. Since Linux 4.11, userfaultfd can be also used with hugetlbfs and shared memory mappings. """ But I'm not sure if that's referring specifically to UFFDIO_REGISTER_MODE_MISSING? Any ideas before I start debugging further? Thanks, Ryan &

Re: [PATCH v7 0/3] x86/tdx: Fix HLT logic execution for TDX VMs

2025-03-24 Thread Ryan Afranji
Tested with the specjbb2015 benchmark. It has heavy lock contention which leads to many halt calls. TDX VMs suffered a poor score before this patchset. Verified the major performance improvement with this patchset applied. Tested-by: Ryan Afranji

Re: [PATCH v1 1/2] mm: Clear uffd-wp PTE/PMD state on mremap()

2025-01-24 Thread Ryan Roberts
On 23/01/2025 17:40, Peter Xu wrote: > On Thu, Jan 23, 2025 at 02:38:46PM +0000, Ryan Roberts wrote: >>> @@ -5470,7 +5471,18 @@ static void move_huge_pte(struct vm_area_struct >>> *vma, unsigned long old_addr, >>> spin_lock_nested(src_ptl, SINGLE_DEP

Re: [PATCH v1 1/2] mm: Clear uffd-wp PTE/PMD state on mremap()

2025-01-23 Thread Ryan Roberts
On 23/01/2025 14:38, Ryan Roberts wrote: > I think there might be a bug in this after all... > > > On 07/01/2025 14:47, Ryan Roberts wrote: >> When mremap()ing a memory region previously registered with userfaultfd >> as write-protected but without UFFD_FEATURE_EVENT_RE

Re: [PATCH v1 1/2] mm: Clear uffd-wp PTE/PMD state on mremap()

2025-01-23 Thread Ryan Roberts
I think there might be a bug in this after all... On 07/01/2025 14:47, Ryan Roberts wrote: > When mremap()ing a memory region previously registered with userfaultfd > as write-protected but without UFFD_FEATURE_EVENT_REMAP, an > inconsistency in flag clearing leads to a mismatch betwee

Re: [PATCH v1 1/2] mm: Clear uffd-wp PTE/PMD state on mremap()

2025-01-16 Thread Ryan Roberts
On 15/01/2025 20:28, Peter Xu wrote: > On Tue, Jan 07, 2025 at 02:47:52PM +0000, Ryan Roberts wrote: >> When mremap()ing a memory region previously registered with userfaultfd >> as write-protected but without UFFD_FEATURE_EVENT_REMAP, an >> inconsistency in flag clearin

Re: [PATCH v1 1/2] mm: Clear uffd-wp PTE/PMD state on mremap()

2025-01-15 Thread Ryan Roberts
On 15/01/2025 17:30, Lorenzo Stoakes wrote: > On Wed, Jan 15, 2025 at 12:21:15PM -0500, Peter Xu wrote: >> On Wed, Jan 15, 2025 at 04:58:06PM +0000, Ryan Roberts wrote: >>> Hi Peter, David, >> >> Hey, Ryan, >> >>> >>> On 07/01/2025 14:47, Rya

Re: [PATCH v1 1/2] mm: Clear uffd-wp PTE/PMD state on mremap()

2025-01-15 Thread Ryan Roberts
Hi Peter, David, On 07/01/2025 14:47, Ryan Roberts wrote: > When mremap()ing a memory region previously registered with userfaultfd > as write-protected but without UFFD_FEATURE_EVENT_REMAP, an > inconsistency in flag clearing leads to a mismatch between the vma flags > (which

[PATCH v1 2/2] selftests/mm: Introduce uffd-wp-mremap regression test

2025-01-07 Thread Ryan Roberts
: Ryan Roberts --- tools/testing/selftests/mm/.gitignore | 1 + tools/testing/selftests/mm/Makefile | 2 + tools/testing/selftests/mm/run_vmtests.sh | 1 + tools/testing/selftests/mm/uffd-wp-mremap.c | 380 4 files changed, 384 insertions(+) create mode

[PATCH v1 1/2] mm: Clear uffd-wp PTE/PMD state on mremap()

2025-01-07 Thread Ryan Roberts
existing clearing of VM_UFFD_WP. Be careful to clear the logical flag regardless of its physical form; a PTE bit, a swap PTE bit, or a PTE marker. Cover PTE, huge PMD and hugetlb paths. Co-developed-by: Mikołaj Lenczewski Signed-off-by: Mikołaj Lenczewski Signed-off-by: Ryan Roberts Closes: https

[PATCH v1 0/2] mm: Clear uffd-wp PTE/PMD state on mremap()

2025-01-07 Thread Ryan Roberts
d the patch, which I have subsequently extended. Applies on top of mm-unstable (f349e79bfbf3) Thanks, Ryan Ryan Roberts (2): mm: Clear uffd-wp PTE/PMD state on mremap() selftests/mm: Introduce uffd-wp-mremap regression test include/linux/userfaultfd_k.h | 12 + mm/huge_mem

Re: [PATCH 1/2] selftests/mm: replace atomic_bool with pthread_barrier_t

2024-10-18 Thread Ryan Roberts
#x27;s pretty hacky. This is blocking our arm64 testing on linux-next so would appreciate either a quick fix or removing the change until a fix is ready. Thanks, Ryan 8<- diff --git a/tools/testing/selftests/mm/uffd-common.c b/tools/testing/selftests/mm/uffd-common.c index 852e7281026

[PATCH 1/3] ASoC:codec:max98373: Changed amp shutdown register as volatile

2021-03-24 Thread Ryan Lee
re value for the non-volatile register. When amp is internally shutdown by some reason, next 'AMP ON' command can be ignored because regmap think amp is already ON. Signed-off-by: Ryan Lee --- sound/soc/codecs/max98373-i2c.c | 1 + sound/soc/codecs/max98373-sdw.c | 1 + 2 files changed,

[PATCH 3/3] ASoC:codec:max98373: Added controls for autorestart config

2021-03-24 Thread Ryan Lee
rature recovers from thermal shutdown. "CMON Autorestart Switch" : controls whether or not the device automatically resumes playback when the clock returns after stopping. Above Auto Restart functions are enabled by default. Signed-off-by: Ryan Lee --- sound/soc/codecs/max98373.c | 14 ++

[PATCH 2/3] ASoC:codec:max98373: Added 30ms turn on/off time delay

2021-03-24 Thread Ryan Lee
Amp requires 10 ~ 30ms for the power ON and OFF. Added 30ms delay for stability. Signed-off-by: Ryan Lee --- sound/soc/codecs/max98373.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c index 746c829312b8..1346a98ce8a1 100644 --- a

[PATCH 1/1] ipmi/watchdog: Add WDIOC_GETTIMELEFT ioctl

2021-03-16 Thread Ryan O'Leary
This is the same ioctl the rest of the watchdogs support. GETTIMELEFT returns the number of seconds in the countdown -- useful for testing whether the watchdog is functioning. Signed-off-by: Ryan O'Leary --- drivers/char/ipmi/ipmi_watchdog.c | 75 +++ 1 file ch

RE: [PATCH 1/1] clk: aspeed: modify some default clks are critical

2021-01-31 Thread Ryan Chen
> -Original Message- > From: Andrew Jeffery > Sent: Monday, January 25, 2021 8:47 AM > To: Ryan Chen ; Samuel Holland > ; Stephen Boyd ; Joel Stanley > > Cc: BMC-SW ; linux-aspeed > ; Michael Turquette > ; Linux Kernel Mailing List > ; linux-...@vger.kern

RE: Re: [PATCH 1/1] clk: aspeed: modify some default clks are critical

2021-01-22 Thread Ryan Chen
Hello, How about this patch progress? It does impact a lot of machine that when BMC boot at u-boot. SUART is work for Host. But after boot into kernel, due to the clk disabled. The SUART is not work for Host anymore. Regards, Ryan > -Original Mess

RE: [PATCH v3 4/4] hwmon: Support Aspeed AST2600 PWM/Fan tachometer

2021-01-19 Thread Ryan Chen
> -Original Message- > From: Andrew Jeffery > Sent: Wednesday, January 20, 2021 1:16 PM > To: Troy Lee ; open...@lists.ozlabs.org; Joel > Stanley ; Philipp Zabel ; open list > ; moderated list:ARM/ASPEED MACHINE > SUPPORT ; moderated > list:ARM/ASPEED MACHINE

[PATCH v2] clk: aspeed: Fix APLL calculate formula from ast2600-A2

2021-01-18 Thread Ryan Chen
Starting from A2, the A-PLL calculation has changed. Use the existing formula for A0/A1 and the new formula for A2 onwards. Fixes: d3d04f6c330a ("clk: Add support for AST2600 SoC") Signed-off-by: Ryan Chen --- drivers/clk/clk-ast2600.c | 37 +++-- 1 fi

RE: [PATCH 1/1] clk: aspeed: Fix APLL calculate formula for ast2600-A2

2021-01-18 Thread Ryan Chen
> -Original Message- > From: Joel Stanley > Sent: Tuesday, January 19, 2021 11:10 AM > To: Ryan Chen > Cc: Joel Stanley ; Michael Turquette > ; Stephen Boyd ; > linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; > andre...@au1.ibm.com; BMC-SW ; Andrew

RE: [PATCH 1/1] clk: aspeed: Fix APLL calculate formula for ast2600-A2

2021-01-18 Thread Ryan Chen
> -Original Message- > From: Joel Stanley > Sent: Tuesday, January 19, 2021 10:20 AM > To: Ryan Chen ; Michael Turquette > ; Stephen Boyd ; > linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; > andre...@au1.ibm.com; BMC-SW > Cc: j...@jms.id.au; Andre

[PATCH 1/1] clk: aspeed: Fix APLL calculate formula for ast2600-A2

2021-01-18 Thread Ryan Chen
AST2600A1/A2 have different pll calculate formula. Signed-off-by: Ryan Chen --- drivers/clk/clk-ast2600.c | 37 +++-- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/drivers/clk/clk-ast2600.c b/drivers/clk/clk-ast2600.c index bbacaccad554

[PATCH 0/1] Fix AST2600A2 APLL calculate formuula

2021-01-18 Thread Ryan Chen
AST2600 A1/A2 have different pll, this patch fix for AST2600 A2 APLL calculate. Ryan Chen (1): clk: aspeed: Fix APLL calculate formula for ast2600-A2 drivers/clk/clk-ast2600.c | 37 +++-- 1 file changed, 27 insertions(+), 10 deletions(-) -- 2.17.1

RE: [PATCH v2 1/2] misc: Add clock control logic into Aspeed LPC SNOOP driver

2021-01-15 Thread Ryan Chen
> -Original Message- > From: Arnd Bergmann > Sent: Saturday, January 16, 2021 1:05 AM > To: Ryan Chen > Cc: John Wang ; > xuxiao...@bytedance.com; yulei...@bytedance.com; Robert Lippert > ; moderated list:ARM/ASPEED MACHINE SUPPORT > ; Greg Kroah-Hartman > ;

Re: [PATCH] Adds a new ioctl32 syscall for backwards compatibility layers

2021-01-14 Thread Ryan Houdek
On Wed, Jan 6, 2021 at 12:49 AM Arnd Bergmann wrote: > > On Wed, Jan 6, 2021 at 7:48 AM wrote: > > From: Ryan Houdek > ... > > This does not solve the following problems: > > 1) compat_alloc_user_space inside ioctl > > 2) ioctls that check task mode instead o

[PATCH 0/1] Fix vhub engine stop dma register setting.

2021-01-08 Thread Ryan Chen
This patch fixes vhub engine stop dma should have different register setting. Ryan Chen (1): usb: gadget: aspeed: fix stop dma register setting. drivers/usb/gadget/udc/aspeed-vhub/epn.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.17.1

[PATCH 1/1] usb: gadget: aspeed: fix stop dma register setting.

2021-01-08 Thread Ryan Chen
The vhub engine has two dma mode, one is descriptor list, another is single stage DMA. Each mode has different stop register setting. Descriptor list operation (bit2) : 0 disable reset, 1: enable reset Single mode operation (bit0) : 0 : disable, 1: enable Signed-off-by: Ryan Chen --- drivers

RE: [PATCH 5/6] soc: aspeed: Add eSPI driver

2021-01-07 Thread Ryan Chen
and electrical specification of SPI but runs > > completely > different protocol. > > Only the flash channel is related to SPI and the other 3 channels are for > EC/BMC/SIO. > > Therefore, an eSPI driver might not fit into the SPI model. > > I agree, the naming is confusing but eSPI doesn't belong in drivers/spi. > > As it is a bus that is common to more than just the Aspeed BMC, we may want > to implement it as a new bus type that has devices hanging off it, similar to > FSI. > The ASPEED eSPI controller driver is slave side device, not master side. I think it will be stay soc/aspeed first. Because is most SoC Chip related. Cheers, Ryan

RE: [PATCH v2 1/2] misc: Add clock control logic into Aspeed LPC SNOOP driver

2021-01-06 Thread Ryan Chen
Hello John, Joel, Jae, For this should be set LCLK to be CRITICAL it will fix LPC related driver. (KCS/BT/SNOOP) I have send the patch before. https://patchwork.ozlabs.org/project/linux-aspeed/patch/20200928070108.14040-2-ryan_c...@aspeedtech.com/ Hello Joel, W

RE: [PATCH 2/3] aspeed-video: clear spurious interrupt bits unconditionally

2020-12-22 Thread Ryan Chen
> -Original Message- > From: Zev Weiss > Sent: Wednesday, December 23, 2020 11:54 AM > To: Ryan Chen > Cc: Joel Stanley ; Eddie James ; > Mauro Carvalho Chehab ; Andrew Jeffery > ; linux-me...@vger.kernel.org; OpenBMC Maillist > ; Linux ARM > ; linux-aspeed &g

RE: [PATCH 2/3] aspeed-video: clear spurious interrupt bits unconditionally

2020-12-22 Thread Ryan Chen
> -Original Message- > From: Joel Stanley > Sent: Wednesday, December 23, 2020 9:07 AM > To: Zev Weiss ; Ryan Chen > > Cc: Eddie James ; Mauro Carvalho Chehab > ; Andrew Jeffery ; > linux-me...@vger.kernel.org; OpenBMC Maillist ; > Linux ARM ; linux-aspeed &g

RE: [PATCH v2 3/3] ARM: dts: add ehci uhci enable in evb dts

2020-10-22 Thread Ryan Chen
> -Original Message- > From: Andrew Jeffery > Sent: Thursday, October 22, 2020 7:45 AM > To: Ryan Chen ; Sergei Shtylyov > ; Joel Stanley ; > linux-arm-ker...@lists.infradead.org; linux-asp...@lists.ozlabs.org; > linux-kernel@vger.kernel.org; linux-...@vger.kernel

RE: [PATCH 1/1] clk: aspeed: modify some default clks are critical

2020-10-13 Thread Ryan Chen
> -Original Message- > From: Joel Stanley > Sent: Wednesday, October 14, 2020 1:28 PM > To: Stephen Boyd > Cc: Andrew Jeffery ; Michael Turquette > ; Ryan Chen ; > BMC-SW ; Linux ARM > ; linux-aspeed > ; linux-...@vger.kernel.org; Linux Kernel > Mailing L

RE: [PATCH v2 3/3] ARM: dts: add ehci uhci enable in evb dts

2020-10-11 Thread Ryan Chen
Hello Segei, > -Original Message- > From: Sergei Shtylyov > Sent: Friday, October 9, 2020 4:23 PM > To: Ryan Chen ; Joel Stanley ; > Andrew Jeffery ; linux-arm-ker...@lists.infradead.org; > linux-asp...@lists.ozlabs.org; linux-kernel@vger.kernel.org; > linux-...@vg

[PATCH] risc-v: kernel: ftrace: Fixes improper SPDX comment style

2020-10-10 Thread Ryan Kosta
Signed-off-by: Ryan Kosta --- arch/riscv/kernel/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/ftrace.c b/arch/riscv/kernel/ftrace.c index 99e12faa549..765b62434f3 100644 --- a/arch/riscv/kernel/ftrace.c +++ b/arch/riscv/kernel/ftrace.c @@ -1,4

RE: [PATCH v2 1/3] configs: aspeed: enable UHCI driver in defconfig

2020-10-08 Thread Ryan Chen
> -Original Message- > From: Joel Stanley > Sent: Friday, October 9, 2020 12:55 PM > To: Greg KH > Cc: Ryan Chen ; Andrew Jeffery > ; Linux ARM ; > linux-aspeed ; Linux Kernel Mailing List > ; linux-...@vger.kernel.org; BMC-SW > ; Alan Stern > Subject: Re:

RE: [PATCH v2 1/3] configs: aspeed: enable UHCI driver in defconfig

2020-10-08 Thread Ryan Chen
> -Original Message- > From: Greg KH > Sent: Friday, October 9, 2020 1:47 PM > To: Joel Stanley > Cc: Ryan Chen ; Andrew Jeffery > ; Linux ARM ; > linux-aspeed ; Linux Kernel Mailing List > ; linux-...@vger.kernel.org; BMC-SW > ; Alan Stern > Subject: Re:

[PATCH v2 2/3] usb: host: add uhci compatible support for ast2600-uhci

2020-10-08 Thread Ryan Chen
v2: - Fix continuation lines, align with "of_device" v1: - Add support for AST2600 SOC UHCI driver. Signed-off-by: Ryan Chen --- drivers/usb/host/uhci-platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb

[PATCH v2 0/3] Enable USB host for AST2600

2020-10-08 Thread Ryan Chen
v2: -[1/3]: Add SCSI,BLK_DEV_SD,USB_STORAGE in defconfig. -[2/3]: Fix continuation lines. v1: -The patches enable UHCI driver in AST2600 and also enable USB host in aspeed-ast2600-evb.dts. Ryan Chen (3): configs: aspeed: enable UHCI driver in defconfig usb: host: add uhci compatible

[PATCH v2 3/3] ARM: dts: add ehci uhci enable in evb dts

2020-10-08 Thread Ryan Chen
Add EHCI UHCI enable build in aspeed-ast2600-evb.dts Signed-off-by: Ryan Chen --- arch/arm/boot/dts/aspeed-ast2600-evb.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-ast2600-evb.dts b/arch/arm/boot/dts/aspeed-ast2600-evb.dts index 89be13197780

[PATCH v2 1/3] configs: aspeed: enable UHCI driver in defconfig

2020-10-08 Thread Ryan Chen
v2: -Changed : Add SCSI, BLK_DEV_SD, USB_STORAGE support. v1: -Enable UHCI driver in aspeed_g5_defconfig. Signed-off-by: Ryan Chen --- arch/arm/configs/aspeed_g5_defconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs

RE: [PATCH 1/1] clk: aspeed: modify some default clks are critical

2020-10-07 Thread Ryan Chen
> -Original Message- > From: Joel Stanley > Sent: Wednesday, October 7, 2020 7:34 PM > To: Ryan Chen > Cc: Jae Hyun Yoo ; Andrew Jeffery > ; Michael Turquette ; Stephen > Boyd ; linux-...@vger.kernel.org; Linux ARM > ; linux-aspeed > ; Linux Kernel Mailing Lis

RE: [PATCH 0/3] Enable USB host for AST2600

2020-10-06 Thread Ryan Chen
Hello Joel, Have you take time review this patches ? Ryan Chen Tel : 886-3-5751185 ext:8857 > -Original Message- > From: Ryan Chen > Sent: Wednesday, September 30, 2020 12:08 PM > To: Joel Stanley ; Andrew Jeffery ; > linux-arm-ker...@lists.infradead

RE: [RESEND PATCH] ARM: dts: aspeed-g6: Fix gpio memory region

2020-09-30 Thread Ryan Chen
> -Original Message- > From: Andrew Jeffery > Sent: Thursday, October 1, 2020 8:32 AM > To: Billy Tsai ; Rob Herring ; > Joel Stanley ; devicet...@vger.kernel.org; > linux-arm-ker...@lists.infradead.org; linux-asp...@lists.ozlabs.org; > linux-kernel@vger.kernel.org;

[PATCH 2/3] usb: host: add uhci compatible support for ast2600-uhci

2020-09-29 Thread Ryan Chen
Add support for AST2600 SOC UHCI driver. Signed-off-by: Ryan Chen --- drivers/usb/host/uhci-platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c index 70dbd95c3f06..fa40fe125c2a 100644 --- a/drivers

[PATCH 0/3] Enable USB host for AST2600

2020-09-29 Thread Ryan Chen
The patches enable UHCI driver in AST2600 and also enable USB host in aspeed-ast2600-evb.dts. Ryan Chen (3): configs: aspeed: enable UHCI driver in defconfig usb: host: add uhci compatible support for ast2600-uhci ARM: dts: add ehci uhci enable in evb dts arch/arm/boot/dts/aspeed-ast2600

[PATCH 1/3] configs: aspeed: enable UHCI driver in defconfig

2020-09-29 Thread Ryan Chen
Enable UHCI driver in aspeed_g5_defconfig. Signed-off-by: Ryan Chen --- arch/arm/configs/aspeed_g5_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig index 2bacd8c90f4b..a57009d1a3b8 100644 --- a/arch/arm

[PATCH 3/3] ARM: dts: add ehci uhci enable in evb dts

2020-09-29 Thread Ryan Chen
Add EHCI UHCI enable build in aspeed-ast2600-evb.dts Signed-off-by: Ryan Chen --- arch/arm/boot/dts/aspeed-ast2600-evb.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-ast2600-evb.dts b/arch/arm/boot/dts/aspeed-ast2600-evb.dts index 89be13197780

RE: [PATCH 1/1] clk: aspeed: modify some default clks are critical

2020-09-29 Thread Ryan Chen
> From: Joel Stanley > Sent: Tuesday, September 29, 2020 4:04 PM > To: Ryan Chen ; Jae Hyun Yoo > ; Andrew Jeffery > Cc: Michael Turquette ; Stephen Boyd > ; linux-...@vger.kernel.org; Linux ARM > ; linux-aspeed > ; Linux Kernel Mailing List > ; BMC-SW > Subjec

RE: [PATCH 0/4] Remove LPC register partitioning

2020-09-28 Thread Ryan Chen
Hello Joel & Andrew, Those patches are more organize for ASPEED SOC LPC register layout. Does those patches have any feedback? Ryan > -Original Message- > From: ChiaWei Wang > Sent: Friday, September 11, 2020 4:21 PM > To: Andrew Jeffery ; Jo

[PATCH 0/1] Modify ASPEED SoC some default clks are critical

2020-09-28 Thread Ryan Chen
This patch is modify for ASPEED SoC some default clks can't disable need keep default clk on. Ryan Chen (1): clk: aspeed: modify some default clks are critical drivers/clk/clk-aspeed.c | 8 drivers/clk/clk-ast2600.c | 8 2 files changed, 8 insertions(+), 8 dele

[PATCH 1/1] clk: aspeed: modify some default clks are critical

2020-09-28 Thread Ryan Chen
ff-by: Ryan Chen --- drivers/clk/clk-aspeed.c | 8 drivers/clk/clk-ast2600.c | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c index 411ff5fb2c07..d348c4fd3f9f 100644 --- a/drivers/clk/clk-aspeed.c +++ b/driver

[PATCH v3] Staging: nvec: Removes repeated word typo in comment

2020-09-27 Thread Ryan Kosta
Fix a comment typo. Signed-off-by: Ryan Kosta --- V3: Fix commit name drivers/staging/nvec/nvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 360ec040774..a80996b2f5c 100644 --- a/drivers/staging/nvec/nvec.c

[PATCH v2] Staging: nvec: nvec: fix double next comment

2020-09-27 Thread Ryan Kosta
Changes since v1: * Made commit message more clear * Added description Note: previous patch named "[PATCH] fix double next comment in drivers/staging/nvec/nvec.c" >8--8< Fixes a comment typo. Signed-off-by: Ryan Kosta ---

[PATCH] fix double next comment in drivers/staging/nvec/nvec.c

2020-09-26 Thread Ryan Kosta
Signed-off-by: Ryan Kosta --- drivers/staging/nvec/nvec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 360ec040774..a80996b2f5c 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c

RE: [PATCH 2/4] clk: ast2600: Add functionality to the APLL clock

2020-09-11 Thread Ryan Chen
div from clock source apll/4. Should not set for apll from fsi-master driver. > -Original Message- > From: Joel Stanley > Sent: Friday, September 11, 2020 9:30 AM > To: Eddie James ; Ryan Chen > ; Billy Tsai > Cc: linux-...@vger.kernel.org; Linux Kernel Mailing L

  1   2   3   4   5   6   >