Re: [PATCH v2 2/3] x86/emul: Rename the x86_seg_* system segments

Andrew Cooper <[email protected]>
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
On 18/08/2026 7:31 am, Jan Beulich wrote:
> On 17.08.2026 14:11, Andrew Cooper wrote:
>> @@ -131,18 +131,21 @@ int arch_set_info_hvm_guest(struct vcpu *v, const struct vcpu_hvm_context *ctx)
>>  #define SEG(s, r) ({                                                        \
>>      s = (struct segment_register)                                           \
>>          { 0, { (r)->s ## _ar }, (r)->s ## _limit, (r)->s ## _base };        \
>> -    /* Set accessed / busy bit for present segments. */                     \
>> +    /* Set accessed bit for present segments. */                            \
>>      if ( (s).p )                                                            \
>> -        (s).type |= (x86_seg_ ## s != x86_seg_tr ? 1 : 2);                  \
> From this, ...
>
>> +        (s).type |= 2;                                                      \
> ... this wants to be 1, while ...
>
>>      check_segment(&(s), x86_seg_ ## s); })
>>  
>>          rc = SEG(cs, regs);
>>          rc |= SEG(ds, regs);
>>          rc |= SEG(ss, regs);
>>          rc |= SEG(es, regs);
>> -        rc |= SEG(tr, regs);
>>  #undef SEG
>>  
>> +        tr = (struct segment_register){
>> +            0, { regs->tr_ar | 1 /* Busy */ }, regs->tr_limit, regs->tr_base };
> ... this wants to be 2.

Yes, I did spot that just after sending.  I thought I emailed out, but
clearly didn't.

>  Then:
> Reviewed-by: Jan Beulich <[email protected]>

Thanks.

~Andrew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.