Re: [PATCH v4 1/6] virtio-net: Stop doing DMA from the stack

2015-10-30 Thread Andy Lutomirski
On Fri, Oct 30, 2015 at 6:55 AM, Christian Borntraeger wrote: > Am 30.10.2015 um 02:09 schrieb Andy Lutomirski: >> From: "Michael S. Tsirkin" >> >> Once virtio starts using the DMA API, we won't be able to safely DMA >> from the stack. virtio-net does a couple of config DMA requests >> from smal

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-10-30 Thread Shannon Zhao
propriate base, > please suggest rules for selecting the more suitable base] > > url: > https://github.com/0day-ci/linux/commits/Shannon-Zhao/KVM-ARM64-Add-guest-PMU-support/20151030-143148 > config: arm-axm55xx_defconfig (attached as .config) > reproduce: > wget

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

2015-10-30 Thread Arnd Bergmann
On Saturday 31 October 2015 10:17:22 Benjamin Herrenschmidt wrote: > On Fri, 2015-10-30 at 11:32 +0100, Arnd Bergmann wrote: > > On Thursday 29 October 2015 10:10:46 Benjamin Herrenschmidt wrote: > > > > > > > Maybe we should at least coordinate IOMMU 'paranoid/fast' modes > > > > across > > > > a

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

2015-10-30 Thread Benjamin Herrenschmidt
On Fri, 2015-10-30 at 11:32 +0100, Arnd Bergmann wrote: > On Thursday 29 October 2015 10:10:46 Benjamin Herrenschmidt wrote: > > > > > Maybe we should at least coordinate IOMMU 'paranoid/fast' modes > > > across > > > architectures, and then the DMA_ATTR_IOMMU_BYPASS flag would have > > > a > > >

[PATCH v3 2/3] KVM/arm/arm64: enable enhanced armv7 fp/simd lazy switch

2015-10-30 Thread Mario Smarduch
This patch tracks vfp/simd hardware state with a vcpu lazy flag. vCPU lazy flag is set on guest access and traps to vfp/simd hardware switch handler. On vm-enter if lazy flag is set skip trap enable and save host fpexc. On vm-exit if flag is set skip hardware context switch and return to host wi

[PATCH 3/3] KVM/arm64: enable enhanced armv8 fp/simd lazy switch

2015-10-30 Thread Mario Smarduch
This patch enables arm64 lazy fp/simd switch, similar to arm described in second patch. Change from previous version - restore function is moved to host. Signed-off-by: Mario Smarduch --- arch/arm64/include/asm/kvm_host.h | 2 +- arch/arm64/kernel/asm-offsets.c | 1 + arch/arm64/kvm/hyp.S

[PATCH v3 1/3] KVM/arm: add hooks for armv7 fp/simd lazy switch support

2015-10-30 Thread Mario Smarduch
This patch adds vcpu fields to track lazy state, save host FPEXC, and offsets to fields. Signed-off-by: Mario Smarduch --- arch/arm/include/asm/kvm_host.h | 6 ++ arch/arm/kernel/asm-offsets.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm

[PATCH v3 0/3] KVM/arm64/arm: enhance armv7/8 fp/simd lazy switch

2015-10-30 Thread Mario Smarduch
This short patch series combines the previous armv7 and armv8 versions. For an FP and lmbench load it reduces fp/simd context switch from 30-50% down to 2%. Results will vary with load but is no worse then current approach. In summary current lazy vfp/simd implementation switches hardware contex

Re: [Qemu-devel] [PATCH] target-i386: enable cflushopt/clwb/pcommit instructions

2015-10-30 Thread Richard Henderson
On 10/29/2015 12:31 AM, Xiao Guangrong wrote: > These instructions are used by NVDIMM drivers and the specification > locates at: > https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf > > There instructions are available on Skylake Server > > Signed-off-by: Xiao Guangrong

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

