Re: [PATCH/RFC 0/4] dma ops and virtio

2015-11-03 Thread Christian Borntraeger
Am 02.11.2015 um 21:23 schrieb Andy Lutomirski: > On Mon, Nov 2, 2015 at 3:16 AM, Cornelia Huck > wrote: >> On Fri, 30 Oct 2015 13:33:07 -0700 >> Andy Lutomirski wrote: >> >>> On Fri, Oct 30, 2015 at 1:25 AM, Cornelia Huck >>> wrote: On Thu, 29 Oct 2015 15:50:38 -0700 Andy Lutomirski

[PATCH v5 4/4] KVM: arm/arm64: Merge vgic_set_lr() and vgic_sync_lr_elrsr()

2015-11-03 Thread Pavel Fedin
Now we see that vgic_set_lr() and vgic_sync_lr_elrsr() are always used together. Merge them into one function, saving from second vgic_ops dereferencing every time. Signed-off-by: Pavel Fedin --- include/kvm/arm_vgic.h | 1 - virt/kvm/arm/vgic-v2.c | 5 - virt/kvm/arm/vgic-v3.c | 5 -

[PATCH v5 0/4] KVM: arm/arm64: Clean up some obsolete code

2015-11-03 Thread Pavel Fedin
Current KVM code has lots of old redundancies, which can be cleaned up. This patchset is actually a better alternative to http://www.spinics.net/lists/arm-kernel/msg430726.html, which allows to keep piggy-backed LRs. The idea is based on the fact that our code also maintains LR state in elrsr, and

[PATCH v5 2/4] KVM: arm/arm64: Replace lr_used with elrsr

2015-11-03 Thread Pavel Fedin
Since commit ae705930fca6322600690df9dc1c7d0516145a93 ("arm/arm64: KVM: Keep elrsr/aisr in sync with software model") lr_used is completely redundant, because together with lr_used we also update elrsr. This allows to easily replace lr_used with elrsr, inverting all conditions (because in elrsr '1'

[PATCH v5 1/4] KVM: arm/arm64: Remove vgic_irq_lr_map

2015-11-03 Thread Pavel Fedin
Currently we use vgic_irq_lr_map in order to track which LRs hold which IRQs, and lr_used bitmap in order to track which LRs are used or free. vgic_irq_lr_map is actually used only in one place for piggy-back optimization, and can be easily replaced by iteration over lr_used. Therefore we remove i

[PATCH v5 3/4] KVM: arm/arm64: Clean up vgic_retire_lr() and surroundings

2015-11-03 Thread Pavel Fedin
1. Remove unnecessary 'irq' argument, because irq number can be retrieved from the LR. 2. Since commit cff9211eb1a1f58ce7f5a2d596b617928fd4be0e ("arm/arm64: KVM: Fix arch timer behavior for disabled interrupts") LR_STATE_PENDING is queued back by vgic_retire_lr() itself. Also, it clears vl

Re: [PATCH 0/3] KVM: x86: simplify RSM into 64-bit protected mode

2015-11-03 Thread Laszlo Ersek
On 11/02/15 10:32, Paolo Bonzini wrote: > > > On 31/10/2015 20:50, Laszlo Ersek wrote: >> Tested-by: Laszlo Ersek > > Thanks Laszlo, I applied patches 1 and 2 (since your "part 2" never was :)). > > Paolo > Thanks. Since you can rebase the queue freely, can you please also add: Reported-by

RE: [PATCH v4 0/3] KVM: arm/arm64: Clean up some obsolete code

2015-11-03 Thread Pavel Fedin
Hello! > By this time i'll make a very minimal version of patch 0001, for you to test > it. If we have > problems with current 0001, which we > cannot solve quickly, we could stick to that version then, which will provide > the necessary > changes to plug in LPIs, yet with > minimal changes (i

Re: [kvm-unit-tests PATCH 00/14] ppc64: initial drop

2015-11-03 Thread Paolo Bonzini
On 03/11/2015 08:08, Thomas Huth wrote: > On 03/08/15 16:41, Andrew Jones wrote: >> > This series is the first series of a series of series that will >> > bring support to kvm-unit-tests for ppc64, and eventually ppc64le. > Hi Andrew, > > may I ask about the current state of ppc64 support in th

Re: [PATCH] KVM: VMX: fix SMEP and SMAP without EPT

