Release 4.14 arch/s390/include/asm/kvm_para.h
/*
* definition for paravirtual devices on s390
*
* Copyright IBM Corp. 2008
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2 only)
* as published by the Free Software Foundation.
*
* Author(s): Christian Borntraeger <borntraeger@de.ibm.com>
*/
/*
* Hypercalls for KVM on s390. The calling convention is similar to the
* s390 ABI, so we use R2-R6 for parameters 1-5. In addition we use R1
* as hypercall number and R7 as parameter 6. The return value is
* written to R2. We use the diagnose instruction as hypercall. To avoid
* conflicts with existing diagnoses for LPAR and z/VM, we do not use
* the instruction encoded number, but specify the number in R1 and
* use 0x500 as KVM hypercall
*
* Copyright IBM Corp. 2007,2008
* Author(s): Christian Borntraeger <borntraeger@de.ibm.com>
*
* This work is licensed under the terms of the GNU GPL, version 2.
*/
#ifndef __S390_KVM_PARA_H
#define __S390_KVM_PARA_H
#include <uapi/asm/kvm_para.h>
#include <asm/diag.h>
static inline long __kvm_hypercall0(unsigned long nr)
{
register unsigned long __nr asm("1") = nr;
register long __rc asm("2");
asm volatile ("diag 2,4,0x500\n"
: "=d" (__rc) : "d" (__nr): "memory", "cc");
return __rc;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christian Bornträger | 35 | 97.22% | 1 | 50.00% |
Martin Schwidefsky | 1 | 2.78% | 1 | 50.00% |
Total | 36 | 100.00% | 2 | 100.00% |
static inline long kvm_hypercall0(unsigned long nr)
{
diag_stat_inc(DIAG_STAT_X500);
return __kvm_hypercall0(nr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Martin Schwidefsky | 19 | 86.36% | 1 | 50.00% |
Christian Bornträger | 3 | 13.64% | 1 | 50.00% |
Total | 22 | 100.00% | 2 | 100.00% |
static inline long __kvm_hypercall1(unsigned long nr, unsigned long p1)
{
register unsigned long __nr asm("1") = nr;
register unsigned long __p1 asm("2") = p1;
register long __rc asm("2");
asm volatile ("diag 2,4,0x500\n"
: "=d" (__rc) : "d" (__nr), "0" (__p1) : "memory", "cc");
return __rc;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christian Bornträger | 47 | 92.16% | 1 | 50.00% |
Martin Schwidefsky | 4 | 7.84% | 1 | 50.00% |
Total | 51 | 100.00% | 2 | 100.00% |
static inline long kvm_hypercall1(unsigned long nr, unsigned long p1)
{
diag_stat_inc(DIAG_STAT_X500);
return __kvm_hypercall1(nr, p1);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Martin Schwidefsky | 25 | 89.29% | 1 | 50.00% |
Christian Bornträger | 3 | 10.71% | 1 | 50.00% |
Total | 28 | 100.00% | 2 | 100.00% |
static inline long __kvm_hypercall2(unsigned long nr, unsigned long p1,
unsigned long p2)
{
register unsigned long __nr asm("1") = nr;
register unsigned long __p1 asm("2") = p1;
register unsigned long __p2 asm("3") = p2;
register long __rc asm("2");
asm volatile ("diag 2,4,0x500\n"
: "=d" (__rc) : "d" (__nr), "0" (__p1), "d" (__p2)
: "memory", "cc");
return __rc;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christian Bornträger | 62 | 93.94% | 1 | 50.00% |
Martin Schwidefsky | 4 | 6.06% | 1 | 50.00% |
Total | 66 | 100.00% | 2 | 100.00% |
static inline long kvm_hypercall2(unsigned long nr, unsigned long p1,
unsigned long p2)
{
diag_stat_inc(DIAG_STAT_X500);
return __kvm_hypercall2(nr, p1, p2);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Martin Schwidefsky | 31 | 91.18% | 1 | 50.00% |
Christian Bornträger | 3 | 8.82% | 1 | 50.00% |
Total | 34 | 100.00% | 2 | 100.00% |
static inline long __kvm_hypercall3(unsigned long nr, unsigned long p1,
unsigned long p2, unsigned long p3)
{
register unsigned long __nr asm("1") = nr;
register unsigned long __p1 asm("2") = p1;
register unsigned long __p2 asm("3") = p2;
register unsigned long __p3 asm("4") = p3;
register long __rc asm("2");
asm volatile ("diag 2,4,0x500\n"
: "=d" (__rc) : "d" (__nr), "0" (__p1), "d" (__p2),
"d" (__p3) : "memory", "cc");
return __rc;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christian Bornträger | 77 | 95.06% | 1 | 50.00% |
Martin Schwidefsky | 4 | 4.94% | 1 | 50.00% |
Total | 81 | 100.00% | 2 | 100.00% |
static inline long kvm_hypercall3(unsigned long nr, unsigned long p1,
unsigned long p2, unsigned long p3)
{
diag_stat_inc(DIAG_STAT_X500);
return __kvm_hypercall3(nr, p1, p2, p3);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Martin Schwidefsky | 37 | 92.50% | 1 | 50.00% |
Christian Bornträger | 3 | 7.50% | 1 | 50.00% |
Total | 40 | 100.00% | 2 | 100.00% |
static inline long __kvm_hypercall4(unsigned long nr, unsigned long p1,
unsigned long p2, unsigned long p3,
unsigned long p4)
{
register unsigned long __nr asm("1") = nr;
register unsigned long __p1 asm("2") = p1;
register unsigned long __p2 asm("3") = p2;
register unsigned long __p3 asm("4") = p3;
register unsigned long __p4 asm("5") = p4;
register long __rc asm("2");
asm volatile ("diag 2,4,0x500\n"
: "=d" (__rc) : "d" (__nr), "0" (__p1), "d" (__p2),
"d" (__p3), "d" (__p4) : "memory", "cc");
return __rc;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christian Bornträger | 92 | 95.83% | 1 | 50.00% |
Martin Schwidefsky | 4 | 4.17% | 1 | 50.00% |
Total | 96 | 100.00% | 2 | 100.00% |
static inline long kvm_hypercall4(unsigned long nr, unsigned long p1,
unsigned long p2, unsigned long p3,
unsigned long p4)
{
diag_stat_inc(DIAG_STAT_X500);
return __kvm_hypercall4(nr, p1, p2, p3, p4);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Martin Schwidefsky | 43 | 93.48% | 1 | 50.00% |
Christian Bornträger | 3 | 6.52% | 1 | 50.00% |
Total | 46 | 100.00% | 2 | 100.00% |
static inline long __kvm_hypercall5(unsigned long nr, unsigned long p1,
unsigned long p2, unsigned long p3,
unsigned long p4, unsigned long p5)
{
register unsigned long __nr asm("1") = nr;
register unsigned long __p1 asm("2") = p1;
register unsigned long __p2 asm("3") = p2;
register unsigned long __p3 asm("4") = p3;
register unsigned long __p4 asm("5") = p4;
register unsigned long __p5 asm("6") = p5;
register long __rc asm("2");
asm volatile ("diag 2,4,0x500\n"
: "=d" (__rc) : "d" (__nr), "0" (__p1), "d" (__p2),
"d" (__p3), "d" (__p4), "d" (__p5) : "memory", "cc");
return __rc;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christian Bornträger | 107 | 96.40% | 1 | 50.00% |
Martin Schwidefsky | 4 | 3.60% | 1 | 50.00% |
Total | 111 | 100.00% | 2 | 100.00% |
static inline long kvm_hypercall5(unsigned long nr, unsigned long p1,
unsigned long p2, unsigned long p3,
unsigned long p4, unsigned long p5)
{
diag_stat_inc(DIAG_STAT_X500);
return __kvm_hypercall5(nr, p1, p2, p3, p4, p5);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Martin Schwidefsky | 49 | 94.23% | 1 | 50.00% |
Christian Bornträger | 3 | 5.77% | 1 | 50.00% |
Total | 52 | 100.00% | 2 | 100.00% |
static inline long __kvm_hypercall6(unsigned long nr, unsigned long p1,
unsigned long p2, unsigned long p3,
unsigned long p4, unsigned long p5,
unsigned long p6)
{
register unsigned long __nr asm("1") = nr;
register unsigned long __p1 asm("2") = p1;
register unsigned long __p2 asm("3") = p2;
register unsigned long __p3 asm("4") = p3;
register unsigned long __p4 asm("5") = p4;
register unsigned long __p5 asm("6") = p5;
register unsigned long __p6 asm("7") = p6;
register long __rc asm("2");
asm volatile ("diag 2,4,0x500\n"
: "=d" (__rc) : "d" (__nr), "0" (__p1), "d" (__p2),
"d" (__p3), "d" (__p4), "d" (__p5), "d" (__p6)
: "memory", "cc");
return __rc;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christian Bornträger | 122 | 96.83% | 1 | 50.00% |
Martin Schwidefsky | 4 | 3.17% | 1 | 50.00% |
Total | 126 | 100.00% | 2 | 100.00% |
static inline long kvm_hypercall6(unsigned long nr, unsigned long p1,
unsigned long p2, unsigned long p3,
unsigned long p4, unsigned long p5,
unsigned long p6)
{
diag_stat_inc(DIAG_STAT_X500);
return __kvm_hypercall6(nr, p1, p2, p3, p4, p5, p6);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Martin Schwidefsky | 58 | 100.00% | 1 | 100.00% |
Total | 58 | 100.00% | 1 | 100.00% |
/* kvm on s390 is always paravirtualization enabled */
static inline int kvm_para_available(void)
{
return 1;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Heiko Carstens | 11 | 91.67% | 1 | 50.00% |
Christian Bornträger | 1 | 8.33% | 1 | 50.00% |
Total | 12 | 100.00% | 2 | 100.00% |
/* No feature bits are currently assigned for kvm on s390 */
static inline unsigned int kvm_arch_para_features(void)
{
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Heiko Carstens | 13 | 100.00% | 1 | 100.00% |
Total | 13 | 100.00% | 1 | 100.00% |
static inline bool kvm_check_and_clear_guest_paused(void)
{
return false;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Eric B Munson | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.00% |
#endif /* __S390_KVM_PARA_H */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christian Bornträger | 563 | 62.35% | 1 | 16.67% |
Martin Schwidefsky | 290 | 32.12% | 1 | 16.67% |
Heiko Carstens | 34 | 3.77% | 2 | 33.33% |
Eric B Munson | 12 | 1.33% | 1 | 16.67% |
David Howells | 4 | 0.44% | 1 | 16.67% |
Total | 903 | 100.00% | 6 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.