KVM: PPC: Add ePAPR idle hcall support
Subsystems (4)
v8 cover KVM: PPC: Add ePAPR idle hcall support
From: Stuart Yoder <[email protected]>
-v8
-updates hcall instruction for e500mc
Liu Yu-B13201 (4):
KVM: PPC: epapr: Factor out the epapr init
KVM: PPC: epapr: Add idle hcall support for host
KVM: PPC: epapr: install ev_idle hcall for e500 guest
KVM: PPC: epapr: Update other hypercall invoking
arch/powerpc/include/asm/Kbuild | 1 + arch/powerpc/include/asm/epapr_hcalls.h | 35 ++++++++++-------- arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++--------- arch/powerpc/include/asm/kvm_para.h | 14 ++++++- arch/powerpc/kernel/Makefile | 1 + arch/powerpc/kernel/epapr_hcalls.S | 52 ++++++++++++++++++++++++++ arch/powerpc/kernel/epapr_paravirt.c | 61 +++++++++++++++++++++++++++++++ arch/powerpc/kernel/kvm.c | 28 ++------------- arch/powerpc/kernel/kvm_emul.S | 10 ----- arch/powerpc/kvm/booke.c | 6 +++ arch/powerpc/kvm/powerpc.c | 14 ++++++- arch/powerpc/platforms/Kconfig | 10 +++++ drivers/tty/Kconfig | 1 + drivers/virt/Kconfig | 1 + include/linux/kvm.h | 2 + 15 files changed, 199 insertions(+), 73 deletions(-) create mode 100644 arch/powerpc/kernel/epapr_hcalls.S create mode 100644 arch/powerpc/kernel/epapr_paravirt.c
Signature · 1 line
1.7.3.4
PATCH v8 1/4 KVM: PPC: epapr: Factor out the epapr init
From: Liu Yu-B13201 <[email protected]>
from the kvm guest paravirt init code.
---
-v8: no changes
arch/powerpc/include/asm/epapr_hcalls.h | 2 + arch/powerpc/kernel/Makefile | 1 + arch/powerpc/kernel/epapr_hcalls.S | 25 +++++++++++++++ arch/powerpc/kernel/epapr_paravirt.c | 52 +++++++++++++++++++++++++++++++ arch/powerpc/kernel/kvm.c | 28 ++--------------- arch/powerpc/kernel/kvm_emul.S | 10 ------ arch/powerpc/platforms/Kconfig | 9 +++++ 7 files changed, 92 insertions(+), 35 deletions(-) create mode 100644 arch/powerpc/kernel/epapr_hcalls.S create mode 100644 arch/powerpc/kernel/epapr_paravirt.c
arch/powerpc/include/asm/epapr_hcalls.h +2 -0
@@ -148,6 +148,8 @@#define EV_HCALL_CLOBBERS2 EV_HCALL_CLOBBERS3, "r5"#define EV_HCALL_CLOBBERS1 EV_HCALL_CLOBBERS2, "r4" +extern bool epapr_paravirt_enabled; +extern u32 epapr_hypercall_start[];/* * We use "uintptr_t" to define a register because it's guaranteed to be a
arch/powerpc/kernel/Makefile +1 -0
@@ -134,6 +134,7 @@ ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC),) obj-y += ppc_save_regs.o endif +obj-$(CONFIG_EPAPR_PARAVIRT) += epapr_paravirt.o epapr_hcalls.o obj-$(CONFIG_KVM_GUEST) += kvm.o kvm_emul.o # Disable GCOV in odd or sensitive code
arch/powerpc/kernel/epapr_hcalls.S new file +25 -0
@@ -0,0 +1,25 @@ +/* + * Copyright (C) 2012 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include <linux/threads.h> +#include <asm/reg.h> +#include <asm/page.h> +#include <asm/cputable.h> +#include <asm/thread_info.h> +#include <asm/ppc_asm.h> +#include <asm/asm-offsets.h> + +/* Hypercall entry point. Will be patched with device tree instructions. */ +.global epapr_hypercall_start +epapr_hypercall_start: + li r3, -1 + nop + nop + nop + blr
arch/powerpc/kernel/epapr_paravirt.c new file +52 -0
52 lines not on this page · raw message
arch/powerpc/kernel/kvm.c +3 -25
@@ -30,6 +30,7 @@#include <asm/cacheflush.h> #include <asm/disassemble.h> #include <asm/ppc-opcode.h> +#include <asm/epapr_hcalls.h> #include <asm/machdep.h> #include <asm/mpic.h>
@@ -739,7 +740,7 @@ unsigned long kvm_hypercall(unsigned long *in, unsigned long register r11 asm("r11") = nr;unsigned long register r12 asm("r12" ); - asmvolatile ("bl kvm_hypercall_start" + asmvolatile ("bl epapr_hypercall_start" :"=r" (r0),"=r" (r3),"=r" (r4),"=r" (r5),"=r" (r6),"=r" (r7),"=r" (r8),"=r" (r9),"=r" (r10),"=r" (r11), "=r"(r12)
@@ -760,29 +761,6 @@ unsigned long kvm_hypercall(unsigned long *in, }EXPORT_SYMBOL_GPL (kvm_hypercall); -static int kvm_para_setup (void ) -{ -extern u32 kvm_hypercall_start; -struct device_node *hyper_node; -u32 *insts; -int len, i; - - hyper_node =of_find_node_by_path ("/hypervisor" ); -if (!hyper_node) -return -1 ; - - insts = (u32 *)of_get_property (hyper_node,"hcall-instructions" , &len); -if (len %4 ) -return -1 ; -if (len > (4 *4 )) -return -1 ; - -for (i =0 ; i < (len /4 ); i++) -kvm_patch_ins (&(&kvm_hypercall_start)[i], insts[i]); - -return 0 ; -} -static __init void kvm_free_tmp (void ) {unsigned long start, end;
@@ -811,7 +789,7 @@ static int __init kvm_guest_init(void)if (!kvm_para_available ()) goto free_tmp; -if (kvm_para_setup ()) +if (!epapr_paravirt_enabled) goto free_tmp;if (kvm_para_has_feature (KVM_FEATURE_MAGIC_PAGE ))
arch/powerpc/kernel/kvm_emul.S +0 -10
@@ -24,16 +24,6 @@ #include <asm/page.h> #include <asm/asm-offsets.h> -/* Hypercall entry point. Will be patched with device tree instructions. */ - -.global kvm_hypercall_start -kvm_hypercall_start: - li r3, -1 - nop - nop - nop - blr - #define KVM_MAGIC_PAGE (-4096) #ifdef CONFIG_64BIT
arch/powerpc/platforms/Kconfig +9 -0
@@ -25,6 +25,7 @@ source "arch/powerpc/platforms/wsp/Kconfig" config KVM_GUEST bool "KVM Guest support" default n + select EPAPR_PARAVIRT ---help--- This option enables various optimizations for running under the KVM hypervisor. Overhead for the kernel when not running inside KVM should
@@ -32,6 +33,14 @@ config KVM_GUEST In case of doubt, say Y +config EPAPR_PARAVIRT + bool "ePAPR para-virtualization support" + default n + help + Enables ePAPR para-virtualization support for guests. + + In case of doubt, say Y + config PPC_NATIVE bool depends on 6xx || PPC64
Signature · 1 line
1.7.3.4
PATCH v8 2/4 KVM: PPC: epapr: Add idle hcall support for host
In reply to Stuart YoderFrom: Liu Yu-B13201 <[email protected]>
And add a new flag definition in kvm_ppc_pvinfo to indicate whether host support EV_IDLE hcall.
---
-v8: updated hcall instruction for e500mc to be sc 1
arch/powerpc/include/asm/Kbuild | 1 + arch/powerpc/include/asm/kvm_para.h | 14 ++++++++++++-- arch/powerpc/kvm/booke.c | 6 ++++++ arch/powerpc/kvm/powerpc.c | 14 ++++++++++++-- include/linux/kvm.h | 2 ++ 5 files changed, 33 insertions(+), 4 deletions(-)
arch/powerpc/include/asm/Kbuild +1 -0
@@ -34,3 +34,4 @@ header-y += termios.h header-y += types.h header-y += ucontext.h header-y += unistd.h +header-y += epapr_hcalls.h
arch/powerpc/include/asm/kvm_para.h +12 -2
@@ -90,9 +90,19 @@ struct kvm_vcpu_arch_shared { };#define KVM_SC_MAGIC_R0 0x4b564d21/* "KVM!" */ -#define HC_VENDOR_KVM (42 << 16) + +#include <asm/epapr_hcalls.h> + +/* ePAPR Hypercall Vendor ID */ +#define HC_VENDOR_EPAPR (EV_EPAPR_VENDOR_ID << 16) +#define HC_VENDOR_KVM (EV_KVM_VENDOR_ID << 16) + +/* ePAPR Hypercall Token */ +#define HC_EV_IDLE EV_IDLE + +/* ePAPR Hypercall Return Codes */ #define HC_EV_SUCCESS 0 -#define HC_EV_UNIMPLEMENTED 12 +#define HC_EV_UNIMPLEMENTED EV_UNIMPLEMENTED#define KVM_FEATURE_MAGIC_PAGE 1
arch/powerpc/kvm/booke.c +6 -0
@@ -593,6 +593,12 @@ static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcpu)unsigned int priority;if (vcpu->requests) { +/* kvm_vcpu_block() sets KVM_REQ_UNHALT, but it is +* not cleared elsewhere as on x86. Clear it here +* for now, otherwise we never go idle. +*/ +clear_bit (KVM_REQ_UNHALT , &vcpu->requests); +if (kvm_check_request (KVM_REQ_PENDING_TIMER , vcpu)) {smp_mb ();update_timer_ints (vcpu);
arch/powerpc/kvm/powerpc.c +12 -2
@@ -48,8 +48,7 @@ static unsigned int perfmon_refcount;int kvm_arch_vcpu_runnable (struct kvm_vcpu *v) { -bool ret = !(v->arch.shared->msr &MSR_WE ) || - !!(v->arch.pending_exceptions) || +bool ret = !!(v->arch.pending_exceptions) || v->requests;#ifdef CONFIG_BOOKE
@@ -100,6 +99,10 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu)/* Second return value is in r4 */ break ; +case HC_VENDOR_EPAPR |HC_EV_IDLE : + r =HC_EV_SUCCESS ; +kvm_vcpu_block (vcpu); +break ;default : r =HC_EV_UNIMPLEMENTED ;break ;
@@ -888,6 +891,10 @@ out:static int kvm_vm_ioctl_get_pvinfo (struct kvm_ppc_pvinfo *pvinfo) { +#ifdef CONFIG_KVM_BOOKE_HV +u32 inst_sc1 =0x44000022 ; + pvinfo->hcall[0 ] = inst_sc1; +#else u32 inst_lis =0x3c000000 ;u32 inst_ori =0x60000000 ;u32 inst_nop =0x60000000 ;
@@ -907,6 +914,9 @@ static int kvm_vm_ioctl_get_pvinfo(struct kvm_ppc_pvinfo *pvinfo) pvinfo->hcall[1 ] = inst_ori | (KVM_SC_MAGIC_R0 & inst_imm_mask); pvinfo->hcall[2 ] = inst_sc; pvinfo->hcall[3 ] = inst_nop; +#endif + + pvinfo->flags =KVM_PPC_PVINFO_FLAGS_EV_IDLE ;return 0 ; }
include/linux/kvm.h +2 -0
@@ -438,6 +438,8 @@ struct kvm_ppc_pvinfo {__u8 pad[108 ]; }; +#define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0) +#define KVMIO 0xAE/*
Signature · 1 line
1.7.3.4
Re: [PATCH v8 2/4] KVM: PPC: epapr: Add idle hcall support for host
Quoted 12 lines · Stuart Yoder
arch/powerpc/kvm/powerpc.c +4
-0@@ -888,6 +891,10 @@ out:static int kvm_vm_ioctl_get_pvinfo (struct kvm_ppc_pvinfo *pvinfo) { +#ifdef CONFIG_KVM_BOOKE_HV +u32 inst_sc1 =0x44000022 ; + pvinfo->hcall[0 ] = inst_sc1; +#else u32 inst_lis =0x3c000000 ;u32 inst_ori =0x60000000 ;u32 inst_nop =0x60000000 ;
arch/powerpc/kvm/powerpc.c static int kvm_vm_ioctl_get_pvinfo(struct kvm_ppc_pvinfo *pvinfo) · line 917
Quoted 4 lines
arch/powerpc/kvm/powerpc.c +1
-0@@ -907,6 +914,9 @@ static int kvm_vm_ioctl_get_pvinfo(struct kvm_ppc_pvinfo *pvinfo) pvinfo->hcall[1 ] = inst_ori | (KVM_SC_MAGIC_R0 & inst_imm_mask); pvinfo->hcall[2 ] = inst_sc; pvinfo->hcall[3 ] = inst_nop; +#endif
Need to pad the rest of the array with nops.
-Scott
PATCH v8 3/4 KVM: PPC: epapr: install ev_idle hcall for e500 guest
In reply to Stuart YoderFrom: Liu Yu-B13201 <[email protected]>
If the guest hypervisor node contains "has-idle" property.
---
-v8: no changes
arch/powerpc/include/asm/epapr_hcalls.h | 11 ++++++----- arch/powerpc/kernel/epapr_hcalls.S | 27 +++++++++++++++++++++++++++ arch/powerpc/kernel/epapr_paravirt.c | 11 ++++++++++- 3 files changed, 43 insertions(+), 6 deletions(-)
arch/powerpc/include/asm/epapr_hcalls.h +6 -5
@@ -50,10 +50,6 @@#ifndef _EPAPR_HCALLS_H#define _EPAPR_HCALLS_H -#include <linux/types.h> -#include <linux/errno.h> -#include <asm/byteorder.h> -#define EV_BYTE_CHANNEL_SEND 1#define EV_BYTE_CHANNEL_RECEIVE 2#define EV_BYTE_CHANNEL_POLL 3
@@ -108,6 +104,11 @@#define EV_UNIMPLEMENTED 12/* Unimplemented hypercall */ #define EV_BUFFER_OVERFLOW 13/* Caller-supplied buffer too small */ +#ifndef __ASSEMBLY__ +#include <linux/types.h> +#include <linux/errno.h> +#include <asm/byteorder.h> +/* * Hypercall register clobber list *
@@ -500,5 +501,5 @@ static inline unsigned int ev_idle(void)return r3; } - +#endif /* !__ASSEMBLY__ */ #endif
arch/powerpc/kernel/epapr_hcalls.S +27 -0
@@ -8,6 +8,7 @@ */ #include <linux/threads.h> +#include <asm/epapr_hcalls.h> #include <asm/reg.h> #include <asm/page.h> #include <asm/cputable.h>
@@ -15,6 +16,32 @@ #include <asm/ppc_asm.h> #include <asm/asm-offsets.h> +_GLOBAL(epapr_ev_idle) +epapr_ev_idle: + rlwinm r3,r1,0,0,31-THREAD_SHIFT /* current thread_info */ + lwz r4,TI_LOCAL_FLAGS(r3) /* set napping bit */ + ori r4,r4,_TLF_NAPPING /* so when we take an exception */ + stw r4,TI_LOCAL_FLAGS(r3) /* it will return to our caller */ + + wrteei 1 + +idle_loop: + LOAD_REG_IMMEDIATE(r11, EV_HCALL_TOKEN(EV_IDLE)) + +.global epapr_ev_idle_start +epapr_ev_idle_start: + li r3, -1 + nop + nop + nop + + /* + * Guard against spurious wakeups from a hypervisor -- + * only interrupt will cause us to return to LR due to + * _TLF_NAPPING. + */ + b idle_loop + /* Hypercall entry point. Will be patched with device tree instructions. */ .global epapr_hypercall_start epapr_hypercall_start:
arch/powerpc/kernel/epapr_paravirt.c +10 -1
@@ -21,6 +21,10 @@#include <asm/epapr_hcalls.h> #include <asm/cacheflush.h> #include <asm/code-patching.h> +#include <asm/machdep.h> + +extern void epapr_ev_idle (void ); +extern u32 epapr_ev_idle_start[];bool epapr_paravirt_enabled;
@@ -41,8 +45,13 @@ static int __init epapr_paravirt_init(void)if (len %4 || len > (4 *4 ))return -ENODEV ; -for (i =0 ; i < (len /4 ); i++) +for (i =0 ; i < (len /4 ); i++) {patch_instruction (epapr_hypercall_start + i, insts[i]); +patch_instruction (epapr_ev_idle_start + i, insts[i]); + } + +if (of_get_property (hyper_node,"has-idle" ,NULL )) + ppc_md.power_save = epapr_ev_idle; epapr_paravirt_enabled = true;
Signature · 1 line
1.7.3.4
PATCH v8 4/4 KVM: PPC: epapr: Update other hypercall invoking
In reply to Stuart YoderFrom: Liu Yu-B13201 <[email protected]>
Discard the old way that invoke hypercall,
instead, use epapr paravirt.
---
-v8: no changes
arch/powerpc/include/asm/epapr_hcalls.h | 22 +++++++++--------- arch/powerpc/include/asm/fsl_hcalls.h | 36 +++++++++++++++--------------- arch/powerpc/platforms/Kconfig | 1 + drivers/tty/Kconfig | 1 + drivers/virt/Kconfig | 1 + 5 files changed, 32 insertions(+), 29 deletions(-)
arch/powerpc/include/asm/epapr_hcalls.h +11 -11
@@ -189,7 +189,7 @@ static inline unsigned int ev_int_set_config(unsigned int interrupt, r5 = priority; r6 = destination; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"+r" (r4),"+r" (r5),"+r" (r6) : : EV_HCALL_CLOBBERS4 );
@@ -218,7 +218,7 @@ static inline unsigned int ev_int_get_config(unsigned int interrupt, r11 =EV_HCALL_TOKEN (EV_INT_GET_CONFIG ); r3 = interrupt; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"=r" (r4),"=r" (r5),"=r" (r6) : : EV_HCALL_CLOBBERS4 );
@@ -248,7 +248,7 @@ static inline unsigned int ev_int_set_mask(unsigned int interrupt, r3 = interrupt; r4 = mask; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"+r" (r4) : : EV_HCALL_CLOBBERS2 );
@@ -273,7 +273,7 @@ static inline unsigned int ev_int_get_mask(unsigned int interrupt, r11 =EV_HCALL_TOKEN (EV_INT_GET_MASK ); r3 = interrupt; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"=r" (r4) : : EV_HCALL_CLOBBERS2 );
@@ -301,7 +301,7 @@ static inline unsigned int ev_int_eoi(unsigned int interrupt) r11 =EV_HCALL_TOKEN (EV_INT_EOI ); r3 = interrupt; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3) : : EV_HCALL_CLOBBERS1 );
@@ -340,7 +340,7 @@ static inline unsigned int ev_byte_channel_send(unsigned int handle, r7 =be32_to_cpu (p[2 ]); r8 =be32_to_cpu (p[3 ]); - __asm__ __volatile__ ("sc 1" + asm volatile("bl epapr_hypercall_start" : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7), "+r" (r8) : : EV_HCALL_CLOBBERS6
@@ -379,7 +379,7 @@ static inline unsigned int ev_byte_channel_receive(unsigned int handle, r3 = handle; r4 = *count; - __asm__ __volatile__ ("sc 1" + asm volatile("bl epapr_hypercall_start" : "+r" (r11), "+r" (r3), "+r" (r4), "=r" (r5), "=r" (r6), "=r" (r7), "=r" (r8) : : EV_HCALL_CLOBBERS6
@@ -417,7 +417,7 @@ static inline unsigned int ev_byte_channel_poll(unsigned int handle, r11 =EV_HCALL_TOKEN (EV_BYTE_CHANNEL_POLL ); r3 = handle; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"=r" (r4),"=r" (r5) : : EV_HCALL_CLOBBERS3 );
@@ -450,7 +450,7 @@ static inline unsigned int ev_int_iack(unsigned int handle, r11 =EV_HCALL_TOKEN (EV_INT_IACK ); r3 = handle; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"=r" (r4) : : EV_HCALL_CLOBBERS2 );
@@ -474,7 +474,7 @@ static inline unsigned int ev_doorbell_send(unsigned int handle) r11 =EV_HCALL_TOKEN (EV_DOORBELL_SEND ); r3 = handle; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3) : : EV_HCALL_CLOBBERS1 );
@@ -494,7 +494,7 @@ static inline unsigned int ev_idle(void) r11 =EV_HCALL_TOKEN (EV_IDLE ); - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"=r" (r3) : : EV_HCALL_CLOBBERS1 );
arch/powerpc/include/asm/fsl_hcalls.h +18 -18
@@ -96,7 +96,7 @@ static inline unsigned int fh_send_nmi(unsigned int vcpu_mask) r11 =FH_HCALL_TOKEN (FH_SEND_NMI ); r3 = vcpu_mask; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3) : : EV_HCALL_CLOBBERS1 );
@@ -151,7 +151,7 @@ static inline unsigned int fh_partition_get_dtprop(int handle, r9 = (uint32_t )propvalue_addr; r10 = *propvalue_len; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"+r" (r4),"+r" (r5),"+r" (r6),"+r" (r7), "+r" (r8), "+r" (r9), "+r" (r10)
@@ -205,7 +205,7 @@ static inline unsigned int fh_partition_set_dtprop(int handle, r9 = (uint32_t )propvalue_addr; r10 = propvalue_len; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"+r" (r4),"+r" (r5),"+r" (r6),"+r" (r7), "+r" (r8), "+r" (r9), "+r" (r10)
@@ -229,7 +229,7 @@ static inline unsigned int fh_partition_restart(unsigned int partition) r11 =FH_HCALL_TOKEN (FH_PARTITION_RESTART ); r3 = partition; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3) : : EV_HCALL_CLOBBERS1 );
@@ -262,7 +262,7 @@ static inline unsigned int fh_partition_get_status(unsigned int partition, r11 =FH_HCALL_TOKEN (FH_PARTITION_GET_STATUS ); r3 = partition; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"=r" (r4) : : EV_HCALL_CLOBBERS2 );
@@ -295,7 +295,7 @@ static inline unsigned int fh_partition_start(unsigned int partition, r4 = entry_point; r5 = load; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"+r" (r4),"+r" (r5) : : EV_HCALL_CLOBBERS3 );
@@ -317,7 +317,7 @@ static inline unsigned int fh_partition_stop(unsigned int partition) r11 =FH_HCALL_TOKEN (FH_PARTITION_STOP ); r3 = partition; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3) : : EV_HCALL_CLOBBERS1 );
@@ -376,7 +376,7 @@ static inline unsigned int fh_partition_memcpy(unsigned int source,#endif r7 = count; - __asm__ __volatile__ ("sc 1" + asm volatile("bl epapr_hypercall_start" : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7) : : EV_HCALL_CLOBBERS5
@@ -399,7 +399,7 @@ static inline unsigned int fh_dma_enable(unsigned int liodn) r11 =FH_HCALL_TOKEN (FH_DMA_ENABLE ); r3 = liodn; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3) : : EV_HCALL_CLOBBERS1 );
@@ -421,7 +421,7 @@ static inline unsigned int fh_dma_disable(unsigned int liodn) r11 =FH_HCALL_TOKEN (FH_DMA_DISABLE ); r3 = liodn; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3) : : EV_HCALL_CLOBBERS1 );
@@ -447,7 +447,7 @@ static inline unsigned int fh_vmpic_get_msir(unsigned int interrupt, r11 =FH_HCALL_TOKEN (FH_VMPIC_GET_MSIR ); r3 = interrupt; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"=r" (r4) : : EV_HCALL_CLOBBERS2 );
@@ -469,7 +469,7 @@ static inline unsigned int fh_system_reset(void) r11 =FH_HCALL_TOKEN (FH_SYSTEM_RESET ); - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"=r" (r3) : : EV_HCALL_CLOBBERS1 );
@@ -506,7 +506,7 @@ static inline unsigned int fh_err_get_info(int queue, uint32_t *bufsize, r6 = addr_lo; r7 = peek; - __asm__ __volatile__ ("sc 1" + asm volatile("bl epapr_hypercall_start" : "+r" (r11), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7) : : EV_HCALL_CLOBBERS5
@@ -542,7 +542,7 @@ static inline unsigned int fh_get_core_state(unsigned int handle, r3 = handle; r4 = vcpu; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"+r" (r4) : : EV_HCALL_CLOBBERS2 );
@@ -572,7 +572,7 @@ static inline unsigned int fh_enter_nap(unsigned int handle, unsigned int vcpu) r3 = handle; r4 = vcpu; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"+r" (r4) : : EV_HCALL_CLOBBERS2 );
@@ -597,7 +597,7 @@ static inline unsigned int fh_exit_nap(unsigned int handle, unsigned int vcpu) r3 = handle; r4 = vcpu; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3),"+r" (r4) : : EV_HCALL_CLOBBERS2 );
@@ -618,7 +618,7 @@ static inline unsigned int fh_claim_device(unsigned int handle) r11 =FH_HCALL_TOKEN (FH_CLAIM_DEVICE ); r3 = handle; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3) : : EV_HCALL_CLOBBERS1 );
@@ -645,7 +645,7 @@ static inline unsigned int fh_partition_stop_dma(unsigned int handle) r11 =FH_HCALL_TOKEN (FH_PARTITION_STOP_DMA ); r3 = handle; - __asm__ __volatile__ ("sc 1" + asmvolatile ("bl epapr_hypercall_start" :"+r" (r11),"+r" (r3) : : EV_HCALL_CLOBBERS1 );
arch/powerpc/platforms/Kconfig +1 -0
@@ -90,6 +90,7 @@ config MPIC config PPC_EPAPR_HV_PIC bool default n + select EPAPR_PARAVIRT config MPIC_WEIRD bool
drivers/tty/Kconfig +1 -0
@@ -354,6 +354,7 @@ config TRACE_SINK config PPC_EPAPR_HV_BYTECHAN tristate "ePAPR hypervisor byte channel driver" depends on PPC + select EPAPR_PARAVIRT help This driver creates /dev entries for each ePAPR hypervisor byte channel, thereby allowing applications to communicate with byte
drivers/virt/Kconfig +1 -0
@@ -15,6 +15,7 @@ if VIRT_DRIVERS config FSL_HV_MANAGER tristate "Freescale hypervisor management driver" depends on FSL_SOC + select EPAPR_PARAVIRT help The Freescale hypervisor management driver provides several services to drivers and applications related to the Freescale hypervisor:
Signature · 1 line
1.7.3.4