Re: [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Igor Mammedov
On Mon, 12 Oct 2015 11:06:20 +0800 Xiao Guangrong wrote: > > > On 10/12/2015 10:59 AM, Bharata B Rao wrote: > > Xiao, > > > > Are these patches present in any git tree so that they can be easily tried > > out. > > > > Sorry, currently no git tree out of my

RE: [PATCH v3 12/16] KVM: arm64: handle pending bit for LPIs in ITS emulation

2015-10-12 Thread Pavel Fedin
Hello! > -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf > Of Andre Przywara > Sent: Wednesday, October 07, 2015 5:55 PM > To: marc.zyng...@arm.com; christoffer.d...@linaro.org > Cc: eric.au...@linaro.org; p.fe...@samsung.com;

RE: [PATCH v2] KVM: arm/arm64: BUG FIX: Do not inject spurious interrupts

2015-10-12 Thread Pavel Fedin
Hello! > It is really up to whoever adds support for LPIs to make sure it's done > correctly. So I think this is for Andre to work out in his ITS series. > > This patch fixes an issue with the current code in the correct way as > far as I can tell. Ok. An alternate way is to introduce a

RE: [PATCH v4 3/7] KVM: arm/arm64: Fix the documentation

2015-10-12 Thread Pavel Fedin
Hello! > > > ok, fair enough. This kind of rationale is helpful to put in the commit > text though. By the way, may be apply this as a standalone patch? Should i post a standalone version with the updated commit message then? Kind regards, Pavel Fedin Expert Engineer Samsung Electronics

Re: QEMU Technical Talk: NVDIMM and persistent memory in QEMU

2015-10-12 Thread Stefan Hajnoczi
On Mon, Oct 5, 2015 at 8:52 PM, Stefan Hajnoczi wrote: Just a reminder that QEMU's first technical talk is today (Monday, 12 October 2015) at 14:00 UTC. We will be using Hangouts On Air for video/audio. The URL is: https://plus.google.com/events/cfssoojfogaafulssb1qeijn07k

Re: [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Xiao Guangrong
On 10/12/2015 04:20 PM, Igor Mammedov wrote: On Mon, 12 Oct 2015 11:06:20 +0800 Xiao Guangrong wrote: On 10/12/2015 10:59 AM, Bharata B Rao wrote: Xiao, Are these patches present in any git tree so that they can be easily tried out. Sorry, currently no

Re: [PATCH 13/15] arm64: kvm: Rewrite fake pgd handling

2015-10-12 Thread Suzuki K. Poulose
On 10/10/15 15:52, Christoffer Dall wrote: Hi Suzuki, Hi Christoffer, Thanks for being patient enough to review the code :-) without much of the comments. I now realise there needs much more documentation than what I have put in already. I am taking care of this in the next revision already.

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

2015-10-12 Thread Michael S. Tsirkin
On Sun, Oct 11, 2015 at 11:52:40AM +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

[PATCH v5 3/7] KVM: arm64: Implement vGICv3 distributor and redistributor access from userspace

2015-10-12 Thread Pavel Fedin
The access is done similar to vGICv2, using KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_REDIST_REGS with KVM_SET_DEVICE_ATTR and KVM_GET_DEVICE_ATTR ioctls. Since GICv3 can handle large number of CPUs, KVM_DEV_ARM_VGIC_CPUID_MASK has been extended to 32 bits. Access size for vGICv3 is

[PATCH v5 4/7] KVM: arm64: Refactor system register handlers

2015-10-12 Thread Pavel Fedin
Replace Rt with data pointer in struct sys_reg_params. This will allow to reuse system register handling code in implementation of vGICv3 CPU interface access API. Additionally, got rid of "massive hack" in kvm_handle_cp_64(). Signed-off-by: Pavel Fedin ---

[PATCH v5 6/7] KVM: arm64: Implement vGICv3 CPU interface access

2015-10-12 Thread Pavel Fedin
Access size is always 64 bits. Since CPU interface state actually affects only a single vCPU, no vGIC locking is done in order to avoid code duplication. Just made sure that the vCPU is not running. Signed-off-by: Pavel Fedin --- arch/arm64/include/uapi/asm/kvm.h | 14 ++-

[PATCH v5 2/7] KVM: arm/arm64: Refactor vGIC attributes handling code

2015-10-12 Thread Pavel Fedin
Separate all implementation-independent code in vgic_attr_regs_access() and move it to vgic.c. This will allow to reuse this code for vGICv3 implementation. vcpu lookup is left where it originally was, because vGICv3 API will expect affinity ID instead of vCPU index, therefore it will be done

[PATCH v5 1/7] KVM: arm/arm64: Move endianess conversion out of vgic_attr_regs_access()

2015-10-12 Thread Pavel Fedin
mmio_data_read() and mmio_data_write(), originally used in this function, are limited only to 32 bits. We are going to refactor this code and eventually let it do 64-bit I/O for vGICv3. Therefore, our first step is to get rid of this limitation. We open up these inlines, which consist of

[PATCH v5 5/7] KVM: arm64: Introduce find_reg_by_id()

2015-10-12 Thread Pavel Fedin
In order to implement vGICv3 CPU interface access, we will need to perform table lookup of system registers. We would need both index_to_params() and find_reg() exported for that purpose, but instead we export a single function which combines them both. Signed-off-by: Pavel Fedin

[PATCH v5 0/7] KVM: arm64: Implement API for vGICv3 live migration

2015-10-12 Thread Pavel Fedin
This patchset adds necessary userspace API in order to support vGICv3 live migration. GICv3 registers are accessed using device attribute ioctls, similar to GICv2. Whoever wants to test it, please note that this version is not binary-compatible with previous one, the API has been seriously

[PATCH v5 7/7] KVM: arm/arm64: Update API documentation

2015-10-12 Thread Pavel Fedin
From: Christoffer Dall Factor out the GICv3-specific documentation into a separate documentation file. Add description for how to access distributor, redistributor, and CPU interface registers for GICv3 in this new file. Additionally, fix some mistakes in GICv2

[Bug 105841] New: "KVM: x86: apply guest MTRR virtualization on host reserved pages" causes kernel to panic on boot

2015-10-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=105841 Bug ID: 105841 Summary: "KVM: x86: apply guest MTRR virtualization on host reserved pages" causes kernel to panic on boot Product: Virtualization Version: unspecified Kernel

Re: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-10-12 Thread Mario Smarduch
Hi Christoffer, Marc - I just threw this test your way without any explanation. The test loops, does fp arithmetic and checks the truncated result. It could be a little more dynamic have an initial run to get the sum to compare against while looping, different fp hardware may come up with a

[Bug 105841] "KVM: x86: apply guest MTRR virtualization on host reserved pages" causes kernel to panic on boot

2015-10-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=105841 --- Comment #1 from Mike Frysinger --- Created attachment 190051 --> https://bugzilla.kernel.org/attachment.cgi?id=190051=edit dmesg -- You are receiving this mail because: You are watching the assignee of the bug. -- To

Re: [PATCH v2 11/20] kvm: rename pfn_t to kvm_pfn_t

2015-10-12 Thread Dan Williams
On Mon, Oct 12, 2015 at 5:51 AM, Paolo Bonzini wrote: > > > On 10/10/2015 22:57, Dan Williams wrote: >> On Sat, Oct 10, 2015 at 1:35 PM, Paolo Bonzini wrote: >>> On 10/10/2015 02:56, Dan Williams wrote: The core has developed a need for a "pfn_t"

[Bug 105841] "KVM: x86: apply guest MTRR virtualization on host reserved pages" causes kernel to panic on boot

2015-10-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=105841 --- Comment #2 from Mike Frysinger --- Created attachment 190061 --> https://bugzilla.kernel.org/attachment.cgi?id=190061=edit dmidecode output -- You are receiving this mail because: You are watching the assignee of the

Re: [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Dan Williams
On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong wrote: > 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

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

2015-10-12 Thread Eric Blake
On 10/10/2015 09:52 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 00/32] implement vNVDIMM

2015-10-12 Thread Dan Williams
On Sun, Oct 11, 2015 at 9:33 PM, Xiao Guangrong wrote: > > > On 10/11/2015 05:17 AM, Dan Williams wrote: >> >> On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong >> wrote: >> [..] >>> >>> == Test == >>> In host >>> 1) create

