kvm/selftests/memslots_perf_test doesn't work with 64KB-page-size-host
and 4KB-page-size-guest on aarch64. In the implementation, the host and
guest page size have been hardcoded to 4KB. It's ovbiously not working
on aarch64 which supports 4KB, 16KB, 64KB individually on host and guest.
This serie
In prepare_vm(), 'data->nslots' is assigned with 'max_mem_slots - 1'
at the beginning, meaning they are interchangeable.
Use 'data->nslots' isntead of 'max_mem_slots - 1'. With this, it
becomes easier to move the logic of probing number of slots into
upper layer in subsequent patches.
No function
There are two loops in prepare_vm(), which have different conditions.
'slot' is treated as meory slot index in the first loop, but index of
the host virtual address array in the second loop. It makes it a bit
hard to understand the code.
Change the usage of 'slot' in the second loop, to treat it a
The addresses and sizes passed to madvise() and vm_userspace_mem_region_add()
should be aligned to host page size, which can be 64KB on aarch64. So it's
wrong by passing additional fixed 4KB memory area to various tests.
Fix it by passing additional fixed 64KB memory area to various tests. After
i
prepare_vm() is called in every iteration and run. The allowed memory
slots (KVM_CAP_NR_MEMSLOTS) are probed for multiple times. It's not
free and unnecessary.
Move the probing logic for the allowed memory slots to parse_args()
for once, which is upper layer of prepare_vm().
No functional change
The test case is obviously broken on aarch64 because non-4KB guest
page size is supported. The guest page size on aarch64 could be 4KB,
16KB or 64KB.
This supports variable guest page size, mostly for aarch64.
- The host determines the guest page size when virtual machine is
created. The va
The memory area in each slot should be aligned to host page size.
Otherwise, the test will failure. For example, the following command
fails with the following messages with 64KB-page-size-host and
4KB-pae-size-guest. It's not user friendly. Lets do something to report
the optimal memory slots, ins
On Thu, Oct 13, 2022 at 04:09:20PM +0100, Marc Zyngier wrote:
> [Reposting this, as it has been almost two weeks since the initial
> announcement and we're still at sub-10% of the users having
> subscribed to the new list]
FWIW, I didn't subscribe until just now because there weren't clear
instr
On Thu, 13 Oct 2022 17:42:31 +0100,
Eric Auger wrote:
>
> Hi Eric,
>
> On 10/12/22 20:33, Marc Zyngier wrote:
> > Hi Eric,
> >
> > Before I comment on this patch, a couple of things that need
> > addressing:
> >
> >> "Cc: marc.zyng...@arm.com, cd...@linaro.org"
> >
> > None of these two addre
On Tue, Oct 11, 2022 at 01:12:43AM +, Oliver Upton wrote:
> The VMM must know something about the architecture it is running on, as
> it calls KVM_DEV_ARM_ITS_SAVE_TABLES after all...
IIUC this is still a kernel impl detail to flush data into guest pages
within this ioctl, or am I wrong?
For
Kernel build with clang and KCFLAGS=-fprofile-sample-use= fails with:
error: arch/arm64/kvm/hyp/nvhe/kvm_nvhe.tmp.o: Unexpected SHT_REL
section ".rel.llvm.call-graph-profile"
Starting from 13.0.0 llvm can generate SHT_REL section, see
https://reviews.llvm.org/rGca3bdb57fa1ac98b711a735de048c12b5fd
On Tue, Oct 11, 2022, Ricardo Koller wrote:
> +struct uffd_desc *uffd_setup_demand_paging(int uffd_mode,
> + useconds_t uffd_delay, void *hva, uint64_t len,
> + uffd_handler_t handler)
s/uffd_delay/delay, and then this prototype is easier to align. Keeping the
uffd_ prefix
On Tue, Oct 11, 2022, Ricardo Koller wrote:
> +/* Returns true to continue the test, and false if it should be skipped. */
> +static bool punch_hole_in_backing_store(struct kvm_vm *vm,
> + struct userspace_mem_region *region)
> +{
> + void *hva = (void *)regi
On Tue, Oct 11, 2022, Ricardo Koller wrote:
> /* Returns true to continue the test, and false if it should be skipped. */
> +static int uffd_generic_handler(int uffd_mode, int uffd,
> + struct uffd_msg *msg, struct uffd_args *args,
> + bool expect_write)
Align.
static int
On Tue, Oct 11, 2022, Ricardo Koller wrote:
> @@ -395,6 +415,21 @@ static bool punch_hole_in_backing_store(struct kvm_vm
> *vm,
> return true;
> }
>
> +static bool check_write_in_dirty_log(struct kvm_vm *vm,
> + struct userspace_mem_region *region, uint64_t host_pg_nr)
static
On Tue, Oct 11, 2022, Ricardo Koller wrote:
> Ricardo Koller (14):
> KVM: selftests: Add a userfaultfd library
> KVM: selftests: aarch64: Add virt_get_pte_hva() library function
> KVM: selftests: Add missing close and munmap in
> __vm_mem_region_delete()
> KVM: selftests: aarch64: Const
On Fri, Oct 14, 2022 at 09:30:10PM +, Sean Christopherson wrote:
> On Tue, Oct 11, 2022, Ricardo Koller wrote:
> > Ricardo Koller (14):
> > KVM: selftests: Add a userfaultfd library
> > KVM: selftests: aarch64: Add virt_get_pte_hva() library function
> > KVM: selftests: Add missing close
17 matches
Mail list logo