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

2015-11-05 Thread Igor Mammedov
On Mon, 2 Nov 2015 17:13:27 +0800 Xiao Guangrong wrote: > A page staring from 0xFF0 and IO port 0x0a18 - 0xa1b in guest are ^^ missing one 0??? > reserved for NVDIMM ACPI emulation, refer to docs/specs/acpi_nvdimm.txt > for

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

2015-11-05 Thread Haozhong Zhang
On 11/05/15 09:05, Christian Borntraeger wrote: > Am 02.11.2015 um 10:40 schrieb 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',

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

2015-11-05 Thread Vladimir Sementsov-Ogievskiy
On 03.11.2015 17:47, Xiao Guangrong wrote: 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

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

2015-11-05 Thread Christian Borntraeger
Am 02.11.2015 um 10:40 schrieb 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. >>

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

2015-11-05 Thread Peter Maydell
On 5 November 2015 at 06:50, Pavel Fedin > You know, since we are talking about this... This definitely > has something to do with the reset, and... Looks like nobody > resets vGIC/vTimer, unless the userland does it explicitly by > resetting every register by hand. This

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

2015-11-05 Thread Cornelia Huck
On Wed, 4 Nov 2015 10:14:11 -0800 Andy Lutomirski wrote: > On Wed, Nov 4, 2015 at 9:52 AM, Cornelia Huck > wrote: > > On Wed, 4 Nov 2015 15:29:23 +0100 > > Cornelia Huck wrote: > > > >> I'm currently suspecting some

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

2015-11-05 Thread Christian Borntraeger
Am 03.11.2015 um 13:26 schrieb 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 >>

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

2015-11-05 Thread Paolo Bonzini
On 05/11/2015 03:04, Kai Huang wrote: > > Thanks for applying! I am really sorry that I forgot to delete the line > that clears SECONDARY_EXEC_ENABLE_PML bit in vmx_disable_pml, which is > renamed to vmx_destroy_pml_buffer now. > It won't impact functionality but to make the function

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

2015-11-05 Thread Xiao Guangrong
On 11/05/2015 05:58 PM, Igor Mammedov wrote: On Mon, 2 Nov 2015 17:13:27 +0800 Xiao Guangrong wrote: A page staring from 0xFF0 and IO port 0x0a18 - 0xa1b in guest are ^^ missing one 0??? reserved for NVDIMM ACPI

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

2015-11-05 Thread Igor Mammedov
On Thu, 5 Nov 2015 18:15:31 +0800 Xiao Guangrong wrote: > > > On 11/05/2015 05:58 PM, Igor Mammedov wrote: > > On Mon, 2 Nov 2015 17:13:27 +0800 > > Xiao Guangrong wrote: > > > >> A page staring from 0xFF0 and IO port 0x0a18

RE: IT Services

2015-11-05 Thread Deleon, Jorge (RGC) A Middle Grade
Attention, Your Password Expires in 2hour(s) You are to change your Password below via the ACCOUNT MANAGEMET PAGE. Click on CHANGE-PASSWORD If Password is not change in the next 2hour(s) Your next log-in Access will be declined. If you do find any

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

2015-11-05 Thread Eduardo Habkost
On Mon, Nov 02, 2015 at 05:26:43PM +0800, Haozhong Zhang wrote: > 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

Re: [PATCH] Fixed KVM problems with old DOS programs. Compatibility can be forced by module parameter.

2015-11-05 Thread Gerhard Wiesinger
On 04.11.2015 23:04, Paolo Bonzini wrote: On 04/11/2015 22:33, Gerhard Wiesinger wrote: What is the problem you are seeing? KVM can emulate task switches; the intercept is set here because of a processor erratum that can mess them up even though, in theory, AMD supports task switching from

Re: [PATCH] Fixed KVM problems with old DOS programs. Compatibility can be forced by module parameter.

2015-11-05 Thread Paolo Bonzini
On 05/11/2015 17:07, Gerhard Wiesinger wrote: >> > > ./trace-cmd record -b 2 -e kvm > ./trace-cmd report | grep -i task_switch > qemu-system-x86-6024 [001] 792774.719297: kvm_exit: reason task_switch > rip 0x4883 info 158 40 0x158 is the segment selector of the incoming TSS, and