2015-11-03 Thread Paolo Bonzini
On 02/11/2015 22:20, Radim Krčmář wrote: > The comment in code had it mostly right, but we enable paging for > emulated real mode regardless of EPT. > > Without EPT (which implies emulated real mode), secondary VCPUs won't > start unless we disable SM[AE]P when the guest doesn't use paging. > >

Re: [PATCH 0/3] KVM: x86: simplify RSM into 64-bit protected mode

2015-11-03 Thread Paolo Bonzini
On 03/11/2015 10:40, Laszlo Ersek wrote: > On 11/02/15 10:32, Paolo Bonzini wrote: >> >> >> On 31/10/2015 20:50, Laszlo Ersek wrote: >>> Tested-by: Laszlo Ersek >> >> Thanks Laszlo, I applied patches 1 and 2 (since your "part 2" never was :)). >> >> Paolo >> > > Thanks. > > Since you can rebas

Re: [PATCH] KVM: VMX: Fix commit which broke PML

2015-11-03 Thread Paolo Bonzini
On 03/11/2015 06:49, Kai Huang wrote: > I found PML was broken since below commit: > > commit feda805fe7c4ed9cf78158e73b1218752e3b4314 > Author: Xiao Guangrong > Date: Wed Sep 9 14:05:55 2015 +0800 > > KVM: VMX: unify SECONDARY_VM_EXEC_CONTROL update > >

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-03 Thread Paolo Bonzini
On 29/10/2015 10:01, Michael S. Tsirkin wrote: > > Everyone seems to agree that x86's emulated Q35 thing > > is just buggy right now and should be taught to use the existing ACPI > > mechanism for enumerating passthrough devices. > > I'm not sure what ACPI has to do with it. > It's about a way f

Re: [PATCH] KVM: x86: fix eflags state following processor init/reset

2015-11-03 Thread Paolo Bonzini
On 28/10/2015 09:10, Nadav Amit wrote: > Here are my 5 cents. Note that vmx_vcpu_reset calls: > > vmcs_writel(GUEST_RFLAGS, 0x02); > > (And the RFLAGS value is not cached by KVM, so no consistency problem should > occur.) > > You may want to change the value into constant or call a wrapp

[PATCH v2] KVM: x86: Reset RFLAGS state following processor init/reset

2015-11-03 Thread Wanpeng Li
Reference SDM Volume 1 3.4.3: Following initialization of the processor (either by asserting the RESET pin or the INIT pin), the state of the EFLAGS register is 0002H. However, the eflags fixed bit is not set and other bits are also not cleared during the init/reset in kvm. This patch res

[PATCH 3/3] s390/dma: Allow per device dma ops

2015-11-03 Thread Christian Borntraeger
As virtio-ccw now has dma ops, we can no longer default to the PCI ones. Make use of dev_archdata to keep the dma_ops per device. The pci devices now use that to override the default, and the default is changed to use the noop ops for everything that is not PCI. To compile without PCI support we al

[PATCH 1/3] dma: Provide simple noop dma ops

2015-11-03 Thread Christian Borntraeger
We are going to require dma_ops for several common drivers, even for systems that do have an identity mapping. Lets provide some minimal no-op dma_ops that can be used for that purpose. Signed-off-by: Christian Borntraeger --- include/linux/dma-mapping.h | 2 ++ lib/Makefile| 1

[PATCH 2/3] alpha/dma: use common noop dma ops

2015-11-03 Thread Christian Borntraeger
Some of the alpha pci noop dma ops are identical to the common ones. Use them. Signed-off-by: Christian Borntraeger Reviewed-by: Joerg Roedel --- arch/alpha/kernel/pci-noop.c | 46 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/arch/a

[PATCHv3 0/3] dma ops and virtio

2015-11-03 Thread Christian Borntraeger
Andy, this is the next and hopefully last version. Seems to work fine when replacing the previous patches in your tree. I have some reviews/acks for patch 2 and 3. patch 1 still needs one ack. Can you replace the patches in your tree and carry them along with your changes? old introduction: -

Re: [PATCH v2] KVM: x86: Reset RFLAGS state following processor init/reset

2015-11-03 Thread Paolo Bonzini
On 03/11/2015 12:40, Wanpeng Li wrote: > Reference SDM Volume 1 3.4.3: > > Following initialization of the processor (either by asserting the > RESET pin or the INIT pin), the state of the EFLAGS register is > 0002H. > > However, the eflags fixed bit is not set and other bits are also not

Re: [PATCH 3/3] s390/dma: Allow per device dma ops

