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

2015-11-02 Thread Joerg Roedel
On Fri, Oct 30, 2015 at 02:20:35PM +0100, Christian Borntraeger wrote: > +static void *dma_noop_alloc(struct device *dev, size_t size, > + dma_addr_t *dma_handle, gfp_t gfp, > + struct dma_attrs *attrs) > +{ > + void *ret; > + > + ret = (void

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

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 12:13, Xiao Guangrong wrote: It is used to get the size of the specified file, also qemu_fd_getlength() is introduced to unify the code with raw_getlength() in block/raw-posix.c Signed-off-by: Xiao Guangrong --- block/raw-posix.c| 7 +--

Re: [PATCHv2 0/3] dma ops and virtio

2015-11-02 Thread Sebastian Ott
Hi, On Fri, 30 Oct 2015, Christian Borntraeger wrote: > 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

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

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 18:22, Xiao Guangrong wrote: On 11/02/2015 10:51 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, 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

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

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
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, Xiao Guangrong wrote: Curretly, the memory region of backed memory is directly mapped to guest's address space, however, it is not true for nvdimm device This patch

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

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 12:13, 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 No, this patch doesn't

Re: [PATCH v7 07/35] util: introduce qemu_file_get_page_size()

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 12:13, Xiao Guangrong wrote: There are three places use the some logic to get the page size on the file path or file fd Windows did not support file hugepage, so it will return normal page for this case. And this interface has not been used on windows so far This patch

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

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 12: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 work on file directly, if @path is a It isn't try to allow, it allows, as I understand) directory it works as

Re: [PATCH 0/7] kvmtool: Cleanup kernel loading

2015-11-02 Thread Dimitri John Ledkov
On 2 November 2015 at 14:58, Will Deacon wrote: > On Fri, Oct 30, 2015 at 06:26:53PM +, Andre Przywara wrote: >> Hi, > > Hello Andre, > >> this series cleans up kvmtool's kernel loading functionality a bit. >> It has been broken out of a previous series I sent [1] and

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

2015-11-02 Thread Joerg Roedel
On Fri, Oct 30, 2015 at 02:20:36PM +0100, Christian Borntraeger wrote: > 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 >

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

2015-11-02 Thread Xiao Guangrong
On 11/02/2015 10:51 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, 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

Re: [PATCH v3 2/3] target-i386: calculate vcpu's TSC rate to be migrated

2015-11-02 Thread Haozhong Zhang
On Mon, Nov 02, 2015 at 09:40:18AM +, James Hogan wrote: > On Mon, Nov 02, 2015 at 05:26:42PM +0800, Haozhong Zhang wrote: > > The value of the migrated vcpu's TSC rate is determined as below. > > 1. If a TSC rate is specified by the cpu option 'tsc-freq', then this > > user-specified

Re: [PATCH 1/3] KVM: x86: merge kvm_arch_set_irq with kvm_set_msi_inatomic

2015-11-02 Thread Radim Krcmar
2015-11-02 13:21+0100, Paolo Bonzini: > We do not want to do too much work in atomic context, in particular > not walking all the VCPUs of the virtual machine. So we want > to distinguish the architecture-specific injection function for irqfd > from kvm_set_msi. Since it's still empty, reuse the

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

2015-11-02 Thread Xiao Guangrong
On 11/02/2015 11:12 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12: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 work on file directly, if @path is a It isn't try to

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

2015-11-02 Thread Joerg Roedel
On Thu, Oct 29, 2015 at 09:32:32AM +0200, Shamir Rabinovitch wrote: > For the IB case, setting and tearing DMA mappings for the drivers data buffers > is expensive. But we could for example consider to map all the HW control > objects > that validate the HW access to the drivers data buffers as

Re: [PATCH 0/7] kvmtool: Cleanup kernel loading

2015-11-02 Thread Will Deacon
On Fri, Oct 30, 2015 at 06:26:53PM +, Andre Przywara wrote: > Hi, Hello Andre, > 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

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

2015-11-02 Thread Xiao Guangrong
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, Xiao Guangrong wrote: Curretly, the memory region of backed memory is directly mapped to guest's address

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

2015-11-02 Thread Joerg Roedel
On Fri, Oct 30, 2015 at 02:20:37PM +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 >

Re: [PATCH 1/3] KVM: x86: merge kvm_arch_set_irq with kvm_set_msi_inatomic

2015-11-02 Thread Paolo Bonzini
On 02/11/2015 15:59, Radim Krcmar wrote: > > We do not want to do too much work in atomic context, in particular > > not walking all the VCPUs of the virtual machine. So we want > > to distinguish the architecture-specific injection function for irqfd > > from kvm_set_msi. Since it's still

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

2015-11-02 Thread Xiao Guangrong
On 11/02/2015 08:19 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: Curretly, the memory region of backed memory is directly mapped to guest's address space, however, it is not true for nvdimm device This patch let dimm device realize this fact and use

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

2015-11-02 Thread Christian Borntraeger
Am 02.11.2015 um 16:16 schrieb Joerg Roedel: > On Fri, Oct 30, 2015 at 02:20:35PM +0100, Christian Borntraeger wrote: >> +static void *dma_noop_alloc(struct device *dev, size_t size, >> +dma_addr_t *dma_handle, gfp_t gfp, >> +struct dma_attrs *attrs)

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

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
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, Xiao Guangrong wrote: Curretly, the memory region of backed

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

2015-11-02 Thread Thomas Huth
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 the kvm-unit-tests? Is there a newer version available

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

2015-11-02 Thread Shannon Zhao
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 files

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

2015-11-02 Thread Jason Wang
On 10/30/2015 07:58 PM, Jason Wang wrote: > > 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.

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

2015-11-02 Thread Pavel Fedin
Hello! > I ran this through my test scripts and I'm now quite sure that there's > some breakage in here. > > One of my tests is running two VMs in parallel, each booting up, running > hackbench, and then doing reboot (from within the guest), and just > repeating like that. > > I've run your

Re: [PATCH v4 05/21] KVM: ARM64: Add reset and access handlers for PMSELR register

2015-11-02 Thread Christopher Covington
On 10/30/2015 02:21 AM, Shannon Zhao wrote: > From: Shannon Zhao > > Since the reset value of PMSELR_EL0 is UNKNOWN, use reset_unknown for > its reset handler. As it doesn't need to deal with the acsessing action Nit: accessing > specially, it uses default case to

Re: [PATCH] vhost: move is_le setup to the backend

2015-11-02 Thread David Miller
From: Greg Kurz Date: Fri, 30 Oct 2015 12:42:35 +0100 > 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)

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

2015-11-02 Thread Benjamin Herrenschmidt
On Mon, 2015-11-02 at 14:07 +0200, Shamir Rabinovitch wrote: > On Mon, Nov 02, 2015 at 09:00:34PM +1100, Benjamin Herrenschmidt > wrote: > > > > Chosing on a per-mapping basis *in the back end* might still make > > some > > In my case, choosing mapping based on the hardware that will use this >

Re: [PATCH v4 07/21] KVM: ARM64: PMU: Add perf event map and introduce perf event creating function

2015-11-02 Thread Christopher Covington
On 10/30/2015 02:21 AM, Shannon Zhao wrote: > From: Shannon Zhao > > When we use tools like perf on host, perf passes the event type and the > id of this event type category to kernel, then kernel will map them to > hardware event number and write this number to PMU

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

2015-11-02 Thread 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 >> >

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

2015-11-02 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

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

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
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 ++ 1 file changed, 18

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

2015-11-02 Thread Shamir Rabinovitch
On Mon, Nov 02, 2015 at 03:44:27PM +0100, Joerg Roedel wrote: > > How do you envision this per-mapping by-pass to work? For the DMA-API > mappings you have only one device address space. For by-pass to work, > you need to map all physical memory of the machine into this space, > which leaves the

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

2015-11-02 Thread Andrew Jones
On Fri, Oct 30, 2015 at 03:32:43PM -0400, Christopher Covington wrote: > 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

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

2015-11-02 Thread Sebastian Ott
On Fri, 30 Oct 2015, 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 noop ops for

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

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 18:25, Xiao Guangrong wrote: On 11/02/2015 11:12 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12: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 work on

Re: [PATCH 1/3] KVM: x86: merge kvm_arch_set_irq with kvm_set_msi_inatomic

2015-11-02 Thread Paolo Bonzini
On 02/11/2015 18:01, Radim Krcmar wrote: >> > Yes. Both because the Virtuozzo people confirmed that kvm_arch_set_irq >> > isn't needed for synic, and because synic is currently broken with APICv. > Thanks. > > (We can add direct delivery for |online vcpus| < X if performance with > low number

[Bug 102651] vcpuX unhandled rdmsr: 0x570

2015-11-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=102651 Joachim Namislow changed: What|Removed |Added CC|

Re: [PATCH 0/7] kvmtool: Cleanup kernel loading

2015-11-02 Thread Andre Przywara
Hi Dimitri, On 02/11/15 15:17, Dimitri John Ledkov wrote: > On 2 November 2015 at 14:58, Will Deacon wrote: >> On Fri, Oct 30, 2015 at 06:26:53PM +, Andre Przywara wrote: >>> Hi, >> >> Hello Andre, >> >>> this series cleans up kvmtool's kernel loading functionality a

Re: [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 12:13, Xiao Guangrong wrote: lseek can not work for all block devices as the man page says: | Some devices are incapable of seeking and POSIX does not specify | which devices must support lseek(). This patch tries to add the support on Linux by using BLKGETSIZE64 ioctl

Re: [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-02 Thread Xiao Guangrong
On 11/03/2015 12:11 AM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: lseek can not work for all block devices as the man page says: | Some devices are incapable of seeking and POSIX does not specify | which devices must support lseek(). This patch tries to

Re: [PATCH 1/3] KVM: x86: merge kvm_arch_set_irq with kvm_set_msi_inatomic

2015-11-02 Thread Radim Krcmar
2015-11-02 17:08+0100, Paolo Bonzini: > On 02/11/2015 15:59, Radim Krcmar wrote: >>> We do not want to do too much work in atomic context, in particular >>> not walking all the VCPUs of the virtual machine. So we want >>> to distinguish the architecture-specific injection function for irqfd >>>

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

2015-11-02 Thread Shamir Rabinovitch
On Tue, Nov 03, 2015 at 07:13:28AM +1100, Benjamin Herrenschmidt 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 using a bypass or other means in the backend not the > business of the

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

2015-11-02 Thread Suresh E. Warrier
Hi Fengguang, I understand the problem. I will send you the URL for the powerpc git tree once my patches are pulled in so that we can then pass that to the robot. Thanks. -suresh On 11/01/2015 08:51 PM, Fengguang Wu wrote: > Hi Suresh, > > Sorry for the noise! > > Do you have a git tree that

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

2015-11-02 Thread Radim Krčmář
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. Signed-off-by: Radim Krčmář ---

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

2015-11-02 Thread Paolo Bonzini
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 work on file directly, if @path is a > directory it works as before, otherwise it treats @path as the target >

Re: [PATCH v4 17/21] KVM: ARM64: Add helper to handle PMCR register bits

2015-11-02 Thread Christopher Covington
On 10/30/2015 02:21 AM, Shannon Zhao wrote: > From: Shannon Zhao > > According to ARMv8 spec, when writing 1 to PMCR.E, all counters are > enabled by PMCNTENSET, while writing 0 to PMCR.E, all counters are > disabled. When writing 1 to PMCR.P, reset all event counters,

Re: [PATCH v4 08/21] KVM: ARM64: Add reset and access handlers for PMXEVTYPER register

2015-11-02 Thread Christopher Covington
Hi Shannon, On 10/30/2015 02:21 AM, Shannon Zhao wrote: > From: Shannon Zhao > > Since the reset value of PMXEVTYPER is UNKNOWN, use reset_unknown or > reset_unknown_cp15 for its reset handler. Add access handler which > emulates writing and reading PMXEVTYPER register.

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

2015-11-02 Thread Christoffer Dall
On Tue, Oct 27, 2015 at 11:37:28AM +0300, Pavel Fedin wrote: > 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

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

2015-11-02 Thread Arnd Bergmann
On Tuesday 03 November 2015 07:13:28 Benjamin Herrenschmidt wrote: > On Mon, 2015-11-02 at 14:07 +0200, Shamir Rabinovitch wrote: > > On Mon, Nov 02, 2015 at 09:00:34PM +1100, Benjamin Herrenschmidt > > wrote: > > > > > > Chosing on a per-mapping basis *in the back end* might still make > > >

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

2015-11-02 Thread Xiao Guangrong
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 directly allocate memory from it

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

2015-11-02 Thread Xiao Guangrong
Curretly, the memory region of backed memory is directly mapped to guest's address space, however, it is not true for nvdimm device This patch let dimm device realize this fact and use DIMMDeviceClass->get_memory_region method to get the mapped memory region Current code did not check the return

[PATCH v7 16/35] pc-dimm: drop the prefix of pc-dimm

2015-11-02 Thread Xiao Guangrong
This patch is generated by this script: find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" \ | xargs sed -i "s/PC_DIMM/DIMM/g" find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" \ | xargs sed -i "s/PCDIMM/DIMM/g" find ./ -name "*.[ch]" -o -name "*.json" -o -name

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

2015-11-02 Thread Xiao Guangrong
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 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git

[PATCH v7 03/35] acpi: add aml_create_field

2015-11-02 Thread Xiao Guangrong
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 files changed, 14 insertions(+) diff --git a/hw/acpi/aml-build.c

[PATCH v7 04/35] acpi: add aml_concatenate

2015-11-02 Thread Xiao Guangrong
Implement Concatenate term which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 14 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 15 insertions(+) diff --git

[PATCH v7 01/35] acpi: add aml_derefof

2015-11-02 Thread Xiao Guangrong
Implement DeRefOf term which is used by NVDIMM _DSM method in later patch Reviewed-by: Igor Mammedov Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9

[PATCH v7 05/35] acpi: add aml_object_type

2015-11-02 Thread Xiao Guangrong
Implement ObjectType which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c

[PATCH v7 07/35] util: introduce qemu_file_get_page_size()

2015-11-02 Thread Xiao Guangrong
There are three places use the some logic to get the page size on the file path or file fd Windows did not support file hugepage, so it will return normal page for this case. And this interface has not been used on windows so far This patch introduces qemu_file_get_page_size() to unify the code

[PATCH v7 02/35] acpi: add aml_sizeof

2015-11-02 Thread Xiao Guangrong
Implement SizeOf term which is used by NVDIMM _DSM method in later patch Reviewed-by: Igor Mammedov Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9

[PATCH v7 06/35] acpi: add aml_method_serialized

2015-11-02 Thread Xiao Guangrong
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 deletions(-) diff --git

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

2015-11-02 Thread Xiao Guangrong
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 Guangrong ---

[PATCH v7 14/35] pc-dimm: remove DEFAULT_PC_DIMMSIZE

2015-11-02 Thread Xiao Guangrong
It's not used any more Signed-off-by: Xiao Guangrong --- include/hw/mem/pc-dimm.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index d83bf30..11a8937 100644 --- a/include/hw/mem/pc-dimm.h +++

[PATCH v7 10/35] hostmem-file: clean up memory allocation

2015-11-02 Thread Xiao Guangrong
- 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 initialized Reviewed-by: Vladimir

[PATCH v7 15/35] pc-dimm: make pc_existing_dimms_capacity static and rename it

2015-11-02 Thread Xiao Guangrong
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 Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Xiao Guangrong

[PATCH v7 34/35] nvdimm acpi: support _FIT method

2015-11-02 Thread Xiao Guangrong
FIT buffer is not completely mapped into guest address space, so a new function, Read FIT, function index 0x, is reserved by QEMU to read the piece of FIT buffer. The buffer is concatenated before _FIT return Refer to docs/specs/acpi-nvdimm.txt for detailed design Signed-off-by: Xiao

[PATCH v7 35/35] nvdimm: add maintain info

2015-11-02 Thread Xiao Guangrong
Add NVDIMM maintainer Signed-off-by: Xiao Guangrong --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3144113..865c0cf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -907,6 +907,13 @@ M: Jiri Pirko

[PATCH v3 2/3] target-i386: calculate vcpu's TSC rate to be migrated

2015-11-02 Thread Haozhong Zhang
The value of the migrated vcpu's TSC rate is determined as below. 1. If a TSC rate is specified by the cpu option 'tsc-freq', then this user-specified value will be used. 2. If neither a user-specified TSC rate nor a migrated TSC rate is present, we will use the TSC rate from KVM

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

2015-11-02 Thread Xiao Guangrong
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 structure in NFIT We reserve handle 0 for root device. In this patch,

[PATCH v7 24/35] docs: add NVDIMM ACPI documentation

2015-11-02 Thread Xiao Guangrong
It describes the basic concepts of NVDIMM ACPI and the interface between QEMU and the ACPI BIOS Signed-off-by: Xiao Guangrong --- docs/specs/acpi_nvdimm.txt | 179 + 1 file changed, 179 insertions(+) create mode 100644

[PATCH v7 26/35] nvdimm acpi: build ACPI NFIT table

2015-11-02 Thread Xiao Guangrong
NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) Currently, we only support PMEM mode. Each device has 3 structures: - SPA structure, defines the PMEM region info - MEM DEV structure, it has the @handle which is used to associate specified ACPI NVDIMM device we will

[PATCH v7 28/35] nvdimm acpi: save arg3 for NVDIMM device _DSM method

2015-11-02 Thread Xiao Guangrong
Check if the input Arg3 is valid then store it into dsm_in if needed Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index

[PATCH v7 30/35] nvdimm acpi: support Get Namespace Label Size function

2015-11-02 Thread Xiao Guangrong
Function 4 is used to get Namespace label size Reviewed-by: Stefan Hajnoczi Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 87 +++- 1 file changed, 86 insertions(+), 1 deletion(-)

[PATCH v7 29/35] nvdimm acpi: support function 0

2015-11-02 Thread Xiao Guangrong
__DSM is defined in ACPI 6.0: 9.14.1 _DSM (Device Specific Method) Function 0 is a query function. We do not support any function on root device and only 3 functions are support for NVDIMM device, Get Namespace Label Size, Get Namespace Label Data and Set Namespace Label Data, that means we

[PATCH v7 25/35] nvdimm acpi: init the resource used by NVDIMM ACPI

2015-11-02 Thread Xiao Guangrong
A page staring from 0xFF0 and IO port 0x0a18 - 0xa1b in guest are reserved for NVDIMM ACPI emulation, refer to docs/specs/acpi_nvdimm.txt for detailed design A parameter, 'nvdimm-support', is introduced for PIIX4_PM and ICH9-LPC that controls if nvdimm support is enabled, it is true on

[PATCH v7 19/35] dimm: abstract dimm device from pc-dimm

2015-11-02 Thread Xiao Guangrong
A base device, dimm, is abstracted from pc-dimm, so that we can build nvdimm device based on dimm in the later patch Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Xiao Guangrong --- default-configs/i386-softmmu.mak | 1 +

[PATCH v7 21/35] dimm: keep the state of the whole backend memory

2015-11-02 Thread Xiao Guangrong
QEMU keeps the state of memory of dimm device during live migration, however, it is not enough for nvdimm device as its memory does not contain its label data, so that we should protect the whole backend memory instead Signed-off-by: Xiao Guangrong ---

[PATCH v7 18/35] pc-dimm: rename pc-dimm.c and pc-dimm.h

2015-11-02 Thread Xiao Guangrong
Rename: pc-dimm.c => dimm.c pc-dimm.h => dimm.h It prepares the work which abstracts dimm device type for both pc-dimm and nvdimm Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Xiao Guangrong --- hw/Makefile.objs

[PATCH v7 22/35] dimm: introduce realize callback

2015-11-02 Thread Xiao Guangrong
nvdimm need check if the backend memory is large enough to contain label data and init its memory region when the device is realized, so introduce realize callback which is called after common dimm has been realize Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v7 23/35] nvdimm: implement NVDIMM device abstract

2015-11-02 Thread Xiao Guangrong
Introduce "nvdimm" device which is based on dimm device type 128K memory region which is the minimum namespace label size required by NVDIMM Namespace Spec locates at the end of backend memory device is reserved for label data We can use "-m 1G,maxmem=100G,slots=10 -object memory-backend-file,

[PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-02 Thread Xiao Guangrong
lseek can not work for all block devices as the man page says: | Some devices are incapable of seeking and POSIX does not specify | which devices must support lseek(). This patch tries to add the support on Linux by using BLKGETSIZE64 ioctl Signed-off-by: Xiao Guangrong

[PATCH v7 17/35] stubs: rename qmp_pc_dimm_device_list.c

2015-11-02 Thread Xiao Guangrong
Rename qmp_pc_dimm_device_list.c to qmp_dimm_device_list.c Signed-off-by: Xiao Guangrong --- stubs/Makefile.objs | 2 +- stubs/{qmp_pc_dimm_device_list.c => qmp_dimm_device_list.c} | 0 2 files changed, 1 insertion(+), 1

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

2015-11-02 Thread Xiao Guangrong
It is used to get the size of the specified file, also qemu_fd_getlength() is introduced to unify the code with raw_getlength() in block/raw-posix.c Signed-off-by: Xiao Guangrong --- block/raw-posix.c| 7 +-- include/qemu/osdep.h | 2 ++ util/osdep.c

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

2015-11-02 Thread Paolo Bonzini
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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More

[PATCH v7 32/35] nvdimm acpi: support Set Namespace Label Data function

2015-11-02 Thread Xiao Guangrong
Function 6 is used to set Namespace Label Data Reviewed-by: Stefan Hajnoczi Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/hw/acpi/nvdimm.c

[PATCH v7 31/35] nvdimm acpi: support Get Namespace Label Data function

2015-11-02 Thread Xiao Guangrong
Function 5 is used to get Namespace Label Data Reviewed-by: Stefan Hajnoczi Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 63 1 file changed, 63 insertions(+) diff --git

[PATCH v7 33/35] nvdimm: allow using whole backend memory as pmem

2015-11-02 Thread Xiao Guangrong
Introduce a parameter, named "reserve-label-data", if it is false which indicates that QEMU does not reserve any region on the backend memory to support label data. It is a 'label-less' NVDIMM device mode that linux will use whole memory on the device as a single namesapce This is useful for the

[PATCH v3 1/3] target-i386: add a subsection for migrating vcpu's TSC rate

2015-11-02 Thread Haozhong Zhang
A new subsection 'vmstate_tsc_khz' is added to migrate vcpu's TSC rate. For the backwards compatibility, this subsection is not migrated on pc-*-2.4 and older machine types. Signed-off-by: Haozhong Zhang --- hw/i386/pc.c | 1 + hw/i386/pc_piix.c | 1 +

[PATCH v3 3/3] target-i386: load the migrated vcpu's TSC rate

2015-11-02 Thread Haozhong Zhang
Set vcpu's TSC rate to the migrated value if the user does not specify a TSC rate by cpu option 'tsc-freq' and a migrated TSC rate does exist. If KVM supports TSC scaling, guest programs will observe TSC increasing in the migrated rate other than the host TSC rate. Signed-off-by: Haozhong Zhang

Re: [PATCH v3 2/3] target-i386: calculate vcpu's TSC rate to be migrated

2015-11-02 Thread James Hogan
On Mon, Nov 02, 2015 at 05:26:42PM +0800, Haozhong Zhang wrote: > The value of the migrated vcpu's TSC rate is determined as below. > 1. If a TSC rate is specified by the cpu option 'tsc-freq', then this > user-specified value will be used. > 2. If neither a user-specified TSC rate nor a

[PATCH v7 00/35] implement vNVDIMM

2015-11-02 Thread Xiao Guangrong
This patchset can be found at: https://github.com/xiaogr/qemu.git nvdimm-v7 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 v7: - changes from Vladimir Sementsov-Ogievskiy's comments: 1) let

Re: [RFC PATCH] VFIO: Add a parameter to force nonthread IRQ

2015-11-02 Thread Paolo Bonzini
On 30/10/2015 07:16, Yunhong Jiang wrote: > And with this change, we even don't need the module option anymore, we first > try the primary handler, which is in hard irq context, and if failed, then > threaded irq handler. Am I right? Yes. > Paolo/Alex, do you want to work on the patch

Re: [Qemu-devel] [PATCH v6 18/33] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-02 Thread Xiao Guangrong
On 10/31/2015 10:15 PM, Xiao Guangrong wrote: On 10/31/2015 06:52 PM, Vladimir Sementsov-Ogievskiy wrote: On 30.10.2015 08:56, Xiao Guangrong wrote: Curretly, the memory region of backed memory is directly mapped to guest's address space, however, it is not true for nvdimm device This

[PATCH v3 0/3] target-i386: save/restore vcpu's TSC rate during migration

2015-11-02 Thread Haozhong Zhang
This patchset enables QEMU to save/restore vcpu's TSC rate during the migration on machine types pc-*-2.5 or newer. On the source machine: * If the vcpu's TSC rate is specified by the cpu option 'tsc-freq', then this user-specified TSC rate will be migrated. * Otherwise, the TSC rate

Re: [GIT PULL 0/3] KVM: s390: Bugfix and cleanups for kvm/next (4.4)

2015-11-02 Thread Paolo Bonzini
On 29/10/2015 16:08, Christian Borntraeger wrote: > git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git > tags/kvm-s390-next-20151028 Pulled, thanks! Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org

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

2015-11-02 Thread David Woodhouse
On Mon, 2015-11-02 at 08:10 +1100, Benjamin Herrenschmidt wrote: > On Sun, 2015-11-01 at 09:45 +0200, Shamir Rabinovitch wrote: > > Not sure this use case is possible for Infiniband where application hold > > the data buffers and there is no way to force application to re use the > > buffer as

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

2015-11-02 Thread Michael Ellerman
On Mon, 2015-11-02 at 16:10 -0600, Suresh E. Warrier wrote: > Hi Fengguang, > > I understand the problem. > > I will send you the URL for the powerpc git tree once my patches > are pulled in so that we can then pass that to the robot. The robot already knows about the powerpc next tree. It

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

2015-11-02 Thread Benjamin Herrenschmidt
On Mon, 2015-11-02 at 22:48 +, David Woodhouse wrote: > > In the Intel case, the mapping setup is entirely per-device (except for > crap devices and devices behind a PCIe-PCI bridge, etc.). > > So you can happily have a passthrough mapping for *one* device, without > making that same mapping

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

2015-11-02 Thread Mario Smarduch
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': ( ) Kernel low-level debugging via EmbeddedICE DCC channel ( )

  1   2   >