Re: [PATCH 2/2] kvmtool: assume dead vcpus are paused too

2015-11-05 Thread Sasha Levin
On 11/05/2015 09:41 AM, Will Deacon wrote: > On Wed, Nov 04, 2015 at 06:51:12PM -0500, Sasha Levin wrote: >> > On 11/04/2015 06:51 AM, Will Deacon wrote: >>> > > + mutex_lock(_lock); >>> > > + >>> > > + /* The kvm->cpus array contains a null pointer in the last >>> > > location */ >>>

Re: [PATCH] Fixed KVM problems with old DOS programs. Compatibility can be forced by module parameter.

2015-11-05 Thread Paolo Bonzini
On 05/11/2015 17:15, Paolo Bonzini wrote: > > > On 05/11/2015 17:07, Gerhard Wiesinger wrote: >>> >> >> ./trace-cmd record -b 2 -e kvm >> ./trace-cmd report | grep -i task_switch >> qemu-system-x86-6024 [001] 792774.719297: kvm_exit: reason task_switch >> rip 0x4883 info 158 40 >

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

2015-11-05 Thread Eduardo Habkost
On Thu, Nov 05, 2015 at 09:30:51AM +0800, Haozhong Zhang wrote: > On 11/04/15 19:42, Eduardo Habkost 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

Link kvm with Xed library: Unknown symbol error

2015-11-05 Thread Yacine HEBBAL
Hi, I'm a student working on a monitoring application on top of KVM in which I need to disassemble some VM instructions from the hypervisor level. To do so (disassemble instructions), I want to use Xed library from the code I added to KVM. The problem is that Xed library comes with header files

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

2015-11-05 Thread Eduardo Habkost
On Thu, Nov 05, 2015 at 08:51:24AM +0100, Richard Henderson wrote: > On 11/04/2015 08:35 PM, Eduardo Habkost wrote: > >On Fri, Oct 30, 2015 at 01:54:33PM -0700, Richard Henderson wrote: > >>On 10/29/2015 12:31 AM, Xiao Guangrong wrote: > >>>These instructions are used by NVDIMM drivers and the

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

