x86/hvm: fix arch_set_info_hvm_guest SEG macro
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 9 Aug 2017 10:18:20 +0000 (11:18 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 9 Aug 2017 10:24:48 +0000 (11:24 +0100)
Commit 6c9abf0e802 modified the SEG macro in arch_set_info_hvm_guest and
inverted the limit and base fields. Restore the correct order.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/domain.c

index 7e11541089648eeeba75e9ddd132877750793913..60474649de7bbab533e0720f3b0866dc0050bd90 100644 (file)
@@ -137,7 +137,7 @@ int arch_set_info_hvm_guest(struct vcpu *v, const vcpu_hvm_context_t *ctx)
 
 #define SEG(s, r) ({                                                        \
     s = (struct segment_register)                                           \
-        { 0, { (r)->s ## _ar }, (r)->s ## _base, (r)->s ## _limit };        \
+        { 0, { (r)->s ## _ar }, (r)->s ## _limit, (r)->s ## _base };        \
     /* Set accessed / busy bit for present segments. */                     \
     if ( s.p )                                                              \
         s.type |= (x86_seg_##s != x86_seg_tr ? 1 : 2);                      \