From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 6/6] libxl: add force option for xl vcpu-pin Date: Tue, 8 Mar 2016 14:29:12 +0100 Message-ID: <1457443752.3102.215.camel@citrix.com> References: <1457023730-10997-1-git-send-email-jgross@suse.com> <1457023730-10997-7-git-send-email-jgross@suse.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8918084677859408425==" Return-path: In-Reply-To: <1457023730-10997-7-git-send-email-jgross@suse.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Juergen Gross , xen-devel@lists.xen.org Cc: Ian Jackson , Wei Liu , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org --===============8918084677859408425== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-MSYuo4GC2y3IcvJHwC1N" --=-MSYuo4GC2y3IcvJHwC1N Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2016-03-03 at 17:48 +0100, Juergen Gross wrote: > In order to be able to undo a vcpu pin override in case of a kernel > driver error add a flag "-f" to the "xl vcpu-pin" command forcing the > hypervisor to undo the override. >=20 > Cc: Ian Jackson > Cc: Stefano Stabellini > Cc: Wei Liu > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli With the only comment that, here: > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -5344,6 +5344,10 @@ int main_vcpulist(int argc, char **argv) > =C2=A0 > =C2=A0int main_vcpupin(int argc, char **argv) > =C2=A0{ > +=C2=A0=C2=A0=C2=A0=C2=A0static struct option opts[] =3D { > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{"force", 0, 0, 'f'}, > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0COMMON_LONG_OPTS > +=C2=A0=C2=A0=C2=A0=C2=A0}; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0libxl_vcpuinfo *vcpuinfo; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0libxl_bitmap cpumap_hard, cpumap_soft;; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0libxl_bitmap *soft =3D &cpumap_soft, *hard = =3D &cpumap_hard; > @@ -5355,13 +5359,17 @@ int main_vcpupin(int argc, char **argv) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0long vcpuid; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0const char *vcpu, *hard_str, *soft_str; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0char *endptr; > -=C2=A0=C2=A0=C2=A0=C2=A0int opt, nb_cpu, nb_vcpu, rc =3D EXIT_FAILURE; > +=C2=A0=C2=A0=C2=A0=C2=A0int opt, nb_cpu, nb_vcpu, force =3D 0, rc =3D EX= IT_FAILURE; > =C2=A0 force can be bool. The Reviewed-by stands both with that changed, and as the patch looks now. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-MSYuo4GC2y3IcvJHwC1N Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlbe06gACgkQk4XaBE3IOsS5+QCdHwrpSIwfpOZO1PocjXfvVLdi mc0AnjbTZq0+ZiDxjmAh73oC7xxOt5fx =EcGn -----END PGP SIGNATURE----- --=-MSYuo4GC2y3IcvJHwC1N-- --===============8918084677859408425== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============8918084677859408425==--