kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	KVM list <kvm@vger.kernel.org>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Jens Freimann <jfrei@linux.vnet.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Carsten Otte <cotte@de.ibm.com>
Subject: Re: [PATCH 2/2]: kvm-s390: add KVM_S390_GET/SET_SREGS2 call for additional hw regs
Date: Tue, 20 Dec 2011 17:16:01 +0100	[thread overview]
Message-ID: <4EF0B4C1.2010905@de.ibm.com> (raw)
In-Reply-To: <EE22B7A4-3FBA-4BC8-B98F-D885A2421398@suse.de>

On 20/12/11 15:20, Alexander Graf wrote:
>> +Reads special registers from the vcpu which are not covered by sregs.
>> +
>> +/* s390x */
>> +struct kvm_sregs2 {
>> +	__u64 ckc;	/* clock comparator */
>> +	__u64 cputm;	/* cpu timer */
>> +	__u64 gbea;	/* guest breaking event address */
>> +	__u32 todpr;	/* tod programmable field */
>> +	__u32 prefix;	/* prefix register */
>> +};
> 
> Would it make sense to instead use the GET_ONE_REG and SET_ONE_REG interfaces?
> 
>   http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/80854

Still not sure if I like that interface or not, but it should work.
I have some questions, though

- how should userspace check if the kernel supports this specific register?
- How would a GET_MANY_REGS / SET_MANY_REGS look like?
- Is the interface limited to 56 registers? (see the ID)
- scalability and performance. I dont know about other platforms, but the 
  exit overhead on s390 is in the same order of magnitute as a system call
  overhead, so multiple ioctls on the exit path will make the exit overhead 
  noticably more expensive (probably can be solved by a MANY variant). This
  might be a micro optimization though.
  (actually the only register that bothers me regarding performance right now 
  is prefix. qemu will need the content if it has to write to the prefix page. 
  Would be good to have an interface to get that without doing another system
  call)

Christian


  reply	other threads:[~2011-12-20 16:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20  9:38 [PATCH]: kvm-s390: add KVM_S390_GET/SET_SREGS2 call for additional hw regs Christian Borntraeger
2011-12-20  9:52 ` Avi Kivity
2011-12-20  9:59   ` Christian Borntraeger
2011-12-20 10:09     ` Avi Kivity
2011-12-20 11:40       ` [PATCH 1/2]: kvm-s390: use guest flush inline function Christian Borntraeger
2011-12-20 11:41       ` [PATCH 2/2]: kvm-s390: add KVM_S390_GET/SET_SREGS2 call for additional hw regs Christian Borntraeger
2011-12-20 14:20         ` Alexander Graf
2011-12-20 16:16           ` Christian Borntraeger [this message]
2011-12-20 16:28             ` Alexander Graf
2011-12-21  6:52               ` Christian Borntraeger
2011-12-21  7:10                 ` Alexander Graf

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=4EF0B4C1.2010905@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=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).