aboutsummaryrefslogtreecommitdiff
path: root/arch/s390
AgeCommit message (Collapse)AuthorFilesLines
2013-04-17s390/bpf,jit: use kcalloc instead of kmalloc and memsetStelian Nirlu1-2/+1
Signed-off-by: Stelian Nirlu <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-04-17s390/dis: use explicit buf lenStefan Raspl3-6/+8
Pass buffer length in extra parameter. Signed-off-by: Stefan Raspl <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-04-17s390/pci: use kmem_cache_zalloc instead of kmem_cache_alloc/memsetWei Yongjun1-2/+1
Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset(). Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-04-17s390/mm: zero page cache synonyms for zEC12Martin Schwidefsky1-1/+9
To avoid cache synonyms on System zEC12 32 independent zero pages are required, one for each combination for bits 2**12 to 2**16 of the virtual address. To avoid wasting too much memory on small virtual systems the number of zero pages is limited to 4 if the memory size is less or equal to 64MB. Signed-off-by: Martin Schwidefsky <[email protected]>
2013-04-17s390/mm: protection exception PSW for aborted transactionMartin Schwidefsky1-2/+7
Protection exception usually are suppressing and the fault handler needs to rewind the PSW by the instruction length to get the correct fault address. Except for protection exceptions while the CPU is in the middle of a transaction. The CPU stores the transaction abort PSW at the start of the transaction, if the transaction is aborted the PSW is already correct and may not be modified by the fault handler. Signed-off-by: Martin Schwidefsky <[email protected]>
2013-04-17idle: Remove GENERIC_IDLE_LOOP config switchThomas Gleixner1-1/+0
All archs are converted over. Remove the config switch and the fallback code. Signed-off-by: Thomas Gleixner <[email protected]>
2013-04-15s390/kdump: Add PM notifier for kdumpMichael Holzheu1-0/+30
For s390 the page table mapping for the crashkernel memory is removed to protect the pre-loaded kdump kernel and ramdisk. Because the crashkernel memory is not included in the page tables for suspend/resume it is not included in the suspend image. Therefore after resume the resumed system does no longer contain the pre-loaded kdump kernel and when kdump is triggered it fails. This patch adds a PM notifier that creates the page tables before suspend is done and removes them for resume. This ensures that the kdump kernel is included in the suspend image. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-04-09create_proc_cpu_mask() doesn't need an argument...Al Viro1-4/+2
Signed-off-by: Al Viro <[email protected]>
2013-04-09switch compat readv/writev variants to COMPAT_SYSCALL_DEFINEAl Viro2-18/+2
... and take to fs/read_write.c Signed-off-by: Al Viro <[email protected]>
2013-04-08s390: Use generic idle loopThomas Gleixner4-30/+11
Signed-off-by: Thomas Gleixner <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Paul McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Reviewed-by: Cc: Srivatsa S. Bhat <[email protected]> Cc: Magnus Damm <[email protected]> Acked-by: Heiko Carstens <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2013-04-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-29/+58
Conflicts: drivers/nfc/microread/mei.c net/netfilter/nfnetlink_queue_core.c Pull in 'net' to get Eric Biederman's AF_UNIX fix, upon which some cleanups are going to go on-top. Signed-off-by: David S. Miller <[email protected]>
2013-04-06oprofile, s390: Add support for IBM zEnterprise EC12Andreas Krebbel1-0/+1
This patch adds support for the latest release of the IBM mainframe series - the IBM zEnterprise EC12 (zEC12). The CPU measurement facility didn't change. So only the new CPU type has to be tolerated. Signed-off-by: Andreas Krebbel <[email protected]> Signed-off-by: Robert Richter <[email protected]>
2013-04-02KVM: s390: Enable KVM_CAP_NR_MEMSLOTS on s390Nick Wang1-0/+3
Return KVM_USER_MEM_SLOTS in kvm_dev_ioctl_check_extension(). Signed-off-by: Nick Wang <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-04-02KVM: s390: Remove the sanity checks for kvm memory slotNick Wang1-12/+4
To model the standby memory with memory_region_add_subregion and friends, the guest would have one or more regions of ram. Remove the check allowing only one memory slot and the check requiring the real address of memory slot starts at zero. Signed-off-by: Nick Wang <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-04-02KVM: s390: fix compile with !CONFIG_COMPATHeiko Carstens1-0/+1
arch/s390/kvm/priv.c should include both linux/compat.h and asm/compat.h. Fixes this one: In file included from arch/s390/kvm/priv.c:23:0: arch/s390/include/asm/compat.h: In function ‘arch_compat_alloc_user_space’: arch/s390/include/asm/compat.h:258:2: error: implicit declaration of function ‘is_compat_task’ Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-04-02KVM: s390: fix stsi exception handlingHeiko Carstens1-10/+10
In case of an exception the guest psw condition code should be left alone. Signed-off-by: Heiko Carstens <[email protected]> Acked-By: Cornelia Huck <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-04-02KVM: s390: fix and enforce return code handling for irq injectionsHeiko Carstens4-73/+37
kvm_s390_inject_program_int() and friends may fail if no memory is available. This must be reported to the calling functions, so that this gets passed down to user space which should fix the situation. Alternatively we end up with guest state corruption. So fix this and enforce return value checking by adding a __must_check annotation to all of these function prototypes. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Cornelia Huck <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-04-02KVM: s390: make if statements in lpsw/lpswe handlers readableHeiko Carstens1-34/+24
Being unable to parse the 5- and 8-line if statements I had to split them to be able to make any sense of them and verify that they match the architecture. So change the code since I guess that other people will also have a hard time parsing such long conditional statements with line breaks. Introduce a common is_valid_psw() function which does all the checks needed. In case of lpsw (64 bit psw -> 128 bit psw conversion) it will do some not needed additional checks, since a couple of bits can't be set anyway, but that doesn't hurt. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Cornelia Huck <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-04-02KVM: s390: fix return code handling in lpsw/lpswe handlersHeiko Carstens1-30/+14
kvm_s390_inject_program_int() may return with a non-zero return value, in case of an error (out of memory). Report that to the calling functions instead of ignoring the error case. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Cornelia Huck <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-04-02KVM: s390: fix psw conversion in lpsw handlerHeiko Carstens1-1/+2
When converting a 64 bit psw to a 128 bit psw the addressing mode bit of the "addr" part of the 64 bit psw must be moved to the basic addressing mode bit of the "mask" part of the 128 bit psw. In addition the addressing mode bit must be cleared when moved to the "addr" part of the 128 bit psw. Otherwise an invalid psw would be generated if the orginal psw was in the 31 bit addressing mode. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Cornelia Huck <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-04-02KVM: s390: fix 24 bit psw handling in lpsw/lpswe handlerHeiko Carstens1-1/+1
When checking for validity the lpsw/lpswe handler check that only the lower 20 bits instead of 24 bits have a non-zero value. There handling valid psws as invalid ones. Fix the 24 bit psw mask. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Cornelia Huck <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-04-02KVM: s390: Dont do a gmap update on minor memslot changesChristian Borntraeger1-0/+10
Some memslot updates dont affect the gmap implementation, e.g. setting/unsetting dirty tracking. Since a gmap update will cause tlb flushes and segment table invalidations we want to avoid that. Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-04-02s390/mm: provide emtpy check_pgt_cache() functionHeiko Carstens1-1/+2
All architectures need to provide a check_pgt_cache() function. The s390 one got lost somewhere. So reintroduce it to prevent future compile errors e.g. if Thomas Gleixner's idle loop rework patches get merged. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-04-02s390/uaccess: fix page table walkHeiko Carstens2-27/+55
When translating user space addresses to kernel addresses the follow_table() function had two bugs: - PROT_NONE mappings could be read accessed via the kernel mapping. That is e.g. putting a filename into a user page, then protecting the page with PROT_NONE and afterwards issuing the "open" syscall with a pointer to the filename would incorrectly succeed. - when walking the page tables it used the pgd/pud/pmd/pte primitives which with dynamic page tables give no indication which real level of page tables is being walked (region2, region3, segment or page table). So in case of an exception the translation exception code passed to __handle_fault() is not necessarily correct. This is not really an issue since __handle_fault() doesn't evaluate the code. Only in case of e.g. a SIGBUS this code gets passed to user space. If user space can do something sane with the value is a different question though. To fix these issues don't use any Linux primitives. Only walk the page tables like the hardware would do it, however we leave quite some checks away since we know that we only have full size page tables and each index is within bounds. In theory this should fix all issues... Signed-off-by: Heiko Carstens <[email protected]> Reviewed-by: Gerald Schaefer <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-03-31net: add option to enable error queue packets waking selectKeller, Jacob E1-0/+2
Currently, when a socket receives something on the error queue it only wakes up the socket on select if it is in the "read" list, that is the socket has something to read. It is useful also to wake the socket if it is in the error list, which would enable software to wait on error queue packets without waking up for regular data on the socket. The main use case is for receiving timestamped transmit packets which return the timestamp to the socket via the error queue. This enables an application to select on the socket for the error queue only instead of for the regular traffic. -v2- * Added the SO_SELECT_ERR_QUEUE socket option to every architechture specific file * Modified every socket poll function that checks error queue Signed-off-by: Jacob Keller <[email protected]> Cc: Jeffrey Kirsher <[email protected]> Cc: Richard Cochran <[email protected]> Cc: Matthew Vick <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-03-21Merge remote-tracking branch 'upstream/master' into queueMarcelo Tosatti8-7/+15
Merge reason: From: Alexander Graf <[email protected]> "Just recently this really important patch got pulled into Linus' tree for 3.9: commit 1674400aaee5b466c595a8fc310488263ce888c7 Author: Anton Blanchard <anton <at> samba.org> Date: Tue Mar 12 01:51:51 2013 +0000 Without that commit, I can not boot my G5, thus I can't run automated tests on it against my queue. Could you please merge kvm/next against linus/master, so that I can base my trees against that?" * upstream/master: (653 commits) PCI: Use ROM images from firmware only if no other ROM source available sparc: remove unused "config BITS" sparc: delete "if !ULTRA_HAS_POPULATION_COUNT" KVM: Fix bounds checking in ioapic indirect register reads (CVE-2013-1798) KVM: x86: Convert MSR_KVM_SYSTEM_TIME to use gfn_to_hva_cache functions (CVE-2013-1797) KVM: x86: fix for buffer overflow in handling of MSR_KVM_SYSTEM_TIME (CVE-2013-1796) arm64: Kconfig.debug: Remove unused CONFIG_DEBUG_ERRORS arm64: Do not select GENERIC_HARDIRQS_NO_DEPRECATED inet: limit length of fragment queue hash table bucket lists qeth: Fix scatter-gather regression qeth: Fix invalid router settings handling qeth: delay feature trace sgy-cts1000: Remove __dev* attributes KVM: x86: fix deadlock in clock-in-progress request handling KVM: allow host header to be included even for !CONFIG_KVM hwmon: (lm75) Fix tcn75 prefix hwmon: (lm75.h) Update header inclusion MAINTAINERS: Remove Mark M. Hoffman xfs: ensure we capture IO errors correctly xfs: fix xfs_iomap_eof_prealloc_initial_size type ... Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-21s390/uaccess: fix clear_user_pt()Heiko Carstens1-1/+1
The page table walker variant of clear_user() is supposed to copy the contents of the empty zero page to user space. However since 238ec4ef "[S390] zero page cache synonyms" empty_zero_page is not anymore the page itself but contains the pointer to the empty zero pages. Therefore the page table walker variant of clear_user() copied the address of the first empty zero page and afterwards more or less random data to user space instead of clearing the given user space range. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-03-18Merge branch 'for-linus' of ↵Linus Torvalds5-6/+12
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "A couple of bug fixes, the most hairy on is the flush_tlb_kernel_range fix. Another case of "how could this ever have worked?"." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/kdump: Do not add standby memory for kdump drivers/i2c: remove !S390 dependency, add missing GENERIC_HARDIRQS dependencies s390/scm: process availability s390/scm_blk: suspend writes s390/scm_drv: extend notify callback s390/scm_blk: fix request number accounting s390/mm: fix flush_tlb_kernel_range() s390/mm: fix vmemmap size calculation s390: critical section cleanup vs. machine checks
2013-03-18treewide: Fix typos in printk and commentMasanari Iida2-2/+2
Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-03-12Select VIRT_TO_BUS directly where neededStephen Rothwell1-1/+1
In commit 887cbce0adea ("arch Kconfig: centralise ARCH_NO_VIRT_TO_BUS") I introduced the config sybmol HAVE_VIRT_TO_BUS and selected that where needed. I am not sure what I was thinking. Instead, just directly select VIRT_TO_BUS where it is needed. Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-03-11Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc minor fixes mostly related to tracing" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: s390: Fix a header dependencies related build error tracing: update documentation of snapshot utility tracing: Do not return EINVAL in snapshot when not allocated tracing: Add help of snapshot feature when snapshot is empty ftrace: Update the kconfig for DYNAMIC_FTRACE
2013-03-11s390: Fix a header dependencies related build errorLi Zefan1-0/+1
Commit 877c685607925238e302cd3aa38788dca6c1b226 ("perf: Remove include of cgroup.h from perf_event.h") caused this build failure if PERF_EVENTS is enabled: In file included from arch/s390/include/asm/perf_event.h:9:0, from include/linux/perf_event.h:24, from kernel/events/ring_buffer.c:12: arch/s390/include/asm/cpu_mf.h: In function 'qctri': arch/s390/include/asm/cpu_mf.h:61:12: error: 'EINVAL' undeclared (first use in this function) cpu_mf.h had an implicit errno.h dependency, which was added indirectly via cgroups.h but not anymore. Add it explicitly. Reported-by: Fengguang Wu <[email protected]> Tested-by: Fengguang Wu <[email protected]> Signed-off-by: Li Zefan <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2013-03-07s390/kvm,gaccess: add address space annotationsHeiko Carstens4-41/+42
Add missing address space annotations to all put_guest()/get_guest() callers. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Christian Borntraeger <[email protected]> Acked-by: Martin Schwidefsky <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-07s390/kvm: cleanup/fix handle_tpi()Heiko Carstens1-24/+30
- add missing specification exception check - remove one level of indentation - use defines instead of magic numbers Signed-off-by: Heiko Carstens <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-07s390/kvm,gaccess: shorten copy_to/from_guest codeHeiko Carstens1-253/+41
The code can be significantly shortened. There is no functional change, except that for large (> PAGE_SIZE) copies the guest translation would be done more frequently. However, there is not a single user which does this currently. If one gets added later on this functionality can be added easily again. Signed-off-by: Heiko Carstens <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-07s390/kvm,gaccess: shorten put/get_guest codeHeiko Carstens4-152/+81
The put_guest_u*/get_guest_u* are nothing but wrappers for the regular put_user/get_user uaccess functions. The only difference is that before accessing user space the guest address must be translated to a user space address. Change the order of arguments for the guest access functions so they match their uaccess parts. Also remove the u* suffix, so we simply have put_guest/get_guest which will automatically use the right size dependent on pointer type of the destination/source that now must be correct. In result the same behaviour as put_user/get_user except that accesses must be aligned. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Christian Borntraeger <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-07s390/kvm: remove explicit -EFAULT return code checking on guest accessHeiko Carstens3-177/+74
Let's change to the paradigm that every return code from guest memory access functions that is not zero translates to -EFAULT and do not explictly compare. Explictly comparing the return value with -EFAULT has already shown to be a bit fragile. In addition this is closer to the handling of copy_to/from_user functions, which imho is in general a good idea. Also shorten the return code handling in interrupt.c a bit. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Christian Borntraeger <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-07s390/kvm,tprot: use new gmap_translate() functionHeiko Carstens1-12/+9
When out-of-memory the tprot code incorrectly injected a program check for the guest which reported an addressing exception even if the guest address was valid. Let's use the new gmap_translate() which translates a guest address to a user space address whithout the chance of running into an out-of-memory situation. Also make it more explicit that for -EFAULT we won't find a vma. Signed-off-by: Heiko Carstens <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-07s390/mm,gmap: implement gmap_translate()Heiko Carstens2-22/+87
Implement gmap_translate() function which translates a guest absolute address to a user space process address without establishing the guest page table entries. This is useful for kvm guest address translations where no memory access is expected to happen soon (e.g. tprot exception handler). Signed-off-by: Heiko Carstens <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-07s390/kvm,gaccess: fix guest access return code handlingHeiko Carstens1-2/+5
Guest access functions like copy_to/from_guest() call __guestaddr_to_user() which in turn call gmap_fault() in order to translate a guest address to a user space address. In error case __guest_addr_to_user() returns either -EFAULT or -ENOMEM. The copy_to/from_guest functions just pass these return values down to the callers. The -ENOMEM case however is problematic since there are several places which access guest memory like: rc = copy_to_guest(...); if (rc == -EFAULT) error_handling(); So in case of -ENOMEM the code assumes that the guest memory access succeeded even though it failed. This can cause guest data or state corruption. If __guestaddr_to_user() returns -ENOMEM the meaning is that a valid user space mapping exists, but there was not enough memory available when trying to build the guest mapping. In other words an out-of-memory situation occured. For normal user space accesses an out-of-memory situation causes the page fault handler to map -ENOMEM to -EFAULT (see fixup code in do_no_context()). We need to do exactly the same for the kvm gaccess functions. So __guestaddr_to_user() should just map all error codes to -EFAULT. Signed-off-by: Heiko Carstens <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-07s390/scm: process availabilitySebastian Ott1-1/+1
Let the bus code process scm availability information and notify scm device drivers about the new state. Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-03-07s390/scm_blk: suspend writesSebastian Ott1-0/+2
Stop writing to scm after certain error conditions such as a concurrent firmware upgrade. Resume to normal state once scm_blk_set_available is called (due to an scm availability notification). Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-03-07s390/scm_drv: extend notify callbackSebastian Ott1-1/+3
Extend the notify callback of scm_driver by an event parameter to allow to distinguish between different notifications. Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-03-05KVM: s390: Wire up ioeventfd.Cornelia Huck4-1/+29
Enable ioeventfd support on s390 and hook up diagnose 500 virtio-ccw notifications. Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-05KVM: s390: Export virtio-ccw api.Cornelia Huck2-0/+22
Export the virtio-ccw api in a header for usage by other code. Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-05s390/mm: fix flush_tlb_kernel_range()Heiko Carstens1-2/+0
Our flush_tlb_kernel_range() implementation calls __tlb_flush_mm() with &init_mm as argument. __tlb_flush_mm() however will only flush tlbs for the passed in mm if its mm_cpumask is not empty. For the init_mm however its mm_cpumask has never any bits set. Which in turn means that our flush_tlb_kernel_range() implementation doesn't work at all. This can be easily verified with a vmalloc/vfree loop which allocates a page, writes to it and then frees the page again. A crash will follow almost instantly. To fix this remove the cpumask_empty() check in __tlb_flush_mm() since there shouldn't be too many mms with a zero mm_cpumask, besides the init_mm of course. Cc: [email protected] Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-03-05s390/mm: fix vmemmap size calculationHeiko Carstens1-0/+2
The size of the vmemmap must be a multiple of PAGES_PER_SECTION, since the common code always initializes the vmemmap in such pieces. So we must round up in order to not have a too small vmemmap. Fixes an IPL crash on 31 bit with more than 1920MB. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-03-05s390: critical section cleanup vs. machine checksMartin Schwidefsky2-3/+5
The current machine check code uses the registers stored by the machine in the lowcore at __LC_GPREGS_SAVE_AREA as the registers of the interrupted context. The registers 0-7 of a user process can get clobbered if a machine checks interrupts the execution of a critical section in entry[64].S. The reason is that the critical section cleanup code may need to modify the PSW and the registers for the previous context to get to the end of a critical section. If registers 0-7 have to be replaced the relevant copy will be in the registers, which invalidates the copy in the lowcore. The machine check handler needs to explicitly store registers 0-7 to the stack. Cc: [email protected] Signed-off-by: Martin Schwidefsky <[email protected]>
2013-03-04KVM: set_memory_region: Refactor commit_memory_region()Takuya Yoshikawa1-1/+2
This patch makes the parameter old a const pointer to the old memory slot and adds a new parameter named change to know the change being requested: the former is for removing extra copying and the latter is for cleaning up the code. Signed-off-by: Takuya Yoshikawa <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-03-04KVM: set_memory_region: Refactor prepare_memory_region()Takuya Yoshikawa1-2/+2
This patch drops the parameter old, a copy of the old memory slot, and adds a new parameter named change to know the change being requested. This not only cleans up the code but also removes extra copying of the memory slot structure. Signed-off-by: Takuya Yoshikawa <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>