From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqBlI-0006Ao-VI for qemu-devel@nongnu.org; Wed, 15 Oct 2008 15:10:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqBlH-00068T-4l for qemu-devel@nongnu.org; Wed, 15 Oct 2008 15:10:24 -0400 Received: from [199.232.76.173] (port=49596 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqBlH-00068I-0F for qemu-devel@nongnu.org; Wed, 15 Oct 2008 15:10:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:32867) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KqBlG-0007M6-J2 for qemu-devel@nongnu.org; Wed, 15 Oct 2008 15:10:22 -0400 Message-ID: <48F633B3.7070401@suse.de> Date: Wed, 15 Oct 2008 20:17:23 +0200 From: Alexander Graf MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040903060806050607090907" Subject: [Qemu-devel] [PATCH] Return amount of ASIDs Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: joerg.roedel@amd.com, aurelien@aurel32.net This is a multi-part message in MIME format. --------------040903060806050607090907 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return amount of ASIDs With SVM the TLB supports tagging to distinguish TLB entries from different virtual CPUs. This tag is called an ASID. The amount of ASIDs is given in EBX of the SVM-CPUID-leaf. Currently we return 0, which might break hypervisors. Let's better return something >0 here, say 0x10. Since we're flushing the complete TLB on every VM entry and exit we're not making use of the ASID information anyways. Signed-off-by: Alexander Graf --------------040903060806050607090907 Content-Type: text/x-patch; name="qemu-asid.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-asid.patch" Index: target-i386/op_helper.c =================================================================== --- target-i386/op_helper.c (revision 5494) +++ target-i386/op_helper.c (working copy) @@ -2037,10 +2037,10 @@ EDX = 0; break; case 0x8000000A: - EAX = 0x00000001; - EBX = 0; + EAX = 0x00000001; /* SVM Revision */ + EBX = 0x00000010; /* nr of ASIDs */ ECX = 0; - EDX = 0; + EDX = 0; /* optional features */ break; default: /* reserved values: zero */ --------------040903060806050607090907--