p***@xen.org
2018-11-04 05:03:23 UTC
commit 079df73c0a5b4b09b71044091d65a986452d829c
Author: Wei Liu <***@citrix.com>
AuthorDate: Fri Oct 19 15:28:28 2018 +0100
Commit: Wei Liu <***@citrix.com>
CommitDate: Sun Oct 28 20:01:58 2018 +0000
x86: put some code in arch_set_info_guest under CONFIG_PV
This function is called by both PV and HVM. Unfortunately the code is
very convoluted. We can reason that code between the call to
hvm_set_info_guest and out label is PV only. Put that portion under
CONFIG_PV.
Signed-off-by: Wei Liu <***@citrix.com>
Acked-by: Jan Beulich <***@suse.com>
---
xen/arch/x86/domain.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 6f19fbfe69..d63b71c9f9 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -791,11 +791,15 @@ int arch_set_info_guest(
struct vcpu *v, vcpu_guest_context_u c)
{
struct domain *d = v->domain;
+ unsigned int i;
+ unsigned long flags;
+ bool compat;
+#ifdef CONFIG_PV
unsigned long cr3_gfn;
struct page_info *cr3_page;
- unsigned long flags, cr4;
- unsigned int i;
- int rc = 0, compat;
+ unsigned long cr4;
+ int rc = 0;
+#endif
/* The context is a compat-mode one if the target domain is compat-mode;
* we expect the tools to DTRT even in compat-mode callers. */
@@ -889,6 +893,7 @@ int arch_set_info_guest(
goto out;
}
+#ifdef CONFIG_PV
/* IOPL privileges are virtualised. */
v->arch.pv.iopl = v->arch.user_regs.eflags & X86_EFLAGS_IOPL;
v->arch.user_regs.eflags &= ~X86_EFLAGS_IOPL;
@@ -1154,6 +1159,7 @@ int arch_set_info_guest(
paging_update_paging_modes(v);
update_cr3(v);
+#endif /* CONFIG_PV */
out:
if ( flags & VGCF_online )
--
generated by git-patchbot for /home/xen/git/xen.git#master
Author: Wei Liu <***@citrix.com>
AuthorDate: Fri Oct 19 15:28:28 2018 +0100
Commit: Wei Liu <***@citrix.com>
CommitDate: Sun Oct 28 20:01:58 2018 +0000
x86: put some code in arch_set_info_guest under CONFIG_PV
This function is called by both PV and HVM. Unfortunately the code is
very convoluted. We can reason that code between the call to
hvm_set_info_guest and out label is PV only. Put that portion under
CONFIG_PV.
Signed-off-by: Wei Liu <***@citrix.com>
Acked-by: Jan Beulich <***@suse.com>
---
xen/arch/x86/domain.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 6f19fbfe69..d63b71c9f9 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -791,11 +791,15 @@ int arch_set_info_guest(
struct vcpu *v, vcpu_guest_context_u c)
{
struct domain *d = v->domain;
+ unsigned int i;
+ unsigned long flags;
+ bool compat;
+#ifdef CONFIG_PV
unsigned long cr3_gfn;
struct page_info *cr3_page;
- unsigned long flags, cr4;
- unsigned int i;
- int rc = 0, compat;
+ unsigned long cr4;
+ int rc = 0;
+#endif
/* The context is a compat-mode one if the target domain is compat-mode;
* we expect the tools to DTRT even in compat-mode callers. */
@@ -889,6 +893,7 @@ int arch_set_info_guest(
goto out;
}
+#ifdef CONFIG_PV
/* IOPL privileges are virtualised. */
v->arch.pv.iopl = v->arch.user_regs.eflags & X86_EFLAGS_IOPL;
v->arch.user_regs.eflags &= ~X86_EFLAGS_IOPL;
@@ -1154,6 +1159,7 @@ int arch_set_info_guest(
paging_update_paging_modes(v);
update_cr3(v);
+#endif /* CONFIG_PV */
out:
if ( flags & VGCF_online )
--
generated by git-patchbot for /home/xen/git/xen.git#master