[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v4 12/14] x86/ioreq: guard VIO_realmode_completion with CONFIG_VMX
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
- Date: Fri, 12 Jul 2024 11:03:33 +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=arcselector10001; 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=J3PBS7FsMK7CjdCm2JWDE3hC69vUYNvHJ8MLPYv8/pY=; b=CuhTvRAlv0r/5muBsqF9aWry6tDBk7nZWkVr6nM68OdS5QWXsy6MfGJMsvSJflgoOIwnp1iySVo7KgKBFVUUFSQmDZM/jOYhlD3QQnY6xNxx70IfbtVDzJfHxuB9Hi2Wt7Gk7IPZfzNT/G6p8UNiDuScOnhuDkWurbRy00lKfh+IGlg+3FBzunXcngVRhEwJvDUIRTWrLLJraHRBkUvFFFVPuVBvRZOETFy0cnLrNkPPtXOfFtGh/Jt4Q0YHfandozoQDrDDDZUq670O8ks6MKWbs9CsFbn4UZV+625qDG87X0cV0cGCs8Xwl6L/CmgCg2aNUgp7lgyRL7I8PAlesQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SF94b1EGXomeU+co6LyQ1fjJQYh1ZODWKdZpC8AlF42DTR2+4kcYqH9O5uPPHYYkihejGOG676fC92m/1DA43+x5b/vveb/nCJm5U8bdVPW625AdGzOv/e1/W+dLMn3ROfZt3b9GadwohVEQHoJUJ6fFztOyl21PQdCT7uL4M5iJgmGadJrafJVgmKWq90ZD3U/juzIc5NlhUn7i2kcue8TemBj+q4qhJZs9+9QzGx5LbWXPWHhwkNhyc6THRvNoBFYsmxMS+k+SQy8yb9qxh0h3V3dhgPhj8UQzQKMtahS5m6LydfAA0cKl3NXi0HL8lCm4H6ObaIYAC2Ki4gei1g==
- 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 12 Jul 2024 08:04:00 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
10.07.24 13:19, Jan Beulich:
looking through these changes once again I wonder why can't we just move
stub to the header like this:
in xen/include/xen/ioreq.h:
#ifdef arch_vcpu_ioreq_completion
#ifdef CONFIG_VMX
bool arch_vcpu_ioreq_completion(enum vio_completion completion);
#else
static inline bool arch_vcpu_ioreq_completion(enum vio_completion
completion)
{
ASSERT_UNREACHABLE();
return true;
}
#endif
and avoid additional pre-processor variables & conditionals, because it
looks like we do need some kind of stub that does ASSERT_UNREACHABLE()
anyway.
That's possible to do, yes, but not as long as you key it off of CONFIG_VMX.
This arch-specific setting would better not be used in a common code header.
You could introduce a helper CONFIG_* which VMX selects, at which point
doing what you suggest is an option.
ok, I'll try this option in next series, lets see how it will look
However, in what you have above I can't figure why "#ifdef
arch_vcpu_ioreq_completion" is still there.
disregard it please, a copy-paste error
-Sergiy
|