From: Zachary Amsden <zach@vmware.com>
To: Virtualization Mailing List <virtualization@lists.osdl.org>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Chris Wright <chrisw@sous-sol.org>
Subject: Proposed interface change
Date: Tue, 15 Aug 2006 01:44:54 -0700 [thread overview]
Message-ID: <44E18986.40900@vmware.com> (raw)
I would like to propose an interface change to the following
paravirt-ops calls:
void (fastcall *write_ldt_entry)(void *dt, int entrynum, u64 entry);
void (fastcall *write_gdt_entry)(void *dt, int entrynum, u64 entry);
void (fastcall *write_idt_entry)(void *dt, int entrynum, u64 entry);
Can we consolidate the dt and entrynum parameters and just pass
dt+entrynum*8? I don't know if this makes things harder for the Xen
case, but I seem to distantly recall that we used to pass a pure pointer
- actually we used to have a pure post-update call, but changed the
interface to accommodate Xen. When we did that, the interface changed
to take the new descriptor value as a parameter, as a raw write to the
GDT / LDT would not be allowed. And during that step, the new entrynum
parameter was added.
Since it's fairly easy to merely subtract the entry offset from the
descriptor base, and descriptor tables are virtually mapped, obtaining
the page number, if it is required, is still a very easy task. I
believe we added the entrynum field so the page number could be
computed, but I just don't remember why, and don't see any reason for it
now.
So I propose changing the convention here to eliminate the entrynum
field, thus allowing all the parameters to fit within the fastcall
convention, which affords us three registers. The primary motivation
being, the call to write_gdt_entry is on the fast path in context switch.
Any objections?
Zach
next reply other threads:[~2006-08-15 8:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-15 8:44 Zachary Amsden [this message]
2006-08-16 18:16 ` Proposed interface change Jeremy Fitzhardinge
2006-08-16 18:21 ` Jeremy Fitzhardinge
2006-08-16 21:16 ` Zachary Amsden
-- strict thread matches above, loose matches on Subject: below --
2006-08-15 10:28 Christian Limpach
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=44E18986.40900@vmware.com \
--to=zach@vmware.com \
--cc=chrisw@sous-sol.org \
--cc=jeremy@goop.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.osdl.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).