Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-22 Thread Eduardo Habkost
On Mon, Jan 21, 2013 at 07:35:22AM -0700, Eric Blake wrote: > On 01/21/2013 06:14 AM, Andreas Färber wrote: > >> glibc is already responsible from converting the 'unsigned long > >> int' of the user declaration back into the 'unsigned int' that the > >> kernel expects for the second argument. The

Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-21 Thread Marcelo Tosatti
On Thu, Jan 17, 2013 at 06:59:30PM -0200, Eduardo Habkost wrote: > This will allow each architecture to define how the VCPU ID is set on > the KVM_CREATE_VCPU ioctl call. > > Signed-off-by: Eduardo Habkost > --- > Cc: k...@vger.kernel.org > Cc: Michael S. Tsirkin > Cc: Gleb Natapov > Cc: Marcel

Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-21 Thread Eric Blake
On 01/21/2013 06:14 AM, Andreas Färber wrote: >> glibc is already responsible from converting the 'unsigned long >> int' of the user declaration back into the 'unsigned int' that the >> kernel expects for the second argument. The third argument (when >> present), is generally treated as a pointer

Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-21 Thread Andreas Färber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 18.01.2013 18:46, schrieb Eric Blake: > On 01/18/2013 09:40 AM, Eduardo Habkost wrote: >> On Fri, Jan 18, 2013 at 09:11:42AM -0700, Eric Blake wrote: >>> On 01/18/2013 07:20 AM, Eduardo Habkost wrote: > Could you suggest a text for me to add ple

Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-18 Thread Eric Blake
On 01/18/2013 09:40 AM, Eduardo Habkost wrote: > On Fri, Jan 18, 2013 at 09:11:42AM -0700, Eric Blake wrote: >> On 01/18/2013 07:20 AM, Eduardo Habkost wrote: Could you suggest a text for me to add please? >>> >>> "The argument passed to KVM_CREATE_VCPU now has 'unsigned long' type >>> instead

Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-18 Thread Eduardo Habkost
On Fri, Jan 18, 2013 at 09:11:42AM -0700, Eric Blake wrote: > On 01/18/2013 07:20 AM, Eduardo Habkost wrote: > >> Could you suggest a text for me to add please? > > > > "The argument passed to KVM_CREATE_VCPU now has 'unsigned long' type > > instead of 'int', as expected by the Linux ioctl() sysca

Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-18 Thread Eric Blake
On 01/18/2013 07:20 AM, Eduardo Habkost wrote: >> Could you suggest a text for me to add please? > > "The argument passed to KVM_CREATE_VCPU now has 'unsigned long' type > instead of 'int', as expected by the Linux ioctl() syscall. Maybe an int > works on most or all architectures supporting KVM,

Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-18 Thread Eduardo Habkost
On Fri, Jan 18, 2013 at 02:03:09PM +0100, Andreas Färber wrote: > Am 18.01.2013 13:53, schrieb Eduardo Habkost: > > On Fri, Jan 18, 2013 at 12:11:29PM +0100, Andreas Färber wrote: > > [...] > >>> +/* Returns VCPU ID to be used on KVM_CREATE_VCPU ioctl() */ > >>> +unsigned long kvm_arch_vcpu_id(CPUS

Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-18 Thread Andreas Färber
Am 18.01.2013 13:53, schrieb Eduardo Habkost: > On Fri, Jan 18, 2013 at 12:11:29PM +0100, Andreas Färber wrote: > [...] >>> +/* Returns VCPU ID to be used on KVM_CREATE_VCPU ioctl() */ >>> +unsigned long kvm_arch_vcpu_id(CPUState *cpu); >>> + >>> void kvm_arch_reset_vcpu(CPUState *cpu); >>> >>>

Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-18 Thread Eduardo Habkost
On Fri, Jan 18, 2013 at 12:11:29PM +0100, Andreas Färber wrote: [...] > > +/* Returns VCPU ID to be used on KVM_CREATE_VCPU ioctl() */ > > +unsigned long kvm_arch_vcpu_id(CPUState *cpu); > > + > > void kvm_arch_reset_vcpu(CPUState *cpu); > > > > int kvm_arch_on_sigbus_vcpu(CPUState *cpu, int co

Re: [Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-18 Thread Andreas Färber
Am 17.01.2013 21:59, schrieb Eduardo Habkost: > This will allow each architecture to define how the VCPU ID is set on > the KVM_CREATE_VCPU ioctl call. > > Signed-off-by: Eduardo Habkost > --- > Cc: k...@vger.kernel.org > Cc: Michael S. Tsirkin > Cc: Gleb Natapov > Cc: Marcelo Tosatti > > Cha

[Qemu-devel] [PATCH for-1.4 04/12] kvm: Create kvm_arch_vcpu_id() function

2013-01-17 Thread Eduardo Habkost
This will allow each architecture to define how the VCPU ID is set on the KVM_CREATE_VCPU ioctl call. Signed-off-by: Eduardo Habkost --- Cc: k...@vger.kernel.org Cc: Michael S. Tsirkin Cc: Gleb Natapov Cc: Marcelo Tosatti Changes v2: - Get CPUState as argument instead of CPUArchState --- in