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

Re: [PATCH v2 15/39] xen/riscv: add IMSIC vCPU context switch handlers





On 9/10/26 4:57 PM, Jan Beulich wrote:
On 27.08.2026 17:20, Oleksii Kurochko wrote:
--- a/xen/arch/riscv/vaplic.c
+++ b/xen/arch/riscv/vaplic.c
@@ -422,6 +422,13 @@ static const struct mmio_handler_ops vaplic_mmio_ops = {
  static const struct vintc_ops vintc_ops = {
      .vcpu_init = vcpu_imsic_init,
      .vcpu_deinit = vcpu_imsic_deinit,
+    /*
+     * MSI delivery is the only supported mode: aplic_init() panics on an
+     * APLIC without an "msi-parent", so the vAPLIC state to save and restore
+     * is always the IMSIC one.
+     */
+    .ctxt_switch_from = imsic_ctxt_switch_from,
+    .ctxt_switch_to = imsic_ctxt_switch_to,
  };

As previously expressed, I'm not happy with comments like this. aplic_init()
isn't related to vAPLIC behavior. We're doing virtualization, so at least
conceptually host and guest behavior want properly separating. Then it may
still be that for the time being only a certain subset of possibilities is
supported.

I will drop the part "aplic_init() panics on an APLIC without an "msi-parent". It is really not very relevant here.

Thanks.

~ Oleksii



 


Rackspace

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