A test case which does the following:
ioctl(vmfd, KVM_CREATE_VCPU, 0);
ioctl(vmfd, KVM_CREATE_IRQCHIP);
ioctl(cpufd, KVM_RUN);
Can oops in kvm_apic_accept_pic_intr() because vcpu->arch.apic == NULL.
Because irqchip_in_kernel() is false when we create the vcpu we leave
vcpu->arch.apic uninitia
On Tue, Feb 07, 2012 at 05:32:07PM +1100, Michael Ellerman wrote:
> A test case which does the following:
>
> ioctl(vmfd, KVM_CREATE_VCPU, 0);
> ioctl(vmfd, KVM_CREATE_IRQCHIP);
> ioctl(cpufd, KVM_RUN);
>
> Can oops in kvm_apic_accept_pic_intr() because vcpu->arch.apic == NULL.
>
> Because ir
On Tue, 2012-02-07 at 17:38 -0200, Marcelo Tosatti wrote:
> On Tue, Feb 07, 2012 at 05:32:07PM +1100, Michael Ellerman wrote:
> > A test case which does the following:
> >
> > ioctl(vmfd, KVM_CREATE_VCPU, 0);
> > ioctl(vmfd, KVM_CREATE_IRQCHIP);
> > ioctl(cpufd, KVM_RUN);
> >
> > Can oops in k
On Wed, 2012-02-08 at 21:41 +1100, Michael Ellerman wrote:
> On Tue, 2012-02-07 at 17:38 -0200, Marcelo Tosatti wrote:
> > On Tue, Feb 07, 2012 at 05:32:07PM +1100, Michael Ellerman wrote:
> > > A test case which does the following:
> > >
> > > ioctl(vmfd, KVM_CREATE_VCPU, 0);
> > > ioctl(vmfd,
On 02/08/2012 02:13 PM, Michael Ellerman wrote:
> On Wed, 2012-02-08 at 21:41 +1100, Michael Ellerman wrote:
> > On Tue, 2012-02-07 at 17:38 -0200, Marcelo Tosatti wrote:
> > > On Tue, Feb 07, 2012 at 05:32:07PM +1100, Michael Ellerman wrote:
> > > > A test case which does the following:
> > > >
>
On 03/04/2012 11:51 AM, Avi Kivity wrote:
> However kvm_arch_vcpu_init(), which creates the lapic, _is_ called
> without either the vcpu->mutex or kvm->lock held.
This is irrelevant, the important bit is when it becomes visible.
> Patch coming up.
I'll add explicit variables for irqchip_in_ker