x86/domain: Fix build with GCC 4.3.x
PATCH 1/1 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 <[email protected]>
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
--- xen/arch/x86/domain.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
xen/arch/x86/domain.c +2 -3
@@ -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 ;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 4 lines · Andrew Cooper
GCC 4.3.x can't initialise the
user_regsstructure like this.Reported-by Jan Beulich <[email protected]>Signed-off-by Andrew Cooper <[email protected]>
Reviewed-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Jan Beulich
Acked-byQuoted 8 lines
Quoted 1 line
Quoted 1 line · On 29.10.18 at 12:53, <[email protected]> wrote:
Quoted 4 lines · Andrew Cooper
GCC 4.3.x can't initialise the
user_regsstructure like this.Reported-by Jan Beulich <[email protected]>Signed-off-by Andrew Cooper <[email protected]>Reviewed-by Wei Liu <[email protected]>
Acked-by Jan Beulich <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel