Received: from eggs.gnu.org ([2001:4830:134:3::10]:33688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwtfX-0001Gg-Rq for qemu-devel@nongnu.org; Thu, 12 Nov 2015 10:20:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwtfO-0002qm-Ki for qemu-devel@nongnu.org; Thu, 12 Nov 2015 10:20:11 -0500 Date: Thu, 12 Nov 2015 13:19:53 -0200 From: Eduardo Habkost Message-ID: <20151112151953.GL4180@thinpad.lan.raisama.net> References: <1447279373-5006-1-git-send-email-ehabkost@redhat.com> <877flnvcz7.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877flnvcz7.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [RFC] ide: Don't use qemu_hw_version() for firmware revision List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Paolo Bonzini , John Snow , qemu-devel@nongnu.org, qemu-block@nongnu.org, "Michael S. Tsirkin" On Thu, Nov 12, 2015 at 09:27:56AM +0100, Markus Armbruster wrote: > Eduardo Habkost writes: > > > The IDEState.version field is used for firmware version > > information returned to the guest. Updating firmware information > > on QEMU upgrade is supposed to be acceptable, so IDE doesn't need > > the version compatibility magic of qemu_hw_version() and can use > > QEMU_VERSION directly. > > > > Signed-off-by: Eduardo Habkost > > --- > > I'm sending this just to start a discussion about what exactly we > > are supposed to return to the guest on those IDE fields. Should > > we return: > > > > 1) Something that never changes and don't reveal QEMU version > > information (e.g. "QEMU")? > > 2) Something that is always the same depending on the > > machine-type (machine-type name? MachineClass.hw_version?) > > 3) Something that change every time QEMU is upgraded (QEMU_VERSION)? > > 4) Something else? > > > > This patch implements option (3). > > > > --- > > hw/ide/core.c | 2 +- > > hw/ide/internal.h | 2 ++ > > 2 files changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/hw/ide/core.c b/hw/ide/core.c > > index 364ba21..1602707 100644 > > --- a/hw/ide/core.c > > +++ b/hw/ide/core.c > > @@ -2312,7 +2312,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind kind, > > if (version) { > > pstrcpy(s->version, sizeof(s->version), version); > > } else { > > - pstrcpy(s->version, sizeof(s->version), qemu_hw_version()); > > + pstrcpy(s->version, sizeof(s->version), QEMU_VERSION); > > Is s->version migrated? AFAICS, it's not. > > If no, live migration to a newer QEMU changes the version, doesn't it? > The "firmware upgrade is acceptable" argument doesn't apply there. I > guess a spontaneous version change is relatively unlikely to cause > trouble, but why risk it? Good point. Michael proposed we just change the default value of qemu_hw_version() to something constant (like "3.0" or "2.5+") starting on pc-*-2.5, and never update hw_version on newer machine-types anymore. I think his proposal makes sense. -- Eduardo