Re: [PATCH v4 3/7] KVM: arm/arm64: Fix the documentation

2015-10-12 Thread Christoffer Dall
On Mon, Oct 12, 2015 at 10:16:13AM +0300, Pavel Fedin wrote: > Hello! > > > > > > ok, fair enough. This kind of rationale is helpful to put in the commit > > text though. > > By the way, may be apply this as a standalone patch? Should i post a > standalone version with the > updated commit

[PATCH 2/2] KVM: x86: map/unmap private slots in __x86_set_memory_region

2015-10-12 Thread Paolo Bonzini
Otherwise, two copies (one of them never used and thus bogus) are allocated for the regular and SMM address spaces. This breaks SMM with EPT but without unrestricted guest support, because the SMM copy of the identity page map is all zeros. By moving the allocation to the caller we also remove

[PATCH 1/2] KVM: x86: build kvm_userspace_memory_region in x86_set_memory_region

2015-10-12 Thread Paolo Bonzini
The next patch will make x86_set_memory_region fill the userspace_addr. Since the struct is not used untouched anymore, it makes sense to build it in x86_set_memory_region directly; it also simplifies the callers. Reported-by: Alexandre DERUMIER Cc: sta...@vger.kernel.org

[PATCH 0/2] KVM: fix SMM with ept=1/unrestricted_guest=0

