From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7cTE-0006Xu-V7 for qemu-devel@nongnu.org; Mon, 09 Nov 2009 17:12:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7cT9-0006Uv-W3 for qemu-devel@nongnu.org; Mon, 09 Nov 2009 17:12:20 -0500 Received: from [199.232.76.173] (port=40796 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7cT9-0006Uk-QK for qemu-devel@nongnu.org; Mon, 09 Nov 2009 17:12:15 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:36344) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N7cT9-0002VO-7e for qemu-devel@nongnu.org; Mon, 09 Nov 2009 17:12:15 -0500 Message-ID: <4AF893BC.2040507@web.de> Date: Mon, 09 Nov 2009 23:12:12 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <204026d59328febd9789.1257800737@localhost.localdomain> In-Reply-To: <204026d59328febd9789.1257800737@localhost.localdomain> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA7BC0483AA5D743DD9A10EFF" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 1 of 2] kvm: Move KVM mp_state accessors to i386-specific code List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hollis Blanchard Cc: Anthony Liguori , qemu-devel , kvm-ppc This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA7BC0483AA5D743DD9A10EFF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hollis Blanchard wrote: > Unbreaks PowerPC and S390 KVM builds. What breaks precisely? Note that KVM_GET/SET_MP_STATE are generic IOCTLs and supposed to be shared with ia64 - one day. We could still move things back then, but maybe we can handle the build issues already in place, specifically as qemu-kvm is carrying this in generic code since ages. Jan >=20 > Signed-off-by: Hollis Blanchard >=20 > diff --git a/kvm-all.c b/kvm-all.c > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -207,26 +207,6 @@ err: > return ret; > } > =20 > -int kvm_put_mp_state(CPUState *env) > -{ > - struct kvm_mp_state mp_state =3D { .mp_state =3D env->mp_state }; > - > - return kvm_vcpu_ioctl(env, KVM_SET_MP_STATE, &mp_state); > -} > - > -int kvm_get_mp_state(CPUState *env) > -{ > - struct kvm_mp_state mp_state; > - int ret; > - > - ret =3D kvm_vcpu_ioctl(env, KVM_GET_MP_STATE, &mp_state); > - if (ret < 0) { > - return ret; > - } > - env->mp_state =3D mp_state.mp_state; > - return 0; > -} > - > /* > * dirty pages logging control > */ > diff --git a/kvm.h b/kvm.h > --- a/kvm.h > +++ b/kvm.h > @@ -74,9 +74,6 @@ int kvm_vm_ioctl(KVMState *s, int type,=20 > =20 > int kvm_vcpu_ioctl(CPUState *env, int type, ...); > =20 > -int kvm_get_mp_state(CPUState *env); > -int kvm_put_mp_state(CPUState *env); > - > /* Arch specific hooks */ > =20 > int kvm_arch_post_run(CPUState *env, struct kvm_run *run); > diff --git a/target-i386/kvm.c b/target-i386/kvm.c > --- a/target-i386/kvm.c > +++ b/target-i386/kvm.c > @@ -659,6 +659,26 @@ static int kvm_get_msrs(CPUState *env) > return 0; > } > =20 > +static int kvm_put_mp_state(CPUState *env) > +{ > + struct kvm_mp_state mp_state =3D { .mp_state =3D env->mp_state }; > + > + return kvm_vcpu_ioctl(env, KVM_SET_MP_STATE, &mp_state); > +} > + > +static int kvm_get_mp_state(CPUState *env) > +{ > + struct kvm_mp_state mp_state; > + int ret; > + > + ret =3D kvm_vcpu_ioctl(env, KVM_GET_MP_STATE, &mp_state); > + if (ret < 0) { > + return ret; > + } > + env->mp_state =3D mp_state.mp_state; > + return 0; > +} > + > int kvm_arch_put_registers(CPUState *env) > { > int ret; --------------enigA7BC0483AA5D743DD9A10EFF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkr4k8AACgkQitSsb3rl5xQnxwCdEds9Hilb9owpmVued7CTGnbL ktcAoL9pOOKEIlIySjZPVGU8u+Z0YXdX =9Fqp -----END PGP SIGNATURE----- --------------enigA7BC0483AA5D743DD9A10EFF--