From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Petersson, Mats" Subject: RE: [Xen-users] Does vt-x itself have perf. impact on Hypervisor w/o considering HVM? Date: Tue, 23 Jan 2007 17:33:29 +0100 Message-ID: <907625E08839C4409CE5768403633E0B018E18C3@sefsexmb1.amd.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Content-class: urn:content-classes:message In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Liang Yang , Xen devel list , xen-users@lists.xensource.com List-Id: xen-devel@lists.xenproject.org =20 > -----Original Message----- > From: Liang Yang [mailto:multisyncfe991@hotmail.com]=20 > Sent: 23 January 2007 16:15 > To: Petersson, Mats; Xen devel list; xen-users@lists.xensource.com > Subject: Re: [Xen-users] Does vt-x itself have perf. impact=20 > on Hypervisor w/o considering HVM? >=20 > Without VT-x support, binary translation has to be used to make those=20 > non-virtualizable instructions throw exception. With VT-x=20 > support, no binary=20 > translation is needed. So you mean, binary translation could=20 > be implemented=20 > as efficient as they are done in hardware? Not at all - I'm saying that if you're not using VT-x, then VT-x has no performance impact to your tests, which is what you originally asked. Or at least, that's how I interpreted: "both domain0 and Para-Virtualized Guest Domain (HVM domain is not considered)" in your original post.=20 Xen doesn't use binary translation, it uses para-virtualization, which is another way to say "source-code of the operating systme being modified to support virtualization".=20 Binary translation or hardware support is needed if you're using an operating system where it is unpractical to do para-virtualization (for example, source-code is not publicly available (say Windows), or the user-base isn't big enough to sustain a para-virtualization effort (say Linux kernel 2.4.x)). Whether binary translation or hardware is more efficient will depend on: 1. Implementation of the binary translation and hardware.=20 2. What application and OS is being run on the system.=20 It is by no means sure that Binary translation is either faster or slower than hardware implementations of virtualization. There are too many other factors that affect the situation to say for sure - one case may be faster for binary translation (because the type of operations suit binary translation), whilst another is slower. For most common cases, Para-virtualization should be able to be overall faster than both, because there are possibilities to bunch together several operations that cause a hypervisor interaction, and those can be "pacakged together" rahter than each event needing it's own separate hypervisor interaction. Of course, REALLLY clever binary translation may be able to detect a loop writing to the page-table and translate that into a block-call of "translate these 100 page-writes", rather than "for(...) do { translate one page write }" as the obvious solution would be. In hardware, there is no choice but to intercept each and every operation on it's own, so it's most likely the slowest operation, unless there's some way to avoid the hypervisor being called overall (there are some such cases too, and again, it depends on the exact circumstances of the application + OS that is run as a guest).=20 There's also more possibilities to add things to the hardware to support future enhancements of the hardware, which just plain isn't going to happen in the software solution. One such feature is nested paging, which allows the guest-page-table operations to avoid being intercepted (instead of an intercept and a whole bunch of code to perform the page-table write, the processor does a second page-table access of the "host-page-table" which translates the guest physical address into machine physical address).=20 -- Mats >=20 > Thanks, >=20 > Liang >=20 > ----- Original Message -----=20 > From: "Petersson, Mats" > To: "Liang Yang" ; "Xen devel list"=20 > ; > Sent: Tuesday, January 23, 2007 3:05 AM > Subject: RE: [Xen-users] Does vt-x itself have perf. impact=20 > on Hypervisor=20 > w/o considering HVM? >=20 >=20 > > -----Original Message----- > > From: xen-users-bounces@lists.xensource.com > > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of=20 > Liang Yang > > Sent: 22 January 2007 18:33 > > To: Xen devel list; xen-users@lists.xensource.com > > Subject: [Xen-users] Does vt-x itself have perf. impact on > > Hypervisor w/o considering HVM? > > > > Hello, > > > > Suppose I have two different kinds of CPUs which have exactly > > the same > > configuration except one supports VT-X while the other does > > not. If I want > > to test the I/O performance (or other perf. testing which is not > > particularly related to I/O) of the both domain0 and > > Para-Virtualized Guest > > Domain (HVM domain is not considered), shall I expect to=20 > get the same > > performance results on these two CPUs? >=20 > Assuming ALL other aspects are the same, when you're not using HVM, > there should be absolutely zero impact from it (aside from it=20 > using up a > few kilobytes of memory, to be precise, HVM (including both=20 > VMX and SVM) > takes up 129459 bytes when not used - more memory is allocated > dynamically when it's being used for obvious reasons. For modern > systems, that's so small that it doesn't matter). >=20 > -- > Mats > > > > Thanks, > > > > Liang > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > > > > > >=20 >=20 >=20 >=20 >=20 >=20