2015-11-03 Thread Cornelia Huck
On Tue, 3 Nov 2015 12:54:39 +0100 Christian Borntraeger wrote: > As virtio-ccw now has dma ops, we can no longer default to the PCI ones. > Make use of dev_archdata to keep the dma_ops per device. The pci devices > now use that to override the default, and the default is changed to use > the noo

Re: [Qemu-devel] [PATCH v7 06/35] acpi: add aml_method_serialized

2015-11-03 Thread Igor Mammedov
On Mon, 2 Nov 2015 17:13:08 +0800 Xiao Guangrong wrote: > It avoid explicit Mutex and will be used by NVDIMM ACPI > > Signed-off-by: Xiao Guangrong > --- > hw/acpi/aml-build.c | 26 -- > include/hw/acpi/aml-build.h | 1 + > 2 files changed, 25 insertions(+), 2

Re: [PATCH v7 09/35] exec: allow file_ram_alloc to work on file

2015-11-03 Thread Igor Mammedov
On Mon, 2 Nov 2015 17:13:11 +0800 Xiao Guangrong wrote: > Currently, file_ram_alloc() only works on directory - it creates a file > under @path and do mmap on it > > This patch tries to allow it to work on file directly, if @path is a > directory it works as before, otherwise it treats @path as

Re: [PATCH v1 2/2] dma-mapping-common: add DMA attribute - DMA_ATTR_IOMMU_BYPASS

2015-11-03 Thread Christoph Hellwig
On Tue, Nov 03, 2015 at 10:08:13AM +1100, Benjamin Herrenschmidt wrote: > On Mon, 2015-11-02 at 22:45 +0100, Arnd Bergmann wrote: > > > Then I would argue for naming this differently. Make it an optional > > > hint "DMA_ATTR_HIGH_PERF" or something like that. Whether this is > > > achieved via usin

Re: [PATCH v7 27/35] nvdimm acpi: build ACPI nvdimm devices

2015-11-03 Thread Igor Mammedov
On Mon, 2 Nov 2015 17:13:29 +0800 Xiao Guangrong wrote: > NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices > > There is a root device under \_SB and specified NVDIMM devices are under the > root device. Each NVDIMM device has _ADR which returns its handle used to > associate MEMDEV str

Re: [PATCH v3 9/9] kvm/x86: Hyper-V kvm exit

2015-11-03 Thread Paolo Bonzini
On 22/10/2015 18:10, Andrey Smetanin wrote: > A new vcpu exit is introduced to notify the userspace of the > changes in Hyper-V SynIC configuration triggered by guest writing to the > corresponding MSRs. > > Changes v3: > * added KVM_EXIT_HYPERV types and structs notes into docs > > Signed-off-

[PATCH] KVM: x86: allow RSM from 64-bit mode

2015-11-03 Thread Paolo Bonzini
The SDM says that exiting system management mode from 64-bit mode is invalid, but that would be too good to be true. But actually, most of the code is already there to support exiting from compat mode (EFER.LME=1, EFER.LMA=0). Getting all the way from 64-bit mode to real mode only requires cleari

Re: [PATCH v3 9/9] kvm/x86: Hyper-V kvm exit

2015-11-03 Thread Andrey Smetanin
On 11/03/2015 04:28 PM, Paolo Bonzini wrote: On 22/10/2015 18:10, Andrey Smetanin wrote: A new vcpu exit is introduced to notify the userspace of the changes in Hyper-V SynIC configuration triggered by guest writing to the corresponding MSRs. Changes v3: * added KVM_EXIT_HYPERV types and st

Re: [Qemu-devel] [PATCH v7 06/35] acpi: add aml_method_serialized

2015-11-03 Thread Xiao Guangrong
On 11/03/2015 08:30 PM, Igor Mammedov wrote: On Mon, 2 Nov 2015 17:13:08 +0800 Xiao Guangrong wrote: It avoid explicit Mutex and will be used by NVDIMM ACPI Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 26 -- include/hw/acpi/aml-build.h | 1 +

Re: [PATCH v7 09/35] exec: allow file_ram_alloc to work on file

2015-11-03 Thread Xiao Guangrong
On 11/03/2015 08:34 PM, Igor Mammedov wrote: On Mon, 2 Nov 2015 17:13:11 +0800 Xiao Guangrong wrote: Currently, file_ram_alloc() only works on directory - it creates a file under @path and do mmap on it This patch tries to allow it to work on file directly, if @path is a directory it works

Re: [PATCH] KVM: x86: allow RSM from 64-bit mode

