qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Return amount of ASIDs
@ 2008-10-15 18:17 Alexander Graf
  2008-10-17  8:09 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Graf @ 2008-10-15 18:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: joerg.roedel, aurelien

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

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 <agraf@suse.de>



[-- Attachment #2: qemu-asid.patch --]
[-- Type: text/x-patch, Size: 547 bytes --]

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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] Return amount of ASIDs
  2008-10-15 18:17 [Qemu-devel] [PATCH] Return amount of ASIDs Alexander Graf
@ 2008-10-17  8:09 ` Aurelien Jarno
  0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2008-10-17  8:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: joerg.roedel

On Wed, Oct 15, 2008 at 08:17:23PM +0200, Alexander Graf wrote:
> 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 <agraf@suse.de>
>

Applied, thanks.

> 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 */


-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-17  8:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 18:17 [Qemu-devel] [PATCH] Return amount of ASIDs Alexander Graf
2008-10-17  8:09 ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).