qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hvf: Fix segment selector format


From: Roman Bolshakov
Subject: Re: [PATCH] hvf: Fix segment selector format
Date: Wed, 18 Nov 2020 19:25:40 +0300

On Mon, Nov 16, 2020 at 08:04:14PM +0000, Jessica Clarke wrote:
> The Requested Privilege Level field is 2 bits, the Table Indicator field
> is 1 bit and the Index field is the remaining 15 bits, with TI=0 meaning
> GDT and TI=1 meaning LDT.
> 
> Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
> ---
>  target/i386/hvf/x86.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/target/i386/hvf/x86.h b/target/i386/hvf/x86.h
> index bacade7b65..ea3e1b86b3 100644
> --- a/target/i386/hvf/x86.h
> +++ b/target/i386/hvf/x86.h
> @@ -214,16 +214,16 @@ static inline uint32_t 
> x86_call_gate_offset(x86_call_gate *gate)
>      return (uint32_t)((gate->offset1 << 16) | gate->offset0);
>  }
>  
> -#define LDT_SEL     0
> -#define GDT_SEL     1
> +#define GDT_SEL     0
> +#define LDT_SEL     1
>  
>  typedef struct x68_segment_selector {
>      union {
>          uint16_t sel;
>          struct {
> -            uint16_t rpl:3;
> +            uint16_t rpl:2;
>              uint16_t ti:1;
> -            uint16_t index:12;
> +            uint16_t index:13;
>          };
>      };
>  } __attribute__ ((__packed__)) x68_segment_selector;
> -- 
> 2.28.0
> 

Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>

Thanks,
Roman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]