From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3HCo-0006PP-MZ for qemu-devel@nongnu.org; Mon, 30 Nov 2015 00:40:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3HCl-0006JX-GD for qemu-devel@nongnu.org; Mon, 30 Nov 2015 00:40:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3HCl-0006J3-Ac for qemu-devel@nongnu.org; Mon, 30 Nov 2015 00:40:51 -0500 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> <20151129230755.5463b269@halley> From: Jason Wang Message-ID: <565BE15C.3030404@redhat.com> Date: Mon, 30 Nov 2015 13:40:44 +0800 MIME-Version: 1.0 In-Reply-To: <20151129230755.5463b269@halley> Content-Type: text/plain; charset=windows-1252 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: Shmulik Ladkani Cc: Dmitry Fleytman , idan.brown@ravellosystems.com, qemu-devel@nongnu.org On 11/30/2015 05:07 AM, Shmulik Ladkani wrote: > 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. Yes, it's a good idea to have a new type. Thanks