From: Jeremy Fitzhardinge Subject: Re: [RFC][PATCH 03/10] xen/hybrid: Xen Hybrid Extension initialization Date: Wed, 16 Sep 2009 13:24:11 -0700 Message-ID: <4AB1496B.9070705@goop.org> References: <1253090551-7969-1-git-send-email-sheng@linux.intel.com> <1253090551-7969-4-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1253090551-7969-4-git-send-email-sheng@linux.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Sheng Yang Cc: xen-devel , Eddie Dong , linux-kernel@vger.kernel.org, Jeremy Fitzhardinge , Keir Fraser , Jun Nakajima List-Id: xen-devel@lists.xenproject.org On 09/16/09 01:42, Sheng Yang wrote: > As we know that PV guest have performance issue with x86_64 that guest kernel > and userspace resistent in the same ring, then the necessary TLB flushes when > switch between guest userspace and guest kernel cause overhead, and much more > syscall overhead is also introduced. The Hybrid Extension estimated these > overhead by putting guest kernel back in (non-root) ring0 then achieve the > better performance than PV guest. > > The Hybrid Extension is started from real mode like HVM guest, but also with a > component based PV feature selection(e.g. PV halt, PV timer, event channel, > then PV drivers). So guest with Hybrid extension feature can takes the > advantages of both H/W virtualization and Para-Virtualization. > > This patch introduced the Hybrid Extension guest initialization. > > Guest would detect Hybrid capability using CPUID 0x40000002.edx, then call > HVMOP_enable_hybrid hypercall to enable hybrid support in hypervisor. > I think having an option to put PV guests into an HVM container is a good one, but as I mentioned in the other mail, I don't think this is the right approach. It would be much better to make it so that an unmodified guest works in such a mode; even with no specific optimisations the guest would get benefit from faster kernel<->usermode switches. Then we can add specific optimisations to take advantage of, say, running in ring 0 (=fast syscalls) and having access to HAP hardware (=direct pagetable updates, no pinning). J