All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: "Tian, Kevin" <kevin.tian@intel.com>, Jan Beulich <jbeulich@novell.com>
Cc: xen-devel@lists.xensource.com, "Wei, Gang" <gang.wei@intel.com>
Subject: Re: [PATCH 1/9] Add cpu idle pwr mgmt to xen
Date: Wed, 30 Apr 2008 11:00:23 +0100	[thread overview]
Message-ID: <C43E01C7.201DC%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <D470B4E54465E3469E2ABBC5AFAC390F024D9219@pdsmsx412.ccr.corp.intel.com>

On 30/4/08 10:42, "Tian, Kevin" <kevin.tian@intel.com> wrote:

> What do you mean by partly copying things? For a 32-on-64 guest,
> all pointers from guest are 32-bit and compat_handler_okay already
> ensures compat pointers validity. Only native structure may have
> 64-bit pointer field, which is checked by common guest_handle_okay
> if from a 64bit guest, or is trusted by increasing addr limitation if
> from compat layer...

Yes, I don't think we do partial copying anywhere right now. If we did, we
could apply guest_handle_okay() checks explicitly before removing the
addr-space limitation.

>> static pre-allocation used currently also avoids spurious failures of
>> hypercalls (there may be deterministic failures if the combined set
>> of indirect hypercall arguments exceeds the pre-allocation size.
> 
> That's also the limitation of current approach by pre-defined size, which
> is not scalable if 2nd level pointer are variable decided by some count
> field.

Also the approaches are not mutually exclusive. We can still have a per-vcpu
pre-alloc'ed page for most hypercalls, and allow dynamic allocation for
hypercalls which require more space and which then have to tolerate ENOMEM
failure. The pre-alloc'ed pages would no longer require to be mapped in a
special place.

On the other hand, I don't think we have any hypercall right now where 4kB
is likely to be too little space, and where the hypercall cannot be
sub-divided into smaller chunks by the compat shim.

*But* having a way to flag that arguments have been copied would also be
useful for HVM compat shims too. We already have such a flag
(guest_handles_in_xen_space) there, so we would increase commonality. This
probably means we will go down this route for PV guests too when we merge
some of the compat shim mechanisms for PV and HVM guests.

 -- Keir

  reply	other threads:[~2008-04-30 10:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-25  5:07 [PATCH 1/9] Add cpu idle pwr mgmt to xen Wei, Gang
2008-04-25 13:00 ` Keir Fraser
2008-04-25 13:29   ` Wei, Gang
2008-04-26  9:55   ` Wei, Gang
2008-04-28  9:24     ` Jan Beulich
2008-04-30  3:27       ` Wei, Gang
2008-04-30  7:22         ` Jan Beulich
2008-04-30  8:54           ` Keir Fraser
2008-04-30  9:08             ` Wei, Gang
2008-04-30  9:12             ` Tian, Kevin
2008-04-30  9:18               ` Tian, Kevin
2008-04-30  9:35               ` Jan Beulich
2008-04-30  9:42                 ` Tian, Kevin
2008-04-30 10:00                   ` Keir Fraser [this message]
2008-04-30 10:25                     ` Jan Beulich
2008-04-30 12:27                       ` Keir Fraser
2008-04-30 10:25                   ` Jan Beulich
2008-05-05  6:34                     ` Tian, Kevin
2008-04-30 16:36           ` Wei, Gang
2008-05-01  0:48           ` Wei, Gang

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=C43E01C7.201DC%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=gang.wei@intel.com \
    --cc=jbeulich@novell.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xensource.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.