2015-10-30 Thread Andy Lutomirski
On Fri, Oct 30, 2015 at 1:25 AM, Cornelia Huck wrote: > On Thu, 29 Oct 2015 15:50:38 -0700 > Andy Lutomirski wrote: > >> Progress! After getting that sort-of-working, I figured out what was >> wrong with my earlier command, and I got that working, too. Now I >> get: >> >> qemu-system-s390x -fsd

Re: [Qemu-devel] [kvm-unit-tests PATCHv5 3/3] arm: pmu: Add CPI checking

2015-10-30 Thread Christopher Covington
Hi Drew, On 10/30/2015 09:00 AM, Andrew Jones wrote: > On Wed, Oct 28, 2015 at 03:12:55PM -0400, Christopher Covington wrote: >> Calculate the numbers of cycles per instruction (CPI) implied by ARM >> PMU cycle counter values. The code includes a strict checking facility >> intended for the -icoun

Re: [PATCH v4 2/6] virtio_ring: Support DMA APIs

2015-10-30 Thread Andy Lutomirski
On Fri, Oct 30, 2015 at 5:05 AM, Christian Borntraeger wrote: > Am 30.10.2015 um 13:01 schrieb Cornelia Huck: >> On Thu, 29 Oct 2015 18:09:47 -0700 >> Andy Lutomirski wrote: >> >>> virtio_ring currently sends the device (usually a hypervisor) >>> physical addresses of its I/O buffers. This is ok

[PATCH 5/7] x86: use read wrappers in kernel loading

2015-10-30 Thread Andre Przywara
Replace the unsafe read-loops in the x86 kernel image loading functions with our safe read_file() and read_in_full() wrappers. This should fix random fails in kernel image loading, especially from pipes and sockets. Signed-off-by: Andre Przywara --- x86/kvm.c | 35 ++-

[PATCH 6/7] arm/arm64: use read_file() in kernel and initrd loading

2015-10-30 Thread Andre Przywara
Use the new read_file() wrapper in our arm/arm64 kernel image loading function instead of the private implementation. Signed-off-by: Andre Przywara --- arm/fdt.c | 40 ++-- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/arm/fdt.c b/arm/fdt.c i

[PATCH 7/7] arm: move kernel loading into arm/kvm.c

2015-10-30 Thread Andre Przywara
For some reasons (probably to have easy access to the command line) the kernel loading for arm and arm64 was located in arm/fdt.c. Move the routines to kvm.c (where other architectures put it) to only have real device tree code in fdt.c. We use the pointer in struct kvm to access the command line s

[PATCH 3/7] powerpc: use read_file() in kernel and initrd loading

2015-10-30 Thread Andre Przywara
Replace the unsafe read-loops in the powerpc kernel image loading function with our new and safe read_file() wrapper. This should fix random fails in kernel image loading, especially from pipes and sockets. Signed-off-by: Andre Przywara --- powerpc/kvm.c | 36

[PATCH 4/7] MIPS: use read wrappers in kernel loading

2015-10-30 Thread Andre Przywara
Replace the unsafe read-loops used in the MIPS kernel image loading with our safe read_file() and read_in_full() wrappers. This should fix random fails in kernel image loading, especially from pipes and sockets. Signed-off-by: Andre Przywara --- mips/kvm.c | 36 ++

[PATCH 1/7] Refactor kernel image loading

2015-10-30 Thread Andre Przywara
Let's face it: Kernel loading is quite architecture specific. Don't claim otherwise and move the loading routines into each architecture's responsibility. This introduces kvm__arch_load_kernel(), which each architecture can implement accordingly. Provide bzImage loading for x86 and ELF loading for

[PATCH 2/7] provide generic read_file() implementation

2015-10-30 Thread Andre Przywara
In various parts of kvmtool we simply try to read files into memory, but fail to do so in a safe way. The read(2) syscall can return early having only parts of the file read, or it may return -1 due to being interrupted by a signal (in which case we should simply retry). The ARM code seems to provi

