On 21/09/2022 04:51, Peter Collingbourne wrote:
> From: Catalin Marinas
>
> Commit 4beba9486abd ("mm: Add PG_arch_2 page flag") introduced a new
> page flag for all 64-bit architectures. However, even if an architecture
> is 64-bit, it may still have limited spare bits in the 'flags' member of
>
On 21/09/2022 04:51, Peter Collingbourne wrote:
> As with PG_arch_2, this flag is only allowed on 64-bit architectures due
> to the shortage of bits available. It will be used by the arm64 MTE code
> in subsequent patches.
NIT: It's now controlled by CONFIG_ARCH_USES_PG_ARCH_X and not
technically
On Tue, 20 Sep 2022 22:46:21 +0100,
Alexey Kardashevskiy wrote:
>
>
>
> On 21/09/2022 02:08, Marc Zyngier wr
> ote:
> > On Tue, 20 Sep 2022 13:51:43 +0100,
> > Alexey Kardashevskiy wrote:
> >>
> >> When introduced, IRQFD resampling worked on POWER8 with XICS. However
> >> KVM on POWER9 has ne
On Wed, 21 Sep 2022 05:49:25 +0100,
Alexey Kardashevskiy wrote:
>
> When introduced, IRQFD resampling worked on POWER8 with XICS. However
> KVM on POWER9 has never implemented it - the compatibility mode code
> ("XICS-on-XIVE") misses the kvm_notify_acked_irq() call and the native
> XIVE mode doe
On Wed, 21 Sep 2022 07:02:50 +0100,
Denis Nikitin wrote:
>
> Adding a few more comments...
>
> On Tue, Sep 20, 2022 at 5:08 PM Denis Nikitin wrote:
> >
> > Hi Mark,
> >
> > Thank you for a quick response.
> >
> > On Tue, Sep 20, 2022 at 2:34 AM Marc Zyngier wrote:
> > >
> > > Hi Denis,
> > >
>
On Tue, 20 Sep 2022 21:21:33 +0100,
Mark Brown wrote:
>
> [1 ]
> On Tue, Sep 20, 2022 at 05:44:01PM +0100, Marc Zyngier wrote:
> > Mark Brown wrote:
>
> > > void kvm_arch_vcpu_load_fp(struct kvm_vcpu *vcpu)
> > > {
> > > BUG_ON(!current->mm);
> > > - BUG_ON(test_thread_flag(TIF_SVE));
> >
On Tue, 20 Sep 2022 19:32:49 +0100,
Mark Brown wrote:
>
> [1 ]
> On Tue, Sep 20, 2022 at 06:52:59PM +0100, Marc Zyngier wrote:
> > On Mon, 15 Aug 2022 23:55:25 +0100,
> > Mark Brown wrote:
>
> > > enum fp_state {
> > > + FP_STATE_TASK, /* Save based on current, invalid as fp_type */
This series enables the ring-based dirty memory tracking for ARM64.
The feature has been available and enabled on x86 for a while. It
is beneficial when the number of dirty pages is small in a checkpointing
system or live migration scenario. More details can be found from
fb04a1eddb1a ("KVM: X86: I
This adds KVM_REQ_RING_SOFT_FULL, which is raised when the dirty
ring of the specific VCPU becomes softly full in kvm_dirty_ring_push().
The VCPU is enforced to exit when the request is raised and its
dirty ring is softly full on its entrance.
Suggested-by: Marc Zyngier
Signed-off-by: Gavin Shan
Not all architectures like ARM64 need to override the function. Move
its declaration to kvm_dirty_ring.h to avoid the following compiling
warning on ARM64 when the feature is enabled.
arch/arm64/kvm/../../../virt/kvm/dirty_ring.c:14:12:\
warning: no previous prototype for 'kvm_cpu_dirt
In vcpu_map_dirty_ring(), the guest's page size is used to figure out
the offset in the virtual area. It works fine when we have same page
sizes on host and guest. However, it fails when the page sizes on host
and guest are different on arm64, like below error messages indicates.
# ./dirty_log_t
This enables the ring-based dirty memory tracking on ARM64. The
feature is configured by CONFIG_HAVE_KVM_DIRTY_RING, detected and
enabled by KVM_CAP_DIRTY_LOG_RING. A ring buffer is created on every
VCPU when the feature is enabled. Each entry in the ring buffer is
described by 'struct kvm_dirty_gf
There are two states, which need to be cleared before next mode
is executed. Otherwise, we will hit failure as the following messages
indicate.
- The variable 'dirty_ring_vcpu_ring_full' shared by main and vcpu
thread. It's indicating if the vcpu exit due to full ring buffer.
The value can be
In the dirty ring case, we rely on vcpu exit due to full dirty ring
state. On ARM64 system, there are 4096 host pages when the host
page size is 64KB. In this case, the vcpu never exits due to the
full dirty ring state. The similar case is 4KB page size on host
and 64KB page size on guest. The vcpu
This series adds a new aarch64 selftest for testing stage 2 fault handling
for various combinations of guest accesses (e.g., write, S1PTW), backing
sources (e.g., anon), and types of faults (e.g., read on hugetlbfs with a
hole, write on a readonly memslot). Each test tries a different combination
a
Move the generic userfaultfd code out of demand_paging_test.c into a
common library, userfaultfd_util. This library consists of a setup and a
stop function. The setup function starts a thread for handling page
faults using the handler callback function. This setup returns a
uffd_desc object which i
Define macros for memory type indexes and construct DEFAULT_MAIR_EL1
with macros from asm/sysreg.h. The index macros can then be used when
constructing PTEs (instead of using raw numbers).
Reviewed-by: Andrew Jones
Reviewed-by: Oliver Upton
Signed-off-by: Ricardo Koller
---
.../selftests/kvm/
Add a library function to get the PTE (a host virtual address) of a
given GVA. This will be used in a future commit by a test to clear and
check the access flag of a particular page.
Reviewed-by: Oliver Upton
Reviewed-by: Andrew Jones
Signed-off-by: Ricardo Koller
---
.../selftests/kvm/includ
Deleting a memslot (when freeing a VM) is not closing the backing fd,
nor it's unmapping the alias mapping. Fix by adding the missing close
and munmap.
Reviewed-by: Andrew Jones
Reviewed-by: Oliver Upton
Reviewed-by: Ben Gardon
Signed-off-by: Ricardo Koller
---
tools/testing/selftests/kvm/lib
The vm_create() helpers are hardcoded to place most page types (code,
page-tables, stacks, etc) in the same memslot #0, and always backed with
anonymous 4K. There are a couple of issues with that. First, tests
willing to differ a bit, like placing page-tables in a different backing
source type mu
Add the backing_src_type into struct userspace_mem_region. This struct
already stores a lot of info about memory regions, except the backing
source type. This info will be used by a future commit in order to
determine the method for punching a hole.
Reviewed-by: Oliver Upton
Signed-off-by: Ricar
Refactor virt_arch_pgd_alloc() and vm_vaddr_alloc() in both RISC-V and
aarch64 to fix the alignment of parameters in a couple of calls. This will
make it easier to fix the alignment in a future commit that adds an extra
parameter (that happens to be very long).
No functional change intended.
Sugg
Add a new test for stage 2 faults when using different combinations of
guest accesses (e.g., write, S1PTW), backing source type (e.g., anon)
and types of faults (e.g., read on hugetlbfs with a hole). The next
commits will add different handling methods and more faults (e.g., uffd
and dirty logging)
Add some dirty logging tests into page_fault_test. Mark the data and/or
page-table memslots for dirty logging, perform some accesses, and check
that the dirty log bits are set or clean when expected.
Signed-off-by: Ricardo Koller
---
.../selftests/kvm/aarch64/page_fault_test.c | 75 +++
Now that kvm_vm allows specifying different memslots for code, page tables,
and data, use the appropriate memslot when making allocations in
common/libraty code. Change them accordingly:
- code (allocated by lib/elf) use the CODE memslot
- stacks, exception tables, and other core data pages (like
Copy bitfield.h from include/linux/bitfield.h. A subsequent change will
make use of some FIELD_{GET,PREP} macros defined in this header.
The header was copied as-is, no changes needed.
Cc: Jakub Kicinski
Cc: Arnaldo Carvalho de Melo
Reviewed-by: Oliver Upton
Signed-off-by: Ricardo Koller
---
Add some readonly memslot tests into page_fault_test. Mark the data
and/or page-table memslots as readonly, perform some accesses, and check
that the right fault is triggered when expected (e.g., a store with no
write-back should lead to an mmio exit).
Signed-off-by: Ricardo Koller
---
.../selft
Add some userfaultfd tests into page_fault_test. Punch holes into the
data and/or page-table memslots, perform some accesses, and check that
the faults are taken (or not taken) when expected.
Signed-off-by: Ricardo Koller
---
.../selftests/kvm/aarch64/page_fault_test.c | 190 +-
Add some mix of tests into page_fault_test: memslots with all the
pairwise combinations of read-only, userfaultfd, and dirty-logging. For
example, writing into a read-only memslot which has a hole handled with
userfaultfd.
Signed-off-by: Ricardo Koller
---
.../selftests/kvm/aarch64/page_fault_t
29 matches
Mail list logo