2015-11-03 Thread Laszlo Ersek
On 11/03/15 14:29, Paolo Bonzini wrote: > The SDM says that exiting system management mode from 64-bit mode > is invalid, but that would be too good to be true. But actually, > most of the code is already there to support exiting from compat > mode (EFER.LME=1, EFER.LMA=0). Getting all the way fr

Re: [PATCH] KVM: x86: allow RSM from 64-bit mode

2015-11-03 Thread Paolo Bonzini
On 03/11/2015 14:40, Laszlo Ersek wrote: > On 11/03/15 14:29, Paolo Bonzini wrote: >> The SDM says that exiting system management mode from 64-bit mode >> is invalid, but that would be too good to be true. But actually, >> most of the code is already there to support exiting from compat >> mode

Re: [PATCH v7 09/35] exec: allow file_ram_alloc to work on file

2015-11-03 Thread Paolo Bonzini
On 03/11/2015 04:56, Xiao Guangrong wrote: > > > On 11/03/2015 05:12 AM, Paolo Bonzini wrote: >> >> >> On 02/11/2015 10:13, Xiao Guangrong wrote: >>> Currently, file_ram_alloc() only works on directory - it creates a file >>> under @path and do mmap on it >>> >>> This patch tries to allow it to

Re: [PATCH] KVM: x86: allow RSM from 64-bit mode

2015-11-03 Thread Laszlo Ersek
On 11/03/15 14:46, Paolo Bonzini wrote: > > > On 03/11/2015 14:40, Laszlo Ersek wrote: >> On 11/03/15 14:29, Paolo Bonzini wrote: >>> The SDM says that exiting system management mode from 64-bit mode >>> is invalid, but that would be too good to be true. But actually, >>> most of the code is alr

KVM call for 2015-11-10

2015-11-03 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. Call details: By popular demand, a google calendar public entry with it https://www.google.com/calendar/embed?src=dG9iMXRqcXAzN3Y4ZXZwNzRoMHE4a3BqcXNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ (Let me know if you have any problems wit

Re: [PATCH] KVM: x86: allow RSM from 64-bit mode

2015-11-03 Thread Paolo Bonzini
On 03/11/2015 15:02, Laszlo Ersek wrote: > On 11/03/15 14:46, Paolo Bonzini wrote: >> >> >> On 03/11/2015 14:40, Laszlo Ersek wrote: >>> On 11/03/15 14:29, Paolo Bonzini wrote: The SDM says that exiting system management mode from 64-bit mode is invalid, but that would be too good to be

Re: [PATCH v7 27/35] nvdimm acpi: build ACPI nvdimm devices

2015-11-03 Thread Xiao Guangrong
On 11/03/2015 09:13 PM, Igor Mammedov wrote: On Mon, 2 Nov 2015 17:13:29 +0800 Xiao Guangrong wrote: NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices There is a root device under \_SB and specified NVDIMM devices are under the root device. Each NVDIMM device has _ADR which returns

Re: [PATCH v7 09/35] exec: allow file_ram_alloc to work on file

2015-11-03 Thread Xiao Guangrong
On 11/03/2015 09:55 PM, Paolo Bonzini wrote: On 03/11/2015 04:56, Xiao Guangrong wrote: On 11/03/2015 05:12 AM, Paolo Bonzini wrote: On 02/11/2015 10:13, Xiao Guangrong wrote: Currently, file_ram_alloc() only works on directory - it creates a file under @path and do mmap on it This pa

Re: [PATCH v3 9/9] kvm/x86: Hyper-V kvm exit

2015-11-03 Thread Andrey Smetanin
On 11/03/2015 04:28 PM, Paolo Bonzini wrote: On 22/10/2015 18:10, Andrey Smetanin wrote: A new vcpu exit is introduced to notify the userspace of the changes in Hyper-V SynIC configuration triggered by guest writing to the corresponding MSRs. Changes v3: * added KVM_EXIT_HYPERV types and st

Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-03 Thread Xiao Guangrong
On 11/03/2015 12:16 AM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 18:06, Xiao Guangrong wrote: On 11/02/2015 10:26 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 16:08, Xiao Guangrong wrote: On 11/02/2015 08:19 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13,

Re: [kvm-unit-tests PATCH 00/14] ppc64: initial drop

2015-11-03 Thread Andrew Jones
On Tue, Nov 03, 2015 at 10:40:18AM +0100, Paolo Bonzini wrote: > > > On 03/11/2015 08:08, Thomas Huth wrote: > > On 03/08/15 16:41, Andrew Jones wrote: > >> > This series is the first series of a series of series that will > >> > bring support to kvm-unit-tests for ppc64, and eventually ppc64le.

