From: zach@vmware.com
To: akpm@osdl.org, chrisl@vmware.com, chrisw@osdl.org, hpa@zytor.com,
Keir.Fraser@cl.cam.ac.uk, linux-kernel@vger.kernel.org,
m+Ian.Pratt@cl.cam.ac.uk, mbligh@mbligh.org, pratap@vmware.com,
virtualization@lists.osdl.org, zach@vmware.com,
zwame@arm.linux.org.uk
Subject: [PATCH 1/14] i386 / Make write ldt return error code
Date: Wed, 10 Aug 2005 21:52:51 -0700 [thread overview]
Message-ID: <200508110452.j7B4qpSE019505@zach-dev.vmware.com> (raw)
Xen requires error returns from the hypercall to update LDT entries,
and this generates completely equivalent code on native.
Patch-base: 2.6.13-rc5-mm1
Patch-keys: i386 desc ldt paravirt xen
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.13/include/asm-i386/mach-default/mach_desc.h
===================================================================
--- linux-2.6.13.orig/include/asm-i386/mach-default/mach_desc.h 2005-08-09 18:19:39.000000000 -0700
+++ linux-2.6.13/include/asm-i386/mach-default/mach_desc.h 2005-08-09 18:24:10.000000000 -0700
@@ -62,11 +62,12 @@
_set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82);
}
-static inline void write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b)
+static inline int write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b)
{
__u32 *lp = (__u32 *)((char *)ldt + entry*8);
*lp = entry_a;
*(lp+1) = entry_b;
+ return 0;
}
#if TLS_SIZE != 24
Index: linux-2.6.13/arch/i386/kernel/ldt.c
===================================================================
--- linux-2.6.13.orig/arch/i386/kernel/ldt.c 2005-08-09 18:19:37.000000000 -0700
+++ linux-2.6.13/arch/i386/kernel/ldt.c 2005-08-09 18:22:56.000000000 -0700
@@ -221,8 +221,7 @@
/* Install the new entry ... */
install:
- write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2);
- error = 0;
+ error = write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2);
out_unlock:
up(&mm->context.sem);
next reply other threads:[~2005-08-11 4:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-11 4:52 zach [this message]
2005-08-11 12:57 ` Chris Wright
2005-08-16 23:43 ` Andi Kleen
2005-08-17 0:06 ` Chris Wright
2005-08-17 0:12 ` Andi Kleen
2005-08-17 0:22 ` Chris Wright
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=200508110452.j7B4qpSE019505@zach-dev.vmware.com \
--to=zach@vmware.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=akpm@osdl.org \
--cc=chrisl@vmware.com \
--cc=chrisw@osdl.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m+Ian.Pratt@cl.cam.ac.uk \
--cc=mbligh@mbligh.org \
--cc=pratap@vmware.com \
--cc=virtualization@lists.osdl.org \
--cc=zwame@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®