qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Jessica Clarke <jrtc27@jrtc27.com>
Subject: [PULL 6/7] hvf: Fix segment selector format
Date: Wed, 18 Nov 2020 11:19:39 +0100	[thread overview]
Message-ID: <20201118101940.132594-7-pbonzini@redhat.com> (raw)
In-Reply-To: <20201118101940.132594-1-pbonzini@redhat.com>

From: Jessica Clarke <jrtc27@jrtc27.com>

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>
Message-Id: <20201116200414.28286-1-jrtc27@jrtc27.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.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 9e2c0039e6..782664c2ea 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




  parent reply	other threads:[~2020-11-18 10:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18 10:19 [PULL 0/7] HVF and Windows changes for QEMU 5.2-rc Paolo Bonzini
2020-11-18 10:19 ` [PULL 1/7] meson: Fix argument for makensis (build regression) Paolo Bonzini
2020-11-18 10:19 ` [PULL 2/7] docs: Fix some typos (found by codespell) Paolo Bonzini
2020-11-18 10:19 ` [PULL 3/7] meson: Fix build with --disable-guest-agent-msi Paolo Bonzini
2020-11-18 10:19 ` [PULL 4/7] meson: Fixes curses detection on msys2 Paolo Bonzini
2020-11-18 10:19 ` [PULL 5/7] hvf: Gate RDTSCP on CPU_BASED2_RDTSCP, not just CPU_BASED_TSC_OFFSET Paolo Bonzini
2020-11-18 10:19 ` Paolo Bonzini [this message]
2020-11-18 10:19 ` [PULL 7/7] buildsys: Help git-diff adding .gitattributes config file Paolo Bonzini
2020-11-18 13:42 ` [PULL 0/7] HVF and Windows changes for QEMU 5.2-rc Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201118101940.132594-7-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jrtc27@jrtc27.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).