aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-03-06ucc_geth: Fix BD processingLi Yang1-5/+9
Fix broken BD processing code. Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-06natsemi: netpoll fixesSergei Shtylyov1-5/+19
Fix two issues in this driver's netpoll path: one usual, with spin_unlock_irq() enabling interrupts which nobody asks it to do (that has been fixed recently in a number of drivers) and one unusual, with poll_controller() method possibly causing loss of interrupts due to the interrupt status register being cleared by a simple read and the interrpupt handler simply storing it, not accumulating. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-06bonding: Improve IGMP join processingJay Vosburgh1-51/+25
In active-backup mode, the current bonding code duplicates IGMP traffic to all slaves, so that switches are up to date in case of a failover from an active to a backup interface. If bonding then fails back to the original active interface, it is likely that the "active slave" switch's IGMP forwarding for the port will be out of date until some event occurs to refresh the switch (e.g., a membership query). This patch alters the behavior of bonding to no longer flood IGMP to all ports, and to issue IGMP JOINs to the newly active port at the time of a failover. This insures that switches are kept up to date for all cases. "GOELLESCH Niels" <niels.goellesch@eurocontrol.int> originally reported this problem, and included a patch. His original patch was modified by Jay Vosburgh to additionally remove the existing IGMP flood behavior, use RCU, streamline code paths, fix trailing white space, and adjust for style. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-06bonding: only receive ARPs for usJay Vosburgh1-1/+1
The ARP validation code only needs ARPs for the bonding device. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-06bonding: fix double dev_add_packJay Vosburgh1-1/+7
Bonding can erroneously register the same packet_type to receive ARPs (for use by ARP validation): once at device open time, and once via sysfs. Since sysfs can change the validate setting (and thus register or unregister) at any time, a flag is needed to synchronize with device open in order to avoid double registrations, and the simplest place is within the packet_type structure itself. Double unregister is not an issue. Bug reported by Ulrich Oelmann <ulrich.oelmann@web.de>. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-05Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlightLinus Torvalds6-8/+52
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: backlight: Allow enable/disable of fb backlights, fixing regressions backlight: Fix nvidia backlight initial brightness
2007-03-05[PATCH] video/aty/mach64_ct.c: fix bogus delay loopDavid Miller1-2/+1
CT based mach64 cards were reported to hang on sparc64 boxes when compiled with gcc-4.1.x and later. Looking at this piece of code, it's no surprise. A critical delay was implemented as an empty for() loop, and gcc 4.0.x and previous did not optimize it away, so we did get a delay. But gcc-4.1.x and later can optimize it away, and we get crashes. Use a real udelay() to fix this. Fix verified on SunBlade100. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] usb-storage: do not rebuild when kernel version changesSam Ravnborg1-2/+2
Replacing use of UTS_RELEASE with utsname()->release avoids that the usb-storage driver is recompiled each time the kernel version changes. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] atyfb: Fix kconfig errorAntonino A. Daplas1-1/+2
Fix the following compile error: MODPOST 327 modules WARNING: "aty_st_lcd" [drivers/video/aty/atyfb.ko] undefined! WARNING: "aty_ld_lcd" [drivers/video/aty/atyfb.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] char/epca.c: remove unused functionMichal Piotrowski1-17/+0
"drivers/char/epca.c:2741: warning: 'get_termio' defined but not used" Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] clocksource init adjustments (fix bug #7426)john stultz2-2/+5
This patch resolves the issue found here: http://bugme.osdl.org/show_bug.cgi?id=7426 The basic summary is: Currently we register most of i386/x86_64 clocksources at module_init time. Then we enable clocksource selection at late_initcall time. This causes some problems for drivers that use gettimeofday for init calibration routines (specifically the es1968 driver in this case), where durring module_init, the only clocksource available is the low-res jiffies clocksource. This may cause slight calibration errors, due to the small sampling time used. It should be noted that drivers that require fine grained time may not function on architectures that do not have better then jiffies resolution timekeeping (there are a few). However, this does not discount the reasonable need for such fine-grained timekeeping at init time. Thus the solution here is to register clocksources earlier (ideally when the hardware is being initialized), and then we enable clocksource selection at fs_initcall (before device_initcall). This patch should probably get some testing time in -mm, since clocksource selection is one of the most important issues for correct timekeeping, and I've only been able to test this on a few of my own boxes. Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] ipmi: check, if default ports are accessible on PPCChristian Krafft1-0/+5
ipmi_si_intf tries to access default ports, if no device could be found elsewhere. On PPC we have a function to check, if these legacy IO ports are accessible. This patch adds a check for these ports on PPC. This patch fixes a breakage of IPMI module on PPC machines without a BMC. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Acked-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Corey Minyard <minyard@acm.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] md: fix for raid6 reshapeNeilBrown1-1/+1
Recent patch for raid6 reshape had a change missing that showed up in subsequent review. Many places in the raid5 code used "conf->raid_disks-1" to mean "number of data disks". With raid6 that had to be changed to "conf->raid_disk - conf->max_degraded" or similar. One place was missed. This bug means that if a raid6 reshape were aborted in the middle the recorded position would be wrong. On restart it would either fail (as the position wasn't on an appropriate boundary) or would leave a section of the array unreshaped, causing data corruption. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] fb: sm501fb off-by-1 sysfs storePaul Mundt1-3/+3
Currently sm501fb_crtsrc_store() won't allow the routing to be changed via echos from userspace in to the sysfs file. The reason for this is that the strnicmp() for both heads uses a sizeof() for the string length, which ends up being strlen() + 1 (\0 in the normal case, but the echo gives a newline, which is where the issue occurs), this then causes a mismatch and subsequently bails with the -EINVAL. In addition to this, the hardcoded lengths were then used for the store length that was returned, which ended up being erroneous and resulting in a write error. There's also no point in returning anything but the full length since it will -EINVAL out on a mismatch well before then anyways. sizeof("string") is great for making sure you have space in your buffer, but rather less so for string comparisons :-) Signed-off-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Ben Dooks <ben-linux@fluff.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] dz: remove struct pt_regs referencesMaciej W. Rozycki1-4/+3
Remove remaining references to saved registers now that uart_handle_sysrq_char() does not want them. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] gpio_keys driver shouldn't be ARM-specificDavid Brownell1-3/+1
The gpio_keys driver is wrongly ARM-specific; it can't build on other platforms with GPIO suport. This fixes that problem. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: pHilipp Zabel <philipp.zabel@gmail.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Ben Nizette <ben.nizette@iinet.net.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] add CONFIG_GENERIC_GPIODavid Brownell1-4/+6
Most drivers using GPIOs already know they are running on a system that supports the generic GPIO calls, because of other platform dependencies. But the generic GPIO-based LED and input button drivers can't know that. So this patch adds a Kconfig hook, GENERIC_GPIO, to mark the platforms where <asm/gpio.h> will do the right thing. Currently that's a bunch of ARMs, and AVR32; more are on the way. It also fixes a dependency bug for the gpio button input driver; it was wrong to start with, now it covers all platforms with GENERIC_GPIO. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Richard Purdie <rpurdie@rpsys.net> Cc: Arnaud Patard <arnaud.patard@rtp-net.org> Cc: <raph@8d.com> Cc: <msvoboda@ra.rockwell.com> Cc: pHilipp Zabel <philipp.zabel@gmail.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] Fix soft lockup with iSeries viocd driverTony Breeds1-4/+23
Fix soft lockup with iSeries viocd driver, caused by eventually calling end_that_request_first() with nr_bytes 0. Some versions of hald do an SG_IO ioctl on the viocd device which becomes a request with hard_nr_sectors and hard_cur_sectors set to zero. Passing zero as the number of sectors to end_request() (which calls end_that_request_first()) causes an infinite loop when the bio is being freed. This patch makes sure that the zero is never passed. It only requires some number larger the the request size the terminate the loop. The lockup is triggered by hald, interrogating the device. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] msi: support masking msi irqs without a mask bitEric W. Biederman1-0/+2
For devices that do not support msi-x we only support 1 interrupt. Therefore we can disable that one interrupt by disabling the msi capability itself. If we leave the intx interrupts disabled while we have the msi capability disabled no interrupts should be delivered from that device. Devices with just the minimal msi support (and thus hitting this code path) include things like the intel e1000 nic, so it looks like is going to be a fairly common case and thus important to get right. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] msi: fix up the msi enable/disable logicEric W. Biederman1-80/+64
enable/disable_msi_mode have several side effects which keeps them from being generally useful. So this patch replaces them with with two much more targeted functions: msi_set_enable and msix_set_enable. This patch makes pci_dev->msi_enabled and pci_dev->msix_enabled the definitive way to test if linux has enabled the msi capability, and has the appropriate msi data structures set up. This patch ensures that while writing the msi messages in save/restore and during device initialization we have the msi capability disabled so we don't get into races. The pci spec requires that we do not have the msi capability enabled and the msi messages unmasked while we write the messages. Completely disabling the capability is overkill but it is easy :) Care has been taken so we never have both a msi capability and intx enabled simultaneously. We haven't run into a problem yet but better safe then sorry. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] msi: sanely support hardware level msi disablingEric W. Biederman4-12/+30
In some cases when we are not using msi we need a way to ensure that the hardware does not have an msi capability enabled. Currently the code has been calling disable_msi_mode to try and achieve that. However disable_msi_mode has several other side effects and is only available when msi support is compiled in so it isn't really appropriate. Instead this patch implements pci_msi_off which disables all msi and msix capabilities unconditionally with no additional side effects. pci_disable_device was redundantly clearing the bus master enable flag and clearing the msi enable bit. A device that is not allowed to perform bus mastering operations cannot generate intx or msi interrupt messages as those are essentially a special case of dma, and require bus mastering. So the call in pci_disable_device to disable msi capabilities was redundant. quirk_pcie_pxh also called disable_msi_mode and is updated to use pci_msi_off. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05[PATCH] cyclades: return closing_waitAndrew Morton1-0/+1
In http://bugzilla.kernel.org/show_bug.cgi?id=8065, Shen points out that the cyclades driver forget to return closing_wait to userspace. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Shen <shanlu@cs.uiuc.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05backlight: Allow enable/disable of fb backlights, fixing regressionsRichard Purdie5-5/+51
Enabling the backlight by default appears to cause problems for many users. This patch disables backlight controls unless explicitly enabled by users via a module parameter. Since PMAC users are known to work, default to enabled in that case. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-03-05backlight: Fix nvidia backlight initial brightnessRichard Purdie1-3/+1
Fix a mix up when the nvidia driver was converted resulting in the backlight having an incorrect initial brightness. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-03-04Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds27-206/+292
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: ide: make legacy IDE VLB modules check for the "probe" kernel params (v2) ide: remove some obsoleted kernel params (v2) ide/pci/delkin_cb.c: pci_module_init to pci_register_driver scc_pata: bugfix for checking DMA IRQ status ide: remove a ton of pointless #undef REALLY_SLOW_IO siimage: DRAC4 note adjust legacy IDE resource setting (v2) ide: fix pmac breakage ide-cs: Update device table ide: ide_get_best_pio_mode() returns incorrect IORDY setting (take 2) piix/slc90e66: more tuneproc() fixing (take 2) ide: fix drive side 80c cable check, take 2 cmd64x: fix PIO mode setup (take 3) alim15x3: fix PIO mode setup
2007-03-04Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-devLinus Torvalds1-1/+0
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: [libata] pata_jmicron: build fix
2007-03-04Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvbLinus Torvalds3-6/+11
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: V4L/DVB (5260): Cx88-blackbird: allow usage of both 376836 and 262144 sized firmware images V4L/DVB (5366): Pvrusb2: Fix compilation warning for amd64 builds (use %zu instead of %u)
2007-03-04Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds27-110/+103
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [VLAN]: Avoid a 4-order allocation. [HDLC] Fix dev->header_cache_update having a random value. [NetLabel]: Verify sensitivity level has a valid CIPSO mapping [PPPOE]: Key connections properly on local device. [AF_UNIX]: Test against sk_max_ack_backlog properly. [NET]: Fix bugs in "Whether sock accept queue is full" checking
2007-03-04Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds14-721/+142
* master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits) [ARM] Acorn: move the i2c bus driver into drivers/i2c [ARM] ARM SCSI: Don't try to dma_map_sg too many scatterlist entries [ARM] ARM FAS216: don't modify scsi_cmnd request_bufflen [ARM] rtc-pcf8583: Final fixes for this RTC on RiscPC [ARM] rtc-pcf8583: correct month and year offsets [ARM] rtc-pcf8583: don't use BCD_TO_BIN/BIN_TO_BCD [ARM] EBSA110: Work around build errors [ARM] 4241/1: Define mb() as compiler barrier on a uniprocessor system [ARM] 4239/1: S3C24XX: Update kconfig entries for PM [ARM] 4238/1: S3C24XX: docs: update suspend and resume [ARM] 4237/2: oprofile: Always allow backtraces on ARM [ARM] Yet more asm/apm-emulation.h stuff ARM: OMAP: Add missing get_irqnr_preamble and arch_ret_to_user for omap2 ARM: OMAP: Use linux/delay.h not asm/delay.h ARM: OMAP: Remove obsolete alsa typedefs ARM: OMAP: omap1510->15xx conversions needed for sx1 ARM: OMAP: Add missing includes to board-nokia770 ARM: OMAP: Workqueue changes for board-h4.c ARM: OMAP: dmtimer.c omap1 register fix ARM: OMAP: board-nokia770: correct lcd name ...
2007-03-04[ARM] Acorn: move the i2c bus driver into drivers/i2cRussell King7-694/+108
Move the Acorn IOC/IOMD I2C bus driver from drivers/i2c, strip out the reminants of the platform specific parts of the old PCF8583 RTC code, and remove the old obsolete PCF8583 driver. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-04[ARM] ARM SCSI: Don't try to dma_map_sg too many scatterlist entriesRussell King3-6/+7
An off-by-one bug meant we were always trying to map one too many scatterlist entries. This was mostly harmless prior to the checks going in to consistent_sync(), but now causes the kernel to BUG. Also, powertec.c was missing an assignment to info->ec. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-04[ARM] ARM FAS216: don't modify scsi_cmnd request_bufflenRussell King2-4/+7
SCSI doesn't want drivers to modify request_bufflen, so keep a driver-private copy of this in the scsi_pointer structure instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-04[ARM] rtc-pcf8583: Final fixes for this RTC on RiscPCRussell King2-4/+6
Replace the I2C bus address, as per drivers/acorn/char/pcf8583.c. Also, since this driver also contains Acorn RiscPC specific code for obtaining the current year from the SRAM (and updating the platform specific checksum when writing new data back) this is NOT a platform independent driver. Document it as such, and update the dependencies to reflect this fact. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-04[ARM] rtc-pcf8583: correct month and year offsetsRussell King1-5/+6
No, today is not 4th April 3907, it's 4th March 2007. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-04[ARM] rtc-pcf8583: don't use BCD_TO_BIN/BIN_TO_BCDRussell King1-10/+10
Both BCD_TO_BIN(x) and BIN_TO_BCD(x) have an unexpected side-effect - not only do they return the value as expected, they _modify_ their argument in the process. Let's play it safe and avoid these macros. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-04KVM: Move kvmfs magic number to <linux/magic.h>Andrew Morton1-2/+2
Use the standard magic.h for kvmfs. Cc: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: Fix bogus failure in kvm.ko module initializationAvi Kivity1-1/+1
A bogus 'return r' can cause an otherwise successful module load to fail. This both denies users the use of kvm, and it also denies them the use of their machine, as it leaves a filesystem registered with its callbacks pointing into now-freed module memory. Fix by returning a zero like a good module. Thanks to Richard Lucassen <mailinglists@lucassen.org> (?) for reporting the problem and for providing access to a machine which exhibited it. Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: Remove write access permissions when dirty-page-logging is enabledUri Lublin1-0/+2
Enabling dirty page logging is done using KVM_SET_MEMORY_REGION ioctl. If the memory region already exists, we need to remove write accesses, so writes will be caught, and dirty pages will be logged. Signed-off-by: Uri Lublin <uril@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04kvm: move do_remove_write_access() upUri Lublin1-7/+7
To be called from kvm_vm_ioctl_set_memory_region() Signed-off-by: Uri Lublin <uril@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: Fix dirty page log bitmap size/access calculationUri Lublin1-2/+2
Since dirty_bitmap is an unsigned long array, the alignment and size need to take that into account. Signed-off-by: Uri Lublin <uril@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: Add missing calls to mark_page_dirty()Uri Lublin1-0/+6
A few places where we modify guest memory fail to call mark_page_dirty(), causing live migration to fail. This adds the missing calls. Signed-off-by: Uri Lublin <uril@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: Per-vcpu inodesAvi Kivity4-119/+153
Allocate a distinct inode for every vcpu in a VM. This has the following benefits: - the filp cachelines are no longer bounced when f_count is incremented on every ioctl() - the API and internal code are distinctly clearer; for example, on the KVM_GET_REGS ioctl, there is no need to copy the vcpu number from userspace and then copy the registers back; the vcpu identity is derived from the fd used to make the call Right now the performance benefits are completely theoretical since (a) we don't support more than one vcpu per VM and (b) virtualization hardware inefficiencies completely everwhelm any cacheline bouncing effects. But both of these will change, and we need to prepare the API today. Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: Move kvm_vm_ioctl_create_vcpu() aroundAvi Kivity1-51/+51
In preparation of some hacking. Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: Rename some kvm_dev_ioctl_*() functions to kvm_vm_ioctl_*()Avi Kivity1-24/+24
This reflects the changed scope, from device-wide to single vm (previously every device open created a virtual machine). Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: Create an inode per virtual machineAvi Kivity1-41/+171
This avoids having filp->f_op and the corresponding inode->i_fop different, which is a little unorthodox. The ioctl list is split into two: global kvm ioctls and per-vm ioctls. A new ioctl, KVM_CREATE_VM, is used to create VMs and return the VM fd. Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: Add internal filesystem for generating inodesAvi Kivity1-1/+32
The kvmfs inodes will represent virtual machines and vcpus, as necessary, reducing cacheline bouncing due to inodes and filps being shared. Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: More 0 -> NULL conversionsAvi Kivity1-2/+2
Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: SVM: intercept SMI to handle it at host levelJoerg Roedel1-0/+1
This patch changes the SVM code to intercept SMIs and handle it outside the guest. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: svm: init cr0 with the wp bit setAvi Kivity1-1/+1
Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-04KVM: Wire up hypercall handlers to a central arch-independent locationAvi Kivity4-18/+40
Signed-off-by: Avi Kivity <avi@qumranet.com>