From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Thomas Huth <thuth@linux.vnet.ibm.com>
Cc: cornelia.huck@de.ibm.com, qemu-devel@nongnu.org,
kvm@vger.kernel.org, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory
Date: Wed, 04 Feb 2015 13:16:53 +0100 [thread overview]
Message-ID: <54D20DB5.7010205@de.ibm.com> (raw)
In-Reply-To: <54D205B7.7080109@redhat.com>
Am 04.02.2015 um 12:42 schrieb Paolo Bonzini:
>
>
> On 04/02/2015 12:25, Christian Borntraeger wrote:
>> Whenever vhost or qemu or a finished aio request wrote content into a
>> virtio buffer, the HW has set the storage key for that physical page,
>> which makes it automatically dirty/referenced in the guest visible
>> storage key.
>
> Ah, I knew the storage keys were per-physical page, but I wasn't sure if
> they were separate for the host and the guest. That's obvious now.
Just something on top:
the storage key is per physical page. Just once. It contains C/R/ACC/F
(change, reference, access key, fetch protection)
But: there is also the pgste page table extension. That is used to separate
both by doing logically ORs. The host and millicode will do the right shifting
copying to keep both values separate, but when the physical storage key gets
dirty, the host and the guest view is now "changed==yes"
>
> Can we detect non-zero storage key in emulated zPCI requests, and fail
> the request somehow?
Not right now. Even the kernel KVM module does not do this for emulated
instructions (as Linux has always key 0). Somewhen we might want to add
that capability, but its obviously not trivial for I/O like things. It
would get easier if we avoid VFIO etc and just had used the hardware support,
though. but as far as I can see this is not an option in QEMU.
Christian
next prev parent reply other threads:[~2015-02-04 12:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 12:11 [Qemu-devel] [PATCH RFC 0/1] KVM: ioctl for reading/writing guest memory Thomas Huth
2015-02-03 12:11 ` [Qemu-devel] [PATCH RFC 1/1] KVM: s390: Add MEMOP " Thomas Huth
2015-02-03 13:04 ` Paolo Bonzini
2015-02-03 15:16 ` Thomas Huth
2015-02-03 15:22 ` Paolo Bonzini
2015-02-04 7:53 ` Thomas Huth
2015-02-04 8:26 ` Christian Borntraeger
2015-02-04 10:39 ` Paolo Bonzini
2015-02-04 11:25 ` Christian Borntraeger
2015-02-04 11:42 ` Paolo Bonzini
2015-02-04 12:16 ` Christian Borntraeger [this message]
2015-02-04 10:57 ` Thomas Huth
2015-02-05 13:00 ` Cornelia Huck
2015-02-03 12:59 ` [Qemu-devel] [PATCH RFC 0/1] KVM: " Paolo Bonzini
2015-02-03 13:05 ` Christian Borntraeger
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=54D20DB5.7010205@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=agraf@suse.de \
--cc=cornelia.huck@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@linux.vnet.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).