From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Date: Wed, 29 Apr 2009 11:36:43 +0000 Subject: Re: [Qemu-devel] [PATCH 4/7] kvm: Add sanity checks to slot management Message-Id: <49F83BCB.5090804@siemens.com> List-Id: References: <20090411172025.32383.77687.stgit@mchn012c.ww002.siemens.net> <20090411172026.32383.7492.stgit@mchn012c.ww002.siemens.net> <0A1FE637C2C7E148B9573BB60CC630E5210713@zch01exm26.fsl.freescale.net> <49F82E09.3070702@siemens.com> <0A1FE637C2C7E148B9573BB60CC630E5210719@zch01exm26.fsl.freescale.net> In-Reply-To: <0A1FE637C2C7E148B9573BB60CC630E5210719@zch01exm26.fsl.freescale.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Liu Yu-B13201 Cc: qemu-devel@nongnu.org, kvm-ppc@vger.kernel.org Liu Yu-B13201 wrote: >> -----Original Message----- >> From: Jan Kiszka [mailto:jan.kiszka@siemens.com] >> Sent: Wednesday, April 29, 2009 6:38 PM >> To: Liu Yu-B13201 >> Cc: qemu-devel@nongnu.org; kvm-ppc@vger.kernel.org >> Subject: Re: [Qemu-devel] [PATCH 4/7] kvm: Add sanity checks >> to slot management >> >> Liu Yu-B13201 wrote: >>>> -----Original Message----- >>>> From: qemu-devel-bounces+yu.liu=freescale.com@nongnu.org >>>> [mailto:qemu-devel-bounces+yu.liu=freescale.com@nongnu.org] >>>> On Behalf Of Jan Kiszka >>>> Sent: Sunday, April 12, 2009 1:20 AM >>>> To: qemu-devel@nongnu.org >>>> Subject: [Qemu-devel] [PATCH 4/7] kvm: Add sanity checks to >>>> slot management >>>> >>>> Fail loudly if we run out of memory slot. >>>> >>>> Make sure that dirty log start/stop works with consistent >>>> memory regions >>>> by reporting invalid parameters. This reveals several >>>> inconsistencies in >>>> the vga code, patch to fix them follows later in this series. >>>> >>>> And, for simplicity reasons, also catch and report unaligned memory >>>> regions passed to kvm_set_phys_mem (KVM works on page basis). >>>> >>> Commit d3f8d37fe2d0c24ec8bac9c94d5b0e2dc09c0d2a hurts kvm/powerpc >>> The alignment check in kvm_set_phys_mem prevents pci >> controller and mpic initializing mmio regions. >> >> What is the alignment of those regions then? None? >> And do regions of >> different types overlap even on the same page? > I think so. > >> Maybe the check reveals >> some deeper conflict /wrt KVM. Can you point me to the >> involved code files? >> > > hw/ppc4xx_pci.c ppc4xx_pci_init() > hw/ppce500_pci.c ppce500_pci_init() > hw/openpic.c mpic_init() > hw/ppce500_mpc8544ds.c serial_mm_init() > Hmm, too bad that I have no platform at hand to test this. Could you instrument kvm_set_phys_mem (on an older, working version), dumping its arguments and post this trace? TIA, Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lz85z-0001AW-G5 for qemu-devel@nongnu.org; Wed, 29 Apr 2009 07:36:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lz85u-00019g-Ur for qemu-devel@nongnu.org; Wed, 29 Apr 2009 07:36:58 -0400 Received: from [199.232.76.173] (port=39209 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lz85u-00019a-HL for qemu-devel@nongnu.org; Wed, 29 Apr 2009 07:36:54 -0400 Received: from lizzard.sbs.de ([194.138.37.39]:21806) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lz85u-0003LY-0Y for qemu-devel@nongnu.org; Wed, 29 Apr 2009 07:36:54 -0400 Message-ID: <49F83BCB.5090804@siemens.com> Date: Wed, 29 Apr 2009 13:36:43 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 4/7] kvm: Add sanity checks to slot management References: <20090411172025.32383.77687.stgit@mchn012c.ww002.siemens.net> <20090411172026.32383.7492.stgit@mchn012c.ww002.siemens.net> <0A1FE637C2C7E148B9573BB60CC630E5210713@zch01exm26.fsl.freescale.net> <49F82E09.3070702@siemens.com> <0A1FE637C2C7E148B9573BB60CC630E5210719@zch01exm26.fsl.freescale.net> In-Reply-To: <0A1FE637C2C7E148B9573BB60CC630E5210719@zch01exm26.fsl.freescale.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Yu-B13201 Cc: qemu-devel@nongnu.org, kvm-ppc@vger.kernel.org Liu Yu-B13201 wrote: >> -----Original Message----- >> From: Jan Kiszka [mailto:jan.kiszka@siemens.com] >> Sent: Wednesday, April 29, 2009 6:38 PM >> To: Liu Yu-B13201 >> Cc: qemu-devel@nongnu.org; kvm-ppc@vger.kernel.org >> Subject: Re: [Qemu-devel] [PATCH 4/7] kvm: Add sanity checks >> to slot management >> >> Liu Yu-B13201 wrote: >>>> -----Original Message----- >>>> From: qemu-devel-bounces+yu.liu=freescale.com@nongnu.org >>>> [mailto:qemu-devel-bounces+yu.liu=freescale.com@nongnu.org] >>>> On Behalf Of Jan Kiszka >>>> Sent: Sunday, April 12, 2009 1:20 AM >>>> To: qemu-devel@nongnu.org >>>> Subject: [Qemu-devel] [PATCH 4/7] kvm: Add sanity checks to >>>> slot management >>>> >>>> Fail loudly if we run out of memory slot. >>>> >>>> Make sure that dirty log start/stop works with consistent >>>> memory regions >>>> by reporting invalid parameters. This reveals several >>>> inconsistencies in >>>> the vga code, patch to fix them follows later in this series. >>>> >>>> And, for simplicity reasons, also catch and report unaligned memory >>>> regions passed to kvm_set_phys_mem (KVM works on page basis). >>>> >>> Commit d3f8d37fe2d0c24ec8bac9c94d5b0e2dc09c0d2a hurts kvm/powerpc >>> The alignment check in kvm_set_phys_mem prevents pci >> controller and mpic initializing mmio regions. >> >> What is the alignment of those regions then? None? >> And do regions of >> different types overlap even on the same page? > I think so. > >> Maybe the check reveals >> some deeper conflict /wrt KVM. Can you point me to the >> involved code files? >> > > hw/ppc4xx_pci.c ppc4xx_pci_init() > hw/ppce500_pci.c ppce500_pci_init() > hw/openpic.c mpic_init() > hw/ppce500_mpc8544ds.c serial_mm_init() > Hmm, too bad that I have no platform at hand to test this. Could you instrument kvm_set_phys_mem (on an older, working version), dumping its arguments and post this trace? TIA, Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux