p***@xen.org
2018-11-04 05:04:14 UTC
commit 0a1fa635029d100d4b6b7eddb31d49603217cab7
Author: Andrew Cooper <***@citrix.com>
AuthorDate: Mon Oct 29 11:29:54 2018 +0000
Commit: Andrew Cooper <***@citrix.com>
CommitDate: Tue Oct 30 13:26:21 2018 +0000
x86/domain: Fix build with GCC 4.3.x
GCC 4.3.x can't initialise the user_regs structure like this.
Reported-by: Jan Beulich <***@suse.com>
Signed-off-by: Andrew Cooper <***@citrix.com>
Reviewed-by: Wei Liu <***@citrix.com>
Acked-by: Jan Beulich <***@suse.com>
---
xen/arch/x86/domain.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index d63b71c9f9..19692e2193 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -326,9 +326,8 @@ void free_vcpu_struct(struct vcpu *v)
/* Initialise various registers to their architectural INIT/RESET state. */
void arch_vcpu_regs_init(struct vcpu *v)
{
- v->arch.user_regs = (typeof(v->arch.user_regs)){
- .rflags = X86_EFLAGS_MBS,
- };
+ memset(&v->arch.user_regs, 0, sizeof(v->arch.user_regs));
+ v->arch.user_regs.eflags = X86_EFLAGS_MBS;
memset(v->arch.debugreg, 0, sizeof(v->arch.debugreg));
v->arch.debugreg[6] = X86_DR6_DEFAULT;
--
generated by git-patchbot for /home/xen/git/xen.git#master
Author: Andrew Cooper <***@citrix.com>
AuthorDate: Mon Oct 29 11:29:54 2018 +0000
Commit: Andrew Cooper <***@citrix.com>
CommitDate: Tue Oct 30 13:26:21 2018 +0000
x86/domain: Fix build with GCC 4.3.x
GCC 4.3.x can't initialise the user_regs structure like this.
Reported-by: Jan Beulich <***@suse.com>
Signed-off-by: Andrew Cooper <***@citrix.com>
Reviewed-by: Wei Liu <***@citrix.com>
Acked-by: Jan Beulich <***@suse.com>
---
xen/arch/x86/domain.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index d63b71c9f9..19692e2193 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -326,9 +326,8 @@ void free_vcpu_struct(struct vcpu *v)
/* Initialise various registers to their architectural INIT/RESET state. */
void arch_vcpu_regs_init(struct vcpu *v)
{
- v->arch.user_regs = (typeof(v->arch.user_regs)){
- .rflags = X86_EFLAGS_MBS,
- };
+ memset(&v->arch.user_regs, 0, sizeof(v->arch.user_regs));
+ v->arch.user_regs.eflags = X86_EFLAGS_MBS;
memset(v->arch.debugreg, 0, sizeof(v->arch.debugreg));
v->arch.debugreg[6] = X86_DR6_DEFAULT;
--
generated by git-patchbot for /home/xen/git/xen.git#master