All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <graf@amazon.de>
To: Paolo Bonzini <pbonzini@redhat.com>, <milanpa@amazon.com>,
	Milan Pandurov <milanpa@amazon.de>, <kvm@vger.kernel.org>
Cc: <rkrcmar@redhat.com>, <borntraeger@de.ibm.com>
Subject: Re: [PATCH 2/2] kvm: Add ioctl for gathering debug counters
Date: Thu, 23 Jan 2020 15:58:27 +0100	[thread overview]
Message-ID: <25821210-50c4-93f4-2daf-5b572f0bcf31@amazon.de> (raw)
In-Reply-To: <3d3d9374-a92b-0be0-1d6c-82b39fe7ef16@redhat.com>



On 23.01.20 15:50, Paolo Bonzini wrote:
> On 23/01/20 15:45, Alexander Graf wrote:
>> I think we're in agreement then, just leaning onto the other side of the
>> same fence. My take is that if I don't know whether a string is
>> necessary, I'd rather not have a string :).
> 
> And for me it's if I don't know whether a #define is necessary, I'd
> rather not have a #define.  So yeah we agree on everything except the
> userspace API (which is no small thing, but it's a start).
> 
>> I guess as long as we do get stat information out per-vm as well as
>> per-vcpu through vmfd and vcpufd, I'm happy overall.
>>
>> So how strongly do you feel about the string based approach?
> 
> I like it, of course.
> 
>> PS: You could btw easily add a "give me the string for a ONE_REG id"
>> interface in KVM to translate from 0x10042 to "insn_emulation_fail" :).
> 
> That could actually be somewhat useful for VCPU registers as well (give
> me the string and type, and a list of valid ONE_REG ids).  If that was

You don't need the type explicitly, it's part of the ONE_REG identifier :).

> the case, of course it would be fine for me to use ONE_REG on a VM.  The
> part which I don't like is having to make all ONE_REG part of the
> userspace ABI/API.

We don't have all of ONE_REG as part of the user space ABI today. On 
Book3S PPC you can not access BookE ONE_REG variables for obvious 
reasons. Neither can you access ARM ONE_REGs. Not implementing a ONE_REG 
is perfectly ok.

But I like the idea of a ONE_REG query interface that gives you the list 
of available registers and a string representation of them. It would 
make programming kvm from Python so easy!


Alex



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879



  reply	other threads:[~2020-01-23 14:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 13:43 [PATCH 2/2] kvm: Add ioctl for gathering debug counters Milan Pandurov
2020-01-15 14:04 ` Alexander Graf
2020-01-15 14:43   ` milanpa
2020-01-15 14:59     ` Alexander Graf
2020-01-17 23:38       ` Paolo Bonzini
2020-01-20 17:53         ` Alexander Graf
2020-01-20 18:57           ` milanpa
2020-01-21 15:38             ` Alexander Graf
2020-01-23 12:08               ` Paolo Bonzini
2020-01-23 12:32                 ` Alexander Graf
2020-01-23 14:19                   ` Paolo Bonzini
2020-01-23 14:45                     ` Alexander Graf
2020-01-23 14:50                       ` Paolo Bonzini
2020-01-23 14:58                         ` Alexander Graf [this message]
2020-01-23 15:05                           ` Paolo Bonzini
2020-01-23 15:27                             ` milanpa
2020-01-23 16:15                               ` Paolo Bonzini
2020-01-23 18:31                                 ` milanpa

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=25821210-50c4-93f4-2daf-5b572f0bcf31@amazon.de \
    --to=graf@amazon.de \
    --cc=borntraeger@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=milanpa@amazon.com \
    --cc=milanpa@amazon.de \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.