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
9a04b0fe
Commit
9a04b0fe
authored
Nov 30, 2022
by
Michael Ellerman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/ppc-kvm' into next
Merge our KVM topic branch.
parents
a9ffb8ee
6c645b01
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
22 deletions
+26
-22
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/include/asm/kvm_ppc.h
+12
-0
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_64_mmu_hv.c
+3
-4
arch/powerpc/kvm/book3s_64_vio.c
arch/powerpc/kvm/book3s_64_vio.c
+3
-3
arch/powerpc/kvm/book3s_hv_uvmem.c
arch/powerpc/kvm/book3s_hv_uvmem.c
+2
-3
arch/powerpc/kvm/book3s_xive.c
arch/powerpc/kvm/book3s_xive.c
+3
-3
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/booke.c
+3
-0
arch/powerpc/kvm/bookehv_interrupts.S
arch/powerpc/kvm/bookehv_interrupts.S
+0
-9
No files found.
arch/powerpc/include/asm/kvm_ppc.h
View file @
9a04b0fe
...
...
@@ -1014,6 +1014,18 @@ static inline void kvmppc_fix_ee_before_entry(void)
#endif
}
static
inline
void
kvmppc_fix_ee_after_exit
(
void
)
{
#ifdef CONFIG_PPC64
/* Only need to enable IRQs by hard enabling them after this */
local_paca
->
irq_happened
=
PACA_IRQ_HARD_DIS
;
irq_soft_mask_set
(
IRQS_ALL_DISABLED
);
#endif
trace_hardirqs_off
();
}
static
inline
ulong
kvmppc_get_ea_indexed
(
struct
kvm_vcpu
*
vcpu
,
int
ra
,
int
rb
)
{
ulong
ea
;
...
...
arch/powerpc/kvm/book3s_64_mmu_hv.c
View file @
9a04b0fe
...
...
@@ -1202,7 +1202,7 @@ static int resize_hpt_allocate(struct kvm_resize_hpt *resize)
if
(
rc
<
0
)
return
rc
;
resize_hpt_debug
(
resize
,
"
resize_hpt_allocate(): HPT @ 0x%lx
\n
"
,
resize_hpt_debug
(
resize
,
"
%s(): HPT @ 0x%lx
\n
"
,
__func__
,
resize
->
hpt
.
virt
);
return
0
;
...
...
@@ -1443,7 +1443,7 @@ static void resize_hpt_prepare_work(struct work_struct *work)
*/
mutex_unlock
(
&
kvm
->
arch
.
mmu_setup_lock
);
resize_hpt_debug
(
resize
,
"
resize_hpt_prepare_work(): order = %d
\n
"
,
resize_hpt_debug
(
resize
,
"
%s(): order = %d
\n
"
,
__func__
,
resize
->
order
);
err
=
resize_hpt_allocate
(
resize
);
...
...
@@ -1887,8 +1887,7 @@ static ssize_t kvm_htab_write(struct file *file, const char __user *buf,
ret
=
kvmppc_virtmode_do_h_enter
(
kvm
,
H_EXACT
,
i
,
v
,
r
,
tmp
);
if
(
ret
!=
H_SUCCESS
)
{
pr_err
(
"kvm_htab_write ret %ld i=%ld v=%lx "
"r=%lx
\n
"
,
ret
,
i
,
v
,
r
);
pr_err
(
"%s ret %ld i=%ld v=%lx r=%lx
\n
"
,
__func__
,
ret
,
i
,
v
,
r
);
goto
out
;
}
if
(
!
mmu_ready
&&
is_vrma_hpte
(
v
))
{
...
...
arch/powerpc/kvm/book3s_64_vio.c
View file @
9a04b0fe
...
...
@@ -294,14 +294,14 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
struct
kvmppc_spapr_tce_table
*
stt
=
NULL
;
struct
kvmppc_spapr_tce_table
*
siter
;
struct
mm_struct
*
mm
=
kvm
->
mm
;
unsigned
long
npages
,
size
=
args
->
size
;
unsigned
long
npages
;
int
ret
;
if
(
!
args
->
size
||
args
->
page_shift
<
12
||
args
->
page_shift
>
34
||
(
args
->
offset
+
args
->
size
>
(
ULLONG_MAX
>>
args
->
page_shift
)))
return
-
EINVAL
;
npages
=
kvmppc_tce_pages
(
size
);
npages
=
kvmppc_tce_pages
(
args
->
size
);
ret
=
account_locked_vm
(
mm
,
kvmppc_stt_pages
(
npages
),
true
);
if
(
ret
)
return
ret
;
...
...
@@ -314,7 +314,7 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
stt
->
liobn
=
args
->
liobn
;
stt
->
page_shift
=
args
->
page_shift
;
stt
->
offset
=
args
->
offset
;
stt
->
size
=
size
;
stt
->
size
=
args
->
size
;
stt
->
kvm
=
kvm
;
mutex_init
(
&
stt
->
alloc_lock
);
INIT_LIST_HEAD_RCU
(
&
stt
->
iommu_tables
);
...
...
arch/powerpc/kvm/book3s_hv_uvmem.c
View file @
9a04b0fe
...
...
@@ -1190,8 +1190,7 @@ int kvmppc_uvmem_init(void)
pfn_first
=
res
->
start
>>
PAGE_SHIFT
;
pfn_last
=
pfn_first
+
(
resource_size
(
res
)
>>
PAGE_SHIFT
);
kvmppc_uvmem_bitmap
=
kcalloc
(
BITS_TO_LONGS
(
pfn_last
-
pfn_first
),
sizeof
(
unsigned
long
),
GFP_KERNEL
);
kvmppc_uvmem_bitmap
=
bitmap_zalloc
(
pfn_last
-
pfn_first
,
GFP_KERNEL
);
if
(
!
kvmppc_uvmem_bitmap
)
{
ret
=
-
ENOMEM
;
goto
out_unmap
;
...
...
@@ -1215,5 +1214,5 @@ void kvmppc_uvmem_free(void)
memunmap_pages
(
&
kvmppc_uvmem_pgmap
);
release_mem_region
(
kvmppc_uvmem_pgmap
.
range
.
start
,
range_len
(
&
kvmppc_uvmem_pgmap
.
range
));
k
free
(
kvmppc_uvmem_bitmap
);
bitmap_
free
(
kvmppc_uvmem_bitmap
);
}
arch/powerpc/kvm/book3s_xive.c
View file @
9a04b0fe
...
...
@@ -539,7 +539,7 @@ static int xive_vm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr)
if
(
irq
==
XICS_IPI
||
irq
==
0
)
{
/*
* This barrier orders the setting of xc->cppr vs.
* subsquent test of xc->mfrr done inside
* subs
e
quent test of xc->mfrr done inside
* scan_interrupts and push_pending_to_hw
*/
smp_mb
();
...
...
@@ -563,7 +563,7 @@ static int xive_vm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr)
/*
* This barrier orders both setting of in_eoi above vs,
* subsequent test of guest_priority, and the setting
* of xc->cppr vs. subsquent test of xc->mfrr done inside
* of xc->cppr vs. subs
e
quent test of xc->mfrr done inside
* scan_interrupts and push_pending_to_hw
*/
smp_mb
();
...
...
@@ -2390,7 +2390,7 @@ static int xive_set_source(struct kvmppc_xive *xive, long irq, u64 addr)
/*
* Now, we select a target if we have one. If we don't we
* leave the interrupt untargetted. It means that an interrupt
* can become "untargetted" ac
c
ross migration if it was masked
* can become "untargetted" across migration if it was masked
* by set_xive() but there is little we can do about it.
*/
...
...
arch/powerpc/kvm/booke.c
View file @
9a04b0fe
...
...
@@ -1015,6 +1015,9 @@ int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr)
u32
last_inst
=
KVM_INST_FETCH_FAILED
;
enum
emulation_result
emulated
=
EMULATE_DONE
;
/* Fix irq state (pairs with kvmppc_fix_ee_before_entry()) */
kvmppc_fix_ee_after_exit
();
/* update before a new last_exit_type is rewritten */
kvmppc_update_timing_stats
(
vcpu
);
...
...
arch/powerpc/kvm/bookehv_interrupts.S
View file @
9a04b0fe
...
...
@@ -424,15 +424,6 @@ _GLOBAL(kvmppc_resume_host)
mtspr
SPRN_EPCR
,
r3
isync
#ifdef CONFIG_64BIT
/
*
*
We
enter
with
interrupts
disabled
in
hardware
,
but
*
we
need
to
call
RECONCILE_IRQ_STATE
to
ensure
*
that
the
software
state
is
kept
in
sync
.
*/
RECONCILE_IRQ_STATE
(
r3
,
r5
)
#endif
/
*
Switch
to
kernel
stack
and
jump
to
handler
.
*/
mr
r3
,
r4
mr
r5
,
r14
/*
intno
*/
...
...
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