2015-10-12 Thread Paolo Bonzini
The fix is explained in the commit message for patch 2. A little bit of refactoring is needed. Paolo Bonzini (2): KVM: x86: build kvm_userspace_memory_region in x86_set_memory_region KVM: x86: map/unmap private slots in __x86_set_memory_region arch/x86/include/asm/kvm_host.h | 6 +--

Re: [PATCH] KVM: VMX: enable LBR virtualization

2015-10-12 Thread Jian Zhou
ping... > Using vmx msr store/load mechanism and msr intercept bitmap > to implement LBR virtualization. > > Signed-off-by: Jian Zhou > Signed-off-by: Stephen He > > diff --git a/arch/x86/include/asm/kvm_host.h

Re: [PATCH v2 11/20] kvm: rename pfn_t to kvm_pfn_t

2015-10-12 Thread Paolo Bonzini
On 10/10/2015 22:57, Dan Williams wrote: > On Sat, Oct 10, 2015 at 1:35 PM, Paolo Bonzini wrote: >> On 10/10/2015 02:56, Dan Williams wrote: >>> The core has developed a need for a "pfn_t" type [1]. Move the existing >>> pfn_t in KVM to kvm_pfn_t [2]. >>> >>> [1]:

Re: [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Michael S. Tsirkin
On Sun, Oct 11, 2015 at 11:52:55AM +0800, Xiao Guangrong wrote: > 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

Re: [PATCH] KVM: VMX: enable LBR virtualization

2015-10-12 Thread Paolo Bonzini
On 12/10/2015 14:10, Jian Zhou wrote: > ping... I think your expectations for review RTT are a bit too optimistic. I have only worked 4 hours since you posted the patch... But it was on my list anyway, so let's do it. First of all, you should move the implementation entirely into vmx.c,

RE: [PATCH v3 12/16] KVM: arm64: handle pending bit for LPIs in ITS emulation

2015-10-12 Thread Pavel Fedin
Hello! > Shouldn't we also have 'break' here? If vgic_queue_irq() returns false, this > means we have no > more > LRs to use, therefore it makes no sense to keep iterating. No, don't listen to me. :) Because of piggyback, we indeed have to recheck all the interrupts. P.S. I still

