Prev: [PATCH 08/12] Fix possible NULL pointer dereference in print_IO_APIC
Next: [PATCH 03/12] evtchn delivery on HVM
From: Konrad Rzeszutek Wilk on 8 Jun 2010 09:50 > > > + HYPERVISOR_shared_info = (struct shared_info *)shared_info_page; > > > + > > > + /* Don't do the full vcpu_info placement stuff until we have a > > > + possible map and a non-dummy shared_info. */ > > > > Might want to mention where the full vpcu placement is done. > > The comment is not accurate, we actually don't do any vcpu_info > placement on hvm because it is not very useful there. > Better just to remove the comment (I have done so in my tree). > > > > + per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; > > So.. what is the purpose of the per_cpu(xen_vcpu, 0) then? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Stefano Stabellini on 8 Jun 2010 12:00 On Tue, 8 Jun 2010, Konrad Rzeszutek Wilk wrote: > > > > + HYPERVISOR_shared_info = (struct shared_info *)shared_info_page; > > > > + > > > > + /* Don't do the full vcpu_info placement stuff until we have a > > > > + possible map and a non-dummy shared_info. */ > > > > > > Might want to mention where the full vpcu placement is done. > > > > The comment is not accurate, we actually don't do any vcpu_info > > placement on hvm because it is not very useful there. > > Better just to remove the comment (I have done so in my tree). > > > > > > + per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; > > > > So.. what is the purpose of the per_cpu(xen_vcpu, 0) then? > the vcpu info placement memory area is stored in per_cpu(xen_vcpu_info, cpu); per_cpu(xen_vcpu, cpu) is just a pointer to that area if it is available, otherwise it points to the vcpu_info struct in the shared info page. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Jeremy Fitzhardinge on 8 Jun 2010 12:10 On 06/08/2010 06:46 AM, Konrad Rzeszutek Wilk wrote: >>>> + per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; >>>> >>> > So.. what is the purpose of the per_cpu(xen_vcpu, 0) then? > We still need the percpu info for things like time, but it is mapped out of the platform device rather than placed at any address we want in kernel memory (vcpu info placement), where we can access it directly as a percpu variable. This is only really relevent for the implementation of the interrupt enable/disable pvops, so it doesn't matter for hvm. J -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Konrad Rzeszutek Wilk on 8 Jun 2010 12:20 On Tue, Jun 08, 2010 at 04:55:33PM +0100, Stefano Stabellini wrote: > On Tue, 8 Jun 2010, Konrad Rzeszutek Wilk wrote: > > > > > + HYPERVISOR_shared_info = (struct shared_info *)shared_info_page; > > > > > + > > > > > + /* Don't do the full vcpu_info placement stuff until we have a > > > > > + possible map and a non-dummy shared_info. */ > > > > > > > > Might want to mention where the full vpcu placement is done. > > > > > > The comment is not accurate, we actually don't do any vcpu_info > > > placement on hvm because it is not very useful there. > > > Better just to remove the comment (I have done so in my tree). > > > > > > > > + per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; > > > > > > So.. what is the purpose of the per_cpu(xen_vcpu, 0) then? > > > > the vcpu info placement memory area is stored in per_cpu(xen_vcpu_info, cpu); > per_cpu(xen_vcpu, cpu) is just a pointer to that area if it is > available, otherwise it points to the vcpu_info struct in the shared > info page. I was just wondering why are we doing this when you say: " don't do any vcpu_info placement on hvm because it is not very useful there." So if it is not useful, why do it? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Stefano Stabellini on 8 Jun 2010 12:30 On Tue, 8 Jun 2010, Konrad Rzeszutek Wilk wrote: > On Tue, Jun 08, 2010 at 04:55:33PM +0100, Stefano Stabellini wrote: > > On Tue, 8 Jun 2010, Konrad Rzeszutek Wilk wrote: > > > > > > + HYPERVISOR_shared_info = (struct shared_info *)shared_info_page; > > > > > > + > > > > > > + /* Don't do the full vcpu_info placement stuff until we have a > > > > > > + possible map and a non-dummy shared_info. */ > > > > > > > > > > Might want to mention where the full vpcu placement is done. > > > > > > > > The comment is not accurate, we actually don't do any vcpu_info > > > > placement on hvm because it is not very useful there. > > > > Better just to remove the comment (I have done so in my tree). > > > > > > > > > > + per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; > > > > > > > > So.. what is the purpose of the per_cpu(xen_vcpu, 0) then? > > > > > > > the vcpu info placement memory area is stored in per_cpu(xen_vcpu_info, cpu); > > per_cpu(xen_vcpu, cpu) is just a pointer to that area if it is > > available, otherwise it points to the vcpu_info struct in the shared > > info page. > > I was just wondering why are we doing this when you say: > " don't do any vcpu_info placement on hvm because it is not very useful there." > > So if it is not useful, why do it? > I think Jeremy replied to your question better than me: we still need the vcpu_info stuff for the timer and event channels, but we don't need it to be at a specific address in kernel memory. That is useful only for the following pvops operations: pv_irq_ops.save_fl = __PV_IS_CALLEE_SAVE(xen_save_fl_direct); pv_irq_ops.restore_fl = __PV_IS_CALLEE_SAVE(xen_restore_fl_direct); pv_irq_ops.irq_disable = __PV_IS_CALLEE_SAVE(xen_irq_disable_direct); pv_irq_ops.irq_enable = __PV_IS_CALLEE_SAVE(xen_irq_enable_direct); pv_mmu_ops.read_cr2 = xen_read_cr2_direct; none of which are used in the hvm case. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: [PATCH 08/12] Fix possible NULL pointer dereference in print_IO_APIC Next: [PATCH 03/12] evtchn delivery on HVM |