Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
da91747c
Commit
da91747c
authored
Dec 28, 2013
by
Marc Zyngier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'kvm-arm64/for-3.14' into kvm-arm64/next
parents
60dd133a
e5cf9dcd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
18 deletions
+41
-18
arch/arm64/include/asm/kvm_host.h
arch/arm64/include/asm/kvm_host.h
+6
-1
arch/arm64/include/uapi/asm/kvm.h
arch/arm64/include/uapi/asm/kvm.h
+2
-1
arch/arm64/kvm/Kconfig
arch/arm64/kvm/Kconfig
+11
-0
arch/arm64/kvm/guest.c
arch/arm64/kvm/guest.c
+19
-13
arch/arm64/kvm/handle_exit.c
arch/arm64/kvm/handle_exit.c
+0
-3
arch/arm64/kvm/sys_regs_generic_v8.c
arch/arm64/kvm/sys_regs_generic_v8.c
+3
-0
No files found.
arch/arm64/include/asm/kvm_host.h
View file @
da91747c
...
@@ -26,7 +26,12 @@
...
@@ -26,7 +26,12 @@
#include <asm/kvm_asm.h>
#include <asm/kvm_asm.h>
#include <asm/kvm_mmio.h>
#include <asm/kvm_mmio.h>
#define KVM_MAX_VCPUS 4
#if defined(CONFIG_KVM_ARM_MAX_VCPUS)
#define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS
#else
#define KVM_MAX_VCPUS 0
#endif
#define KVM_USER_MEM_SLOTS 32
#define KVM_USER_MEM_SLOTS 32
#define KVM_PRIVATE_MEM_SLOTS 4
#define KVM_PRIVATE_MEM_SLOTS 4
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
...
...
arch/arm64/include/uapi/asm/kvm.h
View file @
da91747c
...
@@ -55,8 +55,9 @@ struct kvm_regs {
...
@@ -55,8 +55,9 @@ struct kvm_regs {
#define KVM_ARM_TARGET_AEM_V8 0
#define KVM_ARM_TARGET_AEM_V8 0
#define KVM_ARM_TARGET_FOUNDATION_V8 1
#define KVM_ARM_TARGET_FOUNDATION_V8 1
#define KVM_ARM_TARGET_CORTEX_A57 2
#define KVM_ARM_TARGET_CORTEX_A57 2
#define KVM_ARM_TARGET_XGENE_POTENZA 3
#define KVM_ARM_NUM_TARGETS
3
#define KVM_ARM_NUM_TARGETS
4
/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */
/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */
#define KVM_ARM_DEVICE_TYPE_SHIFT 0
#define KVM_ARM_DEVICE_TYPE_SHIFT 0
...
...
arch/arm64/kvm/Kconfig
View file @
da91747c
...
@@ -36,6 +36,17 @@ config KVM_ARM_HOST
...
@@ -36,6 +36,17 @@ config KVM_ARM_HOST
---help---
---help---
Provides host support for ARM processors.
Provides host support for ARM processors.
config KVM_ARM_MAX_VCPUS
int "Number maximum supported virtual CPUs per VM"
depends on KVM_ARM_HOST
default 4
help
Static number of max supported virtual CPUs per VM.
If you choose a high number, the vcpu structures will be quite
large, so only choose a reasonable number that you expect to
actually use.
config KVM_ARM_VGIC
config KVM_ARM_VGIC
bool
bool
depends on KVM_ARM_HOST && OF
depends on KVM_ARM_HOST && OF
...
...
arch/arm64/kvm/guest.c
View file @
da91747c
...
@@ -207,20 +207,26 @@ int __attribute_const__ kvm_target_cpu(void)
...
@@ -207,20 +207,26 @@ int __attribute_const__ kvm_target_cpu(void)
unsigned
long
implementor
=
read_cpuid_implementor
();
unsigned
long
implementor
=
read_cpuid_implementor
();
unsigned
long
part_number
=
read_cpuid_part_number
();
unsigned
long
part_number
=
read_cpuid_part_number
();
if
(
implementor
!=
ARM_CPU_IMP_ARM
)
switch
(
implementor
)
{
return
-
EINVAL
;
case
ARM_CPU_IMP_ARM
:
switch
(
part_number
)
{
switch
(
part_number
)
{
case
ARM_CPU_PART_AEM_V8
:
case
ARM_CPU_PART_AEM_V8
:
return
KVM_ARM_TARGET_AEM_V8
;
return
KVM_ARM_TARGET_AEM_V8
;
case
ARM_CPU_PART_FOUNDATION
:
case
ARM_CPU_PART_FOUNDATION
:
return
KVM_ARM_TARGET_FOUNDATION_V8
;
return
KVM_ARM_TARGET_FOUNDATION_V8
;
case
ARM_CPU_PART_CORTEX_A57
:
case
ARM_CPU_PART_CORTEX_A57
:
/* Currently handled by the generic backend */
return
KVM_ARM_TARGET_CORTEX_A57
;
return
KVM_ARM_TARGET_CORTEX_A57
;
default:
};
break
;
case
ARM_CPU_IMP_APM
:
switch
(
part_number
)
{
case
APM_CPU_PART_POTENZA
:
return
KVM_ARM_TARGET_XGENE_POTENZA
;
};
break
;
};
return
-
EINVAL
;
return
-
EINVAL
;
}
}
}
int
kvm_vcpu_set_target
(
struct
kvm_vcpu
*
vcpu
,
int
kvm_vcpu_set_target
(
struct
kvm_vcpu
*
vcpu
,
...
...
arch/arm64/kvm/handle_exit.c
View file @
da91747c
...
@@ -39,9 +39,6 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
...
@@ -39,9 +39,6 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
static
int
handle_smc
(
struct
kvm_vcpu
*
vcpu
,
struct
kvm_run
*
run
)
static
int
handle_smc
(
struct
kvm_vcpu
*
vcpu
,
struct
kvm_run
*
run
)
{
{
if
(
kvm_psci_call
(
vcpu
))
return
1
;
kvm_inject_undefined
(
vcpu
);
kvm_inject_undefined
(
vcpu
);
return
1
;
return
1
;
}
}
...
...
arch/arm64/kvm/sys_regs_generic_v8.c
View file @
da91747c
...
@@ -90,6 +90,9 @@ static int __init sys_reg_genericv8_init(void)
...
@@ -90,6 +90,9 @@ static int __init sys_reg_genericv8_init(void)
&
genericv8_target_table
);
&
genericv8_target_table
);
kvm_register_target_sys_reg_table
(
KVM_ARM_TARGET_CORTEX_A57
,
kvm_register_target_sys_reg_table
(
KVM_ARM_TARGET_CORTEX_A57
,
&
genericv8_target_table
);
&
genericv8_target_table
);
kvm_register_target_sys_reg_table
(
KVM_ARM_TARGET_XGENE_POTENZA
,
&
genericv8_target_table
);
return
0
;
return
0
;
}
}
late_initcall
(
sys_reg_genericv8_init
);
late_initcall
(
sys_reg_genericv8_init
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment