On Sun, Dec 10, 2023 at 8:04 PM Mina Almasry wrote:
>
> On Sun, Dec 10, 2023 at 6:26 PM Mina Almasry wrote:
> >
> > On Sun, Dec 10, 2023 at 6:04 PM Yunsheng Lin wrote:
> > >
> > > On 2023/12/9 0:05, Mina Almasry wrote:
> > > > On Fri, Dec 8, 2023 at 1:30 AM Yunsheng Lin
> > > > wrote:
> > >
On Thu, 7 Dec 2023 16:52:39 -0800, Mina Almasry wrote:
<...>
> +static int mp_dmabuf_devmem_init(struct page_pool *pool)
> +{
> + struct netdev_dmabuf_binding *binding = pool->mp_priv;
> +
> + if (!binding)
> + return -EINVAL;
> +
> + if (!(pool->p.flags &
On Tue, Dec 12, 2023 at 11:16:55PM +, jef...@chromium.org wrote:
> +config MSEAL
> + default n
Minor nit, "n" is always the default, no need to call it out here.
> + bool "Enable mseal() system call"
> + depends on MMU
> + help
> + Enable the virtual memory sealing.
> +
On Wed, 13 Dec 2023 at 09:02, Rae Moar wrote:
>
> Expand the documentation on the KUnit debugfs filesystem on the
> run_manual.rst page.
>
> Add section describing how to access results using debugfs.
>
> Add section describing how to run tests after boot using debugfs.
>
> Signed-off-by: Rae
On Wed, 13 Dec 2023 at 09:02, Rae Moar wrote:
>
> Add functionality to run built-in tests after boot by writing to a
> debugfs file.
>
> Add a new debugfs file labeled "run" for each test suite to use for
> this purpose.
>
> As an example, write to the file using the following:
>
> echo "any
On Wed, 13 Dec 2023 at 09:02, Rae Moar wrote:
>
> Add example_init_test_suite to allow for testing the feature of running
> test suites marked as init to indicate they use init data and/or
> functions.
>
> This suite should always pass and uses a simple init function.
>
> This suite can also be
On Wed, 13 Dec 2023 at 09:02, Rae Moar wrote:
>
> Add is_init test attribute of type bool. Add to_string, get, and filter
> methods to lib/kunit/attributes.c.
>
> Mark each of the tests in the init section with the is_init=true attribute.
>
> Add is_init to the attributes documentation.
>
>
On Wed, 13 Dec 2023 at 09:02, Rae Moar wrote:
>
> Add KUNIT_INIT_TABLE to the INIT_DATA linker section.
>
> Alter the KUnit macros to create init tests:
> kunit_test_init_section_suites
>
> Update lib/kunit/executor.c to run both the suites in KUNIT_TABLE and
> KUNIT_INIT_TABLE.
>
>
On Wed, 13 Dec 2023 at 09:02, Rae Moar wrote:
>
> Alter the linker section of KUNIT_TABLE to move it out of INIT_DATA and
> into DATA_DATA.
>
> Data for KUnit tests does not need to be in the init section.
>
> In order to run tests again after boot the KUnit data cannot be labeled as
> init data
Here is the test result after conversion.
# ./fdb_flush.sh
TEST: vx10: Expected 5 FDB entries, got 5 [ OK ]
TEST: vx20: Expected 5 FDB entries, got 5 [ OK ]
...
TEST: vx10: Expected 5 FDB entries, got 5 [ OK ]
Here is the test result after conversion.
# ./fib_tests.sh
Single path route test
Start point
TEST: IPv4 fibmatch [ OK ]
...
Fib6 garbage collection test
TEST: ipv6 route garbage collection [ OK
Remove PEER_CMD, which is not used in this test
Here is the test result after conversion.
]# ./fib-onlink-tests.sh
Error: ipv4: FIB table does not exist.
Flush terminated
Error: ipv6: FIB table does not exist.
Flush terminated
Configuring
Here is the test result after conversion.
]# ./fib_rule_tests.sh
TEST: rule6 check: oif redirect to table [ OK ]
...
TEST: rule4 dsfield tcp connect (dsfield 0x07)[ OK ]
Tests passed: 66
Tests failed: 0
Acked-by: David Ahern
Signed-off-by:
Here is the test result after conversion.
]# ./fib_nexthops.sh
Basic functional tests
--
TEST: List with nothing defined [ OK ]
TEST: Nexthop get on non-existent id[ OK ]
...
TEST: IPv6 resilient
Here is the test result after conversion.
]# ./fib_nexthop_nongw.sh
TEST: nexthop: get route with nexthop without gw[ OK ]
TEST: nexthop: ping through nexthop without gw [ OK ]
Acked-by: David Ahern
Signed-off-by: Hangbin Liu
---
When running fib_nexthop_multiprefix test I saw all IPv6 test failed.
e.g.
]# ./fib_nexthop_multiprefix.sh
TEST: IPv4: host 0 to host 1, mtu 1300 [ OK ]
TEST: IPv6: host 0 to host 1, mtu 1300 [FAIL]
With -v it shows
COMMAND: ip
Here is the test result after conversion.
]# ./fib_nexthop_multiprefix.sh
TEST: IPv4: host 0 to host 1, mtu 1300 [ OK ]
TEST: IPv6: host 0 to host 1, mtu 1300 [ OK ]
TEST: IPv4: host 0 to host 2, mtu 1350
Here is the test result after conversion. There are some failures, but it
also exists on my system without this patch. So it's not affectec by
this patch and I will check the reason later.
]# time ./fcnal-test.sh
/usr/bin/which: no nettest in
As the name \${rt-${rt}} may make reader confuse, convert the variable
hs/rt in setup_rt/hs to hid, rid. Here is the test result after conversion.
]# ./srv6_end_dt6_l3vpn_test.sh
TEST SECTION: IPv6 routers
As the name \${rt-${rt}} may make reader confuse, convert the variable
hs/rt in setup_rt/hs to hid, rid. Here is the test result after conversion.
]# ./srv6_end_dt4_l3vpn_test.sh
TEST SECTION: IPv6 routers
As the name \${rt-${rt}} may make reader confuse, convert the variable
hs/rt in setup_rt/hs to hid, rid. Here is the test result after conversion.
]# ./srv6_end_dt46_l3vpn_test.sh
TEST SECTION: IPv6 routers
Add a global variable NS_LIST to store all the namespaces that setup_ns
created, so the caller could call cleanup_all_ns() instead of remember
all the netns names when using cleanup_ns().
Signed-off-by: Hangbin Liu
---
tools/testing/selftests/net/lib.sh | 8
1 file changed, 8
Here is the 3rd part of converting net selftests to run in unique namespace.
This part converts all srv6 and fib tests.
Note that patch 06 is a fix for testing fib_nexthop_multiprefix.
Here is the part 1 link:
https://lore.kernel.org/netdev/20231202020110.362433-1-liuhang...@gmail.com
And part 2
On 12/12/23 21:52, John Hubbard wrote:
On 12/12/23 19:58, Muhammad Usama Anjum wrote:
...
Oh, this sounds like it would work nicely. No more "make headers"
required (hooray!). Instead, the new approach would be "selftests are
allowed to include from tools/include", and then we can just start
On 12/12/23 19:58, Muhammad Usama Anjum wrote:
...
Oh, this sounds like it would work nicely. No more "make headers"
required (hooray!). Instead, the new approach would be "selftests are
allowed to include from tools/include", and then we can just start
copying the files that we need to that
On 12/13/23 7:14 AM, John Hubbard wrote:
> On 12/12/23 07:12, Mark Brown wrote:
>> On Mon, Dec 11, 2023 at 12:29:58PM -0800, John Hubbard wrote:
>>> On 12/11/23 12:21, Mark Brown wrote:
> ...
>>> Or maybe there is an innovative way to do all of this, that we have
>>> yet to think of.
>>
>> We do
I'm going a bit out-of-order to report a build failure in a test:
Mark Brown writes:
> +// Recurse x20 times
> +.macro recurse id
I get an assembler error here:
gcc -nostdlib gcs-stress-thread.S -o
/home/thiago.bauermann/src/linux/tools/testing/selftests/arm64/gcs/gcs-stress-thread
On 12/12/23 6:09 PM, Mina Almasry wrote:
> OK, I imagine this is not that hard to implement - it's really whether
> the change is acceptable to reviewers.
>
> I figure I can start by implementing a no-op abstraction to page*:
>
> typedef struct page netmem_t
>
> and replace the page* in the
> From: Baolu Lu
> Sent: Wednesday, December 13, 2023 10:05 AM
> >
> >> 2. This is not intended to work only with idxd and uacce. right?
> > It should work everywhere, I suspect Intel Team didn't hit this
> > because they are testing IDXD SIOV?
>
> Yes.
>
> > Can you guys also test it as a PF
>
On 12/12/23 07:12, Mark Brown wrote:
On Mon, Dec 11, 2023 at 12:29:58PM -0800, John Hubbard wrote:
On 12/11/23 12:21, Mark Brown wrote:
...
Or maybe there is an innovative way to do all of this, that we have
yet to think of.
We do copy files into tools/include at random times which makes
> From: Jason Gunthorpe
> Sent: Tuesday, December 12, 2023 11:35 PM
>
> On Mon, Dec 11, 2023 at 11:49:49AM -0700, Alex Williamson wrote:
> > On Mon, 11 Dec 2023 14:10:28 -0400
> > Jason Gunthorpe wrote:
> >
> > > On Mon, Dec 11, 2023 at 11:03:45AM -0700, Alex Williamson wrote:
> > > > On Sun,
On 12/12/23 10:12 PM, Jason Gunthorpe wrote:
On Tue, Dec 12, 2023 at 02:10:08PM +0100, Joel Granados wrote:
diff --git a/drivers/iommu/iommufd/device.c b/drivers/iommu/iommufd/device.c
index 645ab5d290fe..0a8e03d5e7c5 100644
--- a/drivers/iommu/iommufd/device.c
+++
> From: Jason Gunthorpe
> Sent: Tuesday, December 12, 2023 11:32 PM
>
> On Tue, Dec 12, 2023 at 02:20:01AM +, Tian, Kevin wrote:
> > > From: Liu, Yi L
> > > Sent: Monday, December 11, 2023 4:08 PM
> > >
> > > On 2023/12/7 16:47, Tian, Kevin wrote:
> > > >> From: Liu, Yi L
> > > >> Sent:
There exist the following errors when build vDSO selftests on LoongArch:
# make headers && cd tools/testing/selftests/vDSO && make
...
error: 'VDSO_VERSION' undeclared (first use in this function)
...
error: 'VDSO_NAMES' undeclared (first use in this function)
We can see the following
It could not find __vdso_getcpu and __vdso_gettimeofday when test
getcpu and gettimeofday on LoongArch.
# make headers && cd tools/testing/selftests/vDSO && make
# ./vdso_test_getcpu
Could not find __vdso_getcpu
# ./vdso_test_gettimeofday
Could not find __vdso_gettimeofday
One simple
v3: Rebase on the next branch of linux-kselftest.git,
modify the patch title and update the commit message
v2: Rebase on 6.5-rc1 and update the commit message
Tiezhu Yang (2):
selftests/vDSO: Fix building errors on LoongArch
selftests/vDSO: Fix runtime errors on LoongArch
On Tue, Dec 12, 2023 at 7:08 AM Jason Gunthorpe wrote:
>
> On Tue, Dec 12, 2023 at 06:58:17AM -0800, Mina Almasry wrote:
>
> > Jason, we set the LSB on page_pool_iov pointers before casting it to
> > struct page pointers. The resulting pointers are not useable as page
> > pointers at all.
>
> I
Expand the documentation on the KUnit debugfs filesystem on the
run_manual.rst page.
Add section describing how to access results using debugfs.
Add section describing how to run tests after boot using debugfs.
Signed-off-by: Rae Moar
---
Changes since v3:
- Change the introduction of the
Add functionality to run built-in tests after boot by writing to a
debugfs file.
Add a new debugfs file labeled "run" for each test suite to use for
this purpose.
As an example, write to the file using the following:
echo "any string" > /sys/kernel/debugfs/kunit//run
This will trigger the test
Add is_init test attribute of type bool. Add to_string, get, and filter
methods to lib/kunit/attributes.c.
Mark each of the tests in the init section with the is_init=true attribute.
Add is_init to the attributes documentation.
Signed-off-by: Rae Moar
---
Changes since v3:
- Move the attribute
Add KUNIT_INIT_TABLE to the INIT_DATA linker section.
Alter the KUnit macros to create init tests:
kunit_test_init_section_suites
Update lib/kunit/executor.c to run both the suites in KUNIT_TABLE and
KUNIT_INIT_TABLE.
Signed-off-by: Rae Moar
---
Changes since v3:
- Add to comments in test.h
Add example_init_test_suite to allow for testing the feature of running
test suites marked as init to indicate they use init data and/or
functions.
This suite should always pass and uses a simple init function.
This suite can also be used to test the is_init attribute introduced in
the next
Alter the linker section of KUNIT_TABLE to move it out of INIT_DATA and
into DATA_DATA.
Data for KUnit tests does not need to be in the init section.
In order to run tests again after boot the KUnit data cannot be labeled as
init data as the kernel could write over it.
Add a KUNIT_INIT_TABLE in
On Tue, Dec 12, 2023 at 11:23 AM Mark Brown wrote:
>
> On Tue, Dec 12, 2023 at 11:17:11AM -0800, Deepak Gupta wrote:
> > On Wed, Nov 22, 2023 at 1:43 AM Mark Brown wrote:
>
> > > +/*
> > > + * Set the current shadow stack configuration. Enabling the shadow
> > > + * stack will cause a shadow
Hi Naveen,
On Tue, 12 Dec 2023 14:26:07 +0530
Naveen N Rao wrote:
> Add a test to exercize cpu hotplug with the function tracer active to
> ensure that sensitive functions in idle path are excluded from being
> traced. This helps catch issues such as the one fixed by commit
> 4b3338aaa74d
On Tue, 12 Dec 2023 at 15:17, wrote:
> +
> +**types**: bit mask to specify the sealing types, they are:
I really want a real-life use-case for more than one bit of "don't modify".
IOW, when would you *ever* say "seal this area, but MADV_DONTNEED is ok"?
Or when would you *ever* say "seal this
On Wed, 13 Dec 2023 09:33:18 +0900
Masami Hiramatsu (Google) wrote:
> On Tue, 12 Dec 2023 15:16:32 -0500
> Steven Rostedt wrote:
>
> > From: "Steven Rostedt (Google)"
> >
> > Now that the trace_marker can write up to the max size of the sub buffer.
> > Add a test to see if it actually can
On Tue, 12 Dec 2023 15:16:32 -0500
Steven Rostedt wrote:
> From: "Steven Rostedt (Google)"
>
> Now that the trace_marker can write up to the max size of the sub buffer.
> Add a test to see if it actually can happen.
>
> The README is updated to state that the trace_marker writes can be broken
From: "Steven Rostedt (Google)"
Add a test that writes longs strings, some over the size of the sub buffer
and make sure that the entire content is there.
Signed-off-by: Steven Rostedt (Google)
---
Changes since v2:
On Mon, 11 Dec 2023 18:09:18 +0800 Hangbin Liu wrote:
> --- 2001:db8:101::1 ping statistics ---
This --- will make git am cut off the rest of the patch :(
Could you indent it by one space and repost?
--
pw-bot: cr
From: Jeff Xu
Add documentation for mseal().
Signed-off-by: Jeff Xu
---
Documentation/userspace-api/mseal.rst | 189 ++
1 file changed, 189 insertions(+)
create mode 100644 Documentation/userspace-api/mseal.rst
diff --git a/Documentation/userspace-api/mseal.rst
From: Jeff Xu
selftest for memory sealing change in mmap() and mseal().
Signed-off-by: Jeff Xu
---
tools/testing/selftests/mm/.gitignore |1 +
tools/testing/selftests/mm/Makefile |1 +
tools/testing/selftests/mm/config |1 +
tools/testing/selftests/mm/mseal_test.c |
From: Jeff Xu
The MAP_SEALABLE flag is added to the flags field of mmap().
When present, it marks the map as sealable. A map created
without MAP_SEALABLE will not support sealing; In other words,
mseal() will fail for such a map.
Applications that don't care about sealing will expect their
From: Jeff Xu
Certain types of madvise() operations are destructive, such as
MADV_DONTNEED, which can effectively alter region contents by
discarding pages, especially when memory is anonymous. This blocks
such operations for anonymous memory which is not writable to the
user.
The
From: Jeff Xu
Add merge/split handling for mlock/madvice/mprotect/mmap case.
Make sealed VMA mergeable with adjacent VMAs.
This is so that we don't run out of VMAs, i.e. there is a max
number of VMA per process.
Signed-off-by: Jeff Xu
Suggested-by: Jann Horn
---
fs/userfaultfd.c | 8
From: Jeff Xu
Allow mmap() to set the sealing type when creating a mapping. This is
useful for optimization because it avoids having to make two system
calls: one for mmap() and one for mseal(). With this change, mmap()
can take an input that specifies the sealing type, so only one system
call
From: Jeff Xu
The new mseal() is an architecture independent syscall, and with
following signature:
mseal(void addr, size_t len, unsigned long types, unsigned long flags)
addr/len: memory range. Must be continuous/allocated memory, or else
mseal() will fail and no VMA is updated. For details
From: Jeff Xu
The base package includes the features common to all VMA sealing
types. It prevents sealed VMAs from:
1> Unmapping, moving to another location, and shrinking the size, via
munmap() and mremap(), can leave an empty space, therefore can be
replaced with a VMA with a new set of
From: Jeff Xu
Seal PROT and PKEY of the address range, in other words, mprotect()
and pkey_mprotect() will be denied if the memory is sealed with
MM_SEAL_PROT_PKEY.
Signed-off-by: Jeff Xu
---
mm/mprotect.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/mm/mprotect.c
From: Jeff Xu
Wire up mseal syscall for all architectures.
Signed-off-by: Jeff Xu
---
arch/alpha/kernel/syscalls/syscall.tbl | 1 +
arch/arm/tools/syscall.tbl | 1 +
arch/arm64/include/asm/unistd.h | 2 +-
arch/arm64/include/asm/unistd32.h | 2 ++
From: Jeff Xu
Two utilities to be used later.
can_modify_mm:
checks sealing flags for given memory range.
can_modify_vma:
checks sealing flags for given vma.
Signed-off-by: Jeff Xu
---
include/linux/mm.h | 18 ++
mm/mseal.c | 38
From: Jeff Xu
This patchset proposes a new mseal() syscall for the Linux kernel.
In a nutshell, mseal() protects the VMAs of a given virtual memory
range against modifications, such as changes to their permission bits.
Modern CPUs support memory permissions, such as the read/write (RW)
and
On Tue, 12 Dec 2023 at 20:52, Daniel Xu wrote:
>
> cc Kumar
>
> On Tue, Dec 12, 2023 at 09:17:02AM -0700, Daniel Xu wrote:
> > On Mon, Dec 11, 2023 at 04:25:06PM -0800, Eyal Birger wrote:
> > > On Mon, Dec 11, 2023 at 3:49 PM Daniel Xu wrote:
> > > >
> > > > On Mon, Dec 11, 2023 at 03:13:07PM
+Mike, who did the CRIU work
Re:
https://lore.kernel.org/lkml/e1362732ba86990b7707d3f5b785358b77c5f896.ca...@intel.com/
On Tue, 2023-12-12 at 20:26 +, Mark Brown wrote:
> The set of locked features is read/write via ptrace in my arm64
> series,
> that's architecture specific unfortunately
From: Ackerley Tng
This tests the use of guest memory without explicit MapGPA calls.
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
---
.../selftests/kvm/x86_64/tdx_upm_test.c | 86 +--
1 file changed, 77 insertions(+), 9
Allow userspace to handle KVM_EXIT_MEMORY_FAULT instead of triggering
TEST_ASSERT.
>From the KVM_EXIT_MEMORY_FAULT documentation:
Note! KVM_EXIT_MEMORY_FAULT is unique among all KVM exit reasons in that it
accompanies a return code of '-1', not '0'! errno will always be set to EFAULT
or
From: Ackerley Tng
vm_vaddr_alloc always allocates memory in memslot 0. This allows users
of this function to choose which memslot to allocate virtual memory
in.
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
---
From: Ackerley Tng
This tests the use of guest memory with explicit MapGPA calls.
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
---
tools/testing/selftests/kvm/Makefile | 1 +
.../selftests/kvm/x86_64/tdx_upm_test.c | 401
From: Ackerley Tng
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
---
tools/testing/selftests/kvm/include/x86_64/tdx/tdx.h | 2 ++
tools/testing/selftests/kvm/lib/x86_64/tdx/tdx.c | 5 +
2 files changed, 7 insertions(+)
diff --git
From: Ackerley Tng
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
---
.../selftests/kvm/include/x86_64/tdx/tdx.h| 21 +++
.../selftests/kvm/lib/x86_64/tdx/tdx.c| 19 +
2 files changed, 40 insertions(+)
diff
From: Ryan Afranji
Adds a test that sets up shared memory between the host and guest.
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
---
tools/testing/selftests/kvm/Makefile | 1 +
.../selftests/kvm/include/x86_64/tdx/tdx.h| 2 +
From: Ryan Afranji
The test checks that host can only read fixed values when trying to
access the guest's private memory.
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
---
.../selftests/kvm/x86_64/tdx_vm_tests.c | 85 +++
1 file
From: Ackerley Tng
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
---
.../selftests/kvm/include/kvm_util_base.h | 24 ++
tools/testing/selftests/kvm/lib/kvm_util.c| 32 +++
.../selftests/kvm/lib/x86_64/processor.c |
From: Roger Wang
Adds a test for TDG.VP.INFO
Signed-off-by: Roger Wang
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../selftests/kvm/include/x86_64/tdx/tdcall.h | 19 +++
.../selftests/kvm/include/x86_64/tdx/tdx.h| 5 +
The test verifies MMIO writes of various sizes from the guest to the host.
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../selftests/kvm/include/x86_64/tdx/tdx.h| 2 +
.../selftests/kvm/lib/x86_64/tdx/tdx.c| 14 +++
This test issues a CPUID TDVMCALL from inside the guest to get the CPUID
values as seen by KVM.
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../selftests/kvm/include/x86_64/tdx/tdx.h| 4 +
.../selftests/kvm/lib/x86_64/tdx/tdx.c| 26 +
The test verifies MMIO reads of various sizes from the host to the guest.
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../selftests/kvm/include/x86_64/tdx/tdcall.h | 2 +
.../selftests/kvm/include/x86_64/tdx/tdx.h| 3 +
The test verifies that the guest runs TDVMCALL and the
guest vCPU enters to the halted state.
Signed-off-by: Erdem Aktas
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../selftests/kvm/include/x86_64/tdx/tdx.h| 2 +
The test verifies reads and writes for MSR registers with different access
level.
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../selftests/kvm/include/x86_64/tdx/tdx.h| 5 +
.../selftests/kvm/lib/x86_64/tdx/tdx.c| 27 +++
The test verifies IO reads of various sizes from the host to the guest.
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../selftests/kvm/x86_64/tdx_vm_tests.c | 87 +++
1 file changed, 87 insertions(+)
diff --git
The test verifies IO writes of various sizes from the guest to the host.
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../selftests/kvm/include/x86_64/tdx/tdcall.h | 3 +
.../selftests/kvm/x86_64/tdx_vm_tests.c | 91 +++
2 files
The test calls get_td_vmcall_info from the guest and verifies the
expected returned values.
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../selftests/kvm/include/x86_64/tdx/tdx.h| 3 +
.../kvm/include/x86_64/tdx/test_util.h| 27 +++
The test reads CPUID values from inside a TD VM and compare them
to expected values.
The test targets CPUID values which are virtualized as "As Configured",
"As Configured (if Native)", "Calculated", "Fixed" and "Native"
according to the TDX spec.
Signed-off-by: Sagi Shahar
Signed-off-by:
From: Erdem Aktas
Verifies TDVMCALL READ and WRITE operations.
Signed-off-by: Erdem Aktas
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../kvm/include/x86_64/tdx/test_util.h| 34
.../selftests/kvm/x86_64/tdx_vm_tests.c | 82
The test checks report_fatal_error functionality.
Signed-off-by: Sagi Shahar
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
---
.../selftests/kvm/include/x86_64/tdx/tdx.h| 6 ++-
.../kvm/include/x86_64/tdx/tdx_util.h | 1 +
.../kvm/include/x86_64/tdx/test_util.h
From: Erdem Aktas
Adding a test to verify TDX lifecycle by creating a TD and running a
dummy TDG.VP.VMCALL inside it.
Signed-off-by: Erdem Aktas
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
Co-developed-by: Ackerley Tng
Signed-off-by: Ackerley Tng
---
From: Ackerley Tng
This also exercises the KVM_TDX_CAPABILITIES ioctl.
Suggested-by: Isaku Yamahata
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
---
.../selftests/kvm/lib/x86_64/tdx/tdx_util.c | 69 ++-
1 file changed, 66
From: Ackerley Tng
If guest memory is backed by restricted memfd
+ UPM is being used, hence encrypted memory region has to be
registered
+ Can avoid making a copy of guest memory before getting TDX to
initialize the memory region
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
From: Ackerley Tng
Split the vCPU descriptor table initialization process into a few
steps and expose them:
+ Setting up the IDT
+ Syncing exception handlers into the guest
In kvm_setup_idt(), we conditionally allocate guest memory for vm->idt
to avoid double allocation when kvm_setup_idt() is
From: Erdem Aktas
TDX requires additional IOCTLs to initialize VM and vCPUs to add
private memory and to finalize the VM memory. Also additional utility
functions are provided to manipulate a TD, similar to those that
manipulate a VM in the current selftest framework.
A TD's initial register
From: Ackerley Tng
One-to-one GVA to GPA mappings can be used in the guest to set up boot
sequences during which paging is enabled, hence requiring a transition
from using physical to virtual addresses in consecutive instructions.
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
From: Ackerley Tng
TDX guests' registers cannot be initialized directly using
vcpu_regs_set(), hence the stack pointer needs to be initialized by
the guest itself, running boot code beginning at the reset vector.
We store the stack address as part of struct kvm_vcpu so that it can
be accessible
From: Ackerley Tng
This allows initializing sregs without setting vCPU registers in
KVM.
No functional change intended.
Signed-off-by: Ackerley Tng
Signed-off-by: Ryan Afranji
Signed-off-by: Sagi Shahar
---
.../selftests/kvm/include/x86_64/processor.h | 2 +
Hello,
This is v4 of the patch series for TDX selftests.
It has been updated for Intel’s v17 of the TDX host patches which was
proposed here:
https://lore.kernel.org/all/cover.1699368322.git.isaku.yamah...@intel.com/
The tree can be found at:
On Tue, Dec 12, 2023 at 08:17:09PM +, Edgecombe, Rick P wrote:
> On Wed, 2023-11-22 at 09:42 +, Mark Brown wrote:
> > These features are expected to be inherited by new threads and
> > cleared
> > on exec(), unknown features should be rejected for enable but
> > accepted
> > for locking
On Wed, 2023-11-22 at 09:42 +, Mark Brown wrote:
> These features are expected to be inherited by new threads and
> cleared
> on exec(), unknown features should be rejected for enable but
> accepted
> for locking (in order to allow for future proofing).
The reason why I stuck with arch_prctl
From: "Steven Rostedt (Google)"
Now that the trace_marker can write up to the max size of the sub buffer.
Add a test to see if it actually can happen.
The README is updated to state that the trace_marker writes can be broken
up, and the test checks the README for that statement so that it does
On Tue, Dec 12, 2023 at 03:21:00PM -0400, Jason Gunthorpe wrote:
> On Tue, Dec 12, 2023 at 11:13:37AM -0800, Nicolin Chen wrote:
> > On Tue, Dec 12, 2023 at 10:44:21AM -0400, Jason Gunthorpe wrote:
> > > On Mon, Dec 11, 2023 at 11:30:00PM -0800, Nicolin Chen wrote:
> > >
> > > > > > Could the
cc Kumar
On Tue, Dec 12, 2023 at 09:17:02AM -0700, Daniel Xu wrote:
> On Mon, Dec 11, 2023 at 04:25:06PM -0800, Eyal Birger wrote:
> > On Mon, Dec 11, 2023 at 3:49 PM Daniel Xu wrote:
> > >
> > > On Mon, Dec 11, 2023 at 03:13:07PM -0800, Eyal Birger wrote:
> > > > On Mon, Dec 11, 2023 at 2:31 PM
Add a selftest for verifying the accuracy of DAMON's access monitoring
functionality. The test starts a program of artificial access pattern,
monitor the access pattern using DAMON, and check if DAMON finds
expected amount of hot data region (working set size) with only
acceptable error rate.
1 - 100 of 170 matches
Mail list logo