Re: [PATCH v2 1/2] cpu/SMT: Enable SMT only if a core is online

2024-07-30 Thread Shrikanth Hegde
On 7/31/24 8:31 AM, Nysal Jan K.A. wrote: > From: "Nysal Jan K.A" > > If a core is offline then enabling SMT should not online CPUs of > this core. By enabling SMT, what is intended is either changing the SMT > value from "off" to "on" or setting the SMT level (threads per core) from a > lower

Re: [PATCH v2 2/2] powerpc/topology: Check if a core is online

2024-07-30 Thread Shrikanth Hegde
On 7/31/24 8:31 AM, Nysal Jan K.A. wrote: > From: "Nysal Jan K.A" > > topology_is_core_online() checks if the core a CPU belongs to > is online. The core is online if at least one of the sibling > CPUs is online. The first CPU of an online core is also online > in the common case, so this shou

[PATCH v2 2/2] powerpc/topology: Check if a core is online

2024-07-30 Thread Nysal Jan K.A.
From: "Nysal Jan K.A" topology_is_core_online() checks if the core a CPU belongs to is online. The core is online if at least one of the sibling CPUs is online. The first CPU of an online core is also online in the common case, so this should be fairly quick. Signed-off-by: Nysal Jan K.A --- a

[PATCH v2 0/2] Skip offline cores when enabling SMT on PowerPC

2024-07-30 Thread Nysal Jan K.A.
From: "Nysal Jan K.A" After the addition of HOTPLUG_SMT support for PowerPC [1] there was a regression reported [2] when enabling SMT. On a system with at least one offline core, when enabling SMT, the expectation is that no CPUs of offline cores are made online. On a POWER9 system with 4 cores

[PATCH v2 1/2] cpu/SMT: Enable SMT only if a core is online

2024-07-30 Thread Nysal Jan K.A.
From: "Nysal Jan K.A" If a core is offline then enabling SMT should not online CPUs of this core. By enabling SMT, what is intended is either changing the SMT value from "off" to "on" or setting the SMT level (threads per core) from a lower to higher value. On PowerPC the ppc64_cpu utility can b

[PATCH -next] ASoC: fsl: lpc3xxx-i2s: Remove set but not used variable 'savedbitclkrate'

2024-07-30 Thread Yue Haibing
The variable savedbitclkrate is assigned and never used, so can be removed. sound/soc/fsl/lpc3xxx-i2s.c:42:13: warning: variable ‘savedbitclkrate’ set but not used [-Wunused-but-set-variable] Fixes: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs") Signed-off-by: Yue Haibing

Re: [PATCH v12 00/84] KVM: Stop grabbing references to PFNMAP'd pages

2024-07-30 Thread Sean Christopherson
On Tue, Jul 30, 2024, Paolo Bonzini wrote: > An interesting evolution of the API could be to pass a struct kvm_follow_pfn > pointer to {,__}kvm_faultin_pfn() and __gfn_to_page() (the "constructors"); > and on the other side to kvm_release_faultin_page() and > kvm_release_page_*(). The struct kvm_f

Re: [PATCH v12 84/84] KVM: Don't grab reference on VM_MIXEDMAP pfns that have a "struct page"

2024-07-30 Thread Sean Christopherson
On Tue, Jul 30, 2024, Paolo Bonzini wrote: > On 7/27/24 01:52, Sean Christopherson wrote: > > Now that KVM no longer relies on an ugly heuristic to find its struct page > > references, i.e. now that KVM can't get false positives on VM_MIXEDMAP > > pfns, remove KVM's hack to elevate the refcount for

Re: [PATCH v12 34/84] KVM: Add a helper to lookup a pfn without grabbing a reference

2024-07-30 Thread Sean Christopherson
On Tue, Jul 30, 2024, Paolo Bonzini wrote: > On 7/27/24 01:51, Sean Christopherson wrote: > > Add a kvm_follow_pfn() wrapper, kvm_lookup_pfn(), to allow looking up a > > gfn=>pfn mapping without the caller getting a reference to any underlying > > page. The API will be used in flows that want to k

Re: [PATCH v12 45/84] KVM: guest_memfd: Provide "struct page" as output from kvm_gmem_get_pfn()

