From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] Rename KVM_UPSTREAM to OBSOLETE_KVM_IMPL Date: Mon, 13 Sep 2010 20:52:24 +0200 Message-ID: <4C8E72E8.1090706@web.de> References: <1284400455-29591-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC14C46725CB77591976C1C1F" Cc: kvm@vger.kernel.org, Marcelo Tosatti To: Avi Kivity Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:36144 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754372Ab0IMSw1 (ORCPT ); Mon, 13 Sep 2010 14:52:27 -0400 In-Reply-To: <1284400455-29591-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC14C46725CB77591976C1C1F Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Am 13.09.2010 19:54, Avi Kivity wrote: > The symbol KVM_UPSTREAM is used to mark sections of code that are part = of > the upstream kvm implemetation that is not used in qemu-kvm. However t= he > name becomes ambiguous if qemu-kvm is merged upstream. I doubt this is describing all cases correctly as well. Some changes should rather happen the other way around (e.g. you surely don't want to obsolete x86 kvm_arch_put/get_registers in favor of kvm_arch_load/save_regs, do you?). Jan >=20 > Rename the symbol to avoid confusion. >=20 > Signed-off-by: Avi Kivity > --- > cpus.c | 2 +- > kvm-all.c | 16 ++++++++-------- > kvm.h | 6 +++--- > target-i386/kvm.c | 10 +++++----- > vl.c | 4 ++-- > 5 files changed, 19 insertions(+), 19 deletions(-) >=20 > diff --git a/cpus.c b/cpus.c > index c545a62..99c04d1 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -299,7 +299,7 @@ void qemu_notify_event(void) > } > } > =20 > -#if defined(KVM_UPSTREAM) || !defined(CONFIG_KVM) > +#if defined(OBSOLETE_KVM_IMPL) || !defined(CONFIG_KVM) > void qemu_mutex_lock_iothread(void) {} > void qemu_mutex_unlock_iothread(void) {} > #endif > diff --git a/kvm-all.c b/kvm-all.c > index 4ff75c4..d4b0861 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -41,7 +41,7 @@ > do { } while (0) > #endif > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > =20 > typedef struct KVMSlot > { > @@ -156,7 +156,7 @@ static int kvm_set_user_memory_region(KVMState *s, = KVMSlot *slot) > return kvm_vm_ioctl(s, KVM_SET_USER_MEMORY_REGION, &mem); > } > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > static void kvm_reset_vcpu(void *opaque) > { > CPUState *env =3D opaque; > @@ -176,7 +176,7 @@ int kvm_pit_in_kernel(void) > } > =20 > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > int kvm_init_vcpu(CPUState *env) > { > KVMState *s =3D kvm_state; > @@ -594,7 +594,7 @@ void kvm_cpu_register_phys_memory_client(void) > cpu_register_phys_memory_client(&kvm_cpu_phys_memory_client); > } > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > =20 > int kvm_init(int smp_cpus) > { > @@ -816,7 +816,7 @@ void kvm_flush_coalesced_mmio_buffer(void) > #endif > } > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > =20 > static void do_kvm_cpu_synchronize_state(void *_env) > { > @@ -1038,7 +1038,7 @@ int kvm_has_debugregs(void) > return kvm_state->debugregs; > } > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > int kvm_has_xsave(void) > { > return kvm_state->xsave; > @@ -1069,10 +1069,10 @@ void kvm_setup_guest_memory(void *start, size_t= size) > } > =20 > #ifdef KVM_CAP_SET_GUEST_DEBUG > -#ifndef KVM_UPSTREAM > +#ifndef OBSOLETE_KVM_IMPL > #define run_on_cpu on_vcpu > static void on_vcpu(CPUState *env, void (*func)(void *data), void *dat= a); > -#endif /* !KVM_UPSTREAM */ > +#endif /* !OBSOLETE_KVM_IMPL */ > =20 > struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env, > target_ulong pc) > diff --git a/kvm.h b/kvm.h > index d321fce..56236ae 100644 > --- a/kvm.h > +++ b/kvm.h > @@ -31,13 +31,13 @@ extern int kvm_allowed; > #define kvm_enabled() (0) > #endif > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > struct kvm_run; > =20 > /* external API */ > =20 > int kvm_init(int smp_cpus); > -#endif /* KVM_UPSTREAM */ > +#endif /* OBSOLETE_KVM_IMPL */ > =20 > int kvm_has_sync_mmu(void); > int kvm_has_vcpu_events(void); > @@ -96,7 +96,7 @@ int kvm_arch_handle_exit(CPUState *env, struct kvm_ru= n *run); > =20 > int kvm_arch_pre_run(CPUState *env, struct kvm_run *run); > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > int kvm_arch_process_irqchip_events(CPUState *env); > #endif > =20 > diff --git a/target-i386/kvm.c b/target-i386/kvm.c > index b00e80d..f4fc063 100644 > --- a/target-i386/kvm.c > +++ b/target-i386/kvm.c > @@ -188,7 +188,7 @@ int kvm_arch_init_vcpu(CPUState *env) > return r; > } > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > =20 > env->mp_state =3D KVM_MP_STATE_RUNNABLE; > =20 > @@ -304,7 +304,7 @@ void kvm_arch_reset_vcpu(CPUState *env) > env->mp_state =3D KVM_MP_STATE_RUNNABLE; > } > } > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > =20 > static int kvm_has_msr_star(CPUState *env) > { > @@ -644,7 +644,7 @@ static void kvm_msr_entry_set(struct kvm_msr_entry = *entry, > entry->data =3D value; > } > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > static int kvm_put_msrs(CPUState *env, int level) > { > struct { > @@ -1104,7 +1104,7 @@ static int kvm_get_debugregs(CPUState *env) > return 0; > } > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > int kvm_arch_put_registers(CPUState *env, int level) > { > int ret; > @@ -1242,7 +1242,7 @@ int kvm_arch_post_run(CPUState *env, struct kvm_r= un *run) > return 0; > } > =20 > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > =20 > int kvm_arch_process_irqchip_events(CPUState *env) > { > diff --git a/vl.c b/vl.c > index 22a3616..378a176 100644 > --- a/vl.c > +++ b/vl.c > @@ -2466,7 +2466,7 @@ int main(int argc, char **argv, char **envp) > case QEMU_OPTION_smbios: > do_smbios_option(optarg); > break; > -#ifdef KVM_UPSTREAM > +#ifdef OBSOLETE_KVM_IMPL > case QEMU_OPTION_enable_kvm: > kvm_allowed =3D 1; > #endif > @@ -2803,7 +2803,7 @@ int main(int argc, char **argv, char **envp) > if (kvm_allowed) { > int ret =3D kvm_init(smp_cpus); > if (ret < 0) { > -#if defined(KVM_UPSTREAM) || defined(CONFIG_NO_CPU_EMULATION) > +#if defined(OBSOLETE_KVM_IMPL) || defined(CONFIG_NO_CPU_EMULATION) > if (!kvm_available()) { > printf("KVM not supported for this target\n"); > } else { --------------enigC14C46725CB77591976C1C1F 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.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkyOcugACgkQitSsb3rl5xQZxQCgu6SDrJooMDW5v++CGrqko3G1 TGMAoJJ3/x5m7f0+IqwDkvOdlSXNlHCx =z3Nn -----END PGP SIGNATURE----- --------------enigC14C46725CB77591976C1C1F--