diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2011-09-20 11:07:28 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2011-09-20 11:07:34 -0400 |
commit | 480e5926ce3bb61ec229be2dab08bdce8abb8d2e (patch) | |
tree | b252230da3bba55a8e4ebd747767257c781670d7 /arch/s390/include/asm | |
parent | 9d037a777695993ec7437e5f451647dea7919d4c (diff) |
[S390] kvm: fix address mode switching
598841ca9919d008b520114d8a4378c4ce4e40a1 ([S390] use gmap address
spaces for kvm guest images) changed kvm to use a separate address
space for kvm guests. This address space was switched in __vcpu_run
In some cases (preemption, page fault) there is the possibility that
this address space switch is lost.
The typical symptom was a huge amount of validity intercepts or
random guest addressing exceptions.
Fix this by doing the switch in sie_loop and sie_exit and saving the
address space in the gmap structure itself. Also use the preempt
notifier.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 519eb5f187ef..c0cb794bb365 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -658,12 +658,14 @@ static inline void pgste_set_pte(pte_t *ptep, pgste_t pgste) | |||
658 | * struct gmap_struct - guest address space | 658 | * struct gmap_struct - guest address space |
659 | * @mm: pointer to the parent mm_struct | 659 | * @mm: pointer to the parent mm_struct |
660 | * @table: pointer to the page directory | 660 | * @table: pointer to the page directory |
661 | * @asce: address space control element for gmap page table | ||
661 | * @crst_list: list of all crst tables used in the guest address space | 662 | * @crst_list: list of all crst tables used in the guest address space |
662 | */ | 663 | */ |
663 | struct gmap { | 664 | struct gmap { |
664 | struct list_head list; | 665 | struct list_head list; |
665 | struct mm_struct *mm; | 666 | struct mm_struct *mm; |
666 | unsigned long *table; | 667 | unsigned long *table; |
668 | unsigned long asce; | ||
667 | struct list_head crst_list; | 669 | struct list_head crst_list; |
668 | }; | 670 | }; |
669 | 671 | ||