From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Bader Subject: Re: Workings/effectiveness of the xen-acpi-processor driver Date: Thu, 03 May 2012 16:47:46 +0200 Message-ID: <4FA29A92.2040601@canonical.com> References: <4F97F58A.8090409@canonical.com> <20120426155033.GE26830@phenom.dumpdata.com> <4F9976F8.8040502@canonical.com> <20120501200207.GA15313@phenom.dumpdata.com> <4FA06541.7050607@amd.com> <4FA14C2C.5030104@canonical.com> <20120502160812.GA6611@phenom.dumpdata.com> <4FA1699A.9070405@amd.com> <20120502171415.GA17477@phenom.dumpdata.com> <4FA1A79B.5040701@amd.com> <20120502214147.GA7670@phenom.dumpdata.com> <4FA1B096.5010009@amd.com> <4FA280DA.9080505@canonical.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6660960853952199437==" Return-path: In-Reply-To: <4FA280DA.9080505@canonical.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: "xen-devel@lists.xensource.com" , Jan Beulich , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============6660960853952199437== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig2866F1A5A83D44748554318C" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2866F1A5A83D44748554318C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03.05.2012 14:58, Stefan Bader wrote: >>>>> So this shoudl solve the problem for the bootup processor. >>>>>> >>>>>> -boris >>>>>> >>>>>> >>>>>>> + }; >>>>>>> + int ret =3D 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 =3D=3D APIC_LVR) >>>>>>> + return 0x10; >>>>>>> + >>>>>>> + if (reg !=3D APIC_ID) >>>>>>> + return 0; >>>>>>> + >>>>>>> + ret =3D HYPERVISOR_dom0_op(&op); >>>>>>> + if (ret) >>>>>>> + return 0; >>>>>>> + >>>>>>> + return op.u.pcpu_info.apic_id; >>>>>>> } >>>>>>> >>>>>>> static void xen_apic_write(u32 reg, u32 val) >=20 > I added debugging to all exit paths that could return 0 (which is what = the > boot_cpu_physical_apicid is set to with that patch. Which would only le= ave the > case of the HV call returning the wrong value somehow... >=20 Hmmm, so xen_apic_read is still correct... [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] xxx xen_apic_read(20) [ 0.000000] xxx xen_apic_read -> 10 [ 0.000000] boot_cpu_physical_apicid =3D 0 [ 0.000000] xxx xen_apic_read(30) [ 0.000000] +- apic version =3D 10 there seems to be a slightly strange tweak (at least for me) in read_apic= _id... static inline unsigned int read_apic_id(void) { unsigned int reg; reg =3D apic_read(APIC_ID); // calls apic->read(reg) return apic->get_apic_id(reg); } --------------enig2866F1A5A83D44748554318C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBCgAGBQJPopqSAAoJEOhnXe7L7s6jg2YQANpYYYt5zNi03Av89bRO6fNJ VDnDV03oTDNUR9cbra7OgjsQ3GkQSVwLTySa3LtSj7OEgwLQN0R8aeKgW5ONMsA/ DPYfUfDtlZAom4iuXv+GsDtFoaB9kv6CIewhgJGE2ySFLg1Dm2INsjPRXrigAPNH aj5IEO3CDDi2x8BMDCXQ7RMUwuu1dIKd4ZOAGdq7k4U3QDwbYZW5mCGVHQOXj3Rc h7YdQwzyrJekTD/0aiGE8YgpOt2BUtq7mUtUVTJHtI2OzPYDhsdtHhzq/g6yBnBc 5Tgg2t18l1jV14PuM8goKVYwuu+XWhrrCVvht4zRJpZuvH8eTElr6CeJlYC5oAbd +B8hwP1/+liUxhFwq1WK6QGF5kU+uGT6F5stIsFr6dUJxWY8CRQ6NtG9arqxaCD+ +83zOukaUNBKtNoFjsKt6tR/aBK+6tdAtXkanKXu6samTwD0E1id8vlM4hIZBZTe qa5kg8GbiGyovOrPEtTpyZ5RrxGURQ3UgydOdCOK9K3qwVWW3d0z8fMEGLVUomYv 4fFQNk864QkrMpG8+HawwvhXt705v90r9FPDJlamVfbWzgDgaF6NIJlxUloHPsTQ 91pCnWgeWYfZufu8BcBDcF3kSH6q6/tYzZOr0sM6XnuBJFzThcHqc+h8WrOArhd/ yXD++4Ml8e3f6iO1tF5o =oDlt -----END PGP SIGNATURE----- --------------enig2866F1A5A83D44748554318C-- --===============6660960853952199437== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============6660960853952199437==--