aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds2007-01-061-1/+1
|\ | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: [PATCH] PCI: disable PCI_MULTITHREAD_PROBE
| * [PATCH] PCI: disable PCI_MULTITHREAD_PROBEAndrew Morton2007-01-051-1/+1
| | | | | | | | | | | | | | Unfortunatly, no one reads Kconfig help entries :( Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds2007-01-0610-76/+231
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: asix: Fix AX88772 device PHY selection USB: usblp.c - add Kyocera Mita FS 820 to list of "quirky" printers sisusb_con warning fixes USB: Fixed bug in endpoint release function. USB: small update to Documentation/usb/acm.txt USB storage: fix ipod ejecting issue USB Storage: unusual_devs: add supertop drives USB: omap_udc build fixes (sync with linux-omap) USB: funsoft is borken on sparc USB: fix interaction between different interfaces in an "Option" usb device UHCI: support device_may_wakeup UHCI: make test for ASUS motherboard more specific
| * | USB: asix: Fix AX88772 device PHY selectionDavid Hollis2007-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A small typo in ax88772_bind() prevents the device from selecting the proper PHY, leaving the device useless. The attached patch fixes this. If this patch can be added to the 2.6.19.x series as well, that would be helpful for end-users. Signed-off-by: David Hollis <dhollis@davehollis.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: usblp.c - add Kyocera Mita FS 820 to list of "quirky" printersMartin Williges2007-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch gets the Kyocera FS-820 working with cups 1.2 via usb again. It adds the printer to the list of "quirky" printers. The printer seems not answer to ID requests some seconds after plugging in. Patch is based on linux-2.6.19.1. Background: As far as I could see (strace, usbmon), the Kyocera FS-820 answers to ID requests only a few seconds after plugging it in. This applies to detecting it with cups and is also true for the printing itself, which is initiated with an ID request. Since I have little usb knowledge, maybe someone can interpret the data, especially the fist bulk transfer - why request 8192 bytes? This is the second version of the patch. usbmon output of printing an email without patch: tail -F /tmp/printlog.txt c636e140 3374734463 S Bi:002:02 -115 8192 < c9d43b40 3374734494 S Ci:002:00 s a1 00 0000 0000 03ff 1023 < c9d43b40 3379732301 C Ci:002:00 -104 0 c636e140 3379733294 C Bi:002:02 -2 0 [...repeating...] with patch: tail -F /tmp/printlog.txt d9cb82c0 3729790131 S Ci:002:00 s a1 00 0000 0000 03ff 1023 < d9cb82c0 3729791725 C Ci:002:00 0 91 = 005b4944 3a46532d 3832303b 4d46473a 4b796f63 6572613b 434d443a 50434c58 df956320 3732493190 S Bo:002:01 -115 1347 = 1b252d31 32333435 5840504a 4c0a4050 4a4c2053 4554204d 414e5541 4c464545 [...more data...] Signed-off-by: Martin Williges <kernel@zut.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | sisusb_con warning fixesAndrew Morton2007-01-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | x86_64: drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_putc': drivers/usb/misc/sisusbvga/sisusb_con.c:405: warning: cast from pointer to integer of different size drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_putcs': drivers/usb/misc/sisusbvga/sisusb_con.c:440: warning: cast from pointer to integer of different size drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_clear': drivers/usb/misc/sisusbvga/sisusb_con.c:494: warning: cast from pointer to integer of different size drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_bmove': drivers/usb/misc/sisusbvga/sisusb_con.c:566: warning: cast from pointer to integer of different size drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_switch': drivers/usb/misc/sisusbvga/sisusb_con.c:614: warning: cast from pointer to integer of different size drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_scroll_area': drivers/usb/misc/sisusbvga/sisusb_con.c:941: warning: cast from pointer to integer of different size Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: Fixed bug in endpoint release function.Sarah Bailey2007-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Error handling in usb_create_ep_files() is not correct unless the minor number is freed in ep_device_release(). Signed-off-by: Sarah Bailey <saharabeara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB storage: fix ipod ejecting issuePete Zaitcev2007-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch from Pete fixes the 'ejecting problem' on yet another ipod. Please applyt. Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB Storage: unusual_devs: add supertop drivesPhil Dibowitz2007-01-051-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This combines patches from Alan Stern and Robert Schedel for two "Super Top" drives that need the IGNORE_RESIDUE flag but have different vendor IDs. Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: omap_udc build fixes (sync with linux-omap)David Brownell2007-01-052-53/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resync the omap_udc driver with the latest from the Linux-OMAP tree. Changes include DMA API updates (it builds again!), clock/pm updates, minor bugfixes, whitespace. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: funsoft is borken on sparcAndrew Morton2007-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/usb/serial/funsoft.c: In function `funsoft_ioctl': drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer drivers/usb/serial/funsoft.c:35: error: request for member `c_iflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_iflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_iflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name' drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer drivers/usb/serial/funsoft.c:35: error: request for member `c_oflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_oflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_oflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name' drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer drivers/usb/serial/funsoft.c:35: error: request for member `c_cflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_cflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_cflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name' drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer drivers/usb/serial/funsoft.c:35: error: request for member `c_lflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_lflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_lflag' in something not a structure or union drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name' drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer drivers/usb/serial/funsoft.c:35: error: request for member `c_line' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_line' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_line' in something not a structure or union drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name' drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name' drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name' drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name' drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name' Cc: David Clare <david@funsoft.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: fix interaction between different interfaces in an "Option" usb deviceMiguel Angel Alvarez2007-01-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just the serial port in the first interface should control DTR and RTS lines. This way, the closing of the rest of the ports does not produce a= hangup in the communication. Signed-off-by: Miguel Angel Alvarez <ma.alvarez@ziv.es> Signed-off-by: Matthias Urlichs <matthias@urlichs.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | UHCI: support device_may_wakeupAlan Stern2007-01-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as831) adds device_may_wakeup() support to uhci-hcd; it has been lacking for a long time. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | UHCI: make test for ASUS motherboard more specificAlan Stern2007-01-051-12/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of matching all motherboards whose name contains "A7V8X" for a remote-wakeup hardware bug, this patch (as829) matches only those boards whose name is exactly equal to "A7V8X". Later motherboards don't seem to have the bug. (In fact, it's possible that only one motherboard in the world has the bug. With only one user reporting problems, it's hard to tell.) Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds2007-01-065-21/+28
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c/m41t00: Do not forget to write year i2c-mv64xxx: Fix random oops at boot i2c: Migration aids for i2c_adapter.dev removal i2c-pnx: Add entry to MAINTAINERS i2c-pnx: Fix interrupt handler, get rid of EARLY config option
| * | i2c/m41t00: Do not forget to write yearPhilippe De Muyter2007-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | m41t00.c forgets to set the year field in set_rtc_time; fix that. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Andrew Morton <akpm@osdl.org> Acked-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | i2c-mv64xxx: Fix random oops at bootMaxime Bizon2007-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have a Marvell board which has the same i2c hw block than mv64xxx, so I'm trying to use i2c-mv64xxx driver. But I get the following random oops at boot: Unable to handle kernel NULL pointer dereference at virtual address 00000002 Backtrace: [<c0397e4c>] (mv64xxx_i2c_intr+0x0/0x2b8) from [<c02879c4>] (__do_irq+0x4c/0x8c) [<c0287978>] (__do_irq+0x0/0x8c) from [<c0287c0c>] (do_level_IRQ+0x68/0xc0) r8 = C0501E08 r7 = 00000005 r6 = C0501E08 r5 = 00000005 r4 = C048BB78 [<c0287ba4>] (do_level_IRQ+0x0/0xc0) from [<c02885f8>] (asm_do_IRQ+0x50/0x134) r6 = C0449C78 r5 = F1020000 r4 = FFFFFFFF [<c02885a8>] (asm_do_IRQ+0x0/0x134) from [<c02869c4>] (__irq_svc+0x24/0x100) r8 = C1CAC400 r7 = 00000005 r6 = 00000002 r5 = F1020000 r4 = FFFFFFFF [<c0287efc>] (setup_irq+0x0/0x124) from [<c02880d0>] (request_irq+0xb0/0xd0) r7 = C041B2AC r6 = C0397E4C r5 = 00000000 r4 = 00000005 [<c0288020>] (request_irq+0x0/0xd0) from [<c03985f4>] (mv64xxx_i2c_probe+0x148/0x244) [<c03984ac>] (mv64xxx_i2c_probe+0x0/0x244) from [<c038bedc>] (platform_drv_probe+0x20/0x24) The oops is caused by a spurious interrupt that occurs when request_irq is called. mv64xxx_i2c_fsm() tries to read drv_data->msg, which is NULL. I noticed that hardware init is done after requesting irq. Thus any pending irq from previous hardware usage may cause this. The following patch fixes it: Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Acked-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | i2c: Migration aids for i2c_adapter.dev removalDavid Brownell2007-01-041-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flag i2c_adapter.dev for removal after userspace tools get upgraded, and include a near-term code migration aid to facilitate this: - The class device gets the name attribute it should have had. This was previously (wrongly) associated with the i2c_adapter.dev node. Sysfs based tools and libraries can start converting right away. - Issue a warning for legacy adapter drivers that don't provide any physical device node; so systems with those drivers will know to fix this problem earlier. This is one of a series of patches to help the I2C stack become a better citizen of the Linux Driver Model world. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | i2c-pnx: Fix interrupt handler, get rid of EARLY config optionVitaly Wool2007-01-042-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes two issues raised by David Brownell on the i2c list: << Someone needs to update i2c-pnx.c to handle the IRQ handler doesn't expect pt_regs (gone now for a while), and so it doesn't try to reference "mudule_init()" if I2C isn't initialized "early". For that matter, to get rid of that _option_ to initialize then, and always init that driver with subsystem_init() ... it's common with embedded systems to need I2C access to tweak a GPIO expander or do some other work when bringing up drivers, that's not specific to USB stacks. >> Signed-off-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | | [PATCH] connector: some fixes for ia64 unaligned access errorsErik Jacobson2007-01-051-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On ia64, the various functions that make up cn_proc.c cause kernel unaligned access errors. If you are using these, for example, to get notification about all tasks forking and exiting, you get multiple unaligned access errors per process. Use put_unaligned() in the appropriate palces to fix this. Signed-off-by: Erik Jacobson <erikj@sgi.com> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: <stable@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] fix the toshiba_acpi write_lcd return valueMatthijs van Otterdijk2007-01-051-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | write_lcd() in toshiba_acpi returns 0 on success since the big ACPI patch merged in 2.6.20-rc2. It should return count. Signed-off-by: Matthijs van Otterdijk <thotter@gmail.com> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] hpt37x: Two important bug fixesAlan2007-01-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HPT37x driver very carefully handles DMA completions and the needed fixups are done on pci registers 0x50 and 0x52. This is unfortunate because the actual registers are 0x50 and 0x54. Fixing this offset cures the second channel problems reported. Secondly there are some problems with the HPT370 and certain ATA drives. The filter code however only filters ATAPI devices due to a reversed type check. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] pata_optidma: typo in KconfigAlexey Dobriyan2007-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: Simplify test for interrupt windowDor Laor2007-01-052-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to test for rflags.if as both VT and SVM specs assure us that on exit caused from interrupt window opening, 'if' is set. Signed-off-by: Dor Laor <dor.laor@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: Simplify mmu_alloc_roots()Ingo Molnar2007-01-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Small optimization/cleanup: page == page_header(page->page_hpa) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: Make loading cr3 more robustIngo Molnar2007-01-051-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent the guest's loading of a corrupt cr3 (pointing at no guest phsyical page) from crashing the host. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Add missing dirty bitAvi Kivity2007-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we emulate a write, we fail to set the dirty bit on the guest pte, leading the guest to believe the page is clean, and thus lose data. Bad. Fix by setting the guest pte dirty bit under such conditions. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: Don't set guest cr3 from vmx_vcpu_setup()Avi Kivity2007-01-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | It overwrites the right cr3 set from mmu setup. Happens only with the test harness. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: Add missing 'break'Avi Kivity2007-01-051-0/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: Avoid oom on cr3 switchIngo Molnar2007-01-051-0/+2
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: Initialize vcpu->kvm a little earlierAvi Kivity2007-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes oops on early close of /dev/kvm. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: Improve reporting of vmwrite errorsAvi Kivity2007-01-051-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | This will allow us to see the root cause when a vmwrite error happens. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: add audit code to check mappings, etc are correctAvi Kivity2007-01-052-2/+189
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Destroy mmu while we still have a vcpu leftAvi Kivity2007-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | mmu_destroy flushes the guest tlb (indirectly), which needs a valid vcpu. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Flush guest tlb when reducing permissions on a pteAvi Kivity2007-01-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we reduce permissions on a pte, we must flush the cached copy of the pte from the guest's tlb. This is implemented at the moment by flushing the entire guest tlb, and can be improved by flushing just the relevant virtual address, if it is known. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Detect oom conditions and propagate error to userspaceAvi Kivity2007-01-054-19/+50
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Replace atomic allocations by preallocated objectsAvi Kivity2007-01-054-37/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mmu sometimes needs memory for reverse mapping and parent pte chains. however, we can't allocate from within the mmu because of the atomic context. So, move the allocations to a central place that can be executed before the main mmu machinery, where we can bail out on failure before any damage is done. (error handling is deffered for now, but the basic structure is there) Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Free pages on kvm destructionAvi Kivity2007-01-051-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because mmu pages have attached rmap and parent pte chain structures, we need to zap them before freeing so the attached structures are freed. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Treat user-mode faults as a hint that a page is no longer ↵Avi Kivity2007-01-051-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | a page table Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Fix cmpxchg8b emulationAvi Kivity2007-01-052-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmpxchg8b uses edx:eax as the compare operand, not edi:eax. cmpxchg8b is used by 32-bit pae guests to set page table entries atomically, and this is emulated touching shadowed guest page tables. Also, implement it for 32-bit hosts. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Never free a shadow page actively serving as a rootAvi Kivity2007-01-052-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We always need cr3 to point to something valid, so if we detect that we're freeing a root page, simply push it back to the top of the active list. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Page table write flood protectionAvi Kivity2007-01-052-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In fork() (or when we protect a page that is no longer a page table), we can experience floods of writes to a page, which have to be emulated. This is expensive. So, if we detect such a flood, zap the page so subsequent writes can proceed natively. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: If an empty shadow page is not empty, report more infoAvi Kivity2007-01-051-4/+8
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Ensure freed shadow pages are cleanAvi Kivity2007-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: <ove is_empty_shadow_page() above kvm_mmu_free_page()Avi Kivity2007-01-051-10/+10
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Handle misaligned accesses to write protected guest page ↵Avi Kivity2007-01-051-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tables A misaligned access affects two shadow ptes instead of just one. Since a misaligned access is unlikely to occur on a real page table, just zap the page out of existence, avoiding further trouble. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Remove release_pt_page_64()Avi Kivity2007-01-051-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Unused. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: Remove invlpg interceptionAvi Kivity2007-01-055-62/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we write protect shadowed guest page tables, there is no need to trap page invalidations (the guest will always change the mapping before issuing the invlpg instruction). Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: oom handlingAvi Kivity2007-01-055-43/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When beginning to process a page fault, make sure we have enough shadow pages available to service the fault. If not, free some pages. Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [PATCH] KVM: MMU: kvm_mmu_put_page() only removes one link to the pageAvi Kivity2007-01-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and so must not free it unconditionally. Move the freeing to kvm_mmu_zap_page(). Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>