Re: [Qemu-devel] [PATCH v7 03/35] acpi: add aml_create_field

2015-11-03 Thread Xiao Guangrong
On 11/03/2015 02:14 PM, Shannon Zhao wrote: On 2015/11/2 17:13, Xiao Guangrong wrote: Implement CreateField term which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 13 + include/hw/acpi/aml-build.h | 1 + 2 fi

Re: [PATCH v3 9/9] kvm/x86: Hyper-V kvm exit

2015-11-03 Thread Paolo Bonzini
On 03/11/2015 15:36, Andrey Smetanin wrote: >> >> >> if I run a patched QEMU but I *do not* enable the synthetic interrupt >> controller. I can fix it by wrapping the calls to synic_exit with "if >> (!host)", but I haven't checked yet the source---so that may not be the >> proper fix. Sorry for

Re: [PATCH v7 13/35] hostmem-file: use whole file size if possible

2015-11-03 Thread Xiao Guangrong
On 11/03/2015 01:09 AM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: Use the whole file size if @size is not specified which is useful if we want to directly pass a file to guest Signed-off-by: Xiao Guangrong --- backends/hostmem-file.c | 22 ++

Re: [PATCH v3 9/9] kvm/x86: Hyper-V kvm exit

2015-11-03 Thread Andrey Smetanin
On 11/03/2015 05:51 PM, Paolo Bonzini wrote: On 03/11/2015 15:36, Andrey Smetanin wrote: if I run a patched QEMU but I *do not* enable the synthetic interrupt controller. I can fix it by wrapping the calls to synic_exit with "if (!host)", but I haven't checked yet the source---so that may

Re: [Qemu-devel] [PATCH v3 9/9] kvm/x86: Hyper-V kvm exit

2015-11-03 Thread Roman Kagan
On Tue, Nov 03, 2015 at 03:51:16PM +0100, Paolo Bonzini wrote: > > > On 03/11/2015 15:36, Andrey Smetanin wrote: > >> > >> > >> if I run a patched QEMU but I *do not* enable the synthetic interrupt > >> controller. I can fix it by wrapping the calls to synic_exit with "if > >> (!host)", but I ha

Re: [PATCH] KVM/arm: kernel low level debug support for ARM32 virtual platforms

2015-11-03 Thread Christopher Covington
Hi Mario, On 11/02/2015 06:51 PM, Mario Smarduch wrote: > Hello, >this is a re-post from couple weeks ago, please take time to review this > simple patch which simplifies DEBUG_LL and prevents kernel crash on virtual > platforms. > > Before this patch DEBUG_LL for 'dummy virtual machine': >

Re: [PATCH] KVM/arm: kernel low level debug support for ARM32 virtual platforms

2015-11-03 Thread Russell King - ARM Linux
On Tue, Nov 03, 2015 at 11:33:17AM -0500, Christopher Covington wrote: > > diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug > > index a2e16f9..d126bd4 100644 > > --- a/arch/arm/Kconfig.debug > > +++ b/arch/arm/Kconfig.debug > > @@ -1155,6 +1155,28 @@ choice > > This option

Re: [PATCH] KVM/arm: kernel low level debug support for ARM32 virtual platforms

2015-11-03 Thread Mario Smarduch
On 11/3/2015 8:33 AM, Christopher Covington wrote: > Hi Mario, > > On 11/02/2015 06:51 PM, Mario Smarduch wrote: >> Hello, >>this is a re-post from couple weeks ago, please take time to review this >> simple patch which simplifies DEBUG_LL and prevents kernel crash on virtual >> platforms.

Re: [PATCH] KVM/arm: kernel low level debug support for ARM32 virtual platforms

2015-11-03 Thread Will Deacon
On Tue, Nov 03, 2015 at 09:44:52AM -0800, Mario Smarduch wrote: > On 11/3/2015 8:33 AM, Christopher Covington wrote: > > On 11/02/2015 06:51 PM, Mario Smarduch wrote: > >>this is a re-post from couple weeks ago, please take time to review > >> this > >> simple patch which simplifies DEBUG_LL

Re: [PATCH/RFC 0/4] dma ops and virtio

2015-11-03 Thread Andy Lutomirski
On Tue, Nov 3, 2015 at 12:14 AM, Christian Borntraeger wrote: > Am 02.11.2015 um 21:23 schrieb Andy Lutomirski: >> On Mon, Nov 2, 2015 at 3:16 AM, Cornelia Huck >> wrote: >>> On Fri, 30 Oct 2015 13:33:07 -0700 >>> Andy Lutomirski wrote: >>> On Fri, Oct 30, 2015 at 1:25 AM, Cornelia Huck

