Add a module parameter kvm_irq_bypass for kvm_hv.ko to
disable IRQ bypass for passthrough interrupts. The default
value of this tunable is 1 - that is enable the feature.
Since the tunable is used by built-in kernel code, we use
the module_param_cb macro to achieve this.
Signed-off-by: Suresh
through kvm_set_irq.
pthru_bad_aff: Counts how many cached passthrough interrupts have
bad affinity (receiving CPU is not running VCPU that is
the target of the virtual interrupt in the guest).
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_host.h
ad in its
core. This is only done for IRQs that have been mapped for
IRQ bypass since in this case if the interrupt occurs while
the core is in the guest, the real mode KVM will be able
to simply redirect the interrupt to the appropriate sibling
hardware thread.
Signed-off-by: Suresh Warrier
---
.
The function this_cpu_inc_rm() is introduced to safely increment
per CPU fields (currently coded for unsigned integers only) that
are allocated and could thus be vmalloced also.
Signed-off-by: Suresh Warrier
---
arch/powerpc/kvm/book3s_hv_rm_xics.c | 50
1
Dump the passthrough irqmap structure associated with a
guest as part of /sys/kernel/debug/powerpc/kvm-xics-*.
Signed-off-by: Suresh Warrier
---
arch/powerpc/kvm/book3s_xics.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/arch/powerpc/kvm/book3s_xics.c b/arch/powerpc
r VMs with small
number of passthrough adapters or SRIOV VFs. In the future, we
can increase the number of cached entries, but we would then need
to come up with faster search/filtering mechanisms for an IRQ in
the map of cached passthrough IRQs.
Signed-off-by: Suresh Warrier
---
arch/powerpc/i
real mode handlers do not read a stale value for this case, we
call kick_all_cpus_sync() after unmapping which does not return
until every vcpu executing in the guest has come back to the host
at least once.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_ppc.h| 3 ++
interrupt condition
and calls into the kvmppc_xics_rm_complete, which is made an
exported function for this reason.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_asm.h | 10 ++
arch/powerpc/include/asm/kvm_ppc.h | 3 +++
arch/powerpc/kvm/book3s_hv.c| 8
Select IRQ_BYPASS_MANAGER for PPC when CONFIG_KVM is set.
Add the PPC producer functions for add and del producer.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_ppc.h | 4
arch/powerpc/kvm/Kconfig | 2 ++
arch/powerpc/kvm/book3s.c | 32
for
each guest. Each kvmppc_passthru_irqmap has two mapping arrays,
the mapped array contains all defined real<->virtual IRQs, the
cached array can be used to limit the real<->virtual IRQs to
a smaller subset, like a cache of the most frequently used
mappings.
Signed-off-by: Su
Modify kvmppc_read_intr to make it a C function.
This also adds in the optimization of clearing saved_xirr in the case
where we completely handle and EOI an IPI. Without this, the next
device interrupt will require two trips through the host interrupt
handling code.
Signed-off-by: Suresh
- switch back to host and run the VFIO interrupt
handler.
This is based on 4.5-rc1 plus the patch set in
http://www.spinics.net/lists/kvm-ppc/msg11131.html since it has
dependencies on vmalloc_to_phys() being public.
Suresh Warrier (14):
powerpc: Add simple cache inhibited MMIO accessors
KVM: PPC
.
There is no support to just uncache an entry.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_ppc.h | 1 +
arch/powerpc/kvm/book3s_hv.c | 97 ++
2 files changed, 98 insertions(+)
diff --git a/arch/powerpc/include/asm/kvm_ppc.h
b/arch
structure is not freed even when the
number of mapped entries goes to zero. It is only freed when
the VM is destroyed.
Signed-off-by: Suresh Warrier
---
arch/powerpc/kvm/book3s_hv.c | 158 ++-
1 file changed, 157 insertions(+), 1 deletion(-)
diff --git a
Add simple cache inhibited accessors for memory mapped I/O.
Unlike the accessors built from the DEF_MMIO_* macros, these
don't include any hardware memory barriers, callers need to
manage memory barriers on their own. These can only be called
in hypervisor mode.
Signed-off-by: Suresh Wa
all smp_muxed_ipi_set_message to set the message instead
of doing it directly inside the routine.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/smp.h | 1 +
arch/powerpc/kernel/smp.c | 9 -
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/smp.h b/a
.
* Broke up real mode IPI messaging function into two pieces - one
to set the message and one to cause the IPI. New function
icp_native_cause_ipi_rm added to arch/powerpc/sysdev/xics/icp-native.c
Suresh Warrier (9):
powerpc/smp: Support more IPI messages
powerpc/smp: Add
Update the core host state in kvmppc_host_rm_ops whenever
the primary thread of the core enters the guest or returns
back.
Signed-off-by: Suresh Warrier
---
arch/powerpc/kvm/book3s_hv.c | 44
1 file changed, 44 insertions(+)
diff --git a/arch
control this feature.
The default value for this tunable is 1 - that is enable the feature.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_ppc.h | 1 +
arch/powerpc/kvm/book3s_hv.c | 11 +++
arch/powerpc/kvm/book3s_hv_rm_xics.c | 5 -
3 files changed, 16
-off-by: Suresh Warrier
---
arch/powerpc/kernel/smp.c| 11 +
arch/powerpc/kvm/book3s_hv_rm_xics.c | 81 ++--
arch/powerpc/kvm/powerpc.c | 10 +
3 files changed, 99 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/smp.c b
-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_ppc.h | 1 +
arch/powerpc/kvm/book3s_hv.c | 2 ++
arch/powerpc/kvm/book3s_hv_rm_xics.c | 36
3 files changed, 39 insertions(+)
diff --git a/arch/powerpc/include/asm/kvm_ppc.h
b/arch/powerpc
The kvmppc_host_rm_ops structure keeps track of which cores are
are in the host by maintaining a bitmask of active/runnable
online CPUs that have not entered the guest. This patch adds
support to manage the bitmask when a CPU is offlined or onlined
in the host.
Signed-off-by: Suresh Warrier
ing smp_muxed_ipi_message_pass and then invoke icp_native_cause_ipi_rm
to cause the actual IPI.
The function requires kvm_hstate.xics_phys to have been initialized
with the physical address of XICS.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/xics.h | 1 +
arch/powerpc/sysdev/xics/
ned-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_ppc.h | 31
arch/powerpc/kvm/book3s_hv.c | 70
arch/powerpc/kvm/book3s_hv_builtin.c | 3 ++
3 files changed, 104 insertions(+)
diff --git a/arch/powerpc/include/asm/kvm_ppc
support 4 messages and all 4 are already taken.
Define a fifth message PPC_MSG_RM_HOST_ACTION for this
purpose.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/smp.h | 3 +++
arch/powerpc/kernel/smp.c | 8
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch
control this feature.
The default value for this tunable is 1 - that is enable the feature.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_ppc.h | 1 +
arch/powerpc/kvm/book3s_hv.c | 11 +++
arch/powerpc/kvm/book3s_hv_rm_xics.c | 5 -
3 files changed, 16
-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_ppc.h | 1 +
arch/powerpc/kvm/book3s_hv.c | 2 ++
arch/powerpc/kvm/book3s_hv_rm_xics.c | 36
3 files changed, 39 insertions(+)
diff --git a/arch/powerpc/include/asm/kvm_ppc.h
b/arch/powerpc
-off-by: Suresh Warrier
---
arch/powerpc/kernel/smp.c| 11 +
arch/powerpc/kvm/book3s_hv_rm_xics.c | 81 ++--
arch/powerpc/kvm/powerpc.c | 10 +
3 files changed, 99 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/smp.c b
The kvmppc_host_rm_ops structure keeps track of which cores are
are in the host by maintaining a bitmask of active/runnable
online CPUs that have not entered the guest. This patch adds
support to manage the bitmask when a CPU is offlined or onlined
in the host.
Signed-off-by: Suresh Warrier
Update the core host state in kvmppc_host_rm_ops whenever
the primary thread of the core enters the guest or returns
back.
Signed-off-by: Suresh Warrier
---
arch/powerpc/kvm/book3s_hv.c | 44
1 file changed, 44 insertions(+)
diff --git a/arch
ned-off-by: Suresh Warrier
---
arch/powerpc/include/asm/kvm_ppc.h | 31
arch/powerpc/kvm/book3s_hv.c | 70
arch/powerpc/kvm/book3s_hv_builtin.c | 3 ++
3 files changed, 104 insertions(+)
diff --git a/arch/powerpc/include/asm/kvm_ppc
Function to cause an IPI. Requires kvm_hstate.xics_phys
to be initialized with physical address of XICS.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/xics.h | 1 +
arch/powerpc/sysdev/xics/icp-native.c | 19 +++
2 files changed, 20 insertions(+)
diff --git
ide the routine.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/smp.h | 1 +
arch/powerpc/kernel/smp.c | 9 -
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index 9ef9c37..78083ed 100644
--- a/a
support 4 messages and all 4 are already taken.
Define a fifth message PPC_MSG_RM_HOST_ACTION for this
purpose.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/smp.h | 3 +++
arch/powerpc/kernel/smp.c | 8
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch
and one to cause the IPI. New function
icp_native_cause_ipi_rm added to arch/powerpc/sysdev/xics/icp-native.c
Suresh Warrier (9):
powerpc/smp: Support more IPI messages
powerpc/smp: Add smp_muxed_ipi_set_message
powerpc/powernv: Add icp_native_cause_ipi_rm
KVM: PPC: Book3S HV: Host-side RM
This function supports IPI message passing for real
mode callers.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/smp.h | 1 +
arch/powerpc/kernel/smp.c | 30 ++
2 files changed, 31 insertions(+)
diff --git a/arch/powerpc/include/asm/smp.h b/arch
support 4 messages and all 4 are already taken.
Define a fifth message PPC_MSG_RM_HOST_ACTION for this
purpose.
Signed-off-by: Suresh Warrier
---
arch/powerpc/include/asm/smp.h | 3 +++
arch/powerpc/kernel/smp.c | 8
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch
switch to
host to do the VCPU wakeup.
Suresh Warrier (2):
powerpc/smp: Support more IPI messages
powerpc/smp: Add smp_muxed_ipi_rm_message_pass
arch/powerpc/include/asm/smp.h | 4
arch/powerpc/kernel/smp.c | 38 ++
2 files changed, 38 insert
38 matches
Mail list logo