All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Cc: Eric Auger <eauger@redhat.com>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	oliver.upton@linux.dev, joey.gouly@arm.com,
	suzuki.poulose@arm.com, yuzenghui@huawei.com, seanjc@google.com,
	darren@os.amperecomputing.com
Subject: Re: [RFC PATCH v2 0/9] KVM: Enable Nested Virt selftests
Date: Fri, 25 Jul 2025 11:59:52 +0100	[thread overview]
Message-ID: <86ecu48riv.wl-maz@kernel.org> (raw)
In-Reply-To: <ccd8caba-95b9-450e-afb1-deb0c42b781b@os.amperecomputing.com>

On Fri, 25 Jul 2025 11:01:05 +0100,
Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> wrote:
> 
> 
> Hi Marc,
> 
> On 6/23/2025 7:41 PM, Marc Zyngier wrote:
> > On Mon, 23 Jun 2025 11:31:32 +0100,
> > Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> wrote:
> >> 
> >> On 6/19/2025 5:15 PM, Marc Zyngier wrote:
> >>>>    >
> >>>>> Also, running EL2 is the least of our worries, because that's pretty
> >>>>> easy to deal with. It is running at EL1/0 when EL2 is present that is
> >>>>> interesting, and I see no coverage on that front.
> >>>> 
> >>>> Sorry, I did not get this comment fully.
> >>>> When we run selftest on Host with -g option, the guest code will run in vEL2 as L1.
> >>>> This is implemented as per comment in V1.
> >>>> 
> >>>> When we run same selftest from L1 shell, then guest_code will be running in EL0/1 like running from L0.
> >>> 
> >>> What good does this bring us if we need to boot a full guest OS to run
> >>> tests? What we need is synthetic tests that implement the whole stack:
> >>> 
> >>> - L1 guest hypervisor
> >>> - L2 guest hypervisor
> >>> - L2 guest
> >>> - L3 guest hypervisor
> >>> - L3 guest
> >>> - [...]
> >> 
> >> IIUC, selftest leverages host OS support and uses various IOCTLs to
> >> support the guest_code run. Are you saying to implement all this
> >> again (without OS help) in guest_code to run it as hypervisor and
> >> launch guest_code2 as NestedVM?.
> > 
> > The whole point of having small selftests is to run something that is
> > simpler several orders of magnitude simpler than the full blown
> > OS/hypervisor. So indeed, I'm asking for selftests that build chains
> > of guests up to some level and verify that the nesting, as described
> > in the architecture, works correctly.
> > 
> 
> Do you see value in the patches as they are, without the changes to
> support the bare-metal hypervisor in guest or will you only consider
> them if they are first reworked to support the recursive guests?

Running existing tests at EL2 may an interesting goal, but the way
you've gone about it is really wrong. These tests are not about
"nested", they are about running at EL2. So getting rid of all the
"nested" nonsense in patch #1 and focusing on the *two* flavours of
EL2 would be a good start.

Also, EL2 tests shouldn't be optional. If EL2 is available, the test
should run, without any option, and things like

+	if (is_nested)
+		vm = nv_vm_create_with_vcpus_gic(1, &vcpu, &gic_fd, guest_main);
+	else
+		vm = vm_create_with_one_vcpu(&vcpu, guest_main);

are just non-starters. You just need to either get rid of the whole
vm_create_with_one_vcpu() nonsense, or teach it to take an execution
context.

But the real NV tests are not optional either. They need to happen,
and I don't have the confidence that they will if I agree to what you
are suggesting. Because it's been months since I asked for these
things, and not much has happened in the interval.

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2025-07-25 10:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 10:52 [RFC PATCH v2 0/9] KVM: Enable Nested Virt selftests Ganapatrao Kulkarni
2025-05-12 10:52 ` [RFC PATCH v2 1/9] KVM: arm64: nv: selftests: Add support to run guest code in vEL2 Ganapatrao Kulkarni
2025-05-28 13:33   ` Eric Auger
2025-05-28 23:39   ` [PATCH RFC " Itaru Kitayama
2025-05-29  9:04     ` Eric Auger
2025-05-29 11:50   ` [RFC PATCH " Marc Zyngier
2025-05-12 10:52 ` [RFC PATCH v2 2/9] KVM: arm64: nv: selftests: Add simple test " Ganapatrao Kulkarni
2025-06-09  3:14   ` Itaru Kitayama
2025-05-12 10:52 ` [RFC PATCH v2 3/9] KVM: arm64: nv: selftests: Enable hypervisor timer tests to run " Ganapatrao Kulkarni
2025-05-28 13:58   ` Eric Auger
2025-05-12 10:52 ` [RFC PATCH v2 4/9] KVM: arm64: nv: selftests: enable aarch32_id_regs test " Ganapatrao Kulkarni
2025-05-12 10:52 ` [RFC PATCH v2 5/9] KVM: arm64: nv: selftests: Enable vgic tests " Ganapatrao Kulkarni
2025-05-12 10:52 ` [RFC PATCH v2 6/9] KVM: arm64: nv: selftests: Enable set_id_regs test " Ganapatrao Kulkarni
2025-05-12 10:52 ` [RFC PATCH v2 7/9] KVM: arm64: nv: selftests: Enable " Ganapatrao Kulkarni
2025-05-12 10:52 ` [RFC PATCH v2 8/9] KVM: selftests: arm64: Extend kvm_page_table_test to run guest code " Ganapatrao Kulkarni
2025-06-02  6:04   ` Itaru Kitayama
2025-06-02 15:38     ` Marc Zyngier
2025-05-12 10:52 ` [RFC PATCH v2 9/9] KVM: arm64: nv: selftests: Enable page_fault_test test to run " Ganapatrao Kulkarni
2025-05-28 13:28 ` [RFC PATCH v2 0/9] KVM: Enable Nested Virt selftests Eric Auger
2025-05-29 10:29   ` Ganapatrao Kulkarni
2025-05-29 11:48     ` Marc Zyngier
2025-06-19  9:40       ` Ganapatrao Kulkarni
2025-06-19 11:45         ` Marc Zyngier
2025-06-23 10:31           ` Ganapatrao Kulkarni
2025-06-23 14:11             ` Marc Zyngier
2025-07-25 10:01               ` Ganapatrao Kulkarni
2025-07-25 10:59                 ` Marc Zyngier [this message]
2025-05-30 17:49 ` Miguel Luis
2025-05-30 21:32 ` Oliver Upton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ecu48riv.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=darren@os.amperecomputing.com \
    --cc=eauger@redhat.com \
    --cc=gankulkarni@os.amperecomputing.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=seanjc@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.