Re: [PATCH/RFC 0/4] dma ops and virtio

2015-11-03 Thread Cornelia Huck
On Mon, 2 Nov 2015 12:23:25 -0800 Andy Lutomirski wrote: > No change. I'm stumped :( Here's what I see: (...) > CH DBG: css_interpret_ccw: cmd_code=e4 > CH DBG: css_interpret_ccw: ret=0 sense id -> works (...) > CH DBG: css_interpret_ccw: cmd_code=3 > CH DBG: css_interpret_ccw: ret=0 nop

[PATCH v6 2/8] vfio: platform: add capability to register a reset function

2015-11-03 Thread Eric Auger
In preparation for subsequent changes in reset function lookup, lets introduce a dynamic list of reset combos (compat string, reset module, reset function). The list can be populated/voided with vfio_platform_register/unregister_reset. Those are not yet used in this patch. Signed-off-by: Eric Auge

[PATCH v6 0/8] VFIO platform reset module rework

2015-11-03 Thread Eric Auger
This series fixes the current implementation by getting rid of the usage of __symbol_get which caused a compilation issue with CONFIG_MODULES disabled. On top of this, the usage of MODULE_ALIAS makes possible to add a new reset module without being obliged to update the framework. The new implement

[PATCH v6 4/8] vfio: platform: reset: calxedaxgmac: add reset function registration

2015-11-03 Thread Eric Auger
This patch adds the reset function registration/unregistration. This is handled through the module_vfio_reset_handler macro. This latter also defines a MODULE_ALIAS which simplifies the load from vfio-platform. Signed-off-by: Eric Auger Reviewed-by: Arnd Bergmann --- v3 -> v4: - I restored the

[PATCH v6 8/8] vfio: platform: reset: calxedaxgmac: fix ioaddr leak

2015-11-03 Thread Eric Auger
In the current code the vfio_platform_region is copied on the stack. As a consequence the ioaddr address is not iounmapped in the vfio platform driver (vfio_platform_regions_cleanup). The patch uses the pointer to the region instead. Signed-off-by: Eric Auger --- drivers/vfio/platform/reset/vfio

[PATCH v6 6/8] vfio: platform: use list of registered reset function

2015-11-03 Thread Eric Auger
Remove the static lookup table and use the dynamic list of registered reset functions instead. Also load the reset module through its alias. The reset struct module pointer is stored in vfio_platform_device. We also remove the useless struct device pointer parameter in vfio_platform_get_reset. Th

[PATCH v6 3/8] vfio: platform: introduce module_vfio_reset_handler macro

2015-11-03 Thread Eric Auger
The module_vfio_reset_handler macro - define a module alias - implement module init/exit function which respectively registers and unregisters the reset function. Signed-off-by: Eric Auger Reviewed-by: Arnd Bergmann --- v4 -> v5: - add Arnd's R-b v3 -> v4: - pass reset to vfio_platform_unreg

[PATCH v6 7/8] vfio: platform: add dev_info on device reset

2015-11-03 Thread Eric Auger
It might be helpful for the end-user to check the device reset function was found by the vfio platform reset framework. Lets store a pointer to the struct device in vfio_platform_device and trace when the reset function is called or not found. Signed-off-by: Eric Auger --- v3: creation --- dr

[PATCH v6 5/8] vfio: platform: add compat in vfio_platform_device

2015-11-03 Thread Eric Auger
Let's retrieve the compatibility string on probe and store it in the vfio_platform_device struct Signed-off-by: Eric Auger --- v2 -> v3: - populate compat after vdev check --- drivers/vfio/platform/vfio_platform_common.c | 15 --- drivers/vfio/platform/vfio_platform_private.h | 1

[PATCH v6 1/8] vfio: platform: introduce vfio-platform-base module

2015-11-03 Thread Eric Auger
To prepare for vfio platform reset rework let's build vfio_platform_common.c and vfio_platform_irq.c in a separate module from vfio-platform and vfio-amba. This makes possible to have separate module inits and works around a race between platform driver init and vfio reset module init: that way we

[PATCH v5] VFIO: platform: reset: AMD xgbe reset module

2015-11-03 Thread Eric Auger
This patch introduces a module that registers and implements a low-level reset function for the AMD XGBE device. it performs the following actions: - reset the PHY - disable auto-negotiation - disable & clear auto-negotiation IRQ - soft-reset the MAC Those tiny pieces of code are inherited from t

