From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MsxeQ-0005uL-N5 for qemu-devel@nongnu.org; Wed, 30 Sep 2009 07:47:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MsxeO-0005sy-RP for qemu-devel@nongnu.org; Wed, 30 Sep 2009 07:47:18 -0400 Received: from [199.232.76.173] (port=47741 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MsxeN-0005sm-WD for qemu-devel@nongnu.org; Wed, 30 Sep 2009 07:47:16 -0400 Received: from fe02x03-cgp.akado.ru ([77.232.31.165]:57593 helo=akado.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MsxeN-00017q-JM for qemu-devel@nongnu.org; Wed, 30 Sep 2009 07:47:15 -0400 Date: Wed, 30 Sep 2009 15:47:17 +0400 (MSD) From: malc In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [Qemu-devel] Re: [PATCH 27/49] ac97: add active to the state List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org On Wed, 30 Sep 2009, Juan Quintela wrote: > malc wrote: > > On Tue, 29 Sep 2009, Juan Quintela wrote: > > > >> This simplifies reset_voices, that only takes one argument now. > >> > >> Signed-off-by: Juan Quintela > >> --- > >> hw/ac97.c | 42 ++++++++++++++++++++---------------------- > >> 1 files changed, 20 insertions(+), 22 deletions(-) > >> > >> diff --git a/hw/ac97.c b/hw/ac97.c > >> index 610ca60..da6cb2d 100644 > >> --- a/hw/ac97.c > >> +++ b/hw/ac97.c > >> @@ -146,6 +146,13 @@ typedef struct AC97BusMasterRegs { > >> BD bd; > >> } AC97BusMasterRegs; > >> > >> +enum { > >> + PI_INDEX = 0, > >> + PO_INDEX, > >> + MC_INDEX, > >> + LAST_INDEX > >> +}; > > > > And this was moved becasue...? > > Because I need LAST_INDEX in next part that you quoted. Ah, missed that, yes. > >> + > >> typedef struct AC97LinkState { > >> PCIDevice dev; > >> QEMUSoundCard card; > >> @@ -162,6 +169,7 @@ typedef struct AC97LinkState { > >> uint8_t silence[128]; > >> uint32_t base[2]; > >> int bup_flag; > >> + uint8_t active[LAST_INDEX]; > > > > This doesn't belong here, cause the only purpose i can see is to hack > > around defficiencies of the new load/savevm APIs. > > That was supposed to be one of the features, not deficiences. You can't > sent stuff that it is not in the state. It is "by design" that you can't > sent arbitrary variables. active doesn't belong in the above structure, it's not used for anything other than save/loadvm. If this "design" doesn't allow this, either find another way to accomplish the same or fix the "design". -- mailto:av1474@comtv.ru