On Tue, Aug 26, 2025 at 11:51:18AM -0700, Sean Christopherson wrote: > On Mon, Aug 25, 2025, Oliver Upton wrote: > > The majority of selftests don't even need an irqchip anyway. > > But it's really, really nice for developers if they can assume a certain > level of > configuration is done by the infrastructure, i.e. don't have worry about doing > what is effectively "basic" VM setup.
The more we pile behind what a "basic" VM configuration is the less expressive the tests become. Being able to immediately grok the *intent* of a test from reading it first pass is a very good thing. Otherwise I need to go figure out what the definition of "basic" means when I need to write a test and decide if that is compatible with what I'm trying to do. vm_create_with_irqchip() is delightfully unambiguous. > E.g. x86 selftests creates an IRQCHIP, sets up descriptor tables and exception > handlers, and a handful of other "basic" things, and that has eliminated soooo > much boilerplate code and the associated friction with having to know/discover > that e.g. sending IRQs in a test requires additional setup beyond the obvious > steps like wiring up a handler. That simply isn't going to happen on arm64. On top of the fact that the irqchip configuration depends on the intent of the test (e.g. wired IRQs v. MSIs), there's a bunch of guest-side initialization that needs to happen too. We can add an extremely barebones GIC when asked for (although guest init isn't addressed) but batteries are not included on this architecture and I'd rather not attempt to abstract that. Thanks, Oliver