From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VyzCG-0000NI-NE for qemu-devel@nongnu.org; Fri, 03 Jan 2014 02:29:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VyzCA-0000Kl-3W for qemu-devel@nongnu.org; Fri, 03 Jan 2014 02:29:32 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:58865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VyzC9-0000Ir-Qj for qemu-devel@nongnu.org; Fri, 03 Jan 2014 02:29:26 -0500 Received: by mail-pd0-f181.google.com with SMTP id p10so14932029pdj.26 for ; Thu, 02 Jan 2014 23:29:24 -0800 (PST) Message-ID: <52C666D3.20801@ozlabs.ru> Date: Fri, 03 Jan 2014 18:29:23 +1100 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1373951995-9866-1-git-send-email-aik@ozlabs.ru> <20131209163357.14448.60087.stgit@bahia.local> <52A67FB9.60109@ozlabs.ru> <20131210084723.43cb0e74@bahia.local> <52A80A9B.200@ozlabs.ru> <8E202663-C6A5-48A7-BBE3-525EC0DE1D61@suse.de> <52C5E355.2040006@ozlabs.ru> <2BBD26CB-59F6-40C9-A77C-4B61BED16FD5@suse.de> In-Reply-To: <2BBD26CB-59F6-40C9-A77C-4B61BED16FD5@suse.de> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] spapr-pci: remove io ports workaround List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: QEMU Developers , qemu-ppc , Anthony Liguori , Paolo Bonzini , David Gibson , Paul Mackerras On 03.01.2014 9:09, Alexander Graf wrote: > > On 02.01.2014, at 23:08, Alexey Kardashevskiy wrote: > >> On 01/03/2014 08:04 AM, Alexander Graf wrote: >>> >>> On 11.12.2013, at 07:47, Alexey Kardashevskiy wrote: >>> >>>> On 12/10/2013 06:47 PM, Greg Kurz wrote: >>>>> On Tue, 10 Dec 2013 13:43:05 +1100 >>>>> Alexey Kardashevskiy wrote: >>>>>> On 12/10/2013 03:33 AM, Greg Kurz wrote: >>>>>>> In the past, IO space could not be mapped into the memory address space >>>>>>> so we introduced a workaround for that. Nowadays it does not look >>>>>>> necessary so we can remove the workaround and make sPAPR PCI >>>>>>> configuration simplier. >>>>>>> >>>>>>> This workaround has also an evil side effect with virtio devices: >>>>>>> because all PHBs have their .io region at the same address, the devices >>>>>>> get mapped in the .io-alias region of every PHB (AKA. mapped multiple >>>>>>> times). This breaks the ioeventfd feature and causes qemu to abort() >>>>>>> when running with KVM and asking for more than one PHB: >>>>>>> >>>>>>> $ qemu-system-ppc64 -machine type=pseries,accel=kvm -smp 1 -m 4G \ >>>>>>> -hda /local/greg/images/fedora-be.qcow2 \ >>>>>>> -device >>>>>>> virtio-9p-pci,fsdev=fsdev0,mount_tag=share,bus=pci,ioeventfd=on \ >>>>>>> -fsdev local,security_model=none,id=fsdev0,path=$HOME/share1 \ -device >>>>>>> spapr-pci-host-bridge,index=15 kvm_mem_ioeventfd_add: error adding >>>>>>> ioeventfd: File exists Aborted >>>>>>> >>>>>>> This will prevent to use virtio and VFIO passthrough at the same time, >>>>>>> since VFIO needs a dedicated PHB to work on ppc. >>>>>>> >>>>>>> Signed-off-by: Alexey Kardashevskiy >>>>>> >>>>>> >>>>>> I have not seen this version yet so please remove me from "SOB". The patch >>>>>> you replied to was eventually reworked and went to upstream as >>>>>> 66aab867cedd2a2d81b4d64eff7c3e0f6f272bbf >>>>>> >>>>> >>>>> Hi Alex, >>>>> >>>>> I agree you have not seen this version yet... The patch I replied to was my >>>>> primary source of inspiration and contains these bits, hence the SOB. >>>>> Anyway, the SOB is now removed until you decide to add one yourself. :) >>>>> >>>>>> This one might be correct too but I want to try this first :) >>>>>> >>>>> >>>>> Well, I hope it is. Please try it. >>>> >>>> >>>> Yep. Tried. Looks good, did not break a thing as far as I can tell, even >>>> VGA works :) >>>> >>>> >>>> Signed-off-by: Alexey Kardashevskiy >>> >>> Thanks, applied to ppc-next. >> >> >> Please read the rest of this thread. It does not visibly break things but >> with this patch QEMU starts calling unassigned_mem_accepts() (normally >> silent) which is not a good sign. > > Oops, I thought your comment meant this was fixed. I took it off the queue again :). Thanks :) And I have another bug like that - SPR registers are never saved/restored via KVM's set-one-reg mechanism (with the loop through all 1024 SPRs) because one_reg_id in SPR's descriptor is never initialized (the macro misses assignment) and I made a patch for that but cannot post it as some registers (AMR?) breaks HV KVM :) -- With best regards Alexey Kardashevskiy -- icq: 52150396