aboutsummaryrefslogtreecommitdiffstats
path: root/virt (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2008-07-27task IO accounting: improve code readabilityAndrea Righi7-114/+104
Put all i/o statistics in struct proc_io_accounting and use inline functions to initialize and increment statistics, removing a lot of single variable assignments. This also reduces the kernel size as following (with CONFIG_TASK_XACCT=y and CONFIG_TASK_IO_ACCOUNTING=y). text data bss dec hex filename 11651 0 0 11651 2d83 kernel/exit.o.before 11619 0 0 11619 2d63 kernel/exit.o.after 10886 132 136 11154 2b92 kernel/fork.o.before 10758 132 136 11026 2b12 kernel/fork.o.after 3082029 807968 4818600 8708597 84e1f5 vmlinux.o.before 3081869 807968 4818600 8708437 84e155 vmlinux.o.after Signed-off-by: Andrea Righi <righi.andrea@gmail.com> Acked-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-27tracing: remove unused variableAndrea Righi1-1/+0
Remove the following warning with CONFIG_TRACING=y: kernel/trace/trace.c: In function ‘s_next’: kernel/trace/trace.c:1186: warning: unused variable ‘last_ent’ Signed-off-by: Andrea Righi <righi.andrea@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-27missing bits of net-namespace / sysctlAl Viro7-18/+43
Piss-poor sysctl registration API strikes again, film at 11... What we really need is _pathname_ required to be present in already registered table, so that kernel could warn about bad order. That's the next target for sysctl stuff (and generally saner and more explicit order of initialization of ipv[46] internals wouldn't hurt either). For the time being, here are full fixups required by ..._rotable() stuff; we make per-net sysctl sets descendents of "ro" one and make sure that sufficient skeleton is there before we start registering per-net sysctls. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-27lost sysctl fixAl Viro1-7/+9
try_attach() should walk into the matching subdirectory, not the first one... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Tested-by: Valdis.Kletnieks@vt.edu Tested-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-27Fix namespace issue with HisaxKarsten Keil3-3/+3
you can pull this git://git./linux/kernel/git/kkeil/ISDN-2.6 master rename release_tei() to TEIrelease() because release_tei() was already exported bei the old HiSax driver. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-07-27[SCSI] replace __FUNCTION__ with __func__Harvey Harrison49-235/+235
[jejb: fixed up a ton of missed conversions. All of you are on notice this has happened, driver trees will now need to be rebased] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: SCSI List <linux-scsi@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-27[SCSI] extend the last_sector_bug flag to cover more sectorsAlan Jenkins3-7/+23
The last_sector_bug flag was added to work around a bug in certain usb cardreaders, where they would crash if a multiple sector read included the last sector. The original implementation avoids this by e.g. splitting an 8 sector read which includes the last sector into a 7 sector read, and a single sector read for the last sector. The flag is enabled for all USB devices. This revealed a second bug in other usb cardreaders, which crash when they get a multiple sector read which stops 1 sector short of the last sector. Affected hardware includes the Kingston "MobileLite" external USB cardreader and the internal USB cardreader on the Asus EeePC. Extend the last_sector_bug workaround to ensure that any access which touches the last 8 hardware sectors of the device is a single sector long. Requests are shrunk as necessary to meet this constraint. This gives us a safety margin against potential unknown or future bugs affecting multi-sector access to the end of the device. The two known bugs only affect the last 2 sectors. However, they suggest that these devices are prone to fencepost errors and that multi-sector access to the end of the device is not well tested. Popular OS's use multi-sector accesses, but they rarely read the last few sectors. Linux (with udev & vol_id) automatically reads sectors from the end of the device on insertion. It is assumed that single sector accesses are more thoroughly tested during development. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-07-27avr32: some mmc/sd cleanupsDavid Brownell3-15/+33
Minor cleanups for the MMC/SD support on avr32: - Make at32_add_device_mci() properly initialize "missing" platform data ... so boards like STK1002 won't try GPIO 0. - Switch over to gpio_is_valid() instead of testing for only one designated value. - Provide STK1002 platform data for the unlikely case that switches are set so first Ethernet controller isn't in use. (That's the only way to get card detect and writeprotect switch sensing on the STK1000.) And get rid of one "unused variable" warning. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-07-27KVM: ppc: fix invalidation of large guest pagesHollis Blanchard3-4/+6
When guest invalidates a large tlb map, there may be more than one corresponding shadow tlb maps that need to be invalidated. Use eaddr and eend to find these shadow tlb maps. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: s390: Fix possible host kernel bug on lctl(g) handlingChristian Borntraeger1-0/+6
The lctl(g) instructions require a specific alignment for the parameters. The architecture requires a specification program check if these alignments are not used. Enforcing this alignment also removes a possible host BUG, since the get_guest functions check for proper alignment and emits a BUG. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: s390: Fix instruction naming for lctlgChristian Borntraeger3-6/+6
Lets fix the name for the lctlg instruction... Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: s390: Fix program check on interrupt delivery handlingChristian Borntraeger1-14/+7
The current interrupt handling on s390 misbehaves on an error case. On s390 each cpu has the prefix area (lowcore) for interrupt delivery. This memory must always be available. If we fail to access the prefix area for a guest on interrupt delivery the configuration is completely unusable. There is no point in sending another program interrupt to an inaccessible lowcore. Furthermore, we should not bug the host kernel, because this can be triggered by userspace. I think the guest kernel itself can not trigger the problem, as SET PREFIX and SIGNAL PROCESSOR SET PREFIX both check that the memory is available and sane. As this is a userspace bug (e.g. setting the wrong guest offset, unmapping guest memory) we should kill the userspace process instead of BUGing the host kernel. In the long term we probably should notify the userspace process about this problem. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: s390: Change guestaddr type in gaccessMartin Schwidefsky3-32/+37
All registers are unsigned long types. This patch changes all occurences of guestaddr in gaccess from u64 to unsigned long. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: s390: Fix guest kconfigChristian Borntraeger1-1/+1
Cornelia Huck noticed that a modular virtio without kvm guest support leads to a build error in the s390 virtio transport: CONFIG_VIRTIO=m leads to ERROR: "vmem_add_mapping" [drivers/s390/kvm/kvm_virtio.ko] undefined! ERROR: "max_pfn" [drivers/s390/kvm/kvm_virtio.ko] undefined! ERROR: "vmem_remove_mapping" [drivers/s390/kvm/kvm_virtio.ko] undefined! The virtio transport only works with kvm guest support and only as a builtin. Lets change the build process of drivers/s390/kvm/kvm_virtio.c to depend on kvm guest support, which is also a bool. CONFIG_S390_GUEST already selects CONFIG_VIRTIO, that should prevent CONFIG_S390_GUEST=y CONFIG_VIRTIO=n situations. CC: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: s390: Advertise KVM_CAP_USER_MEMORYCarsten Otte1-1/+6
KVM_CAP_USER_MEMORY is used by s390, therefore, we should advertise it. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: ia64: Fix irq disabling leak in error handling codeJulia Lawall1-2/+3
There is a call to local_irq_restore in the normal exit case, so it would seem that there should be one on an error return as well. The semantic patch that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression l; expression E,E1,E2; @@ local_irq_save(l); ... when != local_irq_restore(l) when != spin_unlock_irqrestore(E,l) when any when strict ( if (...) { ... when != local_irq_restore(l) when != spin_unlock_irqrestore(E1,l) + local_irq_restore(l); return ...; } | if (...) + {local_irq_restore(l); return ...; + } | spin_unlock_irqrestore(E2,l); | local_irq_restore(l); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: VMX: Fix undefined beaviour of EPT after reload kvm-intel.koSheng Yang1-10/+10
As well as move set base/mask ptes to vmx_init(). Signed-off-by: Sheng Yang <sheng.yang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: VMX: Fix bypass_guest_pf enabling when disable EPT in module parameterSheng Yang1-1/+1
Signed-off-by: Sheng Yang <sheng.yang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: task switch: translate guest segment limit to virt-extension byte granular fieldMarcelo Tosatti1-0/+4
If 'g' is one then limit is 4kb granular. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: Avoid instruction emulation when event delivery is pendingAvi Kivity3-1/+9
When an event (such as an interrupt) is injected, and the stack is shadowed (and therefore write protected), the guest will exit. The current code will see that the stack is shadowed and emulate a few instructions, each time postponing the injection. Eventually the injection may succeed, but at that time the guest may be unwilling to accept the interrupt (for example, the TPR may have changed). This occurs every once in a while during a Windows 2008 boot. Fix by unshadowing the fault address if the fault was due to an event injection. Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: task switch: use seg regs provided by subarch instead of reading from GDTMarcelo Tosatti1-63/+30
There is no guarantee that the old TSS descriptor in the GDT contains the proper base address. This is the case for Windows installation's reboot-via-triplefault. Use guest registers instead. Also translate the address properly. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: task switch: segment base is linear addressMarcelo Tosatti1-3/+9
The segment base is always a linear address, so translate before accessing guest memory. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27KVM: SVM: allow enabling/disabling NPT by reloading only the architecture moduleJoerg Roedel3-1/+9
If NPT is enabled after loading both KVM modules on AMD and it should be disabled, both KVM modules must be reloaded. If only the architecture module is reloaded the behavior is undefined. With this patch it is possible to disable NPT only by reloading the kvm_amd module. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-27ALSA: Allow to force model to intel-mac-v3 in snd_hda_intel (sigmatel).Nicolas Boichat2-3/+12
Currently, even if you pass model=intel-mac-v3 as a module parameter to snd_hda_intel, the function patch_stac922x (patch_sigmatel.c) will still try to auto-detect the model type. This is a problem on my MacBook Pro 1st generation, which needs intel-mac-v3, but sometimes incorrectly reports 0x00000100 as subsystem id, which causes the switch in patch_stac922x to select intel-mac-v4. To fix this, I added a new model called intel-mac-auto, so in case no module parameter is passed, and an Intel Mac board is detected, the model will be automatically detected, while no detection will be done if the model is forced to intel-mac-v3. This problem has been around for quite a while, and I used to fix it by moving the case statement for 0x00000100 in patch_stac922x so that intel-mac-v3 is chosen. Another way to fix the problem would be to check if a module parameter was set directly in patch_stac922x, using something like this: if (spec->board_config == STAC_INTEL_MAC_V3 && !codec->bus->modelname) { But I think it is less elegant (if you prefer that way, I can prepare a patch). Signed-off-by: Nicolas Boichat <nicolas@boichat.ch> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-07-27ALSA: cs4232: fix crash during chip PNP detectionKrzysztof Helt1-0/+1
The acard->wss pointer is uninitialized in this function which leads to crash during chip PNP detection. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-07-27ALSA: hda - Add automatic model setting for the Acer Aspire 5920G laptopTravis Place1-0/+1
Make the Acer Aspire 5920G (1025:0121) select ALC883_ACER_ASPIRE by default. Signed-off-by: Travis Place <wishie@wishie.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-07-27ALSA: make snd_ac97_add_vmaster() staticAdrian Bunk1-2/+2
This patch makes the needlessly global snd_ac97_add_vmaster() static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-07-27ALSA: sound/pci/azt3328.h: no variables for enumsAdrian Bunk1-2/+2
AZF_FREQUENCIES and AZF_GAME_CONFIGS were variables, and this doesn't seem to have been intended. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-07-26fix for a memory leak in an error case introduced by fix for double freeOliver Neukum1-4/+6
The fix NULLed a pointer without freeing it. Signed-off-by: Oliver Neukum <oneukum@suse.de> Reported-by: Juha Motorsportcom <juha_motorsportcom@luukku.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26m68k: gs: use tty_port fixesGeert Uytterhoeven2-55/+56
commit b5391e29f428d11755ca2c91074c6db6f5c69d7c ("gs: use tty_port") forgot to update the m68k gs serial drivers. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26firmware: fix memmap printk format warningsRandy Dunlap1-2/+4
Fix firmware/memmap printk format warnings: drivers/firmware/memmap.c:156: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t' drivers/firmware/memmap.c:161: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Bernhard Walle <bwalle@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26mm/util.c must #include <linux/sched.h>Adrian Bunk1-0/+1
mm/util.c: In function 'arch_pick_mmap_layout': mm/util.c:144: error: dereferencing pointer to incomplete type mm/util.c:145: error: 'arch_get_unmapped_area' undeclared (first use in this function) mm/util.c:145: error: (Each undeclared identifier is reported only once mm/util.c:145: error: for each function it appears in.) mm/util.c:146: error: 'arch_unmap_area' undeclared (first use in this function) Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26hugetlb: remove unused variable warningAndrea Righi1-1/+4
Remove the following warning when CONFIG_HUGETLB_PAGE is not set: ipc/shm.c: In function `shm_get_stat': ipc/shm.c:565: warning: unused variable `h' [akpm@linux-foundation.org: use tabs, not spaces] Signed-off-by: Andrea Righi <righi.andrea@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26task IO accounting: correctly account threads IO statisticsAndrea Righi1-34/+22
Oleg Nesterov points out that we should check that the task is still alive before we iterate over the threads. This patch includes a fixup for this. Also simplify do_io_accounting() implementation. Signed-off-by: Andrea Righi <righi.andrea@gmail.com> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26gpiolib: fix typo in commentMichael Buesch1-1/+1
This fixes an off-by-one error in a comment. Signed-off-by: Michael Buesch <mb@bu3sch.de> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26[PATCH] fix RLIM_NOFILE handlingAl Viro3-21/+15
* dup2() should return -EBADF on exceeded sysctl_nr_open * dup() should *not* return -EINVAL even if you have rlimit set to 0; it should get -EMFILE instead. Check for orig_start exceeding rlimit taken to sys_fcntl(). Failing expand_files() in dup{2,3}() now gets -EMFILE remapped to -EBADF. Consequently, remaining checks for rlimit are taken to expand_files(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] get rid of corner case in dup3() entirelyAl Viro1-9/+11
Since Ulrich is OK with getting rid of dup3(fd, fd, flags) completely, to hell the damn thing goes. Corner case for dup2() is handled in sys_dup2() (complete with -EBADF if dup2(fd, fd) is called with fd that is not open), the rest is done in dup3(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] remove remaining namei_{32,64}.h crapAl Viro2-26/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] get rid of indirect users of namei.hAl Viro5-2/+4
fs.h needs path.h, not namei.h; nfs_fs.h doesn't need it at all. Several places in the tree needed direct include. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] get rid of __user_path_lookup_openAl Viro3-18/+10
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] f_count may wrap aroundAl Viro11-39/+27
make it atomic_long_t; while we are at it, get rid of useless checks in affs, hfs and hpfs - ->open() always has it equal to 1, ->release() - to 0. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] dup3 fixUlrich Drepper1-1/+6
Al Viro notice one cornercase that the new dup3() code. The dup2() function, as a special case, handles dup-ing to the same file descriptor. In this case the current dup3() code does nothing at all. I.e., it ingnores the flags parameter. This shouldn't happen, the close-on-exec flag should be set if requested. In case the O_CLOEXEC bit in the flags parameter is not set the dup3() function should behave in this respect identical to dup2(). This means dup3(fd, fd, 0) should not actively reset the c-o-e flag. The patch below implements this minor change. [AV: credits to Artur Grabowski for bringing that up as potential subtle point in dup2() behaviour] Signed-off-by: Ulrich Drepper <drepper@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] don't pass nameidata to __ncp_lookup_validate()Al Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] don't pass nameidata to gfs2_lookupi()Al Viro5-8/+8
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] new (local) helper: user_path_parent()Al Viro1-80/+57
Preparation to untangling intents mess: reduce the number of do_path_lookup() callers. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] sanitize __user_walk_fd() et.al.Al Viro13-238/+235
* do not pass nameidata; struct path is all the callers want. * switch to new helpers: user_path_at(dfd, pathname, flags, &path) user_path(pathname, &path) user_lpath(pathname, &path) user_path_dir(pathname, &path) (fail if not a directory) The last 3 are trivial macro wrappers for the first one. * remove nameidata in callers. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] preparation to __user_walk_fd cleanupAl Viro2-9/+11
Almost all users __user_walk_fd() and friends care only about struct path. Get rid of the few that do not. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] kill nameidata passing to permission(), rename to inode_permission()Al Viro8-21/+17
Incidentally, the name that gives hundreds of false positives on grep is not a good idea... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26[PATCH] take noexec checks to very few callers that careAl Viro3-9/+17
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26Re: [PATCH 3/6] vfs: open_exec cleanupChristoph Hellwig1-28/+30
On Mon, May 19, 2008 at 12:01:49AM +0200, Marcin Slusarz wrote: > open_exec is needlessly indented, calls ERR_PTR with 0 argument > (which is not valid errno) and jumps into middle of function > just to return value. > So clean it up a bit. Still looks rather messy. See below for a better version. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>