kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <cborntra@de.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: Avi Kivity <avi@redhat.com>, Carsten Otte <cotte@de.ibm.com>,
	KVM list <kvm@vger.kernel.org>,
	Martin Schwidefsky <martin.schwidefsky@de.ibm.com>,
	Jens Freimann <JFREI@de.ibm.com>
Subject: Re: [PATCH] kvm-s390: userspace access to guest storage keys
Date: Tue, 10 May 2011 13:29:56 +0200	[thread overview]
Message-ID: <4DC921B4.1060609@de.ibm.com> (raw)
In-Reply-To: <A63BEFEB-76CF-436C-9237-E00EAEA95A7B@suse.de>

On 09/05/11 13:32, Alexander Graf wrote:
> 
> On 09.05.2011, at 13:20, Avi Kivity wrote:
> 
>> On 05/09/2011 01:11 PM, Alexander Graf wrote:
>>>>
>>>>  And not in main memory, either?
>>>
>>> Nope - storage keys are only accessible using special instructions. They're not in RAM (visible to a guest) :).
>>>
>>
>> Interesting, so where are they kept?  An on-chip memory?  That would limit the amount of main
>> memory to that indexed by the chip.  Extra off-chip memory?
> 
> I'll leave the answer of this question to the real experts :). All I know is that the ISA defines special instructions
> to fetch them, so the question on where they are stored is "implementation dependent". In qemu for example, they are 
> kept in an extra array that's just malloc'ed.

Dont know really - the HW folks probably know it better, so I am just guessing.
The final location is probably somewhere in the HSA (hardware system area) which is backed by
real memory and hidden by the cpu microcode.  (there is no way to access this memory directly).
But parts of the storage keys are also mirrored by the different cache levels and TLB (e.g. write
protection via page tables).


Christian

      reply	other threads:[~2011-05-10 11:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 10:25 [PATCH] kvm-s390: userspace access to guest storage keys Carsten Otte
2011-05-09  8:43 ` Avi Kivity
2011-05-09 10:11   ` Alexander Graf
2011-05-09 11:20     ` Avi Kivity
2011-05-09 11:32       ` Alexander Graf
2011-05-10 11:29         ` Christian Borntraeger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DC921B4.1060609@de.ibm.com \
    --to=cborntra@de.ibm.com \
    --cc=JFREI@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=cotte@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=martin.schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).