All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arbel Moshe <arbel.moshe@oracle.com>
To: pbonzini@redhat.com, rkrcmar@redhat.com, kvm@vger.kernel.org
Cc: idan.brown@oracle.com, liran.alon@oracle.com,
	Arbel Moshe <arbel.moshe@oracle.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH 4/5] x86: Add definition for 64 bit Segment descriptor
Date: Sun, 24 Dec 2017 12:08:00 +0200	[thread overview]
Message-ID: <20171224100801.145806-5-arbel.moshe@oracle.com> (raw)
In-Reply-To: <20171224100801.145806-1-arbel.moshe@oracle.com>

Signed-off-by: Arbel Moshe <arbel.moshe@oracle.com>
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 lib/x86/desc.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/lib/x86/desc.h b/lib/x86/desc.h
index 3bf8fbe..181b59e 100644
--- a/lib/x86/desc.h
+++ b/lib/x86/desc.h
@@ -167,6 +167,31 @@ typedef struct {
 	u8 base_high;
 } gdt_entry_t;
 
+struct segment_desc64 {
+	uint16_t limit1;
+	uint16_t base1;
+	uint8_t  base2;
+	union {
+		uint16_t  type_limit_flags;      /* Type and limit flags */
+		struct {
+			uint16_t type:4;
+			uint16_t s:1;
+			uint16_t dpl:2;
+			uint16_t p:1;
+			uint16_t limit:4;
+			uint16_t avl:1;
+			uint16_t l:1;
+			uint16_t db:1;
+			uint16_t g:1;
+		} __attribute__((__packed__));
+	} __attribute__((__packed__));
+	uint8_t  base3;
+	uint32_t base4;
+	uint32_t zero;
+} __attribute__((__packed__));
+
+#define DESC_BUSY ((uint64_t) 1 << 41)
+
 extern idt_entry_t boot_idt[256];
 
 #ifndef __x86_64__
-- 
2.14.1

  parent reply	other threads:[~2017-12-24 10:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-24 10:07 [kvm-unit-test PATCH 0/5]: x86: Add tests for VMware backdoor Arbel Moshe
2017-12-24 10:07 ` [PATCH 1/5] x86: Add utility to run function in User Mode Arbel Moshe
2017-12-24 10:07 ` [PATCH 2/5] x86: Add Test Utility to run in User Mode and catch exceptions Arbel Moshe
2017-12-24 10:07 ` [PATCH 3/5] x86: Add Definition for PCE bit in CR4 Arbel Moshe
2017-12-24 10:08 ` Arbel Moshe [this message]
2017-12-24 10:08 ` [PATCH 5/5] x86: Add VMware backdoor unit test Arbel Moshe
2018-02-14 12:06 ` [kvm-unit-test PATCH 0/5]: x86: Add tests for VMware backdoor Paolo Bonzini

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=20171224100801.145806-5-arbel.moshe@oracle.com \
    --to=arbel.moshe@oracle.com \
    --cc=idan.brown@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=liran.alon@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.