Re: [KVM][PATCH] smp_processor_id() and sleeping functions used in invalid context

2006-12-31 Thread Luca

On 12/31/06, Avi Kivity <[EMAIL PROTECTED]> wrote:

Luca Tettamanti wrote:
> Hello,
> I'm testing KVM on a Core2 CPU. I'm running kernel 2.6.20-git (pulled
> few hours ago), configured with SMP and PREEMPT.
>
> I'm hitting 2 different warnings:
> BUG: using smp_processor_id() in preemptible [0001] code: kvm/7726
> caller is vmx_create_vcpu+0x9/0x2f [kvm_intel]

[...]
> Second one:
> BUG: sleeping function called from invalid context at
> /home/kronos/src/linux-2.6.git/mm/slab.c:3034
> in_atomic():1, irqs_disabled():0
> 1 lock held by kvm/12706:
>  #0:  (>mutex){--..}, at: [] kvm_dev_ioctl+0x113/0xf97
> [kvm]
>  [] kmem_cache_alloc+0x1b/0x6f
>
[...]

There are patches for both (I think) flying around.  They should land in
Linus' tree in a few days.


Ah, I just saw them on lkml...

Luca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [KVM][PATCH] smp_processor_id() and sleeping functions used in invalid context

2006-12-31 Thread Avi Kivity

Luca Tettamanti wrote:

Hello,
I'm testing KVM on a Core2 CPU. I'm running kernel 2.6.20-git (pulled
few hours ago), configured with SMP and PREEMPT.

I'm hitting 2 different warnings:
BUG: using smp_processor_id() in preemptible [0001] code: kvm/7726
caller is vmx_create_vcpu+0x9/0x2f [kvm_intel]

  


[...]


vmx_create_vcpu calls alloc_vmcs which uses smp_processor_id() in
preemptible context and pass the result to alloc_vmcs_cpu(); at a later
point the function may be running on a different CPU (hence the result
of cpu_to_node may be meaningless).

Second one:
BUG: sleeping function called from invalid context at
/home/kronos/src/linux-2.6.git/mm/slab.c:3034
in_atomic():1, irqs_disabled():0
1 lock held by kvm/12706:
 #0:  (>mutex){--..}, at: [] kvm_dev_ioctl+0x113/0xf97
[kvm]
 [] kmem_cache_alloc+0x1b/0x6f
  

[...]

There are patches for both (I think) flying around.  They should land in 
Linus' tree in a few days.


Thanks,

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [KVM][PATCH] smp_processor_id() and sleeping functions used in invalid context

2006-12-31 Thread Avi Kivity

Luca Tettamanti wrote:

Hello,
I'm testing KVM on a Core2 CPU. I'm running kernel 2.6.20-git (pulled
few hours ago), configured with SMP and PREEMPT.

I'm hitting 2 different warnings:
BUG: using smp_processor_id() in preemptible [0001] code: kvm/7726
caller is vmx_create_vcpu+0x9/0x2f [kvm_intel]

  


[...]


vmx_create_vcpu calls alloc_vmcs which uses smp_processor_id() in
preemptible context and pass the result to alloc_vmcs_cpu(); at a later
point the function may be running on a different CPU (hence the result
of cpu_to_node may be meaningless).

Second one:
BUG: sleeping function called from invalid context at
/home/kronos/src/linux-2.6.git/mm/slab.c:3034
in_atomic():1, irqs_disabled():0
1 lock held by kvm/12706:
 #0:  (vcpu-mutex){--..}, at: [f1b68d02] kvm_dev_ioctl+0x113/0xf97
[kvm]
 [b015c32a] kmem_cache_alloc+0x1b/0x6f
  

[...]

There are patches for both (I think) flying around.  They should land in 
Linus' tree in a few days.


Thanks,

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

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [KVM][PATCH] smp_processor_id() and sleeping functions used in invalid context

2006-12-31 Thread Luca

On 12/31/06, Avi Kivity [EMAIL PROTECTED] wrote:

Luca Tettamanti wrote:
 Hello,
 I'm testing KVM on a Core2 CPU. I'm running kernel 2.6.20-git (pulled
 few hours ago), configured with SMP and PREEMPT.

 I'm hitting 2 different warnings:
 BUG: using smp_processor_id() in preemptible [0001] code: kvm/7726
 caller is vmx_create_vcpu+0x9/0x2f [kvm_intel]

[...]
 Second one:
 BUG: sleeping function called from invalid context at
 /home/kronos/src/linux-2.6.git/mm/slab.c:3034
 in_atomic():1, irqs_disabled():0
 1 lock held by kvm/12706:
  #0:  (vcpu-mutex){--..}, at: [f1b68d02] kvm_dev_ioctl+0x113/0xf97
 [kvm]
  [b015c32a] kmem_cache_alloc+0x1b/0x6f

[...]

There are patches for both (I think) flying around.  They should land in
Linus' tree in a few days.


Ah, I just saw them on lkml...

Luca
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/