Re: [PATCH] KVM: x86: allow RSM from 64-bit mode

2015-11-03 Thread Laszlo Ersek
On 11/03/15 15:04, Paolo Bonzini wrote: > > > On 03/11/2015 15:02, Laszlo Ersek wrote: >> On 11/03/15 14:46, Paolo Bonzini wrote: >>> >>> >>> On 03/11/2015 14:40, Laszlo Ersek wrote: On 11/03/15 14:29, Paolo Bonzini wrote: > The SDM says that exiting system management mode from 64-bit mo

[PATCH] KVM: x86: obey KVM_X86_QUIRK_CD_NW_CLEARED in kvm_set_cr0()

2015-11-03 Thread Laszlo Ersek
Commit b18d5431acc7 ("KVM: x86: fix CR0.CD virtualization") was technically correct, but it broke OVMF guests by slowing down various parts of the firmware. Commit fb279950ba02 ("KVM: vmx: obey KVM_QUIRK_CD_NW_CLEARED") quirked the first function modified by b18d5431acc7, vmx_get_mt_mask(), for OV

Re: [PATCH/RFC 0/4] dma ops and virtio

2015-11-03 Thread Andy Lutomirski
On Tue, Nov 3, 2015 at 9:59 AM, Cornelia Huck wrote: > It's just failing very early in the setup phase. As it works for me > with a kvm setup, I'm suspecting some error in qemu's emulation code, > which is unfortunately not my turf. > That should be easy to rule out. Can you try with -machine ac

Re: [PATCH] KVM: x86: obey KVM_X86_QUIRK_CD_NW_CLEARED in kvm_set_cr0()

2015-11-03 Thread Laszlo Ersek
On 11/03/15 19:34, Laszlo Ersek wrote: > Commit b18d5431acc7 ("KVM: x86: fix CR0.CD virtualization") was > technically correct, but it broke OVMF guests by slowing down various > parts of the firmware. > > Commit fb279950ba02 ("KVM: vmx: obey KVM_QUIRK_CD_NW_CLEARED") quirked the > first function

Re: [PATCH] KVM/arm: kernel low level debug support for ARM32 virtual platforms

2015-11-03 Thread Mario Smarduch
On 11/3/2015 9:55 AM, Will Deacon wrote: > On Tue, Nov 03, 2015 at 09:44:52AM -0800, Mario Smarduch wrote: >> On 11/3/2015 8:33 AM, Christopher Covington wrote: >>> On 11/02/2015 06:51 PM, Mario Smarduch wrote: this is a re-post from couple weeks ago, please take time to review this

Re: [PATCH v1 2/2] dma-mapping-common: add DMA attribute - DMA_ATTR_IOMMU_BYPASS

2015-11-03 Thread Benjamin Herrenschmidt
On Tue, 2015-11-03 at 14:11 +0100, Christoph Hellwig wrote: > > xHCI for example, vs. something like 10G ethernet... but yes I agree it > > sucks. I don't like that sort of policy anywhere in drivers. On the > > other hand the platform doesn't have much information to make that sort > > of decision

Re: [PATCH] KVM/arm: kernel low level debug support for ARM32 virtual platforms

2015-11-03 Thread Rob Herring
On Tue, Nov 3, 2015 at 1:17 PM, Mario Smarduch wrote: > > > On 11/3/2015 9:55 AM, Will Deacon wrote: >> On Tue, Nov 03, 2015 at 09:44:52AM -0800, Mario Smarduch wrote: >>> On 11/3/2015 8:33 AM, Christopher Covington wrote: On 11/02/2015 06:51 PM, Mario Smarduch wrote: >this is a re-po

Re: [PATCH] kvm: irqchip: fix memory leak

2015-11-03 Thread William Dauchy
Hi Paolo, I was wondering it this could be a valid candidate for -stable, don't you think? (commit ba60c41) Best regards, On Sep02 12:33, Sudip Mukherjee wrote: > We were taking the exit path after checking ue->flags and return value > of setup_routing_entry(), but 'e' was not freed incase of a

[vfio:next 15/15] drivers/vfio/vfio.c:1002:32-35: ERROR: driver is NULL but dereferenced.

