History log of /kvm-unit-tests/lib/arm/asm/page.h (Results 1 – 16 of 16)
Revision Date Author Comments
# 0cc3a351 22-Feb-2025 Sean Christopherson <seanjc@google.com>

lib: Use __ASSEMBLER__ instead of __ASSEMBLY__

Convert all non-x86 #ifdefs from __ASSEMBLY__ to __ASSEMBLER__, and remove
all manual __ASSEMBLY__ #defines. __ASSEMBLY_ was inherited blindly from
th

lib: Use __ASSEMBLER__ instead of __ASSEMBLY__

Convert all non-x86 #ifdefs from __ASSEMBLY__ to __ASSEMBLER__, and remove
all manual __ASSEMBLY__ #defines. __ASSEMBLY_ was inherited blindly from
the Linux kernel, and must be manually defined, e.g. through build rules
or with the aforementioned explicit #defines in assembly code.

__ASSEMBLER__ on the other hand is automatically defined by the compiler
when preprocessing assembly, i.e. doesn't require manually #defines for
the code to function correctly.

Ignore x86, as x86 doesn't actually rely on __ASSEMBLY__ at the moment,
and is undergoing a parallel cleanup.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
Message-ID: <20250222014526.2302653-1-seanjc@google.com>
[thuth: Fix three more occurances in libfdt.h and sbi-tests.h]
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 74ff0e96 18-May-2021 Paolo Bonzini <bonzini@gnu.org>

Merge branch 'arm/queue' into 'master'

arm/arm64: target-efi prep

This series mostly prepares kvm-unit-tests/arm for targeting EFI
platforms. The actually EFI support will come in another series,
b

Merge branch 'arm/queue' into 'master'

arm/arm64: target-efi prep

This series mostly prepares kvm-unit-tests/arm for targeting EFI
platforms. The actually EFI support will come in another series,
but these patches are good for removing assumptions from our memory
maps and about our PSCI conduit, even if we never merge EFI support.

See merge request kvm-unit-tests/kvm-unit-tests!8

show more ...


# e97e1c82 11-Nov-2020 Andrew Jones <drjones@redhat.com>

arm/arm64: mmu: Stop mapping an assumed IO region

By providing a proper ioremap function, we can just rely on devices
calling it for each region they need (as they already do) instead of
mapping a b

arm/arm64: mmu: Stop mapping an assumed IO region

By providing a proper ioremap function, we can just rely on devices
calling it for each region they need (as they already do) instead of
mapping a big assumed I/O range. We don't require the MMU to be
enabled at the time of the ioremap. In that case, we add the mapping
to the identity map anyway. This allows us to call setup_vm after
io_init. Why don't we just call setup_vm before io_init, I hear you
ask? Well, that's because tests like sieve want to start with the MMU
off, later call setup_vm, and all the while have working I/O. Some
unit tests are just really demanding...

While at it, ensure we map the I/O regions with XN (execute never),
as suggested by Alexandru Elisei.

Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Tested-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>

show more ...


# 1a00120a 11-Nov-2020 Andrew Jones <drjones@redhat.com>

Merge branch 'arm-pull-11-11-2020' into 'master'

Arm pull 11.11.2020

See merge request kvm-unit-tests/kvm-unit-tests!2


# a2d06852 04-Nov-2020 Nikos Nikoleris <nikos.nikoleris@arm.com>

arm64: Add support for configuring the translation granule

Make the translation granule configurable for arm64. arm64 supports
page sizes of 4K, 16K and 64K. By default, arm64 is configured with
64K

arm64: Add support for configuring the translation granule

Make the translation granule configurable for arm64. arm64 supports
page sizes of 4K, 16K and 64K. By default, arm64 is configured with
64K pages. configure has been extended with a new argument:

--page-size=PAGE_SIZE

which allows the user to set the page shift and therefore the page
size for arm64. Using the --page-size for any other architecture
results an error message.

In addition, bump the VA size from 42 to 48 bits. To enable 48 bit
VAs for all translation granules, add support for 4-level and 3-level
page tables. At compile time, we determine how many levels in the page
tables we needed.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Tested-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>

show more ...


# f02b6363 17-Jan-2018 Andrew Jones <drjones@redhat.com>

arm/arm64: fix virt_to_phys

Since switching to the vm_memalign() allocator virt_to_phys() hasn't
been returning the correct address, as it was assuming an identity map.

Signed-off-by: Andrew Jones

arm/arm64: fix virt_to_phys

Since switching to the vm_memalign() allocator virt_to_phys() hasn't
been returning the correct address, as it was assuming an identity map.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# 0226e262 23-Oct-2017 Paolo Bonzini <pbonzini@redhat.com>

arm: get rid of pud

We do not need four levels of page tables in either 32-bit or 64-bit
ARM, so remove the useless indirection.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


# 7d764581 06-Jun-2016 Alexander Gordeev <agordeev@redhat.com>