[PATCH 0/7] kvmtool: Cleanup kernel loading

2015-10-30 Thread Andre Przywara
Hi, this series cleans up kvmtool's kernel loading functionality a bit. It has been broken out of a previous series I sent [1] and contains just the cleanup and bug fix parts, which should be less controversial and thus easier to merge ;-) I will resend the pipe loading part later on as a separate

Re: [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-30 Thread Alexander Duyck
On 10/29/2015 07:41 PM, Lan Tianyu wrote: On 2015年10月30日 00:17, Alexander Duyck wrote: On 10/29/2015 01:33 AM, Lan Tianyu wrote: On 2015年10月29日 14:58, Alexander Duyck wrote: Your code was having to do a bunch of shuffling in order to get things set up so that you could bring the interface back

Re: [Qemu-devel] [PATCH v6 11/33] hostmem-file: use whole file size if possible

2015-10-30 Thread Eduardo Habkost
On Fri, Oct 30, 2015 at 01:56:05PM +0800, 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 | 48 ---

[PATCH 2/2] Makefile: consider LDFLAGS on feature tests and when linking executables

2015-10-30 Thread Andre Przywara
While we have an LDFLAGS variable in kvmtool's Makefile, it's not really used when both doing the feature tests and when finally linking the lkvm executable. Add that variable to all the linking steps to allow the user to specify custom library directories or linker options on the command line. Si

[PATCH 1/2] Makefile: allow overriding CFLAGS on the command line

2015-10-30 Thread Andre Przywara
When a Makefile variable is set on the make command line, all Makefile-internal assignments to that very variable are _ignored_. Since we add quite some essential values to CFLAGS internally, specifying some CFLAGS on the command line will usually break the build (and not fix any include file probl

[PATCH 0/2] kvmtool: allow CFLAGS and LDFLAGS override

2015-10-30 Thread Andre Przywara
In the past there have been some complaints from cross-compilation users about missing libraries and include files. Fixing those issues by pointing make to the proper directories via CFLAGS and LDFLAGS proved to be complicated. This series fixes this, so custom CFLAGS and LDFLAGS can be given on th

Re: [Qemu-devel] [PATCH v6 14/33] pc-dimm: drop the prefix of pc-dimm

2015-10-30 Thread Eric Blake
On 10/29/2015 11:56 PM, Xiao Guangrong wrote: > This patch is generated by this script: > > find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ > | xargs sed -i "s/PC_DIMM/DIMM/g" > > find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ > | xargs sed -

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

2015-10-30 Thread David Woodhouse
(Sorry, missed part of this before). On Thu, 2015-10-29 at 11:01 +0200, Michael S. Tsirkin wrote: > Isn't this specified by the hypervisor? I don't think this is a good > way to do this: guest security should be up to guest. And it is. When the guest sees an IOMMU, it can choose to use it, or cho

Re: [Qemu-devel] [PATCH v6 14/33] pc-dimm: drop the prefix of pc-dimm

2015-10-30 Thread Vladimir Sementsov-Ogievskiy
On 30.10.2015 08:56, Xiao Guangrong wrote: This patch is generated by this script: find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ | xargs sed -i "s/PC_DIMM/DIMM/g" find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ | xargs sed -i "s/PCDIMM/DIM

Re: [PATCH v6 07/33] util: introduce qemu_file_get_page_size()

2015-10-30 Thread Eduardo Habkost
On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: > There are three places use the some logic to get the page size on > the file path or file fd > > This patch introduces qemu_file_get_page_size() to unify the code > > Signed-off-by: Xiao Guangrong [...] > diff --git a/util/oslib-p

Re: [PATCH] KVM: x86: fix RSM into 64-bit protected mode, round 2

2015-10-30 Thread Radim Krčmář
2015-10-26 17:32+0100, Paolo Bonzini: > On 26/10/2015 16:43, Laszlo Ersek wrote: >>> The code would be cleaner if we had a different approach, but this works >>> too and is safer for stable. In case you prefer to leave the rewrite for >>> a future victim, >> >> It's hard to express how much I pref

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

2015-10-30 Thread Radim Krčmář
This series bases on "KVM: x86: fix RSM into 64-bit protected mode, round 2" and reverts it in [3/3]. To avoid regressions after doing so, [1/2] introduces a helper that is used in [2/2] to hopefully get the same behavior. I'll set up test environment next week, unless a random act of kindness al

[PATCH 1/3] KVM: x86: add read_phys to x86_emulate_ops

2015-10-30 Thread Radim Krčmář
We want to read the physical memory when emulating RSM. X86EMUL_IO_NEEDED is returned on all errors for consistency with other helpers. Signed-off-by: Radim Krčmář --- arch/x86/include/asm/kvm_emulate.h | 10 ++ arch/x86/kvm/x86.c | 10 ++ 2 files changed, 20 ins

Re: [Qemu-devel] [PATCH v6 13/33] pc-dimm: make pc_existing_dimms_capacity static and rename it

2015-10-30 Thread Vladimir Sementsov-Ogievskiy
On 30.10.2015 08:56, Xiao Guangrong wrote: pc_existing_dimms_capacity() can be static since it is not used out of pc-dimm.c and drop the pc_ prefix to prepare the work which abstracts dimm device type from pc-dimm Signed-off-by: Xiao Guangrong --- hw/mem/pc-dimm.c | 73 +++

[PATCH 2/3] KVM: x86: handle SMBASE as physical address in RSM

2015-10-30 Thread Radim Krčmář
GET_SMSTATE depends on real mode to ensure that smbase+offset is treated as a physical address, which has already caused a bug after shuffling the code. Enforce physical addressing. Signed-off-by: Radim Krčmář --- arch/x86/kvm/emulate.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(

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

2015-10-30 Thread Radim Krčmář
This reverts 0123456789abc ("KVM: x86: fix RSM into 64-bit protected mode, round 2"). We've achieved the same by treating SMBASE as a physical address in the previous patch. Signed-off-by: Radim Krčmář --- arch/x86/kvm/emulate.c | 37 +++-- 1 file changed, 7 inse

Re: [Qemu-devel] [PATCH v6 11/33] hostmem-file: use whole file size if possible

2015-10-30 Thread Vladimir Sementsov-Ogievskiy
On 30.10.2015 08:56, 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 | 48 1 file changed, 44 inserti

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

2015-10-30 Thread Joerg Roedel
On Thu, Oct 29, 2015 at 11:01:41AM +0200, Michael S. Tsirkin wrote: > Example: you have a mix of assigned devices and virtio devices. You > don't trust your assigned device vendor not to corrupt your memory so > you want to limit the damage your assigned device can do to your guest, > so you use an

Re: [PATCH 5/6] KVM: PPC: Book3S HV: Send IPI to host core to wake VCPU

2015-10-30 Thread Suresh E. Warrier
inux-next -- if it's inappropriate base, > please suggest rules for selecting the more suitable base] > > url: > https://github.com/0day-ci/linux/commits/Suresh-Warrier/KVM-PPC-Book3S-HV-Optimize-wakeup-VCPU-from-H_IPI/20151030-081329 > config: powerpc-defconfig (att

Re: [Qemu-devel] [PATCH v6 10/33] hostmem-file: clean up memory allocation

2015-10-30 Thread Vladimir Sementsov-Ogievskiy
On 30.10.2015 08:56, Xiao Guangrong wrote: - hostmem-file.c is compiled only if CONFIG_LINUX is enabled so that is unnecessary to do the same check in the source file - the interface, HostMemoryBackendClass->alloc(), is not called many times, do not need to check if the memory-region is in

[PATCH] KVM: x86: zero apic_arb_prio on reset

2015-10-30 Thread Radim Krčmář
BSP doesn't get INIT so its apic_arb_prio isn't zeroed after reboot. BSP won't get lowest priority interrupts until other VCPUs get enough interrupts to match their pre-reboot apic_arb_prio. That behavior doesn't fit into KVM's round-robin-like interpretation of lowest priority delivery ... usersp

Re: [PATCH 1/4] Provide simple noop dma ops

2015-10-30 Thread Joerg Roedel
On Fri, Oct 30, 2015 at 01:55:56PM +0100, Christian Borntraeger wrote: > It not trivial without understanding the dma mask details. Do I read > the x86 implementation right, that it limits the dma to 32 bit? Then > we cannot collapse both implementations. Or maybe we can hide this in > dma_capable.

Re: [Qemu-devel] [PATCH v6 09/33] exec: allow file_ram_alloc to work on file

2015-10-30 Thread Vladimir Sementsov-Ogievskiy
On 30.10.2015 08:56, 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 the target file then di

Re: [Qemu-devel] [PATCH v6 08/33] exec: allow memory to be allocated from any kind of path

2015-10-30 Thread Vladimir Sementsov-Ogievskiy
On 30.10.2015 08:56, 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 path Signed-off-by: Xiao Guan

Re: [PATCH v4 1/6] virtio-net: Stop doing DMA from the stack

2015-10-30 Thread Christian Borntraeger
Am 30.10.2015 um 02:09 schrieb Andy Lutomirski: > From: "Michael S. Tsirkin" > > Once virtio starts using the DMA API, we won't be able to safely DMA > from the stack. virtio-net does a couple of config DMA requests > from small stack buffers -- switch to using dynamically-allocated > memory. >

Re: [Qemu-devel] [PATCH v6 07/33] util: introduce qemu_file_get_page_size()

2015-10-30 Thread Vladimir Sementsov-Ogievskiy
logic is changed: in old version gethugepagesize on statfs error generates exit(1) in new it returns getpagesize() in this case (through fd_getpagesize) (I think, fd_getpagesize should be fixed to handle error) also, in new version for windows we have getpagesize(), when in old version t

[PATCH 1/3] Provide simple noop dma ops

2015-10-30 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| 2

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

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

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

2015-10-30 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

[PATCHv2 0/3] dma ops and virtio

2015-10-30 Thread Christian Borntraeger
here is the 2nd version of providing an DMA API for s390. There are some attempts to unify the dma ops (Christoph) as well as some attempts to make virtio use the dma API (Andy). At kernel summit we concluded that we want to use the same code on all platforms, whereever possible, so having a dumm

Re: [PATCH v6 27/33] nvdimm acpi: support function 0

2015-10-30 Thread Xiao Guangrong
On 10/30/2015 06:14 PM, Stefan Hajnoczi wrote: On Fri, Oct 30, 2015 at 01:56:21PM +0800, Xiao Guangrong wrote: static uint64_t nvdimm_dsm_read(void *opaque, hwaddr addr, unsigned size) { -return 0; +AcpiNVDIMMState *state = opaque; +MemoryRegion *dsm_ram_mr = &state->ram_mr;

Re: [Qemu-devel] [kvm-unit-tests PATCHv5 3/3] arm: pmu: Add CPI checking

2015-10-30 Thread Andrew Jones
On Wed, Oct 28, 2015 at 03:12:55PM -0400, Christopher Covington wrote: > Calculate the numbers of cycles per instruction (CPI) implied by ARM > PMU cycle counter values. The code includes a strict checking facility > intended for the -icount option in TCG mode but it is not yet enabled > in the con

Re: [PATCH 4/4] s390/virtio: use noop dma ops

2015-10-30 Thread Christian Borntraeger
Am 28.10.2015 um 01:43 schrieb Joerg Roedel: > On Tue, Oct 27, 2015 at 11:48:51PM +0100, Christian Borntraeger wrote: >> @@ -1093,6 +1094,7 @@ static void virtio_ccw_auto_online(void *data, >> async_cookie_t cookie) >> struct ccw_device *cdev = data; >> int ret; >> >> +cdev->dev.ar

Re: [PATCH 1/4] Provide simple noop dma ops

2015-10-30 Thread Christian Borntraeger
Am 28.10.2015 um 01:41 schrieb Joerg Roedel: > Hi Christian, > > On Tue, Oct 27, 2015 at 11:48:48PM +0100, Christian Borntraeger wrote: >> +static dma_addr_t dma_noop_map_page(struct device *dev, struct page *page, >> + unsigned long offset, size_t size, >> +

Re: [PATCH 4/4] s390/virtio: use noop dma ops

2015-10-30 Thread Cornelia Huck
On Fri, 30 Oct 2015 13:26:09 +0100 Christian Borntraeger wrote: > I am currently reworking this to > > static inline struct dma_map_ops *get_dma_ops(struct device *dev) > { > if (dev && dev->archdata.dma_ops) > return dev->archdata.dma_ops; > return &dma_noop_ops; >

Re: [PATCH 4/4] s390/virtio: use noop dma ops

2015-10-30 Thread Christian Borntraeger
Am 30.10.2015 um 13:17 schrieb Cornelia Huck: > On Tue, 27 Oct 2015 23:48:51 +0100 > Christian Borntraeger wrote: > >> With all infrastructure in place, lets provide dma_ops for virtio >> devices on s390. >> >> Signed-off-by: Christian Borntraeger >> --- >> drivers/s390/virtio/kvm_virtio.c | 2

Re: [PATCH 4/4] s390/virtio: use noop dma ops

2015-10-30 Thread Cornelia Huck
On Tue, 27 Oct 2015 23:48:51 +0100 Christian Borntraeger wrote: > With all infrastructure in place, lets provide dma_ops for virtio > devices on s390. > > Signed-off-by: Christian Borntraeger > --- > drivers/s390/virtio/kvm_virtio.c | 2 ++ > drivers/s390/virtio/virtio_ccw.c | 2 ++ > 2 files

Re: [PATCH v4 18/21] KVM: ARM64: Add PMU overflow interrupt routing

2015-10-30 Thread kbuild test robot
Hi Shannon, [auto build test ERROR on kvm/linux-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Shannon-Zhao/KVM-ARM64-Add-guest-PMU-support/20151030-143148 config: arm-axm55xx_defconfig (att

Re: [PATCH v4 2/6] virtio_ring: Support DMA APIs

2015-10-30 Thread Christian Borntraeger
Am 30.10.2015 um 13:01 schrieb Cornelia Huck: > On Thu, 29 Oct 2015 18:09:47 -0700 > Andy Lutomirski wrote: > >> virtio_ring currently sends the device (usually a hypervisor) >> physical addresses of its I/O buffers. This is okay when DMA >> addresses and physical addresses are the same thing, b

Re: [PATCH v4 2/6] virtio_ring: Support DMA APIs

2015-10-30 Thread Cornelia Huck
On Thu, 29 Oct 2015 18:09:47 -0700 Andy Lutomirski wrote: > virtio_ring currently sends the device (usually a hypervisor) > physical addresses of its I/O buffers. This is okay when DMA > addresses and physical addresses are the same thing, but this isn't > always the case. For example, this nev

Re: [PATCH net-next rfc V2 0/2] basic busy polling support for vhost_net

2015-10-30 Thread Jason Wang
On 10/29/2015 04:45 PM, Jason Wang wrote: > Hi all: > > This series tries to add basic busy polling for vhost net. The idea is > simple: at the end of tx processing, busy polling for new tx added > descriptor and rx receive socket for a while. The maximum number of > time (in us) could be spent o

[PATCH] vhost: move is_le setup to the backend

2015-10-30 Thread Greg Kurz
The vq->is_le field is used to fix endianness when accessing the vring via the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases: 1) host is big endian and device is modern virtio 2) host has cross-endian support and device is legacy virtio with a different endianness than t

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

2015-10-30 Thread Arnd Bergmann
On Thursday 29 October 2015 10:10:46 Benjamin Herrenschmidt wrote: > > > Maybe we should at least coordinate IOMMU 'paranoid/fast' modes across > > architectures, and then the DMA_ATTR_IOMMU_BYPASS flag would have a > > sane meaning in the paranoid mode (and perhaps we'd want an ultra > > -paranoi

Re: [PATCH v6 00/33] implement vNVDIMM

2015-10-30 Thread Stefan Hajnoczi
On Fri, Oct 30, 2015 at 01:55:54PM +0800, Xiao Guangrong wrote: > This patchset can be found at: > https://github.com/xiaogr/qemu.git nvdimm-v6 > > It is based on pci branch on Michael's tree and the top commit is: > commit 6f96a31a06c2a1 (tests: re-enable vhost-user-test). > > Changelog in

Re: [PATCH v6 27/33] nvdimm acpi: support function 0

2015-10-30 Thread Stefan Hajnoczi
On Fri, Oct 30, 2015 at 01:56:21PM +0800, Xiao Guangrong wrote: > static uint64_t > nvdimm_dsm_read(void *opaque, hwaddr addr, unsigned size) > { > -return 0; > +AcpiNVDIMMState *state = opaque; > +MemoryRegion *dsm_ram_mr = &state->ram_mr; > +NvdimmDsmIn *in; > +GArray *out;

Re: [PATCH v4 0/6] virtio core DMA API conversion

2015-10-30 Thread Christian Borntraeger
Am 30.10.2015 um 02:09 schrieb Andy Lutomirski: > This switches virtio to use the DMA API unconditionally. I'm sure > it breaks things, but it seems to work on x86 using virtio-pci, with > and without Xen, and using both the modern 1.0 variant and the > legacy variant. > > This appears to work on

Re: [PATCH 5/6] KVM: PPC: Book3S HV: Send IPI to host core to wake VCPU

2015-10-30 Thread kbuild test robot
Hi Suresh, [auto build test ERROR on kvm/linux-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Suresh-Warrier/KVM-PPC-Book3S-HV-Optimize-wakeup-VCPU-from-H_IPI/20151030-081329 config: po

Re: [PATCH] vfio/platform: store mapped memory in region, instead of an on-stack copy

2015-10-30 Thread Eric Auger
Hi, On 10/30/2015 09:51 AM, Baptiste Reynal wrote: > Hi James, > > Thanks for this fix. > > Acked-by: Baptiste Reynal > Tested-by: Baptiste Reynal > > On Thu, Oct 29, 2015 at 5:50 PM, James Morse wrote: >> vfio_platform_{read,write}_mmio() call ioremap_nocache() to map >> a region of io memor

Re: [PATCH] vfio/platform: store mapped memory in region, instead of an on-stack copy

2015-10-30 Thread Baptiste Reynal
Hi James, Thanks for this fix. Acked-by: Baptiste Reynal Tested-by: Baptiste Reynal On Thu, Oct 29, 2015 at 5:50 PM, James Morse wrote: > vfio_platform_{read,write}_mmio() call ioremap_nocache() to map > a region of io memory, which they store in struct vfio_platform_region to > be eventually

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

2015-10-30 Thread Cornelia Huck
On Thu, 29 Oct 2015 15:50:38 -0700 Andy Lutomirski wrote: > Progress! After getting that sort-of-working, I figured out what was > wrong with my earlier command, and I got that working, too. Now I > get: > > qemu-system-s390x -fsdev > local,id=virtfs1,path=/,security_model=none,readonly -devic

[PATCH] KVM: x86: removing unused variable

2015-10-30 Thread Saurabh Sengar
removing unused variables, found by coccinelle Signed-off-by: Saurabh Sengar --- arch/x86/kvm/x86.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 9a9a198..ec15294 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/