| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Workings/effectiveness of the xen-acpi-processor driver
 On 05/02/2012 05:41 PM, Konrad Rzeszutek Wilk wrote: On Wed, May 02, 2012 at 02:31:07PM -0700, Boris Ostrovsky wrote:On 05/02/2012 01:14 PM, Konrad Rzeszutek Wilk wrote:On Wed, May 02, 2012 at 01:06:34PM -0400, Boris Ostrovsky wrote:On 05/02/2012 12:08 PM, Konrad Rzeszutek Wilk wrote: I agree that for this particular problem this may be sufficient.My concern is that in the future someone may decide to use apic_read(APIC_ID) or read_apic_id() for some other purpose and they won't get expected result (i.e. on all CPUs they will get the same answer). but I am wondering whether in the future we might hit another bug because this routine will return the same APICID for all VCPUs.Later on it does a check for 'smp_processor_id()' - and if that is anything but zero it will bail out.Can you point me to the check you are referring to?if (!xen_initial_domain() || smp_processor_id()) I don't see this line --- neither in the mainline nor in your kernel. Which kernel and which routine is this in? BTW, this patch doesn't quite work, xen-acpi-processor driver fails to load with the same error as before. I'll look at this tomorrow more carefully. -boris -borisSo this shoudl solve the problem for the bootup processor.-boris+ }; + int ret = 0; + + /* Shouldn't need this as APIC is turned off for PV, and we only + * get called on the bootup processor. But just in case. */ + if (!xen_initial_domain() || smp_processor_id()) + return 0; + + if (reg == APIC_LVR) + return 0x10; + + if (reg != APIC_ID) + return 0; + + ret = HYPERVISOR_dom0_op(&op); + if (ret) + return 0; + + return op.u.pcpu_info.apic_id; } static void xen_apic_write(u32 reg, u32 val)_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel 
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |