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
Kirill Smelkov
linux
Commits
708da3ff
Commit
708da3ff
authored
Dec 15, 2021
by
Michael Ellerman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/ppc-kvm' into next
Bring in some more KVM commits from our KVM topic branch.
parents
b149d5d4
63fa47ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv.c
+9
-4
arch/powerpc/kvm/book3s_hv_nested.c
arch/powerpc/kvm/book3s_hv_nested.c
+1
-1
arch/powerpc/kvm/book3s_hv_p9_entry.c
arch/powerpc/kvm/book3s_hv_p9_entry.c
+3
-10
No files found.
arch/powerpc/kvm/book3s_hv.c
View file @
708da3ff
...
...
@@ -4442,6 +4442,7 @@ static int kvmppc_run_vcpu(struct kvm_vcpu *vcpu)
int
kvmhv_run_single_vcpu
(
struct
kvm_vcpu
*
vcpu
,
u64
time_limit
,
unsigned
long
lpcr
)
{
struct
rcuwait
*
wait
=
kvm_arch_vcpu_get_wait
(
vcpu
);
struct
kvm_run
*
run
=
vcpu
->
run
;
int
trap
,
r
,
pcpu
;
int
srcu_idx
;
...
...
@@ -4588,7 +4589,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,
if
(
is_kvmppc_resume_guest
(
r
)
&&
!
kvmppc_vcpu_check_block
(
vcpu
))
{
kvmppc_set_timer
(
vcpu
);
prepare_to_rcuwait
(
&
vcpu
->
wait
);
prepare_to_rcuwait
(
wait
);
for
(;;)
{
set_current_state
(
TASK_INTERRUPTIBLE
);
if
(
signal_pending
(
current
))
{
...
...
@@ -4605,7 +4606,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,
schedule
();
trace_kvmppc_vcore_blocked
(
vc
,
1
);
}
finish_rcuwait
(
&
vcpu
->
wait
);
finish_rcuwait
(
wait
);
}
vcpu
->
arch
.
ceded
=
0
;
...
...
@@ -4872,8 +4873,12 @@ static int kvmppc_core_prepare_memory_region_hv(struct kvm *kvm,
unsigned
long
npages
=
mem
->
memory_size
>>
PAGE_SHIFT
;
if
(
change
==
KVM_MR_CREATE
)
{
slot
->
arch
.
rmap
=
vzalloc
(
array_size
(
npages
,
sizeof
(
*
slot
->
arch
.
rmap
)));
unsigned
long
size
=
array_size
(
npages
,
sizeof
(
*
slot
->
arch
.
rmap
));
if
((
size
>>
PAGE_SHIFT
)
>
totalram_pages
())
return
-
ENOMEM
;
slot
->
arch
.
rmap
=
vzalloc
(
size
);
if
(
!
slot
->
arch
.
rmap
)
return
-
ENOMEM
;
}
...
...
arch/powerpc/kvm/book3s_hv_nested.c
View file @
708da3ff
...
...
@@ -580,7 +580,7 @@ long kvmhv_copy_tofrom_guest_nested(struct kvm_vcpu *vcpu)
if
(
eaddr
&
(
0xFFFUL
<<
52
))
return
H_PARAMETER
;
buf
=
kzalloc
(
n
,
GFP_KERNEL
);
buf
=
kzalloc
(
n
,
GFP_KERNEL
|
__GFP_NOWARN
);
if
(
!
buf
)
return
H_NO_MEM
;
...
...
arch/powerpc/kvm/book3s_hv_p9_entry.c
View file @
708da3ff
...
...
@@ -768,7 +768,6 @@ int kvmhv_vcpu_entry_p9(struct kvm_vcpu *vcpu, u64 time_limit, unsigned long lpc
s64
hdec
,
dec
;
u64
purr
,
spurr
;
u64
*
exsave
;
bool
ri_set
;
int
trap
;
unsigned
long
msr
;
unsigned
long
host_hfscr
;
...
...
@@ -968,18 +967,12 @@ int kvmhv_vcpu_entry_p9(struct kvm_vcpu *vcpu, u64 time_limit, unsigned long lpc
/* 0x2 bit for HSRR is only used by PR and P7/8 HV paths, clear it */
trap
=
local_paca
->
kvm_hstate
.
scratch0
&
~
0x2
;
/* HSRR interrupts leave MSR[RI] unchanged, SRR interrupts clear it. */
ri_set
=
false
;
if
(
likely
(
trap
>
BOOK3S_INTERRUPT_MACHINE_CHECK
))
{
if
(
trap
!=
BOOK3S_INTERRUPT_SYSCALL
&&
(
vcpu
->
arch
.
shregs
.
msr
&
MSR_RI
))
ri_set
=
true
;
if
(
likely
(
trap
>
BOOK3S_INTERRUPT_MACHINE_CHECK
))
exsave
=
local_paca
->
exgen
;
}
else
if
(
trap
==
BOOK3S_INTERRUPT_SYSTEM_RESET
)
{
else
if
(
trap
==
BOOK3S_INTERRUPT_SYSTEM_RESET
)
exsave
=
local_paca
->
exnmi
;
}
else
{
/* trap == 0x200 */
else
/* trap == 0x200 */
exsave
=
local_paca
->
exmc
;
}
vcpu
->
arch
.
regs
.
gpr
[
1
]
=
local_paca
->
kvm_hstate
.
scratch1
;
vcpu
->
arch
.
regs
.
gpr
[
3
]
=
local_paca
->
kvm_hstate
.
scratch2
;
...
...
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