2015-11-03 Thread kbuild test robot
tree: https://github.com/awilliam/linux-vfio.git next head: f54e0bcf65bf7d2015e1aa1c6353e5feb71c3654 commit: f54e0bcf65bf7d2015e1aa1c6353e5feb71c3654 [15/15] vfio: Include No-IOMMU mode coccinelle warnings: (new ones prefixed by >>) >> drivers/vfio/vfio.c:1002:32-35: ERROR: driver is NULL b

Re: [PATCH v7 08/35] exec: allow memory to be allocated from any kind of path

2015-11-03 Thread Eduardo Habkost
On Mon, Nov 02, 2015 at 05:13:10PM +0800, Xiao Guangrong wrote: > Currently file_ram_alloc() is designed for hugetlbfs, however, the memory > of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file > locates at DAX enabled filesystem > > So this patch let it work on any kind of p

Re: [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-03 Thread Eduardo Habkost
On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: [...] > +size_t qemu_file_getlength(const char *file, Error **errp) > +{ > +int64_t size; [...] > +return size; Can you guarantee that SIZE_MAX >= INT64_MAX on all platforms supported by QEMU? -- Eduardo -- To unsubscribe fr

Re: [PATCH] KVM: x86: obey KVM_X86_QUIRK_CD_NW_CLEARED in kvm_set_cr0()

2015-11-03 Thread Janusz Mocek
W dniu 03.11.2015 o 19:57, Laszlo Ersek pisze: > On 11/03/15 19:34, Laszlo Ersek wrote: >> Commit b18d5431acc7 ("KVM: x86: fix CR0.CD virtualization") was >> technically correct, but it broke OVMF guests by slowing down various >> parts of the firmware. >> >> Commit fb279950ba02 ("KVM: vmx: obey KV

Re: [PATCH] KVM: PPC: Book3S HV: Synthesize segment fault if SLB lookup fails

2015-11-03 Thread David Gibson
On Tue, Oct 27, 2015 at 04:13:56PM +1100, Paul Mackerras wrote: > When handling a hypervisor data or instruction storage interrupt (HDSI > or HISI), we look up the SLB entry for the address being accessed in > order to translate the effective address to a virtual address which can > be looked up in

Re: [PATCH] KVM: x86: obey KVM_X86_QUIRK_CD_NW_CLEARED in kvm_set_cr0()

2015-11-03 Thread Xiao Guangrong
On 11/04/2015 02:34 AM, Laszlo Ersek wrote: Commit b18d5431acc7 ("KVM: x86: fix CR0.CD virtualization") was technically correct, but it broke OVMF guests by slowing down various parts of the firmware. Commit fb279950ba02 ("KVM: vmx: obey KVM_QUIRK_CD_NW_CLEARED") quirked the first function mod

Re: [PATCH v7 08/35] exec: allow memory to be allocated from any kind of path

2015-11-03 Thread Xiao Guangrong
On 11/04/2015 07:00 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:10PM +0800, Xiao Guangrong wrote: Currently file_ram_alloc() is designed for hugetlbfs, however, the memory of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file locates at DAX enabled filesystem

Re: [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-03 Thread Xiao Guangrong
On 11/04/2015 07:21 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: [...] +size_t qemu_file_getlength(const char *file, Error **errp) +{ +int64_t size; [...] +return size; Can you guarantee that SIZE_MAX >= INT64_MAX on all platforms suppo

Re: [PATCH] KVM: VMX: Fix commit which broke PML

2015-11-03 Thread Kai Huang
On 11/03/2015 05:59 PM, Paolo Bonzini wrote: On 03/11/2015 06:49, Kai Huang wrote: I found PML was broken since below commit: commit feda805fe7c4ed9cf78158e73b1218752e3b4314 Author: Xiao Guangrong Date: Wed Sep 9 14:05:55 2015 +0800 KVM: VMX: unify

[v2] KVM: VMX: Fix commit which broke PML

2015-11-03 Thread Kai Huang
I found PML was broken since below commit: commit feda805fe7c4ed9cf78158e73b1218752e3b4314 Author: Xiao Guangrong Date: Wed Sep 9 14:05:55 2015 +0800 KVM: VMX: unify SECONDARY_VM_EXEC_CONTROL update Unify the update in vmx_cpuid_update() Signed

[RESEND PATCH v2] KVM: VMX: Fix commit which broke PML

2015-11-03 Thread Kai Huang
I found PML was broken since below commit: commit feda805fe7c4ed9cf78158e73b1218752e3b4314 Author: Xiao Guangrong Date: Wed Sep 9 14:05:55 2015 +0800 KVM: VMX: unify SECONDARY_VM_EXEC_CONTROL update Unify the update in vmx_cpuid_update() Signed