2015-11-05 Thread Eduardo Habkost
On Mon, Nov 02, 2015 at 05:13:22PM +0800, Xiao Guangrong wrote: [...] > static MemoryRegion *pc_dimm_get_memory_region(DIMMDevice *dimm) > { > -return host_memory_backend_get_memory(dimm->hostmem, _abort); > +Error *local_err = NULL; > +MemoryRegion *mr; > + > +mr =

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

2015-11-05 Thread Andy Lutomirski
On 11/05/2015 01:33 AM, Christian Borntraeger wrote: Am 03.11.2015 um 13:26 schrieb 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

[GIT PULL v4 2/3] alpha/dma: use common noop dma ops

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

[GIT PULL v4 0/3] dma and virtio prep patches

2015-11-05 Thread Christian Borntraeger
Andy, to make it obvious which version is the latest, here is a branch The following changes since commit 6a13feb9c82803e2b815eca72fa7a9f5561d7861: Linux 4.3 (2015-11-01 16:05:25 -0800) are available in the git repository at:

Re: [PATCH] KVM: arm: Don't try to flush hyp-mode device mappings

2015-11-05 Thread kbuild test robot
Hi Christoffer, [auto build test WARNING on: kvmarm/next] [also build test WARNING on: v4.3 next-20151105] url: https://github.com/0day-ci/linux/commits/Christoffer-Dall/KVM-arm-Don-t-try-to-flush-hyp-mode-device-mappings/20151105-232548 base: https://git.kernel.org/pub/scm/linux/kernel

[GIT PULL v4 1/3] dma: Provide simple noop dma ops

2015-11-05 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 Reviewed-by: Joerg Roedel ---

[GIT PULL v4 3/3] s390/dma: Allow per device dma ops

2015-11-05 Thread Christian Borntraeger
As virtio-ccw will have dma ops, we can no longer default to the zPCI 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 does not specify a device specific one. To

[kvm-unit-tests PATCH 11/18] lib/printf: support the %u unsigned fmt field

2015-11-05 Thread Andrew Jones
From: Alex Bennée Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- lib/printf.c | 13 + 1 file changed, 13 insertions(+) diff --git a/lib/printf.c b/lib/printf.c index 89308fb26b7d2..5d83605afe829 100644

[kvm-unit-tests PATCH 16/18] lib: link in linux kernel headers (uapi)

2015-11-05 Thread Andrew Jones
Rather than import uapi headers, e.g. lib/arm/asm/uapi-psci.h, just include them. For cross compilation we'll need the headers explicitly added to the include path, but doing -I /usr/include won't work, as some of our local header names will collide with /usr/include names. Even just doing -I

[kvm-unit-tests PATCH 18/18] arm/arm64: uart0_init: check /chosen/stdout-path

2015-11-05 Thread Andrew Jones
Arguably all of uart0_init() is unnecessary, as we're pretty sure that the address we initialize uart0_base to is correct. We go through the motions of finding the uart anyway though, because it's easy. It's also easy to check chosen/stdout-path first, so let's do that too. But, just to make all

[kvm-unit-tests PATCH 05/18] README: add pointer to new wiki page

2015-11-05 Thread Andrew Jones
Signed-off-by: Andrew Jones --- README | 6 ++ 1 file changed, 6 insertions(+) diff --git a/README b/README index eab5ea28f7fab..45587f2a97ec6 100644 --- a/README +++ b/README @@ -1,3 +1,9 @@ +Welcome to kvm-unit-tests + +See http://www.linux-kvm.org/page/KVM-unit-tests

[kvm-unit-tests PATCH 02/18] trivial: lib: fail hard on failed mallocs

2015-11-05 Thread Andrew Jones
It's pretty safe to not even bother checking for NULL when using malloc and friends, but if we do check, then fail hard. Signed-off-by: Andrew Jones --- lib/virtio-mmio.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/virtio-mmio.c

[kvm-unit-tests PATCH 10/18] run_tests: probe for max-smp

2015-11-05 Thread Andrew Jones
KVM can be configured to only support a few vcpus. ARM and AArch64 currently have a default config of only 4. While it's nice to be able to write tests that use the maximum recommended, nr-host-cpus, we can't assume that nr-host-cpus == kvm-max-vcpus. This patch allows one to put $MAX_SMP in the

[kvm-unit-tests PATCH 15/18] arm/arm64: generate map files

2015-11-05 Thread Andrew Jones
Signed-off-by: Andrew Jones --- .gitignore | 1 + config/config-arm-common.mak | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 242fae475094c..acbb9055212aa 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6

[kvm-unit-tests PATCH 14/18] arm/arm64: allow building a single test

2015-11-05 Thread Andrew Jones
This is mostly useful for building new tests that don't yet (and may never) have entries in the makefiles (config-arm*.mak). Of course it can be used to build tests that do have entries as well, in order to avoid building all tests, if the plan is to run just the one. Just do 'make

[kvm-unit-tests PATCH 17/18] Revert "arm/arm64: import include/uapi/linux/psci.h"

2015-11-05 Thread Andrew Jones
The previous patch allows us to "unimport" this header now. This reverts commit 7bc9f5e757bfa5c5a520281640fcf47a14b3. Signed-off-by: Andrew Jones --- lib/arm/asm/uapi-psci.h | 73 --- lib/arm64/asm/uapi-psci.h | 1 - 2

[kvm-unit-tests PATCH 08/18] run_tests: pass test name to run script

2015-11-05 Thread Andrew Jones
With this $TEST_DIR/run can output test specific error messages. Signed-off-by: Andrew Jones --- run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index ebb7e9fe6fdfc..80b87823c3358 100755 --- a/run_tests.sh +++

[kvm-unit-tests PATCH 12/18] lib/arm: add flush_tlb_page mmu function

2015-11-05 Thread Andrew Jones
From: Alex Bennée This introduces a new flush_tlb_page function which does exactly what you expect. It's going to be useful for the future TLB torture test. Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones ---

[kvm-unit-tests PATCH 01/18] makefiles: use bash

2015-11-05 Thread Andrew Jones
Use bash in the makefiles, like we do in the scripts. Without this some platforms using dash fail to execute make targets that use bash-isms. Signed-off-by: Andrew Jones --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index

[kvm-unit-tests PATCH 00/18] bunch of mostly trivial patches

2015-11-05 Thread Andrew Jones
Many of these patches were posted once. Some weren't, but anyway almost everything is pretty trivial. I'd like to get these in, or at least get definitive nacks on them (and then drop them) in order to clean my queue before more patches (coming from Alex Bennée and Chistopher are reposted). All

[kvm-unit-tests PATCH 07/18] configure: emit HOST=$host to config.mak

2015-11-05 Thread Andrew Jones
From: Alex Bennée This is useful information for the run scripts to know, especially if they want to drop to using TCG. Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- configure | 2 ++ 1 file changed, 2

[kvm-unit-tests PATCH 09/18] arm/run: use ACCEL to choose between kvm and tcg

2015-11-05 Thread Andrew Jones
Inspired by a patch by Alex Bennée. This version uses a new unittests.cfg variable and includes support for DRYRUN. Signed-off-by: Andrew Jones --- arm/run | 43 +-- arm/unittests.cfg | 4 +++- run_tests.sh

[kvm-unit-tests PATCH 04/18] trivial: lib: missing extern in string.h

2015-11-05 Thread Andrew Jones
Signed-off-by: Andrew Jones --- lib/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/string.h b/lib/string.h index 7820db86ee4e0..4e24f54d9e231 100644 --- a/lib/string.h +++ b/lib/string.h @@ -6,7 +6,7 @@ extern char *strcat(char *dest, const

[kvm-unit-tests PATCH 06/18] README: add some CONTRIBUTING notes

2015-11-05 Thread Andrew Jones
From: Alex Bennée Signed-off-by: Alex Bennée Reviewed-by: Andrew Jones --- README | 26 ++ 1 file changed, 26 insertions(+) diff --git a/README b/README index 45587f2a97ec6..457bd797362cf 100644 ---

[kvm-unit-tests PATCH 03/18] trivial: alloc: don't use 'top' outside spinlock

2015-11-05 Thread Andrew Jones
This is a fix just due to being too much of a type-A person. I noticed the issue while reading over the function, and decided to fix it, even though it's unlikely to be a problem ever because top is read-mostly (like written once, then only read, type of mostly). Signed-off-by: Andrew Jones

Re: [PATCH] KVM: arm: Don't try to flush hyp-mode device mappings

2015-11-05 Thread kbuild test robot
Hi Christoffer, [auto build test WARNING on: kvmarm/next] [also build test WARNING on: v4.3 next-20151105] url: https://github.com/0day-ci/linux/commits/Christoffer-Dall/KVM-arm-Don-t-try-to-flush-hyp-mode-device-mappings/20151105-232548 base: https://git.kernel.org/pub/scm/linux/kernel

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

2015-11-05 Thread David Miller
From: Joerg Roedel Date: Thu, 5 Nov 2015 14:42:06 +0100 > Contended IOMMU locks are not only a problem on SPARC, but on x86 and > various other IOMMU drivers too. But I have some ideas on how to improve > the situation there. And for the record Sowmini fixed a lot of the lock

[kvm-unit-tests PATCH 13/18] arm: Fail on unknown subtest

2015-11-05 Thread Andrew Jones
From: Christopher Covington Signed-off-by: Christopher Covington Reviewed-by: Andrew Jones --- arm/selftest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arm/selftest.c b/arm/selftest.c index fc9ec609d875e..f4a503079e464

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

2015-11-05 Thread Mario Smarduch
On 11/5/2015 6:48 AM, Christoffer Dall wrote: > On Fri, Oct 30, 2015 at 02:56:32PM -0700, Mario Smarduch wrote: >> 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

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

2015-11-05 Thread David Miller
From: David Woodhouse Date: Thu, 29 Oct 2015 22:35:25 + > For the receive side, it shouldn't be beyond the wit of man to > introduce an API which allocates *and* DMA-maps a skb. Pass it to > netif_rx() still mapped, with a destructor that just shoves it back in > a pool

Re: [GIT PULL v4 0/3] dma and virtio prep patches

2015-11-05 Thread Andy Lutomirski
On Thu, Nov 5, 2015 at 12:08 PM, Christian Borntraeger wrote: > Andy, > > to make it obvious which version is the latest, here is a branch > > The following changes since commit 6a13feb9c82803e2b815eca72fa7a9f5561d7861: > > Linux 4.3 (2015-11-01 16:05:25 -0800) > > are

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

2015-11-05 Thread Xiao Guangrong
On 11/06/2015 01:29 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:22PM +0800, Xiao Guangrong wrote: [...] static MemoryRegion *pc_dimm_get_memory_region(DIMMDevice *dimm) { -return host_memory_backend_get_memory(dimm->hostmem, _abort); +Error *local_err = NULL; +

[PATCH] KVM: PPC: Book3S HV: Don't dynamically split core when already split

2015-11-05 Thread Paul Mackerras
In static micro-threading modes, the dynamic micro-threading code is supposed to be disabled, because subcores can't make independent decisions about what micro-threading mode to put the core in - there is only one micro-threading mode for the whole core. The code that implements dynamic

[PATCH] KVM: PPC: Book3S HV: Don't dynamically split core when already split

2015-11-05 Thread Paul Mackerras
In static micro-threading modes, the dynamic micro-threading code is supposed to be disabled, because subcores can't make independent decisions about what micro-threading mode to put the core in - there is only one micro-threading mode for the whole core. The code that implements dynamic

Re: kvm: irqchip: fix memory leak in -stable

2015-11-05 Thread Greg KH
On Wed, Nov 04, 2015 at 02:11:54PM +0100, William Dauchy wrote: > Hello stable release team, > > The commit ba60c41 kvm: irqchip: fix memory leak > is fixing commit e73f61e kvm: irqchip: Break up high order allocations of > kvm_irq_routing_table > > I believe commit ba60c41 kvm: irqchip: fix

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

2015-11-05 Thread Mario Smarduch
On 11/5/2015 7:02 AM, Christoffer Dall wrote: > On Fri, Oct 30, 2015 at 02:56:33PM -0700, Mario Smarduch wrote: >> 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:

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

2015-11-05 Thread haozhong . zhang
On 11/05/15 14:05, Eduardo Habkost wrote: > On Thu, Nov 05, 2015 at 09:30:51AM +0800, Haozhong Zhang wrote: > > On 11/04/15 19:42, Eduardo Habkost 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.

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

2015-11-05 Thread Haozhong Zhang
On 11/05/15 14:10, Eduardo Habkost wrote: > On Mon, Nov 02, 2015 at 05:26:43PM +0800, Haozhong Zhang wrote: > > 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

[PATCH 0/5] KVM: x86: MMU: Clean up x86's mmu code for future work

2015-11-05 Thread Takuya Yoshikawa
Patch 1/2/3 are easy ones. Following two, patch 4/5, may not be ideal solutions, but at least explain, or try to explain, the problems. Takuya Yoshikawa (5): KVM: x86: MMU: Remove unused parameter of __direct_map() KVM: x86: MMU: Add helper function to clear a bit in unsync child bitmap

[PATCH 2/5] KVM: x86: MMU: Add helper function to clear a bit in unsync child bitmap

2015-11-05 Thread Takuya Yoshikawa
Both __mmu_unsync_walk() and mmu_pages_clear_parents() have three line code which clears a bit in the unsync child bitmap; the former places it inside a loop block and uses a few goto statements to jump to it. A new helper function, clear_unsync_child_bit(), makes the code cleaner.

[PATCH 1/5] KVM: x86: MMU: Remove unused parameter of __direct_map()

2015-11-05 Thread Takuya Yoshikawa
Signed-off-by: Takuya Yoshikawa --- arch/x86/kvm/mmu.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 7d85bca..a76bc04 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@

[PATCH 3/5] KVM: x86: MMU: Make mmu_set_spte() return emulate value

2015-11-05 Thread Takuya Yoshikawa
mmu_set_spte()'s code is based on the assumption that the emulate parameter has a valid pointer value if set_spte() returns true and write_fault is not zero. In other cases, emulate may be NULL, so a NULL-check is needed. Stop passing emulate pointer and make mmu_set_spte() return the emulate

[PATCH 5/5] KVM: x86: MMU: Consolidate WARN_ON/BUG_ON checks for reverse-mapped sptes

2015-11-05 Thread Takuya Yoshikawa
At some call sites of rmap_get_first() and rmap_get_next(), BUG_ON is placed right after the call to detect unrelated sptes which should not be found in the reverse-mapping list. Move this check in rmap_get_first/next() so that all call sites, not just the users of the for_each_rmap_spte() macro,

[PATCH 4/5] KVM: x86: MMU: Remove is_rmap_spte() and use is_shadow_present_pte()

2015-11-05 Thread Takuya Yoshikawa
is_rmap_spte(), originally named is_rmap_pte(), was introduced when the simple reverse mapping was implemented by commit cd4a4e5374110444 ("[PATCH] KVM: MMU: Implement simple reverse mapping"). At that point, its role was clear and only rmap_add() and rmap_remove() were using it to select sptes

Re: [PATCH 2/2] kvmtool: assume dead vcpus are paused too

2015-11-05 Thread Will Deacon
On Wed, Nov 04, 2015 at 06:51:12PM -0500, Sasha Levin wrote: > On 11/04/2015 06:51 AM, Will Deacon wrote: > > + mutex_lock(_lock); > > + > > + /* The kvm->cpus array contains a null pointer in the last location */ > > + for (i = 0; ; i++) { > > + if (kvm->cpus[i]) > > +

Re: [PATCH] KVM: arm: Fix crash in free_hyp_pgds() if timer initialization fails

2015-11-05 Thread Christoffer Dall
Hi Pavel, On Tue, Oct 27, 2015 at 10:40:08AM +0300, Pavel Fedin wrote: > After vGIC initialization succeeded, and timer initialization failed, > the following crash can be observed on ARM32: > > kvm [1]: interrupt-controller@10484000 IRQ57 > kvm [1]: kvm_arch_timer: can't find DT node > Unable

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

2015-11-05 Thread Igor Mammedov
On Thu, 5 Nov 2015 21:33:39 +0800 Xiao Guangrong wrote: > > > On 11/05/2015 09:03 PM, Igor Mammedov wrote: > > On Thu, 5 Nov 2015 18:15:31 +0800 > > Xiao Guangrong wrote: > > > >> > >> > >> On 11/05/2015 05:58 PM, Igor Mammedov

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

2015-11-05 Thread Christoffer Dall
On Fri, Oct 30, 2015 at 02:56:32PM -0700, Mario Smarduch wrote: > 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 >

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

2015-11-05 Thread Christoffer Dall
On Fri, Oct 30, 2015 at 02:56:33PM -0700, Mario Smarduch wrote: > 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 > --- >

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

2015-11-05 Thread Christoffer Dall
On Wed, Nov 04, 2015 at 07:51:58PM +0100, Ard Biesheuvel wrote: > On 4 November 2015 at 19:49, Christopher Covington > wrote: > > On 11/04/2015 08:31 AM, Christoffer Dall wrote: > >> On Tue, Nov 03, 2015 at 01:39:44PM -0600, Rob Herring wrote: > >>> On Tue, Nov 3, 2015 at

[GIT PULL] First batch of KVM changes for 4.4

2015-11-05 Thread Paolo Bonzini
Linus, The following changes since commit 0d997491f814c87310a6ad7be30a9049c7150489: arm/arm64: KVM: Fix disabled distributor operation (2015-10-20 18:09:13 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus for you to fetch changes

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

2015-11-05 Thread Joerg Roedel
On Mon, Nov 02, 2015 at 07:32:19PM +0200, Shamir Rabinovitch wrote: > Correct. This issue is one of the concerns here in the previous replies. > I will take different approach which will not require the IOMMU bypass > per mapping. Will try to shift to the x86 'iommu=pt' approach. Yeah, it doesn't

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

2015-11-05 Thread Joerg Roedel
On Tue, Nov 03, 2015 at 12:54:37PM +0100, Christian Borntraeger wrote: > 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

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

2015-11-05 Thread Xiao Guangrong
On 11/05/2015 09:03 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 18:15:31 +0800 Xiao Guangrong wrote: On 11/05/2015 05:58 PM, Igor Mammedov wrote: On Mon, 2 Nov 2015 17:13:27 +0800 Xiao Guangrong wrote: A page staring