[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 13/20] xen/riscv: introduce (de)initialization helpers for vINTC





On 9/3/26 11:20 AM, Jan Beulich wrote:
On 27.08.2026 17:19, Oleksii Kurochko wrote:
Add common helpers domain_vintc_init() and domain_vintc_deinit() to
allocate and deallocate a virtual interrupt controller (vINTC)
structure and initialize basic virtual interrupt controller registers.

domain_vintc_deinit() isn't called at the moment as arch_domain_destroy()
is implemented as stub at the moment.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
Changes in v8:
  - Add call of domain_vintc_deinit() to arch_domain_destroy().

Why only there? With ...

@@ -308,6 +310,9 @@ int arch_domain_create(struct domain *d,
      if ( (rc = p2m_init(d, config)) != 0)
          goto fail;
+ if ( (rc = domain_vintc_init(d)) )
+        goto fail;
+
      return rc;

... anything added between the newly added code and the return, ...

   fail:

... you will also need to call it here. Since it is (supposed to remain)
idempotent, I think you'd better add that call right away (as long as
domain_create() calls arch_domain_destroy() only when
arch_domain_create() succeeded).

arch_domain_destroy() (where domain_vintc_deinit() is called) is invoked from arch_domain_create() if arch_domain_create() fails.

So, the mentioned case is already covered. Am I missing something?

Then:
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Thanks.

~ Oleksii



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.