From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752922AbbKQBqk (ORCPT ); Mon, 16 Nov 2015 20:46:40 -0500 Received: from mga14.intel.com ([192.55.52.115]:21001 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751807AbbKQBqi (ORCPT ); Mon, 16 Nov 2015 20:46:38 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,305,1444719600"; d="scan'208";a="821755910" From: "Zhang, Yang Z" To: "Michael S. Tsirkin" , "linux-kernel@vger.kernel.org" CC: Paolo Bonzini , Wanpeng Li , =?utf-8?B?UmFkaW0gS3LEjW3DocWZ?= , Andy Lutomirski , Xiao Guangrong , Kai Huang , =?utf-8?B?TWloYWkgRG9uyJt1?= , "kvm@vger.kernel.org" , "Wang, Wei W" , "Nakajima, Jun" Subject: RE: [PATCH] kvm/vmx: EPTP switching test Thread-Topic: [PATCH] kvm/vmx: EPTP switching test Thread-Index: AQHRH77UxG5aIr6vS0CFro6Sqgu4rJ6fbt0Q Date: Tue, 17 Nov 2015 01:45:12 +0000 Message-ID: References: <1447598396-6678-1-git-send-email-mst@redhat.com> In-Reply-To: <1447598396-6678-1-git-send-email-mst@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id tAH1ki6C005572 Michael S. Tsirkin wrote on 2015-11-16: > This patch adds a new parameter: eptp_switching_test, which enables > testing EPT switching on VMX if supported by hardware. All EPT > entries are initialized to the same value so this adds no useful > functionality by itself, but can be used to test VMFUNC performance, > and serve as a basis for future features based on EPTP switching. > > Support for nested virt is not enabled. > > This was tested using the following code within guest: > #define VMX_VMFUNC ".byte 0x0f,0x01,0xd4" > static void vmfunc(unsigned int nr, unsigned int ept) > { > asm volatile(VMX_VMFUNC > : > : "a"(nr), "c"(ept) > : "memory"); > } > > VMFUNC instruction cost was measured at ~122 cycles. > (Note: recent versions of gnu toolchain support the vmfunc > instruction - removing the need for writing the bytecode manually). > > Signed-off-by: Michael S. Tsirkin > --- > > I think I'd like to put this upstream so future eptp switching work > can be implemented on top. Comments? We have a different version in hand which is using separate EPTP. As you known, the patch will be more complex if using separate EPTP. And there are still lots of thing need to do in our version. We will send out for comments soon. Best regards, Yang ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºʇڙë,j­¢f£¢·hš�ï�êÿ‘êçz_è®(­éšŽŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨è­Ú&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿà ÿ¶ìÿ¢¸?–I¥