Re: [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Michael S. Tsirkin
On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote: > Changelog in v3: > There is huge change in this version, thank Igor, Stefan, Paolo, Eduardo, > Michael for their valuable comments, the patchset finally gets better shape. Thanks! This needs some changes in coding style, and more

Re: [PATCH v3 00/16] KVM: arm64: GICv3 ITS emulation

2015-10-12 Thread Andre Przywara
Hej, On 10/10/15 16:37, Christoffer Dall wrote: > Hi Andre, > > > On Wed, Oct 07, 2015 at 03:55:10PM +0100, Andre Przywara wrote: >> Hi, >> >> another respin and rebase of the ITS emulation series. >> Major changes compared to v2 (beside some minor things like added >> comments and function

RE: [PATCH v3 00/16] KVM: arm64: GICv3 ITS emulation

2015-10-12 Thread Pavel Fedin
Hello! > Also what is the status of Eric's IRQ routing support? Should this go in > first now? I'd say without vITS there's nothing to use IRQ routing with. It could go in and just lay around silently, so that it's not forgotten, but for example current qemu just knows that with GICv2m it

Re: [PATCH v3 12/16] KVM: arm64: handle pending bit for LPIs in ITS emulation

2015-10-12 Thread Andre Przywara
Hi Pavel, On 12/10/15 08:40, Pavel Fedin wrote: > Hello! > >> -Original Message- >> From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf >> Of Andre Przywara >> Sent: Wednesday, October 07, 2015 5:55 PM >> To: marc.zyng...@arm.com; christoffer.d...@linaro.org >>

Re: QEMU Technical Talk: NVDIMM and persistent memory in QEMU

2015-10-12 Thread Stefan Hajnoczi
Thanks to everyone who joined and to Marc Mari for giving the presentation. The next QEMU technical talk will be announced to the mailing list in a few days. Video: https://www.youtube.com/watch?v=Vit3-PjbN9M#t=13m02s Slides (PDF): http://vmsplice.net/~stefan/nvdimm_slides_public.pdf Stefan --

[kvm-unit-tests PATCHv4] ARM PMU tests

2015-10-12 Thread Christopher Covington
Changes from v3 in response to Drew's suggestions: * Improved pmu_data / PMCR fields and usage * Straightened out awkward conditionals * Added 32-bit support * Styling enhancements * Deferred -icount testing to later patch -- To unsubscribe from this list: send the line "unsubscribe kvm" in the

[kvm-unit-tests PATCHv4 1/3] arm: Add PMU test

2015-10-12 Thread Christopher Covington
Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). Signed-off-by: Christopher Covington --- arm/pmu.c| 82 arm/unittests.cfg|

[kvm-unit-tests PATCHv4 3/3] arm: pmu: Add CPI checking

2015-10-12 Thread Christopher Covington
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 configuration file. Enabling it must wait on infrastructure improvements which

[kvm-unit-tests PATCHv4 2/3] arm: pmu: Check cycle count increases

2015-10-12 Thread Christopher Covington
Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington --- arm/pmu.c | 54 ++ 1 file changed, 54 insertions(+) diff

Re: [PATCH 0/7] userfault21 update

2015-10-12 Thread Patrick Donnelly
Hello Andrea, On Mon, Jun 15, 2015 at 1:22 PM, Andrea Arcangeli wrote: > This is an incremental update to the userfaultfd code in -mm. Sorry I'm late to this party. I'm curious how a ptrace monitor might use a userfaultfd to handle faults in all of its tracees. Is this

Re: [PATCH 1/2] KVM: arm/arm64: Optimize away redundant LR tracking

2015-10-12 Thread Andre Przywara
Hi, On 02/10/15 15:44, Pavel Fedin wrote: > 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 for piggy-back optimization, and > can be easily replaced by

Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled

2015-10-12 Thread Xiao Guangrong
On 10/11/2015 04:07 AM, Xiao Guangrong wrote: On 10/02/2015 10:38 PM, Janusz wrote: W dniu 01.10.2015 o 16:18, Paolo Bonzini pisze: On 01/10/2015 16:12, Janusz wrote: Now, I can also add, that the problem is only when I allow VM to use more than one core, so with option for example:

Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 02:20 AM, Xiao Guangrong wrote: On 10/11/2015 04:07 AM, Xiao Guangrong wrote: On 10/02/2015 10:38 PM, Janusz wrote: W dniu 01.10.2015 o 16:18, Paolo Bonzini pisze: On 01/10/2015 16:12, Janusz wrote: Now, I can also add, that the problem is only when I allow VM to use

Re: [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 12:40 AM, Dan Williams wrote: On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong wrote: 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,

Re: [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Michael S. Tsirkin
On Tue, Oct 13, 2015 at 01:13:18PM +0800, Xiao Guangrong wrote: > > > >> #endif > > > >This header is too small to be worth it. > >nvdimm_get_built_list seems to be the only interface - > >just stick it in the header you have under include. > > > > Other functions are introudced and included

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 11:38 AM, Dan Williams wrote: On Mon, Oct 12, 2015 at 8:14 PM, Xiao Guangrong wrote: On 10/13/2015 12:36 AM, Dan Williams wrote: Static namespaces can be emitted without a label. Linux needs this to support existing "label-less" bare metal

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 12:36 AM, Dan Williams wrote: On Sun, Oct 11, 2015 at 9:33 PM, Xiao Guangrong wrote: On 10/11/2015 05:17 AM, Dan Williams wrote: On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong wrote: [..] == Test ==

Re: [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Xiao Guangrong
On 10/12/2015 07:55 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote: Changelog in v3: There is huge change in this version, thank Igor, Stefan, Paolo, Eduardo, Michael for their valuable comments, the patchset finally gets better shape. Thanks!

Re: [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Michael S. Tsirkin
On Tue, Oct 13, 2015 at 01:29:48PM +0800, Xiao Guangrong wrote: > > > On 10/12/2015 07:55 PM, Michael S. Tsirkin wrote: > >On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote: > >>Changelog in v3: > >>There is huge change in this version, thank Igor, Stefan, Paolo, Eduardo, >

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

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 12:43 AM, Eric Blake wrote: On 10/10/2015 09:52 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

Re: [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Xiao Guangrong
On 10/12/2015 07:27 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:55AM +0800, Xiao Guangrong wrote: 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

Re: [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 01:57 PM, Michael S. Tsirkin wrote: On Tue, Oct 13, 2015 at 01:29:48PM +0800, Xiao Guangrong wrote: On 10/12/2015 07:55 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote: Changelog in v3: There is huge change in this version, thank

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

2015-10-12 Thread Xiao Guangrong
On 10/12/2015 06:08 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:40AM +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

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Dan Williams
On Mon, Oct 12, 2015 at 8:14 PM, Xiao Guangrong wrote: > On 10/13/2015 12:36 AM, Dan Williams wrote: >> Static namespaces can be emitted without a label. Linux needs this to >> support existing "label-less" bare metal NVDIMMs. > > > This is Linux specific? As i