[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 5/8] ide/pci: convert to qdev.

From: Gerd Hoffmann
Subject: [Qemu-devel] Re: [PATCH 5/8] ide/pci: convert to qdev.
Date: Fri, 11 Sep 2009 21:16:36 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3

On 09/11/09 17:16, Juan Quintela wrote:
But now we look at savevm.c::vmstate_load_state()

        if (field->flags&  VMS_POINTER) {
             base_addr = *(void **)base_addr;

And you see this really nice piece of code.  Each time that we follow a
pointer, we have to read something for a table, hope that value is
right, and follow it.

Do you see know why I want to have the minimal amount of pointers
possible to follow?


Sure, you have to dereference the pointer. I still don't see a problem here. You seem to think this is fragile. Why do you think so? Typechecking missing somewhere?

And yes, I understand why you don't want qdev_create_here() idea, I am
pointing this out to make sure that everybody agrees that not having
qdev_create_here() and having rest of code use more
pointers/malloc/... is the right compromise.

I'm sure you'll need VMS_POINTER anyway. There will be corner cases which don't work without. I think the floppy fifo is one of them.

It is perfectly fine to avoid the pointer indirection if possible.
It isn't the most important thing on earth though.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]