[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v3 14/16] ioreq: make arch_vcpu_ioreq_completion() an optional callback
- To: Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
- Date: Wed, 5 Jun 2024 10:55:27 +0300
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rs645B1pau1J19eF6GkovdydEBouVGJHTXTuW79/Qj4=; b=JUO0qudGSKtVuAKCbFzyx5i+PkAJtL5UAgKmzgJ+aCZ7YqIt3EgWcO7SI504sWpupvuCql/QRQ3F0t03+KFKy/Elz8FPt5dPM9I1hA9TDM/h7UVFLnRy4cpYgfG+dFZo5bpZCd+2+6hF1X5GyrUTy2/LpbTR+6owKZKjHh3R0QpPhBnnNNKtiqfWieOEHphvRWhHB1yF9B2+v/Dj+aENOM84DZlwIz6Ej6eJtYXggv3oRIWtysVgtbWHY+MYW+QH+hYtXRfxd2krZ5x+RLuDmTdXcqXUoIVK/+SJOeViDoeailD9/Sy78a00BTgvUko3M71MyZbS8jKWTiGvJoJS5w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N130QbYABJePCtyJtX0p8Z9GVMN8j5/cyYS7L3iDL+9FnEbnGYzvgj/EID9SST5Dai3KQMyA9Gbmi8PFAI0QDLM1u8+3Etfuqr5wf/JVvqfbQoVo2QDn2tmWuvPXz5FaytwSllKee9DyP4oBBPOGMjMcVO7Nuevv6vPwm0tm99wnKC3fDfl/RKtFouuE4+AWyQFjYqqiXWCKJRqf1bCXyjWloWITie64oLZ1q69feVScvQvg8bGbosdN/WawSKgE7gsY95Ewd6Waed95jxZhDdMQ0dFjwjrClLTHLsIwwoGG1PdIrK17AmkCCn0I/UVV2ddRWtya044jf9Gok3xPuA==
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>
- Delivery-date: Wed, 05 Jun 2024 07:55:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|