2024-07-30 Thread Sean Christopherson
On Tue, Jul 30, 2024, Paolo Bonzini wrote: > On 7/27/24 01:51, Sean Christopherson wrote: > > Provide the "struct page" associated with a guest_memfd pfn as an output > > from __kvm_gmem_get_pfn() so that KVM guest page fault handlers can > > > Just "kvm_gmem_get_pfn()"

Re: [PATCH 1/1] dt-bindings: soc: fsl: Convert rcpm to yaml format

2024-07-30 Thread Rob Herring
On Mon, Jul 29, 2024 at 03:11:42PM -0400, Frank Li wrote: > Convert dt-binding rcpm from txt to yaml format. > Add fsl,ls1028a-rcpm compatible string. > > Signed-off-by: Frank Li > --- > .../bindings/rtc/fsl,ls-ftm-alarm.yaml| 2 +- > .../devicetree/bindings/soc/fsl/fsl,rcpm.yaml | 91 +

Re: [PATCH v1 23/36] dt-bindings: soc: fsl: cpm_qe: Add QUICC Engine (QE) QMC controller

2024-07-30 Thread Rob Herring
On Mon, Jul 29, 2024 at 04:20:52PM +0200, Herve Codina wrote: > Add support for the QMC (QUICC Multichannel Controller) available in > some PowerQUICC SoC that uses a QUICC Engine (QE) block such as MPC8321. > > This QE QMC is similar to the CPM QMC except that it uses UCCs (Unified > Communicatio

Re: [PATCH v1 07/36] dt-bindings: soc: fsl: cpm_qe: Add QUICC Engine (QE) TSA controller

2024-07-30 Thread Rob Herring
On Mon, Jul 29, 2024 at 04:20:36PM +0200, Herve Codina wrote: > Add support for the time slot assigner (TSA) available in some > PowerQUICC SoC that uses a QUICC Engine (QE) block such as MPC8321. > > This QE TSA is similar to the CPM TSA except that it uses UCCs (Unified > Communication Controlle

Re: [PATCH v12 48/84] KVM: Move x86's API to release a faultin page to common KVM

2024-07-30 Thread Sean Christopherson
On Tue, Jul 30, 2024, Paolo Bonzini wrote: > On 7/27/24 01:51, Sean Christopherson wrote: > > Move KVM x86's helper that "finishes" the faultin process to common KVM > > so that the logic can be shared across all architectures. Note, not all > > architectures implement a fast page fault path, but

[net-next v3 12/15] net: ibmvnic: Convert tasklet API to new bottom half workqueue mechanism

2024-07-30 Thread Allen Pais
Migrate tasklet APIs to the new bottom half workqueue mechanism. It replaces all occurrences of tasklet usage with the appropriate workqueue APIs throughout the ibmvnic driver. This transition ensures compatibility with the latest design and enhances performance. Signed-off-by: Allen Pais --- dr

[PATCH 6.10 345/809] tools/perf: Fix the string match for "/tmp/perf-$PID.map" files in dso__load

2024-07-30 Thread Greg Kroah-Hartman
6.10-stable review patch. If anyone has any objections, please let me know. -- From: Athira Rajeev [ Upstream commit b0979f008f1352a44cd3c8877e3eb8a1e3e1c6f3 ] Perf test for perf probe of function from different CU fails as below: ./perf test -vv "test perf probe of f

[PATCH 6.1 157/440] perf tests arm_callgraph_fp: Address shellcheck warnings about signal names and adding double quotes for expression

2024-07-30 Thread Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know. -- From: Spoorthy S [ Upstream commit 1bb17b4c6c91ad4d9468247cf5f5464fa6440668 ] Running shellcheck -S on test_arm_calligraph_fp throws warnings SC2086 and SC3049,   $shellcheck -S warning tests/s

Re: [PATCH RFC v2 2/5] of: get dma area lower limit

2024-07-30 Thread Catalin Marinas
On Thu, Jul 25, 2024 at 02:49:01PM +0300, Baruch Siach wrote: > Hi Catalin, > > On Tue, Jun 18 2024, Catalin Marinas wrote: > > On Tue, Apr 09, 2024 at 09:17:55AM +0300, Baruch Siach wrote: > >> of_dma_get_max_cpu_address() returns the highest CPU address that > >> devices can use for DMA. The imp

Re: [PATCH v3 2/3] dma-mapping: replace zone_dma_bits by zone_dma_limit

2024-07-30 Thread Christoph Hellwig
On Mon, Jul 29, 2024 at 07:12:08PM -0700, Nathan Chancellor wrote: > > | ~~ ^~~~ > >include/linux/dma-mapping.h:77:40: note: expanded from macro > > 'DMA_BIT_MASK' > > 77 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1UL

Re: [PATCH 5/5] locking/ww_mutex/test: add MODULE_DESCRIPTION()

2024-07-30 Thread Waiman Long
On 7/30/24 10:43, Jeff Johnson wrote: Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/locking/test-ww_mutex.o Signed-off-by: Jeff Johnson --- kernel/locking/test-ww_mutex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/locking/test-ww_mutex

[PATCH 3/5] cpufreq: powerpc: add missing MODULE_DESCRIPTION() macros

2024-07-30 Thread Jeff Johnson
With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cpufreq/ppc-cbe-cpufreq.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cpufreq/powernv-cpufreq.o Add the missing invocation of the MODULE_DESCRIPTION() macro to al

[PATCH 0/5] treewide: add missing MODULE_DESCRIPTION() macros

2024-07-30 Thread Jeff Johnson
t-cf.c | 3 ++- drivers/fsi/fsi-master-gpio.c | 1 + drivers/fsi/fsi-master-hub.c | 1 + drivers/fsi/fsi-scom.c| 1 + kernel/locking/test-ww_mutex.c| 1 + 14 files changed, 15 insertions(+), 1 deletion(-) --- base-commit: 94ede2a3e9135764736221c080ac7c0ad99

[PATCH 5/5] locking/ww_mutex/test: add MODULE_DESCRIPTION()

2024-07-30 Thread Jeff Johnson
Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/locking/test-ww_mutex.o Signed-off-by: Jeff Johnson --- kernel/locking/test-ww_mutex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c index 78

[PATCH 4/5] fsi: add missing MODULE_DESCRIPTION() macros

2024-07-30 Thread Jeff Johnson
make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-hub.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-aspeed.o WARNING: modpost: mis

[PATCH 2/5] x86/mm: add testmmiotrace MODULE_DESCRIPTION()

2024-07-30 Thread Jeff Johnson
Fix the following 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/x86/mm/testmmiotrace.o Signed-off-by: Jeff Johnson --- arch/x86/mm/testmmiotrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/mm/testmmiotrace.c b/arch/x86/mm/testmmiotrace.c index bda

[PATCH 1/5] crypto: arm/xor - add missing MODULE_DESCRIPTION() macro

2024-07-30 Thread Jeff Johnson
With ARCH=arm and CONFIG_KERNEL_MODE_NEON=y, make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/arm/lib/xor-neon.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson --- arch/arm/lib/xor-neon.c | 1 + 1 file changed, 1 insertion(+

Re: [PATCH] perf vendor events power10: Update JSON/events

2024-07-30 Thread kajoljain
On 7/23/24 21:32, Ian Rogers wrote: > On Mon, Jul 22, 2024 at 10:27 PM Kajol Jain wrote: >> >> Update JSON/events for power10 platform with additional events. >> Also move PM_VECTOR_LD_CMPL event from others.json to >> frontend.json file. >> >> Signed-off-by: Kajol Jain > > Reviewed-by: Ian R

Re: [PATCH] perf vendor events power10: Update JSON/events

2024-07-30 Thread kajoljain
On 7/23/24 12:35, Disha Goel wrote: > On 23/07/24 10:51 am, Kajol Jain wrote: > >> Update JSON/events for power10 platform with additional events. >> Also move PM_VECTOR_LD_CMPL event from others.json to >> frontend.json file. >> >> Signed-off-by: Kajol Jain > > I have tested the patch on pow

Re: [PATCH v12 00/84] KVM: Stop grabbing references to PFNMAP'd pages

2024-07-30 Thread Paolo Bonzini
On 7/27/24 01:51, Sean Christopherson wrote: arm64 folks, the first two patches are bug fixes, but I have very low confidence that they are correct and/or desirable. If they are more or less correct, I can post them separately if that'd make life easier. I included them here to avoid conflicts,

Re: [PATCH v12 84/84] KVM: Don't grab reference on VM_MIXEDMAP pfns that have a "struct page"

2024-07-30 Thread Paolo Bonzini
On 7/27/24 01:52, Sean Christopherson wrote: Now that KVM no longer relies on an ugly heuristic to find its struct page references, i.e. now that KVM can't get false positives on VM_MIXEDMAP pfns, remove KVM's hack to elevate the refcount for pfns that happen to have a valid struct page. In addi

Re: [PATCH v12 34/84] KVM: Add a helper to lookup a pfn without grabbing a reference

2024-07-30 Thread Paolo Bonzini
On 7/27/24 01:51, Sean Christopherson wrote: Add a kvm_follow_pfn() wrapper, kvm_lookup_pfn(), to allow looking up a gfn=>pfn mapping without the caller getting a reference to any underlying page. The API will be used in flows that want to know if a gfn points at a valid pfn, but don't actually

Re: [RFC PATCH 00/18] use struct ptdesc to replace pgtable_t

2024-07-30 Thread Alex Shi
BTW, the patchset based on the latest git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm mm-unstable branch. On 7/30/24 2:46 PM, al...@kernel.org wrote: > From: Alex Shi > > We have struct ptdesc for page table descriptor a year ago, but it > has no much usages in kernel, while pgtable_t is

[RFC PATCH 18/18] mm/pgtable: pass ptdesc in pte_free_defer

2024-07-30 Thread alexs
From: Alex Shi pass ptdesc in pte_free_defer() and use ptdesc in collapse_huge_page(). This patch is immature, there is a issue from pmd_pgtable() conversion in few archs. The problem need a fix. Signed-off-by: Alex Shi Cc: linux...@kvack.org Cc: linux-s...@vger.kernel.org Cc: linux-ker...@vge

[RFC PATCH 17/18] mm: convert vmf.prealloc_pte to struct ptdesc pointer

2024-07-30 Thread alexs
From: Alex Shi vmfs.prealloc_pte is a pointer to page table memory, so converter it to struct ptdesc pointer. Signed-off-by: Alex Shi Cc: linux-fsde...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: linux...@kvack.org Cc: Matthew Wilcox Cc: Andrew Morton --- include/linux/mm.h | 2 +-

[RFC PATCH 16/18] mm/pgtable: pass ptdesc to pmd_install

2024-07-30 Thread alexs
From: Alex Shi A new step to replace pgtable_t by ptdesc, also a preparation to change vmf.prealloc_pte to ptdesc too. Signed-off-by: Alex Shi Cc: linux-ker...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-fsde...@vger.kernel.org Cc: Andrew Morton Cc: Matthew Wilcox --- mm/filemap.c | 2

[RFC PATCH 15/18] mm/pgtable: pass ptdesc to pmd_populate

2024-07-30 Thread alexs
From: Alex Shi Pass struct ptdesc to pmd_populate to further replace pgtable_t. We use type casting instead of page_ptdesc() helper since different arch has different type of pgtable_t. Helper ptdesc_pfn used for arch openrisc and hexagon. Signed-off-by: Alex Shi Cc: linux...@kvack.org Cc: lin

[RFC PATCH 14/18] mm/pgtable: use ptdesc in pgtable_trans_huge_deposit

2024-07-30 Thread alexs
From: Alex Shi A step to replace pgtable_t to struct ptdesc. Signed-off-by: Alex Shi Cc: linux...@kvack.org Cc: nvd...@lists.linux.dev Cc: linux-fsde...@vger.kernel.org Cc: sparcli...@vger.kernel.org Cc: linux-s...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.o

[RFC PATCH 13/18] mm/pgtable: return ptdesc pointer in pgtable_trans_huge_withdraw

2024-07-30 Thread alexs
From: Alex Shi Way to replace pgtable_t aka struct page in most of archs. Signed-off-by: Alex Shi Cc: linux...@kvack.org Cc: sparcli...@vger.kernel.org Cc: linux-s...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Barry Song Cc: Lance Yang Cc: Kinsey Ho

[RFC PATCH 12/18] mm/thp: pass ptdesc to set_huge_zero_folio function

2024-07-30 Thread alexs
From: Alex Shi Aim is still replace struct page to ptdesc. Signed-off-by: Alex Shi Cc: linux-ker...@vger.kernel.org Cc: linux...@kvack.org Cc: Andrew Morton --- mm/huge_memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index

[RFC PATCH 11/18] mm/pgtable: introduce ptdesc_pfn and use ptdesc in free_pte_range()

2024-07-30 Thread alexs
From: Alex Shi Replace pgtable_t by ptdesc in free_pte_range and it's callee pte_free_tlb series functions. And save some converters now. We have to use type casting for pmd_pgtable() instead of page_ptdesc() helper since different arch has different type of pgtable_t. btw, we can not simplify p

[RFC PATCH 10/18] mm/pgtable: pass ptdesc to pte_free()

2024-07-30 Thread alexs
From: Alex Shi Now we could remove couple of page<->ptdesc converters now. Signed-off-by: Alex Shi Cc: linux...@kvack.org Cc: linux-a...@vger.kernel.org Cc: nvd...@lists.linux.dev Cc: linux-fsde...@vger.kernel.org Cc: sparcli...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-m...@l

[RFC PATCH 09/18] mm/pgtable: fully use ptdesc in pte_alloc_one series functions

2024-07-30 Thread alexs
From: Alex Shi Replace pgtable_t and struct page by ptdesc in pte_alloc_one series functions. Signed-off-by: Alex Shi Cc: linux...@kvack.org Cc: linux-a...@vger.kernel.org Cc: nvd...@lists.linux.dev Cc: linux-fsde...@vger.kernel.org Cc: sparcli...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.o

[RFC PATCH 08/18] mm/memory: use ptdesc in __pte_alloc

2024-07-30 Thread alexs
From: Alex Shi Replace pgtable_t by ptdesc in function __pte_alloc. We will remove pgtable_t from all place. Signed-off-by: Alex Shi Cc: linux-ker...@vger.kernel.org Cc: linux...@kvack.org Cc: Andrew Morton --- mm/memory.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[RFC PATCH 07/18] mm/thp: use ptdesc in copy_huge_pmd

2024-07-30 Thread alexs
From: Alex Shi Since we have ptdesc struct now, better to use replace pgtable_t, aka 'struct page *'. It's alaos a preparation for return ptdesc pointer in pte_alloc_one series function. Signed-off-by: Alex Shi Cc: linux-ker...@vger.kernel.org Cc: linux...@kvack.org Cc: Andrew Morton --- mm/h

[RFC PATCH 06/18] mm/thp: convert insert_pfn_pmd and its caller to use ptdesc

2024-07-30 Thread alexs
From: Alex Shi Since we have ptdesc struct now, better to use replace pgtable_t, aka 'struct page *'. It's alaos a preparation for return ptdesc pointer in pte_alloc_one series function. Signed-off-by: Alex Shi Cc: linux-ker...@vger.kernel.org Cc: linux...@kvack.org Cc: Andrew Morton --- mm/h

[RFC PATCH 05/18] mm/thp: use ptdesc in do_huge_pmd_anonymous_page

2024-07-30 Thread alexs
From: Alex Shi ince we have ptdesc struct now, better to use replace pgtable_t, aka 'struct page *'. It's alaos a preparation for return ptdesc pointer in pte_alloc_one series function. Signed-off-by: Alex Shi Cc: linux-ker...@vger.kernel.org Cc: linux...@kvack.org Cc: Andrew Morton --- mm/hu

[RFC PATCH 04/18] mm/thp: use ptdesc pointer in __do_huge_pmd_anonymous_page

2024-07-30 Thread alexs
From: Alex Shi Since we have ptdesc struct now, better to use replace pgtable_t, aka 'struct page *'. It's alaos a preparation for return ptdesc pointer in pte_alloc_one series function. Signed-off-by: Alex Shi Cc: linux-ker...@vger.kernel.org Cc: linux...@kvack.org Cc: Andrew Morton --- mm/h

[RFC PATCH 03/18] fs/dax: use ptdesc in dax_pmd_load_hole

2024-07-30 Thread alexs
From: Alex Shi Since we have ptdesc struct now, better to use replace pgtable_t, aka 'struct page *'. It's a prepare for return ptdesc pointer in pte_alloc_one series function. Signed-off-by: Alex Shi Cc: linux-ker...@vger.kernel.org Cc: nvd...@lists.linux.dev Cc: linux-fsde...@vger.kernel.org

[RFC PATCH 02/18] mm/pgtable: convert ptdesc.pmd_huge_pte to ptdesc pointer

2024-07-30 Thread alexs
From: Alex Shi folio/page.pmd_huge_pte is a pointer to pagetable descriptor: pgtable_t. In most arch, it is a typedef of 'struct page *'. But we have ptdesc now, tt's better to convert it to right one: struct ptdesc pointer. Different from others, s390/sparc use typedef 'pte_t *' as pgtable_t, s

[RFC PATCH 01/18] mm/pgtable: use ptdesc in pte_free_now/pte_free_defer

2024-07-30 Thread alexs
From: Alex Shi page table descriptor is splited from struct page, use it to replace struct page in right place. Signed-off-by: Alex Shi Cc: linux-ker...@vger.kernel.org Cc: linux...@kvack.org Cc: Andrew Morton Cc: Matthew Wilcox Cc: David Hildenbrand --- mm/pgtable-generic.c | 13 ++---

[RFC PATCH 00/18] use struct ptdesc to replace pgtable_t

2024-07-30 Thread alexs
From: Alex Shi We have struct ptdesc for page table descriptor a year ago, but it has no much usages in kernel, while pgtable_t is used widely. The pgtable_t is typedefed as 'pte_t *' in sparc, s390, powerpc and m68k except SUN3, others archs are all same as 'struct page *'. These blocks the co

Re: [PATCH 14/36] soc: fsl: cpm1: tsa: Add support for QUICC Engine (QE) implementation

2024-07-30 Thread Markus Elfring
… > +++ b/drivers/soc/fsl/qe/tsa.c … > +static int tsa_qe_serial_connect(struct tsa_serial *tsa_serial, bool connect) > +{ … > + spin_lock_irqsave(&tsa->lock, flags); > + ret = ucc_set_qe_mux_tsa(ucc_num, connect); > + spin_unlock_irqrestore(&tsa->lock, flags); … Under which circumstan

Re: [PATCH v12 45/84] KVM: guest_memfd: Provide "struct page" as output from kvm_gmem_get_pfn()

2024-07-30 Thread Paolo Bonzini
On 7/27/24 01:51, Sean Christopherson wrote: Provide the "struct page" associated with a guest_memfd pfn as an output from __kvm_gmem_get_pfn() so that KVM guest page fault handlers can Just "kvm_gmem_get_pfn()". directly put the page instead of having to rely on k

Re: [PATCH v12 50/84] KVM: VMX: Use __kvm_faultin_page() to get APIC access page/pfn

2024-07-30 Thread Paolo Bonzini
On 7/27/24 01:51, Sean Christopherson wrote: Use __kvm_faultin_page() get the APIC access page so that KVM can precisely release the refcounted page, i.e. to remove yet another user of kvm_pfn_to_refcounted_page(). While the path isn't handling a guest page fault, the semantics are effectively t

Re: [PATCH v12 48/84] KVM: Move x86's API to release a faultin page to common KVM

2024-07-30 Thread Paolo Bonzini
On 7/27/24 01:51, Sean Christopherson wrote: Move KVM x86's helper that "finishes" the faultin process to common KVM so that the logic can be shared across all architectures. Note, not all architectures implement a fast page fault path, but the gist of the comment applies to all architectures.

Re: [PATCH v12 41/84] KVM: x86/mmu: Mark pages/folios dirty at the origin of make_spte()

2024-07-30 Thread Paolo Bonzini
On 7/27/24 01:51, Sean Christopherson wrote: Move the marking of folios dirty from make_spte() out to its callers, which have access to the _struct page_, not just the underlying pfn. Once all architectures follow suit, this will allow removing KVM's ugly hack where KVM elevates the refcount of V