hi Julien,

04.06.24 14:07, Julien Grall:
So this match the existing code. But I am not fully convinced that this is the right approach. Arch_vcpu_ioreq_completion is not meant to change across boot (or even at compile time for Arm).

Reading the previous thread, I think something like below would work:

static arch_vcpu_ioreq_completion(...)
{
#ifdef CONFIG_VMX
/* Existing code */
#else
ASSERT_UNREACHABLE();
return true;
#endif
}

If we want to avoid stub, then I think it would be better to use

#ifdef CONFIG_VMX
staticĀ  arch_vcpu_ioreq...
{
}
#endif CONFIG_VMX

Then in the x86 header.

#ifdef CONFIG_VMX
static arch_vcpu_ioreq..();
#define arch_vcpu_ioreq...
#endif

And then in common/ioreq.c

#ifdef arch_vcpu_ioreq
res = arch_vcpu_ioreq(...)
#else
ASSERT_UNREACHABLE();
#endif

Thank you for taking a look and a suggestion. I agree that it's all related to compile time configuration and not a runtime.

I'll rewrite the patch and let's see how it looks like.

  -Sergiy

Reply via email to