From: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
To: xen-devel@lists.xenproject.org
Cc: "Xenia Ragiadakou" <burzalodowa@gmail.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"George Dunlap" <george.dunlap@citrix.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Xenia Ragiadakou" <xenia.ragiadakou@amd.com>,
"Sergiy Kibrik" <Sergiy_Kibrik@epam.com>
Subject: [XEN PATCH v2 13/15] x86/ioreq: guard VIO_realmode_completion with CONFIG_VMX
Date: Wed, 15 May 2024 12:24:42 +0300 [thread overview]
Message-ID: <9e64fa33b298f789d8340cf1046a9fbf683dd2b7.1715761386.git.Sergiy_Kibrik@epam.com> (raw)
In-Reply-To: <cover.1715761386.git.Sergiy_Kibrik@epam.com>
From: Xenia Ragiadakou <burzalodowa@gmail.com>
VIO_realmode_completion is specific to vmx realmode, so guard the completion
handling code with CONFIG_VMX. Also, guard VIO_realmode_completion itself by
CONFIG_VMX, instead of generic CONFIG_X86.
No functional change intended.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
---
changes in v1:
- put VIO_realmode_completion enum under #ifdef CONFIG_VMX
---
xen/arch/x86/hvm/emulate.c | 2 ++
xen/arch/x86/hvm/ioreq.c | 2 ++
xen/include/xen/sched.h | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index ab1bc51683..d60b1f6f4d 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -2667,7 +2667,9 @@ static int _hvm_emulate_one(struct hvm_emulate_ctxt *hvmemul_ctxt,
break;
case VIO_mmio_completion:
+#ifdef CONFIG_VMX
case VIO_realmode_completion:
+#endif
BUILD_BUG_ON(sizeof(hvio->mmio_insn) < sizeof(hvmemul_ctxt->insn_buf));
hvio->mmio_insn_bytes = hvmemul_ctxt->insn_buf_bytes;
memcpy(hvio->mmio_insn, hvmemul_ctxt->insn_buf, hvio->mmio_insn_bytes);
diff --git a/xen/arch/x86/hvm/ioreq.c b/xen/arch/x86/hvm/ioreq.c
index 4eb7a70182..b37bbd660b 100644
--- a/xen/arch/x86/hvm/ioreq.c
+++ b/xen/arch/x86/hvm/ioreq.c
@@ -33,6 +33,7 @@ bool arch_vcpu_ioreq_completion(enum vio_completion completion)
{
switch ( completion )
{
+#ifdef CONFIG_VMX
case VIO_realmode_completion:
{
struct hvm_emulate_ctxt ctxt;
@@ -43,6 +44,7 @@ bool arch_vcpu_ioreq_completion(enum vio_completion completion)
break;
}
+#endif
default:
ASSERT_UNREACHABLE();
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 132b841995..50a58fe428 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -152,7 +152,7 @@ enum vio_completion {
VIO_no_completion,
VIO_mmio_completion,
VIO_pio_completion,
-#ifdef CONFIG_X86
+#ifdef CONFIG_VMX
VIO_realmode_completion,
#endif
};
--
2.25.1
next prev parent reply other threads:[~2024-05-15 9:24 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 8:57 [XEN PATCH v2 00/15] x86: make cpu virtualization support configurable Sergiy Kibrik
2024-05-15 8:59 ` [XEN PATCH v2 01/15] x86: introduce AMD-V and Intel VT-x Kconfig options Sergiy Kibrik
2024-05-16 10:09 ` Jan Beulich
2024-05-15 9:01 ` [XEN PATCH v2 02/15] x86/monitor: guard altp2m usage Sergiy Kibrik
2024-05-16 0:29 ` Stefano Stabellini
2024-05-16 10:20 ` Jan Beulich
2024-05-15 9:03 ` [XEN PATCH v2 03/15] x86/p2m: guard altp2m routines Sergiy Kibrik
2024-05-16 0:31 ` Stefano Stabellini
2024-05-16 10:26 ` Jan Beulich
2024-05-15 9:06 ` [XEN PATCH v2 04/15] x86/p2m: move altp2m-related code to separate file Sergiy Kibrik
2024-05-16 0:35 ` Stefano Stabellini
2024-05-16 11:46 ` Jan Beulich
2024-05-16 10:37 ` Jan Beulich
2024-05-15 9:08 ` [XEN PATCH v2 05/15] x86: introduce CONFIG_ALTP2M Kconfig option Sergiy Kibrik
2024-05-16 0:33 ` Stefano Stabellini
2024-05-16 10:41 ` Jan Beulich
2024-05-18 1:07 ` Tamas K Lengyel
2024-05-15 9:10 ` [XEN PATCH v2 06/15] x86/p2m: guard altp2m code with CONFIG_ALTP2M option Sergiy Kibrik
2024-05-16 0:38 ` Stefano Stabellini
2024-05-16 10:55 ` Jan Beulich
2024-05-16 11:01 ` Jan Beulich
2024-05-23 10:44 ` Sergiy Kibrik
2024-05-23 14:43 ` Jan Beulich
2024-05-15 9:12 ` [XEN PATCH v2 07/15] x86: guard cpu_has_{svm/vmx} macros with CONFIG_{SVM/VMX} Sergiy Kibrik
2024-05-16 0:38 ` Stefano Stabellini
2024-05-16 11:12 ` Jan Beulich
2024-05-23 13:07 ` Sergiy Kibrik
2024-05-23 14:50 ` Jan Beulich
2024-05-23 23:36 ` Stefano Stabellini
2024-05-24 6:49 ` Jan Beulich
2024-05-27 10:27 ` Sergiy Kibrik
2024-05-27 10:49 ` Jan Beulich
2024-05-15 9:14 ` [XEN PATCH v2 08/15] x86/vpmu: guard vmx/svm calls with cpu_has_{vmx,svm} Sergiy Kibrik
2024-05-16 0:44 ` Stefano Stabellini
2024-05-16 7:25 ` Jan Beulich
2024-05-16 11:23 ` Jan Beulich
2024-05-15 9:16 ` [XEN PATCH v2 09/15] x86/traps: clean up superfluous #idef-s Sergiy Kibrik
2024-05-16 0:45 ` Stefano Stabellini
2024-05-15 9:18 ` [XEN PATCH v2 10/15] x86/domain: " Sergiy Kibrik
2024-05-16 0:46 ` Stefano Stabellini
2024-05-15 9:20 ` [XEN PATCH v2 11/15] x86/oprofile: guard svm specific symbols with CONFIG_SVM Sergiy Kibrik
2024-05-15 9:22 ` [XEN PATCH v2 12/15] x86/vmx: guard access to cpu_has_vmx_* in common code Sergiy Kibrik
2024-05-16 0:50 ` Stefano Stabellini
2024-05-16 7:32 ` Jan Beulich
2024-05-15 9:24 ` Sergiy Kibrik [this message]
2024-05-16 0:51 ` [XEN PATCH v2 13/15] x86/ioreq: guard VIO_realmode_completion with CONFIG_VMX Stefano Stabellini
2024-05-16 12:11 ` Jan Beulich
2024-05-15 9:26 ` [XEN PATCH v2 14/15] iommu/vt-d: guard vmx_pi_hooks_* calls with cpu_has_vmx Sergiy Kibrik
2024-05-16 0:54 ` Stefano Stabellini
2024-05-16 7:37 ` Jan Beulich
2024-05-16 23:41 ` Stefano Stabellini
2024-05-16 12:15 ` Jan Beulich
2024-05-15 9:28 ` [XEN PATCH v2 15/15] x86/hvm: make AMD-V and Intel VT-x support configurable Sergiy Kibrik
2024-05-16 0:54 ` Stefano Stabellini
2024-05-16 12:17 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e64fa33b298f789d8340cf1046a9fbf683dd2b7.1715761386.git.Sergiy_Kibrik@epam.com \
--to=sergiy_kibrik@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=burzalodowa@gmail.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
--cc=xenia.ragiadakou@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).