From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: [PATCH 0/2] Optimize ds/es reload Date: Sun, 13 May 2012 19:53:22 +0300 Message-ID: <1336928004-6366-1-git-send-email-avi@redhat.com> To: Marcelo Tosatti , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:24477 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753702Ab2EMQx2 (ORCPT ); Sun, 13 May 2012 12:53:28 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4DGrS9D003249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 13 May 2012 12:53:28 -0400 Sender: kvm-owner@vger.kernel.org List-ID: The lightweight exit path needlessly reloads %ds and %es (and clobbers the user supplied values as well, a minor ABI bug). This patchset fixes the bug and moves the reload to the heavyweight exit path (potentially skipping it completely on x86_64), reducing the vmexit cost by about 70 cycles. Avi Kivity (2): KVM: VMX: Fix %ds/%es clobber KVM: VMX: Optimize %ds, %es reload arch/x86/kvm/vmx.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) -- 1.7.10.1