From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a39CW-00052j-Ib for qemu-devel@nongnu.org; Sun, 29 Nov 2015 16:08:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a39CR-0001Db-J2 for qemu-devel@nongnu.org; Sun, 29 Nov 2015 16:08:04 -0500 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:36179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a39CR-0001DP-8X for qemu-devel@nongnu.org; Sun, 29 Nov 2015 16:07:59 -0500 Received: by wmww144 with SMTP id w144so106959576wmw.1 for ; Sun, 29 Nov 2015 13:07:58 -0800 (PST) Date: Sun, 29 Nov 2015 23:07:55 +0200 From: Shmulik Ladkani Message-ID: <20151129230755.5463b269@halley> In-Reply-To: <56557047.7090205@redhat.com> References: <1447930344-17625-1-git-send-email-shmulik.ladkani@ravellosystems.com> <1447930344-17625-2-git-send-email-shmulik.ladkani@ravellosystems.com> <56551F3B.9020106@redhat.com> <20151125081820.0c147ea8@pixies> <56557047.7090205@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/4] vmxnet3: The vmxnet3 device is a PCIE endpoint List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: Dmitry Fleytman , idan.brown@ravellosystems.com, qemu-devel@nongnu.org Hi, On Wed, 25 Nov 2015 16:24:39 +0800 Jason Wang wrote: > >>> @@ -2568,6 +2572,7 @@ static void vmxnet3_class_init(ObjectClass *class, void *data) > >>> c->class_id = PCI_CLASS_NETWORK_ETHERNET; > >>> c->subsystem_vendor_id = PCI_VENDOR_ID_VMWARE; > >>> c->subsystem_id = PCI_DEVICE_ID_VMWARE_VMXNET3; > >>> + c->is_express = 1; > >> Should we do this conditionally? And how about the migration > >> compatibility? Looks like pcie device is using vmstate_pcie_device > >> instead of vmstate_pci_device, maybe need a new property bit for this. > > (Responding for the entire series) > > > > Agreed. Will limit these changes for new versions. > > > > What's your suggested plan? > > Does it make sense to have a property for each change (as they are not > > necessarily related), or is it too tedious and one property will suffice? > > Since they are not necessarily related, we'd better use a property for > each change. Would it make sense if we expose a new vmxnet3 type to differenciate pcie vs pci instances of vmxnet3? Otherwise, migration gets more complicated, as we need to use either vmstate_pci_device or vmstate_pcie_device; also, upon vm load, we need to preserve the semantics saved (whether the instance was pci or pcie). I have managed to do so, but is a bit tedious; Exposing a new type seems cleaner.