From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRuYQ-0007yV-KL for qemu-devel@nongnu.org; Wed, 10 Sep 2014 22:56:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRuYG-0005dL-Uv for qemu-devel@nongnu.org; Wed, 10 Sep 2014 22:56:14 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:47314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRuYG-0005dD-P4 for qemu-devel@nongnu.org; Wed, 10 Sep 2014 22:56:04 -0400 Received: by mail-pa0-f53.google.com with SMTP id rd3so8107324pab.26 for ; Wed, 10 Sep 2014 19:56:04 -0700 (PDT) Message-ID: <54110F3C.3020104@ozlabs.ru> Date: Thu, 11 Sep 2014 12:55:56 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1409307142-2600-1-git-send-email-aik@ozlabs.ru> <1409307142-2600-17-git-send-email-aik@ozlabs.ru> <54104C39.4010106@suse.de> <541067AB.6030205@ozlabs.ru> <5410C000.2050408@suse.de> In-Reply-To: <5410C000.2050408@suse.de> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v3 16/18] spapr_pci_vfio: Enable DDW List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , qemu-devel@nongnu.org Cc: Alex Williamson , qemu-ppc@nongnu.org, David Gibson On 09/11/2014 07:17 AM, Alexander Graf wrote: > > > On 10.09.14 17:00, Alexey Kardashevskiy wrote: >> On 09/10/2014 11:03 PM, Alexander Graf wrote: >>> >>> >>> On 29.08.14 12:12, Alexey Kardashevskiy wrote: >>>> This implements DDW for VFIO. Host kernel support is required for this. >>>> >>>> After this patch DDW will be enabled on all machines but pseries-2.1. >>> >>> I fail to see the code that restricts DDW to pseries-2.1. Can you please >>> point me to it? >> >> Patch "[RFC PATCH v3 13/18] spapr_pci: Enable DDW" which enables DDW on >> spapr-pci disables it for the current machine by default. >> >> Since spapr-pci-vfio inherits from spapr-pci, this property is off for >> pseries-2.1 as well (I checked). > > Ah, I see. The logic is still reversed. Old machine types get compat > options, new machine types don't. So the default should be "ddw enabled" > and pseries-2.1 gets a compat field saying "disable ddw". I lost you here, sorry. "[RFC PATCH v3 13/18] spapr_pci: Enable DDW" once again: static void spapr_machine_2_1_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); + static GlobalProperty compat_props[] = { + { + .driver = TYPE_SPAPR_PCI_HOST_BRIDGE, + .property = "ddw", + .value = stringify(off), + }, + { /* end of list */ } + }; [...] @@ -682,6 +758,7 @@ static Property spapr_phb_properties[] = { DEFINE_PROP_UINT64("io_win_addr", sPAPRPHBState, io_win_addr, -1), DEFINE_PROP_UINT64("io_win_size", sPAPRPHBState, io_win_size, SPAPR_PCI_IO_WIN_SIZE), + DEFINE_PROP_BOOL("ddw", sPAPRPHBState, ddw_enabled, true), DEFINE_PROP_END_OF_LIST(), }; What is wrong here? -- Alexey