public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Avi Kivity <avi@qumranet.com>
Cc: Jeff Dike <jdike@addtoit.com>,
	KVM devel <kvm-devel@lists.sourceforge.net>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [kvm-devel] [PATCH 3/3] KVM - add hypercall nr to kvm_run
Date: Tue, 17 Jul 2007 09:15:51 -0500	[thread overview]
Message-ID: <469CCF17.3020709@codemonkey.ws> (raw)
In-Reply-To: <469C7C8D.1020600@qumranet.com>

Avi Kivity wrote:
> Jeff Dike wrote:
>   
>> Add the hypercall number to kvm_run and initialize it.  This might be
>> considered API-changing, so I kept it separate.
>>
>> Signed-off-by: Jeff Dike <jdike@linux.intel.com>
>> --
>>  drivers/kvm/kvm_main.c |    1 +
>>  include/linux/kvm.h    |    1 +
>>  2 files changed, 2 insertions(+)
>>
>> Index: kvm/drivers/kvm/kvm_main.c
>> ===================================================================
>> --- kvm.orig/drivers/kvm/kvm_main.c
>> +++ kvm/drivers/kvm/kvm_main.c
>> @@ -1361,6 +1361,7 @@ int kvm_hypercall(struct kvm_vcpu *vcpu,
>>  	}
>>  	switch (nr) {
>>  	default:
>> +		run->hypercall.nr = nr;
>>  		run->hypercall.args[0] = a0;
>>  		run->hypercall.args[1] = a1;
>>  		run->hypercall.args[2] = a2;
>> Index: kvm/include/linux/kvm.h
>> ===================================================================
>> --- kvm.orig/include/linux/kvm.h
>> +++ kvm/include/linux/kvm.h
>> @@ -106,6 +106,7 @@ struct kvm_run {
>>  		} mmio;
>>  		/* KVM_EXIT_HYPERCALL */
>>  		struct {
>> +			__u64 nr;
>>  			__u64 args[6];
>>  			__u64 ret;
>>  			__u32 longmode;
>>   
>>     
>
> It isn't API changing as the API could not be (and has not been) used.  
> We do need to add a padding element to the union to make sure additional 
> union members don't cause its size to change.
>
> Quite sad that we got this far with such brokenness.
>   

I'm planning on breaking this interface again since the new hypercall 
API only takes 4 arguments instead of 6.

Regards,

Anthony Liguori


  parent reply	other threads:[~2007-07-17 14:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-16 19:24 [PATCH 3/3] KVM - add hypercall nr to kvm_run Jeff Dike
2007-07-17  8:23 ` Avi Kivity
2007-07-17  8:40   ` Avi Kivity
2007-07-17 14:15   ` Anthony Liguori [this message]
2007-07-17 16:07     ` [kvm-devel] " Jeff Dike
2007-07-18 16:28       ` Anthony Liguori
2007-07-18 17:41         ` Jeff Dike
2007-07-18 19:25           ` Anthony Liguori

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=469CCF17.3020709@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@qumranet.com \
    --cc=jdike@addtoit.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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