All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Don't use QEMU_VERSION in ATA/ATAPI replies to IDENTIFY cmds
Date: Wed, 10 Sep 2008 19:30:21 -0500	[thread overview]
Message-ID: <48C8669D.2000103@codemonkey.ws> (raw)
In-Reply-To: <OF47F08F32.912096E4-ON852574C1.0001C90F@rapid7.com>

Marc Bevand wrote:
> At boottime, the licensing mechanism in Windows examines the reply to
> ATA/ATAPI IDENTIFY commands to determine if the hardware has been
> upgraded and whether Windows needs to be "reactivated" or not.
>
> I can confirm this because my Windows XP VM asked for reactivation
> after a QEMU upgrade and I was able to remove the need for
> reactivation by applying a patch similar to the one below (the
> versions were all hardcoded to "0.9.0" -- the version of QEMU I was
> running before).
>
> To prevent this kind of problem from happening again, I suggest QEMU
> stops returning its constantly changing version (QEMU_VERSION) in
> replies to IDENTIFY commands. Instead a constant version string
> such as "1.0" should be returned.
>   

Wouldn't it be better to just use whatever QEMU_VERSION is right now 
with a big fat comment? At least then, any VM made with QEMU 0.9.1 won't 
require reactivation.

No point in breaking everyone by changing it to 1.0.

Regards,

Anthony Liguori

> Comments ?
>
> -marc
>
>
> Index: hw/ide.c
> ===================================================================
> --- hw/ide.c	(revision 5193)
> +++ hw/ide.c	(working copy)
> @@ -549,7 +549,7 @@
>      put_le16(p + 20, 3); /* XXX: retired, remove ? */
>      put_le16(p + 21, 512); /* cache size in sectors */
>      put_le16(p + 22, 4); /* ecc bytes */
> -    padstr((char *)(p + 23), QEMU_VERSION, 8); /* firmware version */
> +    padstr((char *)(p + 23), "1.0", 8); /* firmware version */
>      padstr((char *)(p + 27), "QEMU HARDDISK", 40); /* model */
>  #if MAX_MULT_SECTORS > 1
>      put_le16(p + 47, 0x8000 | MAX_MULT_SECTORS);
> @@ -615,7 +615,7 @@
>      put_le16(p + 20, 3); /* buffer type */
>      put_le16(p + 21, 512); /* cache size in sectors */
>      put_le16(p + 22, 4); /* ecc bytes */
> -    padstr((char *)(p + 23), QEMU_VERSION, 8); /* firmware version */
> +    padstr((char *)(p + 23), "1.0", 8); /* firmware version */
>      padstr((char *)(p + 27), "QEMU DVD-ROM", 40); /* model */
>      put_le16(p + 48, 1); /* dword I/O (XXX: should not be set on CDROM) */
>  #ifdef USE_DMA_CDROM
> @@ -669,7 +669,7 @@
>      snprintf(buf, sizeof(buf), "QM%05d", s->drive_serial);
>      padstr((char *)(p + 10), buf, 20);	/* Serial number in ASCII */
>      put_le16(p + 22, 0x0004);			/* ECC bytes */
> -    padstr((char *) (p + 23), QEMU_VERSION, 8);	/* Firmware Revision */
> +    padstr((char *) (p + 23), "1.0", 8);	/* Firmware Revision */
>      padstr((char *) (p + 27), "QEMU MICRODRIVE", 40);/* Model number */
>  #if MAX_MULT_SECTORS > 1
>      put_le16(p + 47, 0x8000 | MAX_MULT_SECTORS);
> @@ -1821,7 +1821,7 @@
>          buf[7] = 0; /* reserved */
>          padstr8(buf + 8, 8, "QEMU");
>          padstr8(buf + 16, 16, "QEMU DVD-ROM");
> -        padstr8(buf + 32, 4, QEMU_VERSION);
> +        padstr8(buf + 32, 4, "1.0");
>          ide_atapi_cmd_reply(s, 36, max_len);
>          break;
>      case GPCMD_GET_CONFIGURATION:
>
>
>   

  reply	other threads:[~2008-09-11  0:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-11  0:19 [Qemu-devel] [PATCH] Don't use QEMU_VERSION in ATA/ATAPI replies to IDENTIFY cmds Marc Bevand
2008-09-11  0:30 ` Anthony Liguori [this message]
2008-09-11  1:19   ` Marc Bevand
2008-09-11  1:40     ` Glauber Costa
2008-09-11  3:34       ` Marc Bevand
2008-09-11  8:18         ` Jamie Lokier
2008-09-11 11:44           ` Glauber Costa
2008-09-11 11:56             ` Jamie Lokier
2008-09-11 13:58               ` Paul Brook
2008-09-11 14:11                 ` Avi Kivity
2008-09-11 15:16                 ` Ian Kirk
2008-09-11 15:55                   ` Paul Brook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48C8669D.2000103@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.