Signed-off-by: Zenghui Yu
---
Reviewed-by: Gavin Shan
virt/kvm/arm/vgic/vgic-mmio.h | 5 -
1 file changed, 5 deletions(-)
diff --git a/virt/kvm/arm/vgic/vgic-mmio.h b/virt/kvm/arm/vgic/vgic-mmio.h
index 836f418f1ee8..5af2aefad435 100644
--- a/virt/kvm/arm/vgic/vgic-mmio.h
+++ b/virt/kvm/arm
On 1/22/20 12:28 AM, Marc Zyngier wrote:
On 2020-01-21 05:56, Gavin Shan wrote:
kvm_test_age_hva() is called upon mmu_notifier_test_young(), but wrong
address range has been passed to handle_hva_to_gpa(). With the wrong
address range, no young bits will be checked in handle_hva_to_gpa
by passing correct address range to the underly
function handle_hva_to_gpa(), so that the hardware young (access) bit
will be visited.
Cc: sta...@vger.kernel.org # v4.1+
Fixes: 35307b9a5f7e ("arm/arm64: KVM: Implement Stage-2 page aging")
Signed-off-by: Gavin Shan
---
virt/kvm/arm/mmu.c
, to
allocate (and access) all free memory. No system hang is found.
Gavin Shan (7):
kvm/arm64: Rename kvm_vcpu_get_hsr() to kvm_vcpu_get_esr()
kvm/arm64: Detach ESR operator from vCPU struct
kvm/arm64: Replace hsr with esr
kvm/arm64: Export kvm_handle_user_mem_abort() with prefault mode
. With this, the
caller has flexibility on where the ESR is read. It shouldn't cause
any functional changes.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_emulate.h | 83 +++-
arch/arm64/kvm/handle_exit.c | 20 --
arch/arm64/kvm/hyp/switch.c | 24
by @esr.
* The parameters are reorder based on their importance.
This shouldn't cause any functional changes.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_host.h | 4
virt/kvm/arm/mmu.c| 14 --
2 files changed, 12 insertions(+), 6 deletions(-)
diff
.
Signed-off-by: Gavin Shan
---
arch/arm64/Kconfig | 11 ++
arch/arm64/include/asm/exception.h | 5 +
arch/arm64/include/asm/kvm_para.h | 42 -
arch/arm64/kernel/smp.c| 47 ++
arch/arm64/mm/fault.c | 239 -
5 files
The data abort will be used as signal by the asynchronous page fault.
However, the specific IMPDEF Data Fault Status Code (DFSC) is used.
Currently, there is no API to inject data abort with specific DSC.
This fixes the gap by introducing kvm_inject_dabt_with_dfsc().
Signed-off-by: Gavin Shan
This replace the variable names to make them self-explaining. The
tracepoint isn't changed accordingly because they're part of ABI:
* @hsr to @esr
* @hsr_ec to @ec
* Use kvm_vcpu_trap_get_class() helper if possible
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/handle_exit.c | 28
Since kvm/arm32 was removed, this renames kvm_vcpu_get_hsr() to
kvm_vcpu_get_esr() to it a bit more self-explaining because the
functions returns ESR instead of HSR on aarch64. This shouldn't
cause any functional changes.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_emulate.h | 36
duplicate signals will be fired for one gfn.
* The signal is conveyed through data abort with IMPDEF Data Fault
Status Code (DFSC), which is 0x34. the specific events are stored
in the control block, waiting for guest to read.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm
Hi Marc,
On 4/10/20 10:52 PM, Marc Zyngier wrote:
Hi Gavin,
On 2020-04-10 09:58, Gavin Shan wrote:
There are two stages of page faults and the stage one page fault is
handled by guest itself. The guest is trapped to host when the page
fault is caused by stage 2 page table, for example missing
Hi Mark,
On 4/16/20 7:16 PM, Mark Rutland wrote:
On Thu, Apr 16, 2020 at 05:59:33PM +1000, Gavin Shan wrote:
On 4/14/20 9:05 PM, Mark Rutland wrote:
On Tue, Apr 14, 2020 at 03:39:56PM +1000, Gavin Shan wrote:
On 4/10/20 10:52 PM, Marc Zyngier wrote:
On 2020-04-10 09:58, Gavin Shan wrote
Hi Mark,
On 4/14/20 9:05 PM, Mark Rutland wrote:
On Tue, Apr 14, 2020 at 03:39:56PM +1000, Gavin Shan wrote:
On 4/10/20 10:52 PM, Marc Zyngier wrote:
On 2020-04-10 09:58, Gavin Shan wrote:
In order to fulfil the control flow and convey signals between host
and guest. A IMPDEF system register
Since kvm/arm32 was removed, this renames kvm_vcpu_get_hsr() to
kvm_vcpu_get_esr() to it a bit more self-explaining because the
functions returns ESR instead of HSR on aarch64. This shouldn't
cause any functional changes.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_emulate.h | 36
. With this, the
caller has flexibility on where the ESR is read. It shouldn't cause
any functional changes.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_emulate.h | 83 +++-
arch/arm64/kvm/handle_exit.c | 20 --
arch/arm64/kvm/hyp/switch.c | 24
compatible with KVM. Once this has been established,
additional services can be discovered via a feature bitmap.
Cc: Marc Zyngier
Signed-off-by: Will Deacon
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/hypervisor.h | 11 +
arch/arm64/kernel/setup.c
he feature.
Signed-off-by: Gavin Shan
---
arch/arm64/Kconfig | 11 +
arch/arm64/include/asm/exception.h | 3 +
arch/arm64/include/asm/kvm_para.h | 27 +-
arch/arm64/kernel/entry.S | 33 +++
arch/arm64/kernel/process.c| 4 +
arch/arm64/mm/fault.c
From: Will Deacon
We can advertise ourselves to guests as KVM and provide a basic features
bitmap for discoverability of future hypervisor services.
Cc: Marc Zyngier
Signed-off-by: Will Deacon
Signed-off-by: Gavin Shan
---
virt/kvm/arm/hypercalls.c | 29 +++--
1 file
are fired and consumed in sequential fashion. It means
no more signals will be fired if there is pending one, awaiting the
guest to consume. It's because the injected data abort faults have
to be done in sequential fashion.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm
elayed wakeup mechanism in guest kernel (Gavin
Shan)
* Stability improvement in the guest kernel: delayed wakeup mechanism,
external abort disallowed region, lazily clear async page fault,
disabled interrupt on acquiring the head's lock and so on
by @esr.
* The parameters are reorder based on their importance.
This shouldn't cause any functional changes.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_host.h | 4
virt/kvm/arm/mmu.c| 14 --
2 files changed, 12 insertions(+), 6 deletions(-)
diff
This adds API cpu_rq_is_locked() to check if the CPU's runqueue has been
locked or not. It's used in the subsequent patch to determine the task
wakeup should be executed immediately or delayed.
Signed-off-by: Gavin Shan
---
include/linux/sched.h | 1 +
kernel/sched/core.c | 8
2
This replace the variable names to make them self-explaining. The
tracepoint isn't changed accordingly because they're part of ABI:
* @hsr to @esr
* @hsr_ec to @ec
* Use kvm_vcpu_trap_get_class() helper if possible
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/handle_exit.c | 28
Hi Will,
On 9/3/20 9:13 PM, Gavin Shan wrote:
On 9/3/20 5:34 PM, Gavin Shan wrote:
On 8/25/20 7:39 PM, Will Deacon wrote:
Hello folks,
This is version three of the KVM page-table rework that I previously posted
here:
v1: https://lore.kernel.org/r/20200730153406.25136-1-w...@kernel.org
Hi Marc,
On 9/4/20 8:07 PM, Marc Zyngier wrote:
On 2020-09-04 01:51, Gavin Shan wrote:
On 9/3/20 10:16 PM, Will Deacon wrote:
On Thu, Sep 03, 2020 at 09:48:18PM +1000, Gavin Shan wrote:
On 9/3/20 9:13 PM, Gavin Shan wrote:
On 9/3/20 5:34 PM, Gavin Shan wrote:
On 8/25/20 7:39 PM
Hi Will,
On 9/3/20 10:16 PM, Will Deacon wrote:
On Thu, Sep 03, 2020 at 09:48:18PM +1000, Gavin Shan wrote:
On 9/3/20 9:13 PM, Gavin Shan wrote:
On 9/3/20 5:34 PM, Gavin Shan wrote:
On 8/25/20 7:39 PM, Will Deacon wrote:
Hello folks,
This is version three of the KVM page-table rework
Hi Will,
On 9/4/20 2:15 AM, Will Deacon wrote:
On Thu, Sep 03, 2020 at 01:30:32PM +0100, Will Deacon wrote:
On Thu, Sep 03, 2020 at 09:18:27PM +1000, Gavin Shan wrote:
On 8/25/20 7:39 PM, Will Deacon wrote:
+static int stage2_map_walk_table_post(u64 addr, u64 end, u32 level
Hi Will,
On 9/4/20 2:50 AM, Will Deacon wrote:
On Thu, Sep 03, 2020 at 03:07:17PM +1000, Gavin Shan wrote:
On 8/25/20 7:39 PM, Will Deacon wrote:
The stage-2 page-tables are entirely encapsulated by the 'pgt' field of
'struct kvm_s2_mmu', so remove the unused 'pgd' field.
Cc: Marc Zyngier
Hi Will,
On 9/4/20 2:48 AM, Will Deacon wrote:
On Thu, Sep 03, 2020 at 02:33:22PM +1000, Gavin Shan wrote:
On 8/25/20 7:39 PM, Will Deacon wrote:
Add stage-2 mkyoung(), mkold() and is_young() operations to the generic
page-table code.
Cc: Marc Zyngier
Cc: Quentin Perret
Signed-off
("KVM: arm/arm64: Re-check VMA on detecting a poisoned
page")
Signed-off-by: Alexandru Elisei
---
Reviewed-by: Gavin Shan
arch/arm64/kvm/mmu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index ba00bcc0c884..25e7dc52c086 100644
--
Hi Will,
On 8/25/20 7:39 PM, Will Deacon wrote:
The KVM page-table code is intricately tied into the kernel page-table
code and re-uses the pte/pmd/pud/p4d/pgd macros directly in an attempt
to reduce code duplication. Unfortunately, the reality is that there is
an awful lot of code required to
Hi Alexandru,
On 9/1/20 11:33 PM, Alexandru Elisei wrote:
When userspace uses hugetlbfs for the VM memory, user_mem_abort() tries to
use the same block size to map the faulting IPA in stage 2. If stage 2
cannot use the same size mapping because the block size doesn't fit in the
memslot or the
+++-
4 files changed, 99 insertions(+), 26 deletions(-)
With the following one question resolved:
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/include/asm/kvm_host.h
b/arch/arm64/include/asm/kvm_host.h
index e52c927aade5..0b7c702b2151 100644
--- a/arch/arm64
Perret
Signed-off-by: Will Deacon
---
Reviewed-by: Gavin Shan
arch/arm64/include/asm/kvm_pgtable.h | 36
arch/arm64/kvm/hyp/pgtable.c | 133 +++
2 files changed, 169 insertions(+)
diff --git a/arch/arm64/include/asm/kvm_pgtable.h
b/arch/arm64
need.
Cc: Marc Zyngier
Cc: Quentin Perret
Signed-off-by: Will Deacon
---
With following one question resolved if getting a chance for another
respin:
Reviewed-by: Gavin Shan
arch/arm64/include/asm/kvm_mmu.h | 78 +
arch/arm64/include/asm/kvm_pgtable.h | 5 +
arch/arm64
to add some comments about kvm_block_mapping_supported().
More details are provoided below.
Reviewed-by: Gavin Shan
arch/arm64/include/asm/kvm_pgtable.h | 101 ++
arch/arm64/kvm/hyp/Makefile | 2 +-
arch/arm64/kvm/hyp/pgtable.c | 285 +++
3
Hi Will and Marc,
On 9/8/20 1:23 AM, Will Deacon wrote:
Hi all,
Here's version four of the KVM page-table rework I previously posted here:
v1: https://lore.kernel.org/r/20200730153406.25136-1-w...@kernel.org
v2: https://lore.kernel.org/r/20200818132818.16065-1-w...@kernel.org
v3:
On 9/10/20 2:06 PM, Gavin Shan wrote:
Hi Will and Marc,
On 9/8/20 1:23 AM, Will Deacon wrote:
Hi all,
Here's version four of the KVM page-table rework I previously posted here:
v1: https://lore.kernel.org/r/20200730153406.25136-1-w...@kernel.org
v2: https://lore.kernel.org/r
Hi Will,
On 9/2/20 9:02 PM, Will Deacon wrote:
On Wed, Sep 02, 2020 at 04:31:32PM +1000, Gavin Shan wrote:
On 8/25/20 7:39 PM, Will Deacon wrote:
The KVM page-table code is intricately tied into the kernel page-table
code and re-uses the pte/pmd/pud/p4d/pgd macros directly in an attempt
only try and map a PUD when its size is different from
that of a PMD.
Cc: sta...@vger.kernel.org
Fixes: b8e0ba7c8bea ("KVM: arm64: Add support for creating PUD hugepages at stage
2")
Reported-by: Gavin Shan
Reported-by: Eric Auger
Signed-off-by: Marc Zyngier
---
arch/arm64/kvm/mmu.c
Hi Alex,
On 9/2/20 7:01 PM, Alexandru Elisei wrote:
On 9/2/20 2:23 AM, Gavin Shan wrote:
On 9/1/20 11:33 PM, Alexandru Elisei wrote:
When userspace uses hugetlbfs for the VM memory, user_mem_abort() tries to
use the same block size to map the faulting IPA in stage 2. If stage 2
cannot use
+++
2 files changed, 301 insertions(+)
With the following questions resolved:
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/include/asm/kvm_pgtable.h
b/arch/arm64/include/asm/kvm_pgtable.h
index 3389f978d573..8ab0d5f43817 100644
--- a/arch/arm64/include/asm/kvm_pgtable.h
Hi Will,
On 9/3/20 5:34 PM, Gavin Shan wrote:
On 8/25/20 7:39 PM, Will Deacon wrote:
Hello folks,
This is version three of the KVM page-table rework that I previously posted
here:
v1: https://lore.kernel.org/r/20200730153406.25136-1-w...@kernel.org
v2: https://lore.kernel.org/r
Hi Will,
On 8/25/20 7:39 PM, Will Deacon wrote:
Add stage-2 map() and unmap() operations to the generic page-table code.
Cc: Marc Zyngier
Cc: Quentin Perret
Signed-off-by: Will Deacon
---
arch/arm64/include/asm/kvm_pgtable.h | 39
arch/arm64/kvm/hyp/pgtable.c | 262
+---
1 file changed, 32 insertions(+), 25 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index 704b471a48ce..751ce2462765 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -39,6 +39,33 @@ static bool is_iomap(unsigned long flags
++--
1 file changed, 16 insertions(+), 58 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index 751ce2462765..d3db8e00ce0a 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -1698,46 +1698,23 @@ static
/arm64/kvm/mmu.c | 2 --
2 files changed, 3 deletions(-)
I think this might be folded into PATCH[18] as both patches are
simple enough. I'm not sure the changes introduced in PATCH[19]
prevent us doing this.
There is another question below.
Reviewed-by: Gavin Shan
diff --git
5 files changed, 1141 deletions(-)
With the following questions resolved:
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h
index 42fb50cfe0d8..13ff00d9f16d 100644
--- a/arch/arm64/include/asm/kvm_mmu.h
+++ b/arch/arm64/include/asm
(+), 13 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index 33146d3dc93a..704b471a48ce 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -1911,28 +1911,27 @@ int kvm_unmap_hva_range(struct kvm *kvm,
static int kvm_set_spte_handler
-by: Will Deacon
---
arch/arm64/kvm/mmu.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index ca2c37c91e0b..d4b0716a6ab4 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -455,21
Hi Will,
On 8/25/20 7:39 PM, Will Deacon wrote:
From: Quentin Perret
Add support for cache flushing a range of the stage-2 address space to
the generic page-table code.
Cc: Marc Zyngier
Signed-off-by: Quentin Perret
Signed-off-by: Will Deacon
---
Reviewed-by: Gavin Shan
arch/arm64
changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index cfbf32cae3a5..050eab71de31 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -1813,7 +1813,7 @@ static int kvm_unmap_hva_handler(struct kvm *kvm, gpa_t
with various configuration
on different machines. I will update the result when it's finished.
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index d4b0716a6ab4..cfbf32cae3a5 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -1491,7 +1491,8 @@ static int
| 86
2 files changed, 124 insertions(+)
With the following one question resolved:
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/include/asm/kvm_pgtable.h
b/arch/arm64/include/asm/kvm_pgtable.h
index 8ab0d5f43817..ae56534f87a0 100644
--- a/arch/arm64
-by: Will Deacon
---
arch/arm64/kvm/mmu.c | 25 -
1 file changed, 4 insertions(+), 21 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index d3db8e00ce0a..ca2c37c91e0b 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
+
arch/arm64/kvm/hyp/pgtable.c | 20
2 files changed, 37 insertions(+)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/include/asm/kvm_pgtable.h
b/arch/arm64/include/asm/kvm_pgtable.h
index ea823fe31913..0d7077c34152 100644
--- a/arch/arm64
Hi Will,
On 9/3/20 12:57 PM, Gavin Shan wrote:
On 8/25/20 7:39 PM, Will Deacon wrote:
Add stage-2 map() and unmap() operations to the generic page-table code.
Cc: Marc Zyngier
Cc: Quentin Perret
Signed-off-by: Will Deacon
---
arch/arm64/include/asm/kvm_pgtable.h | 39
arch/arm64
-
2 files changed, 13 insertions(+), 30 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
index 41ee8f3c0369..6f65d3841ec9 100644
--- a/arch/arm64/kvm/hyp/pgtable.c
+++ b/arch/arm64/kvm/hyp/pgtable.c
@@ -439,18
Hi Will,
On 8/25/20 7:39 PM, Will Deacon wrote:
From: Quentin Perret
Add a stage-2 wrprotect() operation to the generic page-table code.
Cc: Marc Zyngier
Signed-off-by: Quentin Perret
Signed-off-by: Will Deacon
---
Reviewed-by: Gavin Shan
arch/arm64/include/asm/kvm_pgtable.h | 15
: Marc Zyngier
Cc: Quentin Perret
Signed-off-by: Will Deacon
---
arch/arm64/kvm/reset.c | 38 +-
1 file changed, 5 insertions(+), 33 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index ee33875c5c2a
Hi Will,
On 8/25/20 7:39 PM, Will Deacon wrote:
Hello folks,
This is version three of the KVM page-table rework that I previously posted
here:
v1: https://lore.kernel.org/r/20200730153406.25136-1-w...@kernel.org
v2: https://lore.kernel.org/r/20200818132818.16065-1-w...@kernel.org
Since commit ("arm64/kvm: Add generic v8 KVM target"),
there is no negative number returned from kvm_target_cpu(). So it's
not needed to validate its return value in kvm_vcpu_preferred_target()
and this just drops the unnecessary check.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/g
The target CPU type is validated when KVM module is initialized.
However, we always have a valid target CPU type since commit
("arm64/kvm: Add generic v8 KVM target").
So it's unnecessary to validate the target CPU type at that time
and this just drops it.
Signed-off-by: Gavin Shan
locate the required resources.
ARM_SMCCC_KVM_FUNC_APF_SDEI
ARM_SMCCC_KVM_FUNC_APF_IRQ
Used by guest to confiugre the SDEI event and PPI numbers.
ARM_SMCCC_KVM_FUNC_APF_IRQ_ACK
Acknowledge the page-ready notificaton in the PPI handler.
Signed-off-by: Gavin Shan
---
arch/arm64/i
From: Will Deacon
We can advertise ourselves to guests as KVM and provide a basic features
bitmap for discoverability of future hypervisor services.
Cc: Marc Zyngier
Signed-off-by: Will Deacon
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/hypercalls.c | 29 +++--
1
eature has to be enabled after SDEI service is settled down
because this depends on SDEI service.
Signed-off-by: Gavin Shan
---
arch/arm64/Kconfig | 11 +
arch/arm64/include/asm/kvm_para.h| 26 +-
arch/arm64/include/asm/processor.h | 1 +
arch/arm64/include/asm/thread_in
.
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/esr.h | 5 +
arch/arm64/include/asm/kvm_emulate.h | 8
arch/arm64/include/asm/kvm_host.h| 4
arch/arm64/kvm/mmu.c | 18 --
4 files changed, 25 insertions(+), 10 deletions(-)
diff --git
* @interrupt_flags: PPI's mode and polarity
Signed-off-by: Gavin Shan
---
include/acpi/actbl2.h | 18 ++
1 file changed, 18 insertions(+)
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index ec66779cb193..2eb715f4463b 100644
--- a/include/acpi/actbl2.h
+++ b/include
compatible with KVM. Once this has been established,
additional services can be discovered via a feature bitmap.
Signed-off-by: Will Deacon
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/hypervisor.h | 11 ++
arch/arm64/kernel/setup.c | 32 +
include
2>&1"
Idx Disabled Enabled Output
==
1 2049s 1850s +9.7%
2 2144s 1947s +9.1%
3 2164s 1997s +7.7%
4 2192s 2031s +7.3%
5 2515s 2141s +14.8%
Hi Will,
On 8/18/20 11:27 PM, Will Deacon wrote:
kvm_phys_addr_ioremap() unconditionally empties out the memcache pages
for the current vCPU on return. This causes subsequent topups to allocate
fresh pages and is at odds with the behaviour when mapping memory in
user_mem_abort().
Remove the
/arm64/kvm/arm.c | 2 +-
arch/arm64/kvm/mmu.c | 5 -
3 files changed, 1 insertion(+), 8 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h
index 189839c3706a..0f078b1920ff 100644
--- a/arch/arm64
Eric Auger
Signed-off-by: Gavin Shan
Tested-by: Eric Auger
Reviewed-by: Eric Auger
---
arch/arm64/kvm/mmu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index 0121ef2c7c8d..deb1819ba9e2 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/
Hi Marc,
On 8/22/20 8:01 PM, Marc Zyngier wrote:
On Sat, 22 Aug 2020 03:44:44 +0100,
Gavin Shan wrote:
Depending on the kernel configuration, PUD_SIZE could be equal to
PMD_SIZE. For example, both of them are 512MB with the following
kernel configuration. In this case, both PUD and PMD
This retrieves the event signaled property when it's created for the
first time. The property will be needed when SDEI virtualization is
supported.
Signed-off-by: Gavin Shan
---
drivers/firmware/arm_sdei.c | 6 ++
include/linux/arm_sdei.h| 1 +
2 files changed, 7 insertions(+)
diff
ssthrou SDEI
events to target VMs and vCPUs.
PATCH[15-16] Support more hypercalls like COMPLETE, COMPLETE_AND_RESUME, and
CONTEXT.
PATCH[17]Support injecting KVM private SDEI event and expose the SDEI
capability.
PATCH[18]Add self-test case for KVM private SDE
.
Signed-off-by: Gavin Shan
---
include/kvm/arm_hypercalls.h | 34 +++---
1 file changed, 15 insertions(+), 19 deletions(-)
diff --git a/include/kvm/arm_hypercalls.h b/include/kvm/arm_hypercalls.h
index 0e2509d27910..1120eff7aa28 100644
--- a/include/kvm/arm_hypercalls.h
This adds API sdei_event_get_info(), to be used when virtualized
SDEI is supported to retrieve the information about the specified
event.
Signed-off-by: Gavin Shan
---
drivers/firmware/arm_sdei.c | 13 +
include/linux/arm_sdei.h| 2 ++
2 files changed, 15 insertions(+)
diff
CPU. These events forms a link list through
@vcpu->arch.sdei_events, protected by lock @vcpu->arch.sdei_lock.
For now, errno (SDEI_NOT_SUPPORTED) is returned for all SDEI hypercalls
and they will be implemented and suppoerted one by one in the subsequent
patches.
Signed-off-by: Gavin S
On 8/17/20 8:05 PM, Gavin Shan wrote:
This series intends to support SDEI virtualization. The background is
the feature (Asynchronous Page Fault) needs virtualized SDEI event to
deliver page-not-present notification from host to guest. This series
depends on the series "Refactor SDEI C
)
SDEI_1_0_FN_SDEI_PE_MASK(CPU offline)
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/Makefile | 1 +
tools/testing/selftests/kvm/aarch64/sdei.c | 170 +
2 files changed, 171 insertions(+)
create mode 100644 tools/testing/selftests/kvm/aarch64/sdei.c
diff --git
This supports SDEI_1_0_FN_SDEI_EVENT_CONTEXT hypercall by implementing
kvm_sdei_hypercall_context(). If there is valid context on the current
vCPU and the register index isn't out of scope, the register values are
returned. Otherwise, errno is returned.
Signed-off-by: Gavin Shan
---
arch/arm64
rrupted PC/PState are saved.
* x0/x1/x2/x3 is set to the event number, event parameter, the
interrupt PC and PState separately.
* PSTATE is modified as follows: DAIF=0b, EL=ELc, nRW=0, SP=1
* PC is set to the address of the handler
Signed-off-by: Gavin Shan
---
arch/arm64/i
: kvm_sdei_register_notifier() and
kvm_sdei_cancel().
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_sdei.h | 4 +
arch/arm64/kvm/arm.c | 8 ++
arch/arm64/kvm/reset.c| 3 +
arch/arm64/kvm/sdei.c | 134 ++
include/uapi
retrieved from underly firmware
if applicable.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 125 ++
1 file changed, 125 insertions(+)
diff --git a/arch/arm64/kvm/sdei.c b/arch/arm64/kvm/sdei.c
index 2d2135a5c3ea..529505c4f0cf 100644
--- a/arch/arm64
This supports SDEI_1_0_FN_SDEI_EVENT_STATUS hypercall by adding the
function kvm_sdei_hypercall_status(). On success, the event's current
status is returned. Otherwise, errno is returned.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 50 +++
1
ich is originated from KVM itself, the
notfier is executed. Besides, the IRQ exception is injected if the
request is to resume the guest by SDEI_1_0_FN_SDEI_EVENT_RESUME.
The behaviour is defined in SDEI specification (v1.0).
Signed-off-by: Gavin Shan
---
arch/arm64/include/asm/kvm_emulate.h | 2 +
a
-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/arch/arm64/kvm/sdei.c b/arch/arm64/kvm/sdei.c
index e2090e9bab8b..f5739c0063df 100644
--- a/arch/arm64/kvm/sdei.c
+++ b/arch/arm64/kvm/sdei.c
@@ -36,6 +36,21 @@ static inline int
exist, the kvm event is created
and put into the RB-tree of the parent event. The registered status
is updated either.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 230 ++
1 file changed, 230 insertions(+)
diff --git a/arch/arm64/kvm
might be shared by multiple VMs.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 24
1 file changed, 24 insertions(+)
diff --git a/arch/arm64/kvm/sdei.c b/arch/arm64/kvm/sdei.c
index 1e7291acea0d..0816136e73a6 100644
--- a/arch/arm64/kvm/sdei.c
+++ b/arch/arm64/kvm
we need is to update the enabled bits,
which will be serving as filters during the event delivery to the
target VMs and vCPUs.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 68 +++
1 file changed, 68 insertions(+)
diff --git a/arch/arm64/kvm/sdei.c
) events which have been registered on the
speicific VM. However, the request is directed to underly firmware
by calling sdei_event_unregister() when last event (reference) exits.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 18 ++
1 file changed, 18 insertions(+)
diff
the underly firmware in that case.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/sdei.c | 73 +++
1 file changed, 73 insertions(+)
diff --git a/arch/arm64/kvm/sdei.c b/arch/arm64/kvm/sdei.c
index 320b79528211..63d621dc9711 100644
--- a/arch/arm64/kvm/sdei.c
This supports SDEI_1_0_FN_SDEI_EVENT_ROUTING_SET hypercall by adding
kvm_sdei_hypercall_route(). On success, the specified routing mode
and affinity is set. Otherwise, errno is returned. The route mode
or affinity is updated to the KVM SDEI event.
Signed-off-by: Gavin Shan
---
arch/arm64/kvm
/pgtable.c | 23 ---
1 file changed, 16 insertions(+), 7 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
index 603d6b415337..0cdf6e461cbd 100644
--- a/arch/arm64/kvm/hyp/pgtable.c
+++ b/arch/arm64/kvm/hyp
of an external abort into the guest or a spurious
return to userspace. Neither or these are what we want to do.
Initialise 'ret' to 0 in user_mem_abort() so that bailing due to a
change in the MMU notrifier sequence number is treated as though the
fault was handled.
Cc: Gavin Shan
Cc: Alexandru
On 5/27/20 5:20 PM, Marc Zyngier wrote:
On 2020-05-27 03:43, Gavin Shan wrote:
Hi Mark,
On 5/26/20 8:42 PM, Mark Rutland wrote:
On Fri, May 08, 2020 at 01:29:13PM +1000, Gavin Shan wrote:
Since kvm/arm32 was removed, this renames kvm_vcpu_get_hsr() to
kvm_vcpu_get_esr() to it a bit more self
Hi Paolo,
On 5/27/20 4:48 PM, Paolo Bonzini wrote:
I definitely appreciate the work, but this is repeating most of the
mistakes done in the x86 implementation. In particular:
- the page ready signal can be done as an interrupt, rather than an
exception. This is because "page ready" can be
Hi Marc,
On 5/27/20 5:37 PM, Marc Zyngier wrote:
On 2020-05-27 05:05, Gavin Shan wrote:
[...]
+struct kvm_vcpu_pv_apf_data {
+ __u32 reason;
+ __u8 pad[60];
+ __u32 enabled;
+};
What's all the padding for?
The padding is ensure the @reason and @enabled in different
1 - 100 of 637 matches
Mail list logo