Move phys_addr_t type definition to lib/libcflat.h

This change leads to removing '#include <alloc.h>'s from
several places that only included alloc.h to get the typedef.

Cc: Andrew Jones <drjones@r

Move phys_addr_t type definition to lib/libcflat.h

This change leads to removing '#include <alloc.h>'s from
several places that only included alloc.h to get the typedef.

Cc: Andrew Jones <drjones@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Suggested-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# f3bd1e05 18-Jan-2016 Andrew Jones <drjones@redhat.com>

lib: add linux dir for kernel uapi headers

We needed to import some uapi headers, e.g. lib/arm/asm/uapi-psci.h,
and will need some others, e.g. pci_regs.h, in the future. Create a
linux directory fo

lib: add linux dir for kernel uapi headers

We needed to import some uapi headers, e.g. lib/arm/asm/uapi-psci.h,
and will need some others, e.g. pci_regs.h, in the future. Create a
linux directory for them in lib so that they can be included with
the familiar <linux/header.h> reference.

(Note, x86 has been cheating. lib/x86/pci.c already includes
<linux/pci_regs.h>, which it's been getting away with as its include
paths are less strict than arm's, i.e. it *does* look in /usr/include)

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Message-Id: <1453140064-9040-2-git-send-email-drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 62e6e986 10-Dec-2014 Andrew Jones <drjones@redhat.com>

arm: get PHYS_MASK from pgtable-hwdef.h

This allows it to be different for arm64, even with setup.h
shared.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@r

arm: get PHYS_MASK from pgtable-hwdef.h

This allows it to be different for arm64, even with setup.h
shared.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 8cca5668 10-Dec-2014 Andrew Jones <drjones@redhat.com>

arm: use absolute headers

Files in lib/arm including "asm/someheader.h" will get
lib/arm/asm/someheader.h, not lib/asm/someheader.h. So we
need to use <> instead of "" in order to prepare for header

arm: use absolute headers

Files in lib/arm including "asm/someheader.h" will get
lib/arm/asm/someheader.h, not lib/asm/someheader.h. So we
need to use <> instead of "" in order to prepare for headers
of the same name, but for a different arch. We change all
'#include's of all arm files, as consistency looks better.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 7a693fee 30-Oct-2014 Andrew Jones <drjones@redhat.com>

arm: import some Linux page table API

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


# 09121d03 30-Oct-2014 Andrew Jones <drjones@redhat.com>

arm: apply ALIGN() and const.h to arm files

This fixes PAGE_ALIGN for greater than 32-bit addresses.
Also fix up some whitespace in lib/arm/asm/page.h

Signed-off-by: Andrew Jones <drjones@redhat.co

arm: apply ALIGN() and const.h to arm files

This fixes PAGE_ALIGN for greater than 32-bit addresses.
Also fix up some whitespace in lib/arm/asm/page.h

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 901c1c8d 22-Aug-2014 Paolo Bonzini <pbonzini@redhat.com>

Merge remote-tracking branch 'drjones/arm/v7-initial-drop'


# fd33143e 25-Jun-2014 Andrew Jones <drjones@redhat.com>

arm: Add arch-specific asm/page.h and __va/__pa

These are pretty much the same as the asm-generic version,
but use phys_addr_t.

Signed-off-by: Andrew Jones <drjones@redhat.com>


# 5e61cba0 21-Jan-2014 Andrew Jones <drjones@redhat.com>

arm: initial drop

This is the initial drop of the arm test framework and a first test
that just checks that setup completed (a selftest). kvm isn't needed
to run this test unless testing with smp >

arm: initial drop

This is the initial drop of the arm test framework and a first test
that just checks that setup completed (a selftest). kvm isn't needed
to run this test unless testing with smp > 1.

Try it out with
yum install gcc-arm-linux-gnu
export QEMU=[qemu with mach-virt and chr-testdev]
./configure --cross-prefix=arm-linux-gnu- --arch=arm
make
./run_tests.sh

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
---
v7:
- remove memregions (reworked them as phys_alloc in lib/alloc)
- selftest: non-functional change: s/argv[i]/var/
- lib/argv:setup_args don't dereference NULL
v6:
- fixed setup.c comment [Christoffer Dall]
- changed arm/run to use chr-testdev instead of virtio-testdev
- add align parameter to memregion_new, setup alloc_ops
v5:
- memregions: check freemem_start is in bounds and document
- selftest: rename testnam => testname and properly init it
- io.c: use writeb instead of writel in puts() and use ioremap
- arm/run script update for new qemu ('-device ?' now requires -machine)
- couple other minor changes to setup.c and io.c [Christoffer Dall]
v4:
- moved fdt to just after stacktop (it was in the middle of free memory)
- switched from using heap to memregions
- get nr_cpus and added smp=<num> test
- added barrier.h
- use new report()/report_summary()
- config/config-arm.mak cleanup

show more ...