linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 0/9] KVM/ARM Changes for v3.19
@ 2014-12-09 11:25 Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 1/9] KVM: ARM: VGIC: Optimize the vGIC vgic_update_irq_pending function Christoffer Dall
                   ` (10 more replies)
  0 siblings, 11 replies; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 11:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Paolo,

The following changes since commit f62c95fd4041d669159dd76ac0bb2a7f86b5b05d:

  Merge tag 'kvm-s390-next-20141028' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD (2014-10-29 13:31:32 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm-for-3.19

for you to fetch changes up to 016ed39c54b8a3db680e5c6a43419f806133caf2:

  arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating through all (2014-11-26 10:19:37 +0000)

Thanks,
-Christoffer

----------------------------------------------------------------
Changes for KVM for arm/arm64 for v3.19 including mmio mapping fixups
(already in kvm/next, apologies about duplicate commits), vgic cleanup
and optimizations, and an MMIO path cleanup.

----------------------------------------------------------------


Andre Przywara (1):
  arm/arm64: KVM: avoid unnecessary guest register mangling on MMIO read

Ard Biesheuvel (4):
  arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()
  kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()
  kvm: add a memslot flag for incoherent memory regions
  arm, arm64: KVM: handle potential incoherency of readonly memslots

Christoffer Dall (1):
  arm/arm64: vgic: Remove unreachable irq_clear_pending

Laszlo Ersek (1):
  arm, arm64: KVM: allow forced dcache flush on page faults

Shannon Zhao (1):
  arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating
    through all

wanghaibin (1):
  KVM: ARM: VGIC: Optimize the vGIC vgic_update_irq_pending function.

 arch/arm/include/asm/kvm_mmu.h   |  5 +++--
 arch/arm/kvm/mmio.c              | 15 +++++++++------
 arch/arm/kvm/mmu.c               | 34 +++++++++++++++++++++++++++-------
 arch/arm64/include/asm/kvm_mmu.h |  5 +++--
 arch/ia64/kvm/kvm-ia64.c         |  2 +-
 arch/x86/kvm/mmu.c               |  6 +++---
 include/linux/kvm_host.h         |  3 ++-
 virt/kvm/arm/vgic.c              | 20 +++++++++++++-------
 virt/kvm/kvm_main.c              | 16 ++++++++--------
 9 files changed, 69 insertions(+), 37 deletions(-)

-- 
2.1.2.330.g565301e.dirty

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [GIT PULL 1/9] KVM: ARM: VGIC: Optimize the vGIC vgic_update_irq_pending function.
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
@ 2014-12-09 11:26 ` Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 2/9] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn() Christoffer Dall
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: wanghaibin <wanghaibin.wang@huawei.com>

When vgic_update_irq_pending with level-sensitive false, it is need to
deactivates an interrupt, and, it can go to out directly.
Here return a false value, because it will be not need to kick.

Signed-off-by: wanghaibin <wanghaibin.wang@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 virt/kvm/arm/vgic.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 3aaca49..5acf2c9 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1646,6 +1646,9 @@ static bool vgic_update_irq_pending(struct kvm *kvm, int cpuid,
 		} else {
 			vgic_dist_irq_clear_pending(vcpu, irq_num);
 		}
+
+		ret = false;
+		goto out;
 	}
 
 	enabled = vgic_irq_is_enabled(vcpu, irq_num);
-- 
2.1.2.330.g565301e.dirty

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [GIT PULL 2/9] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 1/9] KVM: ARM: VGIC: Optimize the vGIC vgic_update_irq_pending function Christoffer Dall
@ 2014-12-09 11:26 ` Christoffer Dall
  2014-12-09 12:29   ` Ard Biesheuvel
  2014-12-09 11:26 ` [GIT PULL 3/9] kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn() Christoffer Dall
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Instead of using kvm_is_mmio_pfn() to decide whether a host region
should be stage 2 mapped with device attributes, add a new static
function kvm_is_device_pfn() that disregards RAM pages with the
reserved bit set, as those should usually not be mapped as device
memory.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 arch/arm/kvm/mmu.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index 57a403a..b007438 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -834,6 +834,11 @@ static bool kvm_is_write_fault(struct kvm_vcpu *vcpu)
 	return kvm_vcpu_dabt_iswrite(vcpu);
 }
 
+static bool kvm_is_device_pfn(unsigned long pfn)
+{
+	return !pfn_valid(pfn);
+}
+
 static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
 			  struct kvm_memory_slot *memslot, unsigned long hva,
 			  unsigned long fault_status)
@@ -904,7 +909,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
 	if (is_error_pfn(pfn))
 		return -EFAULT;
 
-	if (kvm_is_mmio_pfn(pfn))
+	if (kvm_is_device_pfn(pfn))
 		mem_type = PAGE_S2_DEVICE;
 
 	spin_lock(&kvm->mmu_lock);
-- 
2.1.2.330.g565301e.dirty

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [GIT PULL 3/9] kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 1/9] KVM: ARM: VGIC: Optimize the vGIC vgic_update_irq_pending function Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 2/9] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn() Christoffer Dall
@ 2014-12-09 11:26 ` Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 4/9] kvm: add a memslot flag for incoherent memory regions Christoffer Dall
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

This reverts commit 85c8555ff0 ("KVM: check for !is_zero_pfn() in
kvm_is_mmio_pfn()") and renames the function to kvm_is_reserved_pfn.

The problem being addressed by the patch above was that some ARM code
based the memory mapping attributes of a pfn on the return value of
kvm_is_mmio_pfn(), whose name indeed suggests that such pfns should
be mapped as device memory.

However, kvm_is_mmio_pfn() doesn't do quite what it says on the tin,
and the existing non-ARM users were already using it in a way which
suggests that its name should probably have been 'kvm_is_reserved_pfn'
from the beginning, e.g., whether or not to call get_page/put_page on
it etc. This means that returning false for the zero page is a mistake
and the patch above should be reverted.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 arch/ia64/kvm/kvm-ia64.c |  2 +-
 arch/x86/kvm/mmu.c       |  6 +++---
 include/linux/kvm_host.h |  2 +-
 virt/kvm/kvm_main.c      | 16 ++++++++--------
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index ec6b9ac..dbe46f4 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -1563,7 +1563,7 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
 
 	for (i = 0; i < npages; i++) {
 		pfn = gfn_to_pfn(kvm, base_gfn + i);
-		if (!kvm_is_mmio_pfn(pfn)) {
+		if (!kvm_is_reserved_pfn(pfn)) {
 			kvm_set_pmt_entry(kvm, base_gfn + i,
 					pfn << PAGE_SHIFT,
 				_PAGE_AR_RWX | _PAGE_MA_WB);
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index ac1c4de..978f402 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -630,7 +630,7 @@ static int mmu_spte_clear_track_bits(u64 *sptep)
 	 * kvm mmu, before reclaiming the page, we should
 	 * unmap it from mmu first.
 	 */
-	WARN_ON(!kvm_is_mmio_pfn(pfn) && !page_count(pfn_to_page(pfn)));
+	WARN_ON(!kvm_is_reserved_pfn(pfn) && !page_count(pfn_to_page(pfn)));
 
 	if (!shadow_accessed_mask || old_spte & shadow_accessed_mask)
 		kvm_set_pfn_accessed(pfn);
@@ -2461,7 +2461,7 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
 		spte |= PT_PAGE_SIZE_MASK;
 	if (tdp_enabled)
 		spte |= kvm_x86_ops->get_mt_mask(vcpu, gfn,
-			kvm_is_mmio_pfn(pfn));
+			kvm_is_reserved_pfn(pfn));
 
 	if (host_writable)
 		spte |= SPTE_HOST_WRITEABLE;
@@ -2737,7 +2737,7 @@ static void transparent_hugepage_adjust(struct kvm_vcpu *vcpu,
 	 * PT_PAGE_TABLE_LEVEL and there would be no adjustment done
 	 * here.
 	 */
-	if (!is_error_noslot_pfn(pfn) && !kvm_is_mmio_pfn(pfn) &&
+	if (!is_error_noslot_pfn(pfn) && !kvm_is_reserved_pfn(pfn) &&
 	    level == PT_PAGE_TABLE_LEVEL &&
 	    PageTransCompound(pfn_to_page(pfn)) &&
 	    !has_wrprotected_page(vcpu->kvm, gfn, PT_DIRECTORY_LEVEL)) {
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ea53b04..a6059bd 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -703,7 +703,7 @@ void kvm_arch_sync_events(struct kvm *kvm);
 int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu);
 void kvm_vcpu_kick(struct kvm_vcpu *vcpu);
 
-bool kvm_is_mmio_pfn(pfn_t pfn);
+bool kvm_is_reserved_pfn(pfn_t pfn);
 
 struct kvm_irq_ack_notifier {
 	struct hlist_node link;
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 25ffac9..3cee7b1 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -107,10 +107,10 @@ EXPORT_SYMBOL_GPL(kvm_rebooting);
 
 static bool largepages_enabled = true;
 
-bool kvm_is_mmio_pfn(pfn_t pfn)
+bool kvm_is_reserved_pfn(pfn_t pfn)
 {
 	if (pfn_valid(pfn))
-		return !is_zero_pfn(pfn) && PageReserved(pfn_to_page(pfn));
+		return PageReserved(pfn_to_page(pfn));
 
 	return true;
 }
@@ -1321,7 +1321,7 @@ static pfn_t hva_to_pfn(unsigned long addr, bool atomic, bool *async,
 	else if ((vma->vm_flags & VM_PFNMAP)) {
 		pfn = ((addr - vma->vm_start) >> PAGE_SHIFT) +
 			vma->vm_pgoff;
-		BUG_ON(!kvm_is_mmio_pfn(pfn));
+		BUG_ON(!kvm_is_reserved_pfn(pfn));
 	} else {
 		if (async && vma_is_valid(vma, write_fault))
 			*async = true;
@@ -1427,7 +1427,7 @@ static struct page *kvm_pfn_to_page(pfn_t pfn)
 	if (is_error_noslot_pfn(pfn))
 		return KVM_ERR_PTR_BAD_PAGE;
 
-	if (kvm_is_mmio_pfn(pfn)) {
+	if (kvm_is_reserved_pfn(pfn)) {
 		WARN_ON(1);
 		return KVM_ERR_PTR_BAD_PAGE;
 	}
@@ -1456,7 +1456,7 @@ EXPORT_SYMBOL_GPL(kvm_release_page_clean);
 
 void kvm_release_pfn_clean(pfn_t pfn)
 {
-	if (!is_error_noslot_pfn(pfn) && !kvm_is_mmio_pfn(pfn))
+	if (!is_error_noslot_pfn(pfn) && !kvm_is_reserved_pfn(pfn))
 		put_page(pfn_to_page(pfn));
 }
 EXPORT_SYMBOL_GPL(kvm_release_pfn_clean);
@@ -1477,7 +1477,7 @@ static void kvm_release_pfn_dirty(pfn_t pfn)
 
 void kvm_set_pfn_dirty(pfn_t pfn)
 {
-	if (!kvm_is_mmio_pfn(pfn)) {
+	if (!kvm_is_reserved_pfn(pfn)) {
 		struct page *page = pfn_to_page(pfn);
 		if (!PageReserved(page))
 			SetPageDirty(page);
@@ -1487,14 +1487,14 @@ EXPORT_SYMBOL_GPL(kvm_set_pfn_dirty);
 
 void kvm_set_pfn_accessed(pfn_t pfn)
 {
-	if (!kvm_is_mmio_pfn(pfn))
+	if (!kvm_is_reserved_pfn(pfn))
 		mark_page_accessed(pfn_to_page(pfn));
 }
 EXPORT_SYMBOL_GPL(kvm_set_pfn_accessed);
 
 void kvm_get_pfn(pfn_t pfn)
 {
-	if (!kvm_is_mmio_pfn(pfn))
+	if (!kvm_is_reserved_pfn(pfn))
 		get_page(pfn_to_page(pfn));
 }
 EXPORT_SYMBOL_GPL(kvm_get_pfn);
-- 
2.1.2.330.g565301e.dirty

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [GIT PULL 4/9] kvm: add a memslot flag for incoherent memory regions
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
                   ` (2 preceding siblings ...)
  2014-12-09 11:26 ` [GIT PULL 3/9] kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn() Christoffer Dall
@ 2014-12-09 11:26 ` Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 5/9] arm, arm64: KVM: allow forced dcache flush on page faults Christoffer Dall
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Memory regions may be incoherent with the caches, typically when the
guest has mapped a host system RAM backed memory region as uncached.
Add a flag KVM_MEMSLOT_INCOHERENT so that we can tag these memslots
and handle them appropriately when mapping them.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 include/linux/kvm_host.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index a6059bd..e4d8f70 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -43,6 +43,7 @@
  * include/linux/kvm_h.
  */
 #define KVM_MEMSLOT_INVALID	(1UL << 16)
+#define KVM_MEMSLOT_INCOHERENT	(1UL << 17)
 
 /* Two fragments for cross MMIO pages. */
 #define KVM_MAX_MMIO_FRAGMENTS	2
-- 
2.1.2.330.g565301e.dirty

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [GIT PULL 5/9] arm, arm64: KVM: allow forced dcache flush on page faults
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
                   ` (3 preceding siblings ...)
  2014-12-09 11:26 ` [GIT PULL 4/9] kvm: add a memslot flag for incoherent memory regions Christoffer Dall
@ 2014-12-09 11:26 ` Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 6/9] arm, arm64: KVM: handle potential incoherency of readonly memslots Christoffer Dall
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Laszlo Ersek <lersek@redhat.com>

To allow handling of incoherent memslots in a subsequent patch, this
patch adds a paramater 'ipa_uncached' to cache_coherent_guest_page()
so that we can instruct it to flush the page's contents to DRAM even
if the guest has caching globally enabled.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 arch/arm/include/asm/kvm_mmu.h   | 5 +++--
 arch/arm/kvm/mmu.c               | 9 +++++++--
 arch/arm64/include/asm/kvm_mmu.h | 5 +++--
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h
index acb0d57..f867060 100644
--- a/arch/arm/include/asm/kvm_mmu.h
+++ b/arch/arm/include/asm/kvm_mmu.h
@@ -161,9 +161,10 @@ static inline bool vcpu_has_cache_enabled(struct kvm_vcpu *vcpu)
 }
 
 static inline void coherent_cache_guest_page(struct kvm_vcpu *vcpu, hva_t hva,
-					     unsigned long size)
+					     unsigned long size,
+					     bool ipa_uncached)
 {
-	if (!vcpu_has_cache_enabled(vcpu))
+	if (!vcpu_has_cache_enabled(vcpu) || ipa_uncached)
 		kvm_flush_dcache_to_poc((void *)hva, size);
 	
 	/*
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index b007438..cb924c6 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -852,6 +852,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
 	struct vm_area_struct *vma;
 	pfn_t pfn;
 	pgprot_t mem_type = PAGE_S2;
+	bool fault_ipa_uncached;
 
 	write_fault = kvm_is_write_fault(vcpu);
 	if (fault_status == FSC_PERM && !write_fault) {
@@ -918,6 +919,8 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
 	if (!hugetlb && !force_pte)
 		hugetlb = transparent_hugepage_adjust(&pfn, &fault_ipa);
 
+	fault_ipa_uncached = false;
+
 	if (hugetlb) {
 		pmd_t new_pmd = pfn_pmd(pfn, mem_type);
 		new_pmd = pmd_mkhuge(new_pmd);
@@ -925,7 +928,8 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
 			kvm_set_s2pmd_writable(&new_pmd);
 			kvm_set_pfn_dirty(pfn);
 		}
-		coherent_cache_guest_page(vcpu, hva & PMD_MASK, PMD_SIZE);
+		coherent_cache_guest_page(vcpu, hva & PMD_MASK, PMD_SIZE,
+					  fault_ipa_uncached);
 		ret = stage2_set_pmd_huge(kvm, memcache, fault_ipa, &new_pmd);
 	} else {
 		pte_t new_pte = pfn_pte(pfn, mem_type);
@@ -933,7 +937,8 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
 			kvm_set_s2pte_writable(&new_pte);
 			kvm_set_pfn_dirty(pfn);
 		}
-		coherent_cache_guest_page(vcpu, hva, PAGE_SIZE);
+		coherent_cache_guest_page(vcpu, hva, PAGE_SIZE,
+					  fault_ipa_uncached);
 		ret = stage2_set_pte(kvm, memcache, fault_ipa, &new_pte,
 			pgprot_val(mem_type) == pgprot_val(PAGE_S2_DEVICE));
 	}
diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h
index 0caf7a5..123b521 100644
--- a/arch/arm64/include/asm/kvm_mmu.h
+++ b/arch/arm64/include/asm/kvm_mmu.h
@@ -243,9 +243,10 @@ static inline bool vcpu_has_cache_enabled(struct kvm_vcpu *vcpu)
 }
 
 static inline void coherent_cache_guest_page(struct kvm_vcpu *vcpu, hva_t hva,
-					     unsigned long size)
+					     unsigned long size,
+					     bool ipa_uncached)
 {
-	if (!vcpu_has_cache_enabled(vcpu))
+	if (!vcpu_has_cache_enabled(vcpu) || ipa_uncached)
 		kvm_flush_dcache_to_poc((void *)hva, size);
 
 	if (!icache_is_aliasing()) {		/* PIPT */
-- 
2.1.2.330.g565301e.dirty

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [GIT PULL 6/9] arm, arm64: KVM: handle potential incoherency of readonly memslots
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
                   ` (4 preceding siblings ...)
  2014-12-09 11:26 ` [GIT PULL 5/9] arm, arm64: KVM: allow forced dcache flush on page faults Christoffer Dall
@ 2014-12-09 11:26 ` Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 7/9] arm/arm64: KVM: avoid unnecessary guest register mangling on MMIO read Christoffer Dall
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Readonly memslots are often used to implement emulation of ROMs and
NOR flashes, in which case the guest may legally map these regions as
uncached.
To deal with the incoherency associated with uncached guest mappings,
treat all readonly memslots as incoherent, and ensure that pages that
belong to regions tagged as such are flushed to DRAM before being passed
to the guest.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 arch/arm/kvm/mmu.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index cb924c6..f2a9874 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -919,7 +919,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
 	if (!hugetlb && !force_pte)
 		hugetlb = transparent_hugepage_adjust(&pfn, &fault_ipa);
 
-	fault_ipa_uncached = false;
+	fault_ipa_uncached = memslot->flags & KVM_MEMSLOT_INCOHERENT;
 
 	if (hugetlb) {
 		pmd_t new_pmd = pfn_pmd(pfn, mem_type);
@@ -1298,11 +1298,12 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
 		hva = vm_end;
 	} while (hva < reg_end);
 
-	if (ret) {
-		spin_lock(&kvm->mmu_lock);
+	spin_lock(&kvm->mmu_lock);
+	if (ret)
 		unmap_stage2_range(kvm, mem->guest_phys_addr, mem->memory_size);
-		spin_unlock(&kvm->mmu_lock);
-	}
+	else
+		stage2_flush_memslot(kvm, memslot);
+	spin_unlock(&kvm->mmu_lock);
 	return ret;
 }
 
@@ -1314,6 +1315,15 @@ void kvm_arch_free_memslot(struct kvm *kvm, struct kvm_memory_slot *free,
 int kvm_arch_create_memslot(struct kvm *kvm, struct kvm_memory_slot *slot,
 			    unsigned long npages)
 {
+	/*
+	 * Readonly memslots are not incoherent with the caches by definition,
+	 * but in practice, they are used mostly to emulate ROMs or NOR flashes
+	 * that the guest may consider devices and hence map as uncached.
+	 * To prevent incoherency issues in these cases, tag all readonly
+	 * regions as incoherent.
+	 */
+	if (slot->flags & KVM_MEM_READONLY)
+		slot->flags |= KVM_MEMSLOT_INCOHERENT;
 	return 0;
 }
 
-- 
2.1.2.330.g565301e.dirty

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [GIT PULL 7/9] arm/arm64: KVM: avoid unnecessary guest register mangling on MMIO read
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
                   ` (5 preceding siblings ...)
  2014-12-09 11:26 ` [GIT PULL 6/9] arm, arm64: KVM: handle potential incoherency of readonly memslots Christoffer Dall
@ 2014-12-09 11:26 ` Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 8/9] arm/arm64: vgic: Remove unreachable irq_clear_pending Christoffer Dall
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Andre Przywara <andre.przywara@arm.com>

Currently we mangle the endianness of the guest's register even on an
MMIO _read_, where it is completely useless, because we will not use
the value of that register.
Rework the io_mem_abort() function to clearly separate between reads
and writes and only do the endianness mangling on MMIO writes.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 arch/arm/kvm/mmio.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c
index 4cb5a93..5d3bfc0 100644
--- a/arch/arm/kvm/mmio.c
+++ b/arch/arm/kvm/mmio.c
@@ -187,15 +187,18 @@ int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
 	}
 
 	rt = vcpu->arch.mmio_decode.rt;
-	data = vcpu_data_guest_to_host(vcpu, *vcpu_reg(vcpu, rt), mmio.len);
 
-	trace_kvm_mmio((mmio.is_write) ? KVM_TRACE_MMIO_WRITE :
-					 KVM_TRACE_MMIO_READ_UNSATISFIED,
-			mmio.len, fault_ipa,
-			(mmio.is_write) ? data : 0);
+	if (mmio.is_write) {
+		data = vcpu_data_guest_to_host(vcpu, *vcpu_reg(vcpu, rt),
+					       mmio.len);
 
-	if (mmio.is_write)
+		trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, mmio.len,
+			       fault_ipa, data);
 		mmio_write_buf(mmio.data, mmio.len, data);
+	} else {
+		trace_kvm_mmio(KVM_TRACE_MMIO_READ_UNSATISFIED, mmio.len,
+			       fault_ipa, 0);
+	}
 
 	if (vgic_handle_mmio(vcpu, run, &mmio))
 		return 1;
-- 
2.1.2.330.g565301e.dirty

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [GIT PULL 8/9] arm/arm64: vgic: Remove unreachable irq_clear_pending
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
                   ` (6 preceding siblings ...)
  2014-12-09 11:26 ` [GIT PULL 7/9] arm/arm64: KVM: avoid unnecessary guest register mangling on MMIO read Christoffer Dall
@ 2014-12-09 11:26 ` Christoffer Dall
  2014-12-09 11:26 ` [GIT PULL 9/9] arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating through all Christoffer Dall
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

When 'injecting' an edge-triggered interrupt with a falling edge we
shouldn't clear the pending state on the distributor.  In fact, we
don't, because the check in vgic_validate_injection would prevent us
from ever reaching this bit of code.

Remove the unreachable snippet.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 virt/kvm/arm/vgic.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 5acf2c9..631a472 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1643,8 +1643,6 @@ static bool vgic_update_irq_pending(struct kvm *kvm, int cpuid,
 			vgic_dist_irq_clear_level(vcpu, irq_num);
 			if (!vgic_dist_irq_soft_pend(vcpu, irq_num))
 				vgic_dist_irq_clear_pending(vcpu, irq_num);
-		} else {
-			vgic_dist_irq_clear_pending(vcpu, irq_num);
 		}
 
 		ret = false;
-- 
2.1.2.330.g565301e.dirty

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [GIT PULL 9/9] arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating through all
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
                   ` (7 preceding siblings ...)
  2014-12-09 11:26 ` [GIT PULL 8/9] arm/arm64: vgic: Remove unreachable irq_clear_pending Christoffer Dall
@ 2014-12-09 11:26 ` Christoffer Dall
  2014-12-09 19:39 ` [GIT PULL 0/9] KVM/ARM Changes for v3.19 Paolo Bonzini
  2014-12-11 11:52 ` Paolo Bonzini
  10 siblings, 0 replies; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Shannon Zhao <zhaoshenglong@huawei.com>

When call kvm_vgic_inject_irq to inject interrupt, we can known which
vcpu the interrupt for by the irq_num and the cpuid. So we should just
kick this vcpu to avoid iterating through all.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 virt/kvm/arm/vgic.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 631a472..21e035c 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1607,7 +1607,7 @@ static int vgic_validate_injection(struct kvm_vcpu *vcpu, int irq, int level)
 	}
 }
 
-static bool vgic_update_irq_pending(struct kvm *kvm, int cpuid,
+static int vgic_update_irq_pending(struct kvm *kvm, int cpuid,
 				  unsigned int irq_num, bool level)
 {
 	struct vgic_dist *dist = &kvm->arch.vgic;
@@ -1673,7 +1673,7 @@ static bool vgic_update_irq_pending(struct kvm *kvm, int cpuid,
 out:
 	spin_unlock(&dist->lock);
 
-	return ret;
+	return ret ? cpuid : -EINVAL;
 }
 
 /**
@@ -1693,9 +1693,14 @@ out:
 int kvm_vgic_inject_irq(struct kvm *kvm, int cpuid, unsigned int irq_num,
 			bool level)
 {
-	if (likely(vgic_initialized(kvm)) &&
-	    vgic_update_irq_pending(kvm, cpuid, irq_num, level))
-		vgic_kick_vcpus(kvm);
+	int vcpu_id;
+
+	if (likely(vgic_initialized(kvm))) {
+		vcpu_id = vgic_update_irq_pending(kvm, cpuid, irq_num, level);
+		if (vcpu_id >= 0)
+			/* kick the specified vcpu */
+			kvm_vcpu_kick(kvm_get_vcpu(kvm, vcpu_id));
+	}
 
 	return 0;
 }
-- 
2.1.2.330.g565301e.dirty

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [GIT PULL 2/9] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()
  2014-12-09 11:26 ` [GIT PULL 2/9] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn() Christoffer Dall
@ 2014-12-09 12:29   ` Ard Biesheuvel
  2014-12-09 12:38     ` Christoffer Dall
  0 siblings, 1 reply; 20+ messages in thread
From: Ard Biesheuvel @ 2014-12-09 12:29 UTC (permalink / raw)
  To: linux-arm-kernel

On 9 December 2014 at 12:26, Christoffer Dall
<christoffer.dall@linaro.org> wrote:
> From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> Instead of using kvm_is_mmio_pfn() to decide whether a host region
> should be stage 2 mapped with device attributes, add a new static
> function kvm_is_device_pfn() that disregards RAM pages with the
> reserved bit set, as those should usually not be mapped as device
> memory.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

As I mentioned last week, this patch (and the next one) are already in
3.18 so unless there is some policy I am unaware of, these do not have
to be submitted again.

-- 
Ard.




> ---
>  arch/arm/kvm/mmu.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
> index 57a403a..b007438 100644
> --- a/arch/arm/kvm/mmu.c
> +++ b/arch/arm/kvm/mmu.c
> @@ -834,6 +834,11 @@ static bool kvm_is_write_fault(struct kvm_vcpu *vcpu)
>         return kvm_vcpu_dabt_iswrite(vcpu);
>  }
>
> +static bool kvm_is_device_pfn(unsigned long pfn)
> +{
> +       return !pfn_valid(pfn);
> +}
> +
>  static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>                           struct kvm_memory_slot *memslot, unsigned long hva,
>                           unsigned long fault_status)
> @@ -904,7 +909,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>         if (is_error_pfn(pfn))
>                 return -EFAULT;
>
> -       if (kvm_is_mmio_pfn(pfn))
> +       if (kvm_is_device_pfn(pfn))
>                 mem_type = PAGE_S2_DEVICE;
>
>         spin_lock(&kvm->mmu_lock);
> --
> 2.1.2.330.g565301e.dirty
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [GIT PULL 2/9] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()
  2014-12-09 12:29   ` Ard Biesheuvel
@ 2014-12-09 12:38     ` Christoffer Dall
  2014-12-09 12:38       ` Ard Biesheuvel
  0 siblings, 1 reply; 20+ messages in thread
From: Christoffer Dall @ 2014-12-09 12:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Dec 09, 2014 at 01:29:52PM +0100, Ard Biesheuvel wrote:
> On 9 December 2014 at 12:26, Christoffer Dall
> <christoffer.dall@linaro.org> wrote:
> > From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> >
> > Instead of using kvm_is_mmio_pfn() to decide whether a host region
> > should be stage 2 mapped with device attributes, add a new static
> > function kvm_is_device_pfn() that disregards RAM pages with the
> > reserved bit set, as those should usually not be mapped as device
> > memory.
> >
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> 
> As I mentioned last week, this patch (and the next one) are already in
> 3.18 so unless there is some policy I am unaware of, these do not have
> to be submitted again.
> 
They're in kvmarm/next, which is a stable branch (doesn't rebase) so our
only choice would be to revert this commit specifically in kvmarm/next
before sending the pull request.  Since that would be more confusing
than help anything, and Paolo said to just include the duplicate commit
in the pull request, here it is.

As we can see in linux-next, it's not really a problem.

-Christoffer

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [GIT PULL 2/9] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()
  2014-12-09 12:38     ` Christoffer Dall
@ 2014-12-09 12:38       ` Ard Biesheuvel
  0 siblings, 0 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2014-12-09 12:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 9 December 2014 at 13:38, Christoffer Dall
<christoffer.dall@linaro.org> wrote:
> On Tue, Dec 09, 2014 at 01:29:52PM +0100, Ard Biesheuvel wrote:
>> On 9 December 2014 at 12:26, Christoffer Dall
>> <christoffer.dall@linaro.org> wrote:
>> > From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> >
>> > Instead of using kvm_is_mmio_pfn() to decide whether a host region
>> > should be stage 2 mapped with device attributes, add a new static
>> > function kvm_is_device_pfn() that disregards RAM pages with the
>> > reserved bit set, as those should usually not be mapped as device
>> > memory.
>> >
>> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>>
>> As I mentioned last week, this patch (and the next one) are already in
>> 3.18 so unless there is some policy I am unaware of, these do not have
>> to be submitted again.
>>
> They're in kvmarm/next, which is a stable branch (doesn't rebase) so our
> only choice would be to revert this commit specifically in kvmarm/next
> before sending the pull request.  Since that would be more confusing
> than help anything, and Paolo said to just include the duplicate commit
> in the pull request, here it is.
>
> As we can see in linux-next, it's not really a problem.
>

OK, thanks for the explanation.

-- 
Ard.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [GIT PULL 0/9] KVM/ARM Changes for v3.19
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
                   ` (8 preceding siblings ...)
  2014-12-09 11:26 ` [GIT PULL 9/9] arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating through all Christoffer Dall
@ 2014-12-09 19:39 ` Paolo Bonzini
  2014-12-11  9:47   ` Christoffer Dall
  2014-12-11 11:52 ` Paolo Bonzini
  10 siblings, 1 reply; 20+ messages in thread
From: Paolo Bonzini @ 2014-12-09 19:39 UTC (permalink / raw)
  To: linux-arm-kernel



On 09/12/2014 12:25, Christoffer Dall wrote:
> Hi Paolo,
> 
> The following changes since commit f62c95fd4041d669159dd76ac0bb2a7f86b5b05d:
> 
>   Merge tag 'kvm-s390-next-20141028' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD (2014-10-29 13:31:32 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm-for-3.19
> 
> for you to fetch changes up to 016ed39c54b8a3db680e5c6a43419f806133caf2:
> 
>   arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating through all (2014-11-26 10:19:37 +0000)
> 
> Thanks,
> -Christoffer
> 
> ----------------------------------------------------------------
> Changes for KVM for arm/arm64 for v3.19 including mmio mapping fixups
> (already in kvm/next, apologies about duplicate commits), vgic cleanup
> and optimizations, and an MMIO path cleanup.
> 
> ----------------------------------------------------------------
> 
> 
> Andre Przywara (1):
>   arm/arm64: KVM: avoid unnecessary guest register mangling on MMIO read
> 
> Ard Biesheuvel (4):
>   arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()
>   kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()
>   kvm: add a memslot flag for incoherent memory regions
>   arm, arm64: KVM: handle potential incoherency of readonly memslots
> 
> Christoffer Dall (1):
>   arm/arm64: vgic: Remove unreachable irq_clear_pending
> 
> Laszlo Ersek (1):
>   arm, arm64: KVM: allow forced dcache flush on page faults
> 
> Shannon Zhao (1):
>   arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating
>     through all
> 
> wanghaibin (1):
>   KVM: ARM: VGIC: Optimize the vGIC vgic_update_irq_pending function.
> 
>  arch/arm/include/asm/kvm_mmu.h   |  5 +++--
>  arch/arm/kvm/mmio.c              | 15 +++++++++------
>  arch/arm/kvm/mmu.c               | 34 +++++++++++++++++++++++++++-------
>  arch/arm64/include/asm/kvm_mmu.h |  5 +++--
>  arch/ia64/kvm/kvm-ia64.c         |  2 +-
>  arch/x86/kvm/mmu.c               |  6 +++---
>  include/linux/kvm_host.h         |  3 ++-
>  virt/kvm/arm/vgic.c              | 20 +++++++++++++-------
>  virt/kvm/kvm_main.c              | 16 ++++++++--------
>  9 files changed, 69 insertions(+), 37 deletions(-)
> 

No dirty bitmap yet?  You still have one week, I'm okay with a late
addition.

Paolo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [GIT PULL 0/9] KVM/ARM Changes for v3.19
  2014-12-09 19:39 ` [GIT PULL 0/9] KVM/ARM Changes for v3.19 Paolo Bonzini
@ 2014-12-11  9:47   ` Christoffer Dall
  2014-12-11 11:54     ` Paolo Bonzini
  0 siblings, 1 reply; 20+ messages in thread
From: Christoffer Dall @ 2014-12-11  9:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Dec 09, 2014 at 08:39:39PM +0100, Paolo Bonzini wrote:
> 
> 
> On 09/12/2014 12:25, Christoffer Dall wrote:
> > Hi Paolo,
> > 
> > The following changes since commit f62c95fd4041d669159dd76ac0bb2a7f86b5b05d:
> > 
> >   Merge tag 'kvm-s390-next-20141028' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD (2014-10-29 13:31:32 +0100)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm-for-3.19
> > 
> > for you to fetch changes up to 016ed39c54b8a3db680e5c6a43419f806133caf2:
> > 
> >   arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating through all (2014-11-26 10:19:37 +0000)
> > 
> > Thanks,
> > -Christoffer
> > 
> > ----------------------------------------------------------------
> > Changes for KVM for arm/arm64 for v3.19 including mmio mapping fixups
> > (already in kvm/next, apologies about duplicate commits), vgic cleanup
> > and optimizations, and an MMIO path cleanup.
> > 
> > ----------------------------------------------------------------
> > 
> > 
> > Andre Przywara (1):
> >   arm/arm64: KVM: avoid unnecessary guest register mangling on MMIO read
> > 
> > Ard Biesheuvel (4):
> >   arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()
> >   kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()
> >   kvm: add a memslot flag for incoherent memory regions
> >   arm, arm64: KVM: handle potential incoherency of readonly memslots
> > 
> > Christoffer Dall (1):
> >   arm/arm64: vgic: Remove unreachable irq_clear_pending
> > 
> > Laszlo Ersek (1):
> >   arm, arm64: KVM: allow forced dcache flush on page faults
> > 
> > Shannon Zhao (1):
> >   arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating
> >     through all
> > 
> > wanghaibin (1):
> >   KVM: ARM: VGIC: Optimize the vGIC vgic_update_irq_pending function.
> > 
> >  arch/arm/include/asm/kvm_mmu.h   |  5 +++--
> >  arch/arm/kvm/mmio.c              | 15 +++++++++------
> >  arch/arm/kvm/mmu.c               | 34 +++++++++++++++++++++++++++-------
> >  arch/arm64/include/asm/kvm_mmu.h |  5 +++--
> >  arch/ia64/kvm/kvm-ia64.c         |  2 +-
> >  arch/x86/kvm/mmu.c               |  6 +++---
> >  include/linux/kvm_host.h         |  3 ++-
> >  virt/kvm/arm/vgic.c              | 20 +++++++++++++-------
> >  virt/kvm/kvm_main.c              | 16 ++++++++--------
> >  9 files changed, 69 insertions(+), 37 deletions(-)
> > 
> 
> No dirty bitmap yet?  You still have one week, I'm okay with a late
> addition.
> 
No, we spotted a bug in the last revision and I prefer not merging it at
this short notice, because I won't have proper time to test the stuff.

The plan is to put it in kvmarm/next right after the merge window
closes.

-Christoffer

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [GIT PULL 0/9] KVM/ARM Changes for v3.19
  2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
                   ` (9 preceding siblings ...)
  2014-12-09 19:39 ` [GIT PULL 0/9] KVM/ARM Changes for v3.19 Paolo Bonzini
@ 2014-12-11 11:52 ` Paolo Bonzini
  2014-12-11 11:59   ` Christoffer Dall
  10 siblings, 1 reply; 20+ messages in thread
From: Paolo Bonzini @ 2014-12-11 11:52 UTC (permalink / raw)
  To: linux-arm-kernel



On 09/12/2014 12:25, Christoffer Dall wrote:
>   git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm-for-3.19

Pulled, thanks.

(In case you're wondering, this merge window I'll send the pull request
late to avoid multiple conflicts with the ia64 removal).

Paolo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [GIT PULL 0/9] KVM/ARM Changes for v3.19
  2014-12-11  9:47   ` Christoffer Dall
@ 2014-12-11 11:54     ` Paolo Bonzini
  2014-12-11 12:02       ` Christoffer Dall
  0 siblings, 1 reply; 20+ messages in thread
From: Paolo Bonzini @ 2014-12-11 11:54 UTC (permalink / raw)
  To: linux-arm-kernel



On 11/12/2014 10:47, Christoffer Dall wrote:
> On Tue, Dec 09, 2014 at 08:39:39PM +0100, Paolo Bonzini wrote:
>>
>>
>> On 09/12/2014 12:25, Christoffer Dall wrote:
>>> Hi Paolo,
>>>
>>> The following changes since commit f62c95fd4041d669159dd76ac0bb2a7f86b5b05d:
>>>
>>>   Merge tag 'kvm-s390-next-20141028' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD (2014-10-29 13:31:32 +0100)
>>>
>>> are available in the git repository at:
>>>
>>>   git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm-for-3.19
>>>
>>> for you to fetch changes up to 016ed39c54b8a3db680e5c6a43419f806133caf2:
>>>
>>>   arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating through all (2014-11-26 10:19:37 +0000)
>>>
>>> Thanks,
>>> -Christoffer
>>>
>>> ----------------------------------------------------------------
>>> Changes for KVM for arm/arm64 for v3.19 including mmio mapping fixups
>>> (already in kvm/next, apologies about duplicate commits), vgic cleanup
>>> and optimizations, and an MMIO path cleanup.
>>>
>>> ----------------------------------------------------------------
>>>
>>>
>>> Andre Przywara (1):
>>>   arm/arm64: KVM: avoid unnecessary guest register mangling on MMIO read
>>>
>>> Ard Biesheuvel (4):
>>>   arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()
>>>   kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()
>>>   kvm: add a memslot flag for incoherent memory regions
>>>   arm, arm64: KVM: handle potential incoherency of readonly memslots
>>>
>>> Christoffer Dall (1):
>>>   arm/arm64: vgic: Remove unreachable irq_clear_pending
>>>
>>> Laszlo Ersek (1):
>>>   arm, arm64: KVM: allow forced dcache flush on page faults
>>>
>>> Shannon Zhao (1):
>>>   arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating
>>>     through all
>>>
>>> wanghaibin (1):
>>>   KVM: ARM: VGIC: Optimize the vGIC vgic_update_irq_pending function.
>>>
>>>  arch/arm/include/asm/kvm_mmu.h   |  5 +++--
>>>  arch/arm/kvm/mmio.c              | 15 +++++++++------
>>>  arch/arm/kvm/mmu.c               | 34 +++++++++++++++++++++++++++-------
>>>  arch/arm64/include/asm/kvm_mmu.h |  5 +++--
>>>  arch/ia64/kvm/kvm-ia64.c         |  2 +-
>>>  arch/x86/kvm/mmu.c               |  6 +++---
>>>  include/linux/kvm_host.h         |  3 ++-
>>>  virt/kvm/arm/vgic.c              | 20 +++++++++++++-------
>>>  virt/kvm/kvm_main.c              | 16 ++++++++--------
>>>  9 files changed, 69 insertions(+), 37 deletions(-)
>>>
>>
>> No dirty bitmap yet?  You still have one week, I'm okay with a late
>> addition.
>>
> No, we spotted a bug in the last revision and I prefer not merging it at
> this short notice, because I won't have proper time to test the stuff.
> 
> The plan is to put it in kvmarm/next right after the merge window
> closes.

Since there are x86 bits, please send an "unusual" kvmarm/next pull
request as soon as it's ready.  This way the 3.20 kvm/next and
kvmarm/next trees can both include it.

Paolo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [GIT PULL 0/9] KVM/ARM Changes for v3.19
  2014-12-11 11:52 ` Paolo Bonzini
@ 2014-12-11 11:59   ` Christoffer Dall
  2014-12-11 12:04     ` Paolo Bonzini
  0 siblings, 1 reply; 20+ messages in thread
From: Christoffer Dall @ 2014-12-11 11:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Dec 11, 2014 at 12:52:37PM +0100, Paolo Bonzini wrote:
> 
> 
> On 09/12/2014 12:25, Christoffer Dall wrote:
> >   git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm-for-3.19
> 
> Pulled, thanks.
> 
> (In case you're wondering, this merge window I'll send the pull request
> late to avoid multiple conflicts with the ia64 removal).
> 
ok, we are considering sending the regression fix for the vgic init
stuff as an additional pull request next week, depending on available
cycles for reviewing an testing:

https://lists.cs.columbia.edu/pipermail/kvmarm/2014-December/012743.html

We also have a series which clarifies the ABI and fixes guest reboot
issues and guest UEFI issues, which seems to be quieting down.  Since
that is technically a fix, we could merge that for -rc2?

https://lists.cs.columbia.edu/pipermail/kvmarm/2014-December/012635.html

Would both be ok with you?

-Christoffer

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [GIT PULL 0/9] KVM/ARM Changes for v3.19
  2014-12-11 11:54     ` Paolo Bonzini
@ 2014-12-11 12:02       ` Christoffer Dall
  0 siblings, 0 replies; 20+ messages in thread
From: Christoffer Dall @ 2014-12-11 12:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Dec 11, 2014 at 12:54:30PM +0100, Paolo Bonzini wrote:
> 
> 
> On 11/12/2014 10:47, Christoffer Dall wrote:
> > On Tue, Dec 09, 2014 at 08:39:39PM +0100, Paolo Bonzini wrote:
> >>
> >>
> >> On 09/12/2014 12:25, Christoffer Dall wrote:
> >>> Hi Paolo,
> >>>
> >>> The following changes since commit f62c95fd4041d669159dd76ac0bb2a7f86b5b05d:
> >>>
> >>>   Merge tag 'kvm-s390-next-20141028' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD (2014-10-29 13:31:32 +0100)
> >>>
> >>> are available in the git repository at:
> >>>
> >>>   git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm-for-3.19
> >>>
> >>> for you to fetch changes up to 016ed39c54b8a3db680e5c6a43419f806133caf2:
> >>>
> >>>   arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating through all (2014-11-26 10:19:37 +0000)
> >>>
> >>> Thanks,
> >>> -Christoffer
> >>>
> >>> ----------------------------------------------------------------
> >>> Changes for KVM for arm/arm64 for v3.19 including mmio mapping fixups
> >>> (already in kvm/next, apologies about duplicate commits), vgic cleanup
> >>> and optimizations, and an MMIO path cleanup.
> >>>
> >>> ----------------------------------------------------------------
> >>>
> >>>
> >>> Andre Przywara (1):
> >>>   arm/arm64: KVM: avoid unnecessary guest register mangling on MMIO read
> >>>
> >>> Ard Biesheuvel (4):
> >>>   arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()
> >>>   kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()
> >>>   kvm: add a memslot flag for incoherent memory regions
> >>>   arm, arm64: KVM: handle potential incoherency of readonly memslots
> >>>
> >>> Christoffer Dall (1):
> >>>   arm/arm64: vgic: Remove unreachable irq_clear_pending
> >>>
> >>> Laszlo Ersek (1):
> >>>   arm, arm64: KVM: allow forced dcache flush on page faults
> >>>
> >>> Shannon Zhao (1):
> >>>   arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating
> >>>     through all
> >>>
> >>> wanghaibin (1):
> >>>   KVM: ARM: VGIC: Optimize the vGIC vgic_update_irq_pending function.
> >>>
> >>>  arch/arm/include/asm/kvm_mmu.h   |  5 +++--
> >>>  arch/arm/kvm/mmio.c              | 15 +++++++++------
> >>>  arch/arm/kvm/mmu.c               | 34 +++++++++++++++++++++++++++-------
> >>>  arch/arm64/include/asm/kvm_mmu.h |  5 +++--
> >>>  arch/ia64/kvm/kvm-ia64.c         |  2 +-
> >>>  arch/x86/kvm/mmu.c               |  6 +++---
> >>>  include/linux/kvm_host.h         |  3 ++-
> >>>  virt/kvm/arm/vgic.c              | 20 +++++++++++++-------
> >>>  virt/kvm/kvm_main.c              | 16 ++++++++--------
> >>>  9 files changed, 69 insertions(+), 37 deletions(-)
> >>>
> >>
> >> No dirty bitmap yet?  You still have one week, I'm okay with a late
> >> addition.
> >>
> > No, we spotted a bug in the last revision and I prefer not merging it at
> > this short notice, because I won't have proper time to test the stuff.
> > 
> > The plan is to put it in kvmarm/next right after the merge window
> > closes.
> 
> Since there are x86 bits, please send an "unusual" kvmarm/next pull
> request as soon as it's ready.  This way the 3.20 kvm/next and
> kvmarm/next trees can both include it.
> 
Yes, that's what I meant actually, we'd put it in kvm/arm next as soon
as you've rebased kvm/next and send a pull request immediately, sorry
for being unclear.

-Christoffer

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [GIT PULL 0/9] KVM/ARM Changes for v3.19
  2014-12-11 11:59   ` Christoffer Dall
@ 2014-12-11 12:04     ` Paolo Bonzini
  0 siblings, 0 replies; 20+ messages in thread
From: Paolo Bonzini @ 2014-12-11 12:04 UTC (permalink / raw)
  To: linux-arm-kernel



On 11/12/2014 12:59, Christoffer Dall wrote:
>> > 
> ok, we are considering sending the regression fix for the vgic init
> stuff as an additional pull request next week, depending on available
> cycles for reviewing an testing:
> 
> https://lists.cs.columbia.edu/pipermail/kvmarm/2014-December/012743.html
> 
> We also have a series which clarifies the ABI and fixes guest reboot
> issues and guest UEFI issues, which seems to be quieting down.  Since
> that is technically a fix, we could merge that for -rc2?
> 
> https://lists.cs.columbia.edu/pipermail/kvmarm/2014-December/012635.html

Both are okay for -rc.

Paolo

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-12-11 12:04 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09 11:25 [GIT PULL 0/9] KVM/ARM Changes for v3.19 Christoffer Dall
2014-12-09 11:26 ` [GIT PULL 1/9] KVM: ARM: VGIC: Optimize the vGIC vgic_update_irq_pending function Christoffer Dall
2014-12-09 11:26 ` [GIT PULL 2/9] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn() Christoffer Dall
2014-12-09 12:29   ` Ard Biesheuvel
2014-12-09 12:38     ` Christoffer Dall
2014-12-09 12:38       ` Ard Biesheuvel
2014-12-09 11:26 ` [GIT PULL 3/9] kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn() Christoffer Dall
2014-12-09 11:26 ` [GIT PULL 4/9] kvm: add a memslot flag for incoherent memory regions Christoffer Dall
2014-12-09 11:26 ` [GIT PULL 5/9] arm, arm64: KVM: allow forced dcache flush on page faults Christoffer Dall
2014-12-09 11:26 ` [GIT PULL 6/9] arm, arm64: KVM: handle potential incoherency of readonly memslots Christoffer Dall
2014-12-09 11:26 ` [GIT PULL 7/9] arm/arm64: KVM: avoid unnecessary guest register mangling on MMIO read Christoffer Dall
2014-12-09 11:26 ` [GIT PULL 8/9] arm/arm64: vgic: Remove unreachable irq_clear_pending Christoffer Dall
2014-12-09 11:26 ` [GIT PULL 9/9] arm/arm64: KVM: vgic: kick the specific vcpu instead of iterating through all Christoffer Dall
2014-12-09 19:39 ` [GIT PULL 0/9] KVM/ARM Changes for v3.19 Paolo Bonzini
2014-12-11  9:47   ` Christoffer Dall
2014-12-11 11:54     ` Paolo Bonzini
2014-12-11 12:02       ` Christoffer Dall
2014-12-11 11:52 ` Paolo Bonzini
2014-12-11 11:59   ` Christoffer Dall
2014-12-11 12:04     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).