public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* KVM_SET_MP_STATE is undocumented
@ 2010-04-22 17:18 Pekka Enberg
  2010-04-25 12:52 ` Avi Kivity
  0 siblings, 1 reply; 4+ messages in thread
From: Pekka Enberg @ 2010-04-22 17:18 UTC (permalink / raw)
  To: Avi Kivity, KVM General

Hi!

I noticed that QEMU uses KVM_SET_MP_STATE but the ioctl() is completely 
undocumented.  I assume it has something to do with multiprocessor but I 
am unable to work out the details unless I take a peek at arch/x86/kvm.

			Pekka

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: KVM_SET_MP_STATE is undocumented
  2010-04-22 17:18 KVM_SET_MP_STATE is undocumented Pekka Enberg
@ 2010-04-25 12:52 ` Avi Kivity
  2010-04-26  7:48   ` Pekka Enberg
  0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2010-04-25 12:52 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: KVM General

On 04/22/2010 08:18 PM, Pekka Enberg wrote:
> Hi!
>
> I noticed that QEMU uses KVM_SET_MP_STATE but the ioctl() is 
> completely undocumented.  I assume it has something to do with 
> multiprocessor but I am unable to work out the details unless I take a 
> peek at arch/x86/kvm.

Patch sent.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: KVM_SET_MP_STATE is undocumented
  2010-04-25 12:52 ` Avi Kivity
@ 2010-04-26  7:48   ` Pekka Enberg
  2010-04-26 13:21     ` Avi Kivity
  0 siblings, 1 reply; 4+ messages in thread
From: Pekka Enberg @ 2010-04-26  7:48 UTC (permalink / raw)
  To: Avi Kivity; +Cc: KVM General

Hi Avi,

Avi Kivity kirjoitti:
>> I noticed that QEMU uses KVM_SET_MP_STATE but the ioctl() is 
>> completely undocumented.  I assume it has something to do with 
>> multiprocessor but I am unable to work out the details unless I take a 
>> peek at arch/x86/kvm.
> 
> Patch sent.

Two more interesting but undocumented ioctls:

  - KVM_SET_IDENTITY_MAP_ADDR
  - KVM_SET_BOOT_CPU_ID

Little background: we're debugging a KVM_EXIT_UNKNOWN problem for the 
"largest bug-free kernel" on Core i5 machine.  I've been looking at 
plain QEMU sources but it seems "qemu-kvm" that the person is using does 
much more during initialization. Do we have a known good list of 
mandatory steps required to properly initialize KVM on all CPUs?

			Pekka

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: KVM_SET_MP_STATE is undocumented
  2010-04-26  7:48   ` Pekka Enberg
@ 2010-04-26 13:21     ` Avi Kivity
  0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2010-04-26 13:21 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: KVM General

On 04/26/2010 10:48 AM, Pekka Enberg wrote:
> Two more interesting but undocumented ioctls:
>
>  - KVM_SET_IDENTITY_MAP_ADDR
>  - KVM_SET_BOOT_CPU_ID

I'll post patches.

> Little background: we're debugging a KVM_EXIT_UNKNOWN problem for the 
> "largest bug-free kernel" on Core i5 machine.  I've been looking at 
> plain QEMU sources but it seems "qemu-kvm" that the person is using 
> does much more during initialization. Do we have a known good list of 
> mandatory steps required to properly initialize KVM on all CPUs?

KVM_GET_API_VERSION (unless you're sure you aren't running on 2.6.20 or 
2.6.21)
KVM_CREATE_VM
KVM_SET_USER_MEMORY_REGION
KVM_CREATE_VCPU
KVM_SET_TSS_ADDR
KVM_SET_IDENTITY_MAP_ADDR (really only needed on EPT machines, but 
recommended to invoke on all hosts)
KVM_CREATE_IRQCHIP (optional; if you want in-kernel lapic/ioapic/pic)
KVM_SET_CPUID2
KVM_RUN

qemu also initializes all the vcpu state from its own values and has 
elaborate memory setup.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-26 13:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22 17:18 KVM_SET_MP_STATE is undocumented Pekka Enberg
2010-04-25 12:52 ` Avi Kivity
2010-04-26  7:48   ` Pekka Enberg
2010-04-26 13:21     ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox