On Thu, 27 Feb 2025 22:08:19 +, Colin Ian King wrote:
> There is a spelling mistake in a PER_PAGE_DEBUG debug message. Fix it.
Applied to kvm-x86 selftests, thanks!
[1/1] KVM: selftests: Fix spelling mistake "UFFDIO_CONINUE" -> "UFFDIO_CONTINUE"
https://github.com/kvm-x86/linux/commit/7
On 28/02/25 10:24 pm, Brendan Jackman wrote:
Just reporting failure doesn't tell you what went wrong. This can fail
in different ways so report errno to help the reader get started
debugging.
Signed-off-by: Brendan Jackman
Reviewed-by: Dev Jain
Am 28.02.25 um 06:43 schrieb Lei Yang:
> Hi Marcus
>
> Since your patches are about the virtual network, I'd like to test it,
> but it conflicts (Please review the attachment to review more details)
> when I apply it to the master branch.
> My test based on this commit:
> commit 1e15510b71c99c6e49
Hi,
On 2/27/2025 10:26 PM, Jiayuan Chen wrote:
> BPF CI has failed 3 times in the last 24 hours. Add retry for ENOMEM.
> It's similar to the optimization plan:
> commit 2f553b032cad ("selftsets/bpf: Retry map update for non-preallocated
> per-cpu map")
>
> Failed CI:
> https://github.com/kernel-p
On Thu, Feb 27, 2025 at 02:21:41PM -0800, John Fastabend wrote:
> On 2025-02-27 11:52:04, Cong Wang wrote:
> > On Wed, Feb 26, 2025 at 09:22:41PM +0800, Jiayuan Chen wrote:
> > > Current wrapper function create_pair() is used to create a pair of
> > > connected links and returns two fds, but it doe
On Thu, Feb 20, 2025 at 09:16:25PM +, Vishal Annapurve wrote:
> From: "Kirill A. Shutemov"
>
> CONFIG_PARAVIRT_XXL is mainly defined/used by XEN PV guests. For
> other VM guest types, features supported under CONFIG_PARAVIRT
> are self sufficient. CONFIG_PARAVIRT mainly provides support for
>
On Thu, Feb 20, 2025 at 09:42:57PM +0100, Thomas Gleixner wrote:
> On Thu, Feb 20 2025 at 15:01, Frank Li wrote:
> > On Tue, Feb 11, 2025 at 02:21:53PM -0500, Frank Li wrote:
> >
> > Thomas Gleixner and Marc Zyngier:
> >
> > Do you have any comments about irq/msi part?
>
> I'm not having object
On Fri, Feb 28, 2025 at 08:12:51PM +0100, Uladzislau Rezki wrote:
> Hello, Paul!
>
> > > > > >
> > > > > > Except that I got this from overnight testing of rcu/dev on the
> > > > > > shared
> > > > > > RCU tree:
> > > > > >
> > > > > > WARNING: CPU: 5 PID: 14 at kernel/rcu/tree.c:1636
> > > >
On Thu, 27 Feb 2025 11:33:39 +0100 Luca Weiss wrote:
> couldn't be tested much back then due to missing features in tqftpserv
> which caused the modem to not enable correctly.
>
> Especially the last commit is important since it makes mobile data
> actually functional on SoCs with IPA v4.7 like SM
On 2/27/25 6:23 AM, Marcus Wichelmann wrote:
When the XDP metadata area was used, it is expected that the same
metadata can also be accessed from TC, as can be read in the description
of the bpf_xdp_adjust_meta helper function. In the tun driver, this was
not yet implemented.
To make this work,
On 28/02/25 10:24 pm, Brendan Jackman wrote:
So this can be debugged more easily.
Signed-off-by: Brendan Jackman
Reviewed-by: Dev Jain
On Fri, Feb 28, 2025 at 11:59:55AM -0800, Paul E. McKenney wrote:
> On Fri, Feb 28, 2025 at 08:12:51PM +0100, Uladzislau Rezki wrote:
> > Hello, Paul!
> >
> > > > > > >
> > > > > > > Except that I got this from overnight testing of rcu/dev on the
> > > > > > > shared
> > > > > > > RCU tree:
> >
On Thu, 27 Feb 2025 18:50:13 + Joe Damato wrote:
> @@ -2870,9 +2883,15 @@ static void refill_work(struct work_struct *work)
> for (i = 0; i < vi->curr_queue_pairs; i++) {
> struct receive_queue *rq = &vi->rq[i];
>
> + rtnl_lock();
> virtnet_napi_d
Hi Stanislav,
On 2/27/25 11:08 PM, Stanislav Fomichev wrote:
On 02/27, Bastien Curutchet (eBPF Foundation) wrote:
A fair amount of code duplication is present among tests to attach BPF
programs.
Create generic_attach* helpers that attach BPF programs to a given
interface.
Use ASSERT_OK_FD() in
On Fri, Feb 28, 2025 at 2:50 AM Joe Damato wrote:
>
> Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping
> can be accessed by user apps. Note that the netif_queue_set_napi
> currently requires RTNL, so care must be taken to ensure RTNL is held on
> paths where this API might be
Hi Stanislav
On 2/27/25 11:18 PM, Stanislav Fomichev wrote:
On 02/27, Bastien Curutchet (eBPF Foundation) wrote:
ip6gre tunnels are tested in the test_tunnel.sh but not in the test_progs
framework.
Add a new test in test_progs to test ip6gre tunnels. It uses the same
network topology and the s
On Thu, Feb 27, 2025 at 3:39 PM Andreas Hindborg wrote:
>
> The `Index` implementation on `BStr` was lost when we switched `BStr` from
> a type alias of `[u8]` to a newtype. Add back `Index` by implementing
> `Index` for `BStr` when `Index` would be implemented for `[u8]`.
>
> Reviewed-by: Daniel
From: Peter Gonda
Add helper functions for guest code to check the status of SEV and
SEV-ES.
Cc: Paolo Bonzini
Cc: Claudio Imbrenda
Cc: Sean Christopherson
Cc: Carlos Bilbao
Cc: Tom Lendacky
Cc: Michael Roth
Signed-off-by: Peter Gonda
Signed-off-by: Neeraj Upadhyay
---
tools/testing/sel
From: Peter Gonda
Add a shared page allocation. To be used for SEV-ES GHCBs.
Cc: Vishal Annapurve
Cc: Ackerley Tng
Cc: Paolo Bonzini
Cc: Claudio Imbrenda
Cc: Sean Christopherson
Cc: Carlos Bilbao
Cc: Tom Lendacky
Cc: Michael Roth
Cc: k...@vger.kernel.org
Cc: linux-kselft...@vger.kernel.o
From: Peter Gonda
Modifies ucall handling for SEV-ES VMs. Instead of using an out
instruction and storing the ucall pointer in RDI, SEV-ES guests use a
outsb VMGEXIT to move the ucall pointer as the data. Allows for SEV-ES
to use ucalls instead of relying the SEV-ES MSR based termination protocol
VC exception has an associated error code. Update the IDT
handler for it.
Signed-off-by: Neeraj Upadhyay
---
tools/testing/selftests/kvm/lib/x86/handlers.S | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/lib/x86/handlers.S
b/tools/testing/selft
This series adds KVM selftests for Secure AVIC.
The Secure AVIC KVM support patch series is at:
https://lore.kernel.org/kvm/20250228085115.105648-1-neeraj.upadh...@amd.com/T/#u
Git tree is available at:
https://github.com/AMDESE/linux-kvm/tree/savic-host-latest
This series depends on SNP
From: Peter Gonda
Move the GHCB definitions from svm.h to the tools/ copy. This allows the
SEV-ES selftest to use GHCBs which are required for non-trival VMs to
paravirtualize NonAutomaticExits (NAEs) when SEV-ES is enabled. GHCB
getters/setters have a warning with address-of-packed-member, so re
Make GHCB entry page size aligned. Without this change
GHCB GPA registration gets incorrectly interpreted in
host as a GHCB MSR protocol request.
Signed-off-by: Neeraj Upadhyay
---
tools/testing/selftests/kvm/lib/x86/sev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools
Skip vm_is_gpa_protected() call for APIC MMIO address in __virt_pg_map().
Without this change, the virt_pg_map() fails with below error for
APIC MMIO address.
No vm physical memory at 0xfee0
Signed-off-by: Neeraj Upadhyay
---
tools/testing/selftests/kvm/lib/x86/processor.c | 6 ++
1
Add instruction deconding support for MMIO instruction
decoding in SEV-ES VC handler path. For ease of review,
file insn-eval.c is a snapshot of the file from arch/x86/lib/.
It will be updated in subsequent commits with the modifications
to just support minimal instruction deconding.
Signed-off-by
Update insn-eval.c to prototype instruction decoding for MMIO
VC exception exit.
Signed-off-by: Neeraj Upadhyay
---
tools/testing/selftests/kvm/Makefile.kvm | 12 +
.../selftests/kvm/include/x86/ex_regs.h | 21 ++
.../selftests/kvm/include/x86/insn-eval.h | 48
.../selftes
Add #VC exception handling support for unaccelerated msrs
reads/writes for Secure AVIC guests.
Signed-off-by: Neeraj Upadhyay
---
.../testing/selftests/kvm/include/x86/apic.h | 1 +
.../testing/selftests/kvm/include/x86/savic.h | 1 +
tools/testing/selftests/kvm/lib/x86/savic.c | 145
Add Secure AVIC lib which provides apis to enable
Secure AVIC for a vCPU. In addition, add guest APIC
backing page initialization support and helper
functions to access APIC regs from guest APIC backing
page and from hv.
Signed-off-by: Neeraj Upadhyay
---
tools/testing/selftests/kvm/Makefile.kvm
Add support to test SEV VMs - SEV, SEV-ES, SEV-SNP
in both xapic and x2apic modes. Convert the stats page
to a shared page so that it is accesible from host.
Signed-off-by: Neeraj Upadhyay
---
.../testing/selftests/kvm/include/kvm_util.h | 1 +
tools/testing/selftests/kvm/lib/kvm_util.c| 1
Add MMIO VC exception handling support to allow xapic mmio access
for SEV-ES guests. In addition, add a PV interface for xapic MMIO
guest accesses from outside of VC exception handler context.
Signed-off-by: Neeraj Upadhyay
---
.../selftests/kvm/include/x86/ex_regs.h | 2 +-
tools/testin
Certain xapic MMIO reads and writes get compiled into movabs
instruction which uses rax as the register containing data and
8-byte address encoded as part of the instruction. Add support
to decode these instructions.
Signed-off-by: Neeraj Upadhyay
---
.../testing/selftests/kvm/lib/x86/insn-eval.
Now with xapic/x2apic acceses being supported for SEV-ES and
SNP guests, add support for testing these VMs in xapic_state_test.
Signed-off-by: Neeraj Upadhyay
---
.../selftests/kvm/x86/xapic_state_test.c | 117 --
1 file changed, 109 insertions(+), 8 deletions(-)
diff --git
Add support for testing x2apic mode in xapic_ipi_test. This
allows extending the test in future to support VMs which
only work in x2apic mode such as Secure AVIC enabled VMs.
Signed-off-by: Neeraj Upadhyay
---
.../selftests/kvm/x86/xapic_ipi_test.c| 65 +++
1 file changed
Add support for handling INCOMPLET_IPI #VC exception
handling for Secure AVIC guests. This allows sending
cross-vCPU IPI, using all destination shorthands (broadcast,
fixed) and destination modes (logical/physical) between
Secure AVIC enabled vCPUs. In addition, cross-vCPU NMI
using APIC_ICR writes
Add #VC exception handling on rdmsr/wrmsr accesses for SEV-ES
guests. In addition, add PV interface for direct msr read/write
from SEV-ES guests without going through #VC exception path.
Signed-off-by: Neeraj Upadhyay
---
tools/testing/selftests/kvm/include/x86/sev.h | 2 +
tools/testing/selfte
From: Peter Gonda
SEV-ES guests need additional pages allocated for their GHCBs. Add arch
specific function definition with __weak to allow for overriding for X86
specific SEV-ES functionality.
Cc: Vishal Annapurve
Cc: Ackerley Tng
Cc: Paolo Bonzini
Cc: Claudio Imbrenda
Cc: Sean Christophers
On 2/28/25 12:31, Cosmin Ratiu wrote:
> On Fri, 2025-02-28 at 02:20 +, Hangbin Liu wrote:
>> On Thu, Feb 27, 2025 at 03:31:01PM +0200, Nikolay Aleksandrov wrote:
> One more thing - note I'm not an xfrm expert by far but it
> seems to me here you have
> to also call xdo_dev_state_fr
On 2/28/25 13:07, Nikolay Aleksandrov wrote:
> On 2/28/25 12:31, Cosmin Ratiu wrote:
>> On Fri, 2025-02-28 at 02:20 +, Hangbin Liu wrote:
>>> On Thu, Feb 27, 2025 at 03:31:01PM +0200, Nikolay Aleksandrov wrote:
>> One more thing - note I'm not an xfrm expert by far but it
>> seems to me
Test cross-vCPU IPI for Secure AVIC guests using xapic_ipi_test.
Add new "SAVIC" apic mode to the test for this.
Signed-off-by: Neeraj Upadhyay
---
tools/arch/x86/include/asm/msr-index.h| 4 +-
.../selftests/kvm/include/x86/processor.h | 1 +
.../selftests/kvm/x86/xapic_ipi_test.c
Extend SAVIC test to verify APIC MSR accesses in SAVIC enabled
mode. Verify the behavior of reads and writes using rdmsr/wrmsr
for various APIC registers. In addition, test whether wrmsr
based writes are propagated to guest backing page.
Signed-off-by: Neeraj Upadhyay
---
.../testing/selftests/k
I tested this patch with virtio-net regression tests, everything works fine.
Tested-by: Lei Yang
On Mon, Feb 24, 2025 at 4:20 PM wrote:
>
> Hello:
>
> This patch was applied to netdev/net-next.git (main)
> by David S. Miller :
>
> On Tue, 18 Feb 2025 10:39:08 +0800 you wrote:
> > There are seve
Extend Secure AVIC tests to test edge and level
ioapic based interrupt flow. In addition, test
RTC_GSI IOAPIC line which has special casing
in KVM. Add new interfaces to read and write to
IOAPIC redirect tables.
Signed-off-by: Neeraj Upadhyay
---
.../testing/selftests/kvm/include/kvm_util.h |
Extend SAVIC test include MSI injection from host.
Test scenarios where MSI vector is not allowed by
guest in ALLOWED_IRR and when it is allowed.
Signed-off-by: Neeraj Upadhyay
---
tools/testing/selftests/kvm/x86/savic_test.c | 49
1 file changed, 49 insertions(+)
diff --gi
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> The definition is used by tools/testing/selftests/vDSO/parse_vdso.c.
> To be able to build the vDSO selftests without a libc dependency,
> add the define to the kernels own UAPI headers.
>
> Link:
> https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Cor
On 2/27/25 5:21 PM, Jakub Kicinski wrote:
On Thu, 27 Feb 2025 02:21:25 +0100 Antonio Quartulli wrote:
After some time of struggle trying to fix all hidden bugs that Sabrina
has found...here is v20!
Please note that some patches were already reviewed/tested by a few
people. These patches have
On Fri, Feb 28, 2025 at 03:42:02PM +0100, Vlastimil Babka wrote:
> On 2/28/25 13:13, Uladzislau Rezki (Sony) wrote:
> > Currently kvfree_rcu() APIs use a system workqueue which is
> > "system_unbound_wq" to driver RCU machinery to reclaim a memory.
> >
> > Recently, it has been noted that the foll
On Fri, Feb 28, 2025 at 04:49:24PM +0100, Vlastimil Babka wrote:
> On 2/28/25 13:13, Uladzislau Rezki (Sony) wrote:
> > Add a test_kfree_rcu_wq_destroy test to verify a kmem_cache_destroy()
> > from a workqueue context. The problem is that, before destroying any
> > cache the kvfree_rcu_barrier() i
This script must be run as root anyway (see all the writing to
privileged files in /proc etc).
Remove the unnecessary use of sudo to avoid breaking on single-user
systems that don't have sudo. This also avoids confusing readers.
Signed-off-by: Brendan Jackman
---
tools/testing/selftests/mm/run_
On Fri, Feb 28, 2025 at 05:36:47PM +0100, Uladzislau Rezki wrote:
> On Fri, Feb 28, 2025 at 07:41:40AM -0800, Paul E. McKenney wrote:
> > On Thu, Feb 27, 2025 at 06:44:15PM +0100, Uladzislau Rezki wrote:
> > > On Thu, Feb 27, 2025 at 09:26:40AM -0800, Paul E. McKenney wrote:
> > > > On Thu, Feb 27,
On Fri, Feb 28, 2025 at 07:24:41PM +0100, Uladzislau Rezki wrote:
> On Fri, Feb 28, 2025 at 10:21:57AM -0800, Paul E. McKenney wrote:
> > On Fri, Feb 28, 2025 at 05:36:47PM +0100, Uladzislau Rezki wrote:
> > > On Fri, Feb 28, 2025 at 07:41:40AM -0800, Paul E. McKenney wrote:
> > > > On Thu, Feb 27,
On Fri, Feb 28, 2025 at 07:41:40AM -0800, Paul E. McKenney wrote:
> On Thu, Feb 27, 2025 at 06:44:15PM +0100, Uladzislau Rezki wrote:
> > On Thu, Feb 27, 2025 at 09:26:40AM -0800, Paul E. McKenney wrote:
> > > On Thu, Feb 27, 2025 at 09:12:39AM -0800, Boqun Feng wrote:
> > > > Hi Ulad,
> > > >
> >
On 2/26/25 9:30 AM, Beleswar Prasad Padhi wrote:
Hi Andrew,
On 26/02/25 20:14, Andrew Davis wrote:
On 2/19/25 3:10 AM, Beleswar Padhi wrote:
Currently, struct members such as mem, num_mems, reset, tsp, ti_sci and
ti_sci_id are part of the k3_r5_core structure. To align the rproc->priv
data str
On 2/28/25 13:13, Uladzislau Rezki (Sony) wrote:
> Currently kvfree_rcu() APIs use a system workqueue which is
> "system_unbound_wq" to driver RCU machinery to reclaim a memory.
>
> Recently, it has been noted that the following kernel warning can
> be observed:
>
>
> workqueue: WQ_MEM_RECLAIM n
I never had much luck running mm selftests so I spent a few hours
digging into why.
Looks like most of the reason is missing SKIP checks, so this series is
just adding a bunch of those that I found. I did not do anything like
all of them, just the ones I spotted in gup_longterm, gup_test, mmap,
us
It's pretty obvious that the test wouldn't work if you don't have the
feature enabled. But, it's still useful to SKIP instead of failing so
the reader can immediately tell that this is the reason why.
Signed-off-by: Brendan Jackman
---
tools/testing/selftests/mm/uffd-stress.c | 4 ++--
1 file ch
It seems that 9pfs does not allow truncating unlinked files, Mark Brown
has noted that NFS may also behave this way.
It doesn't seem quite right to call this a "bug" but it's probably a
special enough case that it makes sense for the test to just SKIP if it
happens.
Signed-off-by: Brendan Jackman
This calculation divides a fixed parameter by an environment-dependent
parameter i.e. the number of CPUs.
The simple way to avoid machine-specific failures here is to just put a
cap on the max value of the latter.
Suggested-by: Mateusz Guzik
Signed-off-by: Brendan Jackman
---
tools/testing/sel
Just reporting failure doesn't tell you what went wrong. This can fail
in different ways so report errno to help the reader get started
debugging.
Signed-off-by: Brendan Jackman
---
tools/testing/selftests/mm/gup_longterm.c | 37 ++-
1 file changed, 21 insertions(+),
So this can be debugged more easily.
Signed-off-by: Brendan Jackman
---
tools/testing/selftests/mm/uffd-stress.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/uffd-stress.c
b/tools/testing/selftests/mm/uffd-stress.c
index
ec842bbb9f18e291fa51d
This test allocates a page of every available size and doesn't have any
SKIP logic if the allocation fails. So, ensure it's available and skip
the test if we can't do so.
Signed-off-by: Brendan Jackman
---
tools/testing/selftests/mm/run_vmtests.sh | 23 ++-
1 file changed, 22
On Fri, Feb 28, 2025 at 06:08:19PM +0100, Uladzislau Rezki wrote:
> On Fri, Feb 28, 2025 at 05:36:47PM +0100, Uladzislau Rezki wrote:
> > On Fri, Feb 28, 2025 at 07:41:40AM -0800, Paul E. McKenney wrote:
> > > On Thu, Feb 27, 2025 at 06:44:15PM +0100, Uladzislau Rezki wrote:
> > > > On Thu, Feb 27,
(I'm still reviewing how everything fits together, but one small thing
here:)
2025-02-27, 02:21:34 +0100, Antonio Quartulli wrote:
> +static void ovpn_udp_close(struct sock *sk, long timeout)
> +{
> + struct ovpn_socket *sock;
> + struct ovpn_priv *ovpn;
> +
> + rcu_read_lock();
> +
On 28/02/25 10:24 pm, Brendan Jackman wrote:
A later commit will bound this variable so it no longer necessarily
matches the number of CPUs. Rename it appropriately.
Signed-off-by: Brendan Jackman
---
tools/testing/selftests/mm/uffd-common.c | 8
tools/testing/selftests/mm/u
On 28/02/25 10:24 pm, Brendan Jackman wrote:
This calculation divides a fixed parameter by an environment-dependent
parameter i.e. the number of CPUs.
The simple way to avoid machine-specific failures here is to just put a
cap on the max value of the latter.
Suggested-by: Mateusz Guzik
Sign
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> These currently have no maintainer besides the default kselftest ones.
> Add the general vDSO maintainers, too.
>
> Signed-off-by: Thomas Weißschuh
> ---
> MAINTAINERS | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTA
On 2/28/25 13:13, Uladzislau Rezki (Sony) wrote:
> Add a test_kfree_rcu_wq_destroy test to verify a kmem_cache_destroy()
> from a workqueue context. The problem is that, before destroying any
> cache the kvfree_rcu_barrier() is invoked to guarantee that in-flight
> freed objects are flushed.
>
> T
On Thu, Feb 27, 2025 at 06:44:15PM +0100, Uladzislau Rezki wrote:
> On Thu, Feb 27, 2025 at 09:26:40AM -0800, Paul E. McKenney wrote:
> > On Thu, Feb 27, 2025 at 09:12:39AM -0800, Boqun Feng wrote:
> > > Hi Ulad,
> > >
> > > I put these three patches into next (and misc.2025.02.27a) for some
> > >
Am 28.02.25 um 06:43 schrieb Lei Yang:
Hi Marcus
Since your patches are about the virtual network, I'd like to test it,
but it conflicts (Please review the attachment to review more details)
when I apply it to the master branch.
My test based on this commit:
commit 1e15510b71c99c6e49134d756df910
On 28/02/25 10:24 pm, Brendan Jackman wrote:
It's obvious that this should fail in that case, but still, save the
reader the effort of figuring out that they've run into this by just
SKIPping
Signed-off-by: Brendan Jackman
---
tools/testing/selftests/mm/uffd-wp-mremap.c | 5 -
1 file
On 28/02/25 10:24 pm, Brendan Jackman wrote:
This script must be run as root anyway (see all the writing to
privileged files in /proc etc).
Remove the unnecessary use of sudo to avoid breaking on single-user
systems that don't have sudo. This also avoids confusing readers.
Signed-off-by: Bre
Hello, Paul!
> > > > >
> > > > > Except that I got this from overnight testing of rcu/dev on the shared
> > > > > RCU tree:
> > > > >
> > > > > WARNING: CPU: 5 PID: 14 at kernel/rcu/tree.c:1636
> > > > > rcu_sr_normal_complete+0x5c/0x80
> > > > >
> > > > > I see this only on TREE05. Which sho
On Fri, Feb 28, 2025 at 10:21:57AM -0800, Paul E. McKenney wrote:
> On Fri, Feb 28, 2025 at 05:36:47PM +0100, Uladzislau Rezki wrote:
> > On Fri, Feb 28, 2025 at 07:41:40AM -0800, Paul E. McKenney wrote:
> > > On Thu, Feb 27, 2025 at 06:44:15PM +0100, Uladzislau Rezki wrote:
> > > > On Thu, Feb 27,
Add GHCB call to register Secure AVIC guest APIC backing page
GPA with the hyperversior. This call ensures that guest APIC
backing page is pinned in NPT while vCPU is running.
Signed-off-by: Neeraj Upadhyay
---
tools/testing/selftests/kvm/include/x86/sev.h | 1 +
tools/testing/selftests/kvm/lib
Add provision to pass custom args to kvm_arch_vm_post_create().
This will be used to pass sev init args (vmsa features) for SEV VMs.
Signed-off-by: Neeraj Upadhyay
---
.../testing/selftests/kvm/include/kvm_util.h | 9 +++-
tools/testing/selftests/kvm/include/x86/sev.h | 3 ++
tools/testing/se
Currently, ghcb_alloc() always returns first entry. Fix
it to return an unused entry.
Signed-off-by: Neeraj Upadhyay
---
tools/testing/selftests/kvm/lib/x86/sev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/testing/selftests/kvm/lib/x86/sev.c
b/tools/testing/self
Extend SAVIC test to include various cross-vCPU IPI modes -
fixed dest, fixed-logical, broadcast-all, broadcast excluding
self.
Signed-off-by: Neeraj Upadhyay
---
tools/testing/selftests/kvm/x86/savic_test.c | 305 ++-
1 file changed, 299 insertions(+), 6 deletions(-)
diff --git
On Fri, Feb 28, 2025 at 04:29:04PM +1100, Alistair Popple wrote:
> On Thu, Feb 27, 2025 at 11:01:55AM +0100, Danilo Krummrich wrote:
> > On Thu, Feb 27, 2025 at 11:25:55AM +1100, Alistair Popple wrote:
>
> > > To be honest I don't really understand the utility here because the
> > > compile-time
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> It will be used by the vDSO selftests.
>
> Signed-off-by: Thomas Weißschuh
Reviewed-by: Vincenzo Frascino
> ---
> tools/include/uapi/linux/elf.h | 524
> +
> 1 file changed, 524 insertions(+)
>
> diff
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> limits.h is a widely used standard header.
> Missing it from nolibc requires adoption effort to port applications.
>
> Add a shim header which includes the global nolibc.h header.
> It makes all nolibc symbols available.
>
> Signed-off-by: Thomas
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> vdso_standalone_test_x86 provides its own ASM syscall wrappers and
> _start() implementation. The in-tree nolibc library already provides
> this functionality for multiple architectures. By making use of nolibc,
> the standalone testcase can be buil
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> nolibc does not provide sys/time.h and sys/auxv.h,
> instead their definitions are available unconditionally.
>
> Guard the includes so they are not attempted on nolibc.
>
> Signed-off-by: Thomas Weißschuh
Reviewed-by: Vincenzo Frascino
> ---
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> Some selftests need access to a full UAPI headers tree, for example when
> building with nolibc which heavily relies on UAPI headers.
> A reference to such a tree is available in the KHDR_INCLUDES variable,
> but there is currently no way to populat
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> The types are used by tools/testing/selftests/vDSO/parse_vdso.c.
> To be able to build the vDSO selftests without a libc dependency,
> add the types to the kernels own UAPI headers.
>
> Link:
> https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Co
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> vdso_standalone_test_x86 is the only user of vdso_init_from_auxv().
> Instead of combining the parsing the aux vector with the parsing of the
> vDSO, split them apart into getauxval() and the regular
> vdso_init_from_sysinfo_ehdr().
>
> The impleme
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> There are no users left.
>
> This also removes the usage of ElfXX_auxv_t,
> which is not formally standardized.
>
> Signed-off-by: Thomas Weißschuh
Reviewed-by: Vincenzo Frascino
> ---
> tools/testing/selftests/vDSO/parse_vdso.c | 14
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> To allow the usage of parse_vdso.c together with a limited libc like
> nolibc, use the kernels own elf.h and auxvec.h headers.
>
> Signed-off-by: Thomas Weißschuh
Reviewed-by: Vincenzo Frascino
> ---
> tools/testing/selftests/vDSO/Makefile
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> According to limits.h(2) ULONG_MAX is only guaranteed to expand to an
> expression, not a symbolic constant which can be evaluated by the
> preprocessor.
> Specifically the definition of ULONG_MAX from nolibc can no be evaluated
> by the preprocesso
Add a test_kfree_rcu_wq_destroy test to verify a kmem_cache_destroy()
from a workqueue context. The problem is that, before destroying any
cache the kvfree_rcu_barrier() is invoked to guarantee that in-flight
freed objects are flushed.
The _barrier() function queues and flushes its own internal wo
Currently kvfree_rcu() APIs use a system workqueue which is
"system_unbound_wq" to driver RCU machinery to reclaim a memory.
Recently, it has been noted that the following kernel warning can
be observed:
workqueue: WQ_MEM_RECLAIM nvme-wq:nvme_scan_work is flushing !WQ_MEM_RECLAIM
events_unbound
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> The definition is used by tools/testing/selftests/vDSO/parse_vdso.c.
> To be able to build the vDSO selftests without a libc dependency,
> add the definition to the kernels own UAPI headers.
>
> Link: https://refspecs.linuxfoundation.org/elf/gabi4+
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> The definitions are used by tools/testing/selftests/vDSO/parse_vdso.c.
> To be able to build the vDSO selftests without a libc dependency,
> add the definitions to the kernels own UAPI headers.
>
> Link: https://docs.oracle.com/cd/E19683-01/816-138
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> The types are used by tools/testing/selftests/vDSO/parse_vdso.c.
> To be able to build the vDSO selftests without a libc dependency,
> add the types to the kernels own UAPI headers.
>
> As documented by elf(5).
>
> Reviewed-by: Kees Cook
> Signed
Add idle halt entry and exit on pending events test for
Secure AVIC guests. Secure AVIC guests require idle halt
intercept to be enabled. Without idle halt intercept being
enabled, guest can block in halt forever as hv does not
have access to APIC_IRR state to check for pending events.
Signed-off-
From: Peter Gonda
Add GHCB management functionality similar to the ucall management.
Allows for selftest vCPUs to acquire GHCBs for their usage.
Cc: Vishal Annapurve
Cc: Ackerley Tng
Cc: Paolo Bonzini
Cc: Claudio Imbrenda
Cc: Sean Christopherson
Cc: Carlos Bilbao
Cc: Tom Lendacky
Cc: Mich
On Fri, Feb 28, 2025 at 6:29 AM Alistair Popple wrote:
>
> I'm not sure I agree it works perfectly fine. Developer ergonomics are
> an important aspect of any build environment, and I'd argue the ergonomic
> limitation for (2) means it is at least somewhat broken and needs fixing.
>
> Anyway thank
On Fri, 21 Feb 2025 at 19:26, Brendan Jackman wrote:
> nr_pages_per_cpu = bytes / page_size / nr_threads;
> if (!nr_pages_per_cpu) {
> - _err("invalid MiB");
> + _err("pages_per_cpu = 0, cannot test (%lu / %lu / %lu)",
> + nr_pages_
On 26/02/2025 11:44, Thomas Weißschuh wrote:
> Some unnecessary headers are included, remove them.
>
> Signed-off-by: Thomas Weißschuh
Reviewed-by: Vincenzo Frascino
> ---
> tools/testing/selftests/vDSO/vdso_test_gettimeofday.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/too
Extend SAVIC test with various NMI tests:
- Test NMI injection failure when AllowedNMI is not set
by guest.
- Test NMI injection when 2 NMIs are pending.
- Test ICR based cross-VCPU NMI for fixed-phys, fixed-logical,
broadcast-all and broadcast-exclself modes.
Signed-off-by: Neeraj Upadhyay
Add a APIC regs to verify APIC register updates at various
stages in Secure AVIC guest's APIC enablement. In summary,
do below validations:
- Verify that the initial reset of APIC is xapic.
- Values written by SAVIC guest in xapic mode are propagated
to host APIC state.
- APIC regs state updates
1 - 100 of 109 matches
Mail list logo