summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Serial: serial_core, use pr_debugJiri Slaby2007-05-071-12/+5
| | | | | | | | | serial_core, use pr_debug Signed-off-by: Jiri Slaby <jirislaby@gmail.com> 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>
* MPSC serial driver tx lockingDave Jiang2007-05-071-1/+24
| | | | | | | | | | | | | | | | | | | | The MPSC serial driver assumes that interrupt is always on to pick up the DMA transmit ops that aren't submitted while the DMA engine is active. However when irqs are off for a period of time such as operations under kernel crash dump console messages do not show up due to additional DMA ops are being dropped. This makes console writes to process through all the tx DMAs queued up before submitting a new request. Also, the current locking mechanism does not protect the hardware registers and ring buffer when a printk is done during the serial write operations. The additional per port transmit lock provides a finer granular locking and protects registers being clobbered while printks are nested within UART writes. Signed-off-by: Dave Jiang <djiang@mvista.com> Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* serial: define FIXED_PORT flag for serial_coreDavid Gibson2007-05-072-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | At present, the serial core always allows setserial in userspace to change the port address, irq and base clock of any serial port. That makes sense for legacy ISA ports, but not for (say) embedded ns16550 compatible serial ports at peculiar addresses. In these cases, the kernel code configuring the ports must know exactly where they are, and their clocking arrangements (which can be unusual on embedded boards). It doesn't make sense for userspace to change these settings. Therefore, this patch defines a UPF_FIXED_PORT flag for the uart_port structure. If this flag is set when the serial port is configured, any attempts to alter the port's type, io address, irq or base clock with setserial are ignored. In addition this patch uses the new flag for on-chip serial ports probed in arch/powerpc/kernel/legacy_serial.c, and for other hard-wired serial ports probed by drivers/serial/of_serial.c. Signed-off-by: David Gibson <dwg@au1.ibm.com> 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>
* RM9000 serial driverThomas Koeller2007-05-072-12/+89
| | | | | | | | | | | | | | Add support for the integrated serial ports of the MIPS RM9122 processor and its relatives. The patch also does some whitespace cleanup. [akpm@linux-foundation.org: cleanups] Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com> Cc: Ralf Baechle <ralf@linux-mips.org> 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>
* serial driver PMC MSP71xxMarc St-Jean2007-05-072-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Serial driver patch for the PMC-Sierra MSP71xx devices. There are three different fixes: 1 Fix for DesignWare APB THRE errata: In brief, this is a non-standard 16550 in that the THRE interrupt will not re-assert itself simply by disabling and re-enabling the THRI bit in the IER, it is only re-enabled if a character is actually sent out. It appears that the "8250-uart-backup-timer.patch" in the "mm" tree also fixes it so we have dropped our initial workaround. This patch now needs to be applied on top of that "mm" patch. 2 Fix for Busy Detect on LCR write: The DesignWare APB UART has a feature which causes a new Busy Detect interrupt to be generated if it's busy when the LCR is written. This fix saves the value of the LCR and rewrites it after clearing the interrupt. 3 Workaround for interrupt/data concurrency issue: The SoC needs to ensure that writes that can cause interrupts to be cleared reach the UART before returning from the ISR. This fix reads a non-destructive register on the UART so the read transaction completion ensures the previously queued write transaction has also completed. Signed-off-by: Marc St-Jean <Marc_St-Jean@pmc-sierra.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* add new_id to PCMCIA driversBernhard Walle2007-05-071-1/+112
| | | | | | | | | | | | | | | | | | | PCI drivers have the new_id file in sysfs which allows new IDs to be added at runtime. The advantage is to avoid re-compilation of a driver that works for a new device, but it's ID table doesn't contain the new device. This mechanism is only meant for testing, after the driver has been tested successfully, the ID should be added in source code so that new revisions of the kernel automatically detect the device. The implementation follows the PCI implementation. The interface is documented in Documentation/pcmcia/driver.txt. Computations should be done in userspace, so the sysfs string contains the raw structure members for matching. Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* at91_cf, minor fixDavid Brownell2007-05-071-2/+1
| | | | | | | | | | | | This is a minor correctness fix: since the at91_cf driver probe() routine is in the init section, it should use platform_driver_probe() instead of leaving that pointer around in the driver struct after init section removal. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds2007-05-065-17/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (38 commits) kconfig: fix mconf segmentation fault kbuild: enable use of code from a different dir kconfig: error out if recursive dependencies are found kbuild: scripts/basic/fixdep segfault on pathological string-o-death kconfig: correct minor typo in Kconfig warning message. kconfig: fix path to modules.txt in Kconfig help usr/Kconfig: fix typo kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs' kbuild: be more explicit on missing .config file kbuild: clarify the creation of the LOCALVERSION_AUTO string. kbuild: propagate errors from find in scripts/gen_initramfs_list.sh kconfig: refer to qt3 if we cannot find qt libraries kbuild: handle compressed cpio initramfs-es kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text kbuild: remove stale comment in modpost.c kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE kbuild: fix make mrproper for Documentation/DocBook/man kbuild: remove kconfig binaries during make mrproper kconfig/menuconfig: do not hardcode '.config' kbuild: override build timestamp & version ...
| * kconfig: fix path to modules.txt in Kconfig helpAlexander E. Patrakov2007-05-025-17/+17
| | | | | | | | | | | | | | | | Documentation/modules.txt doesn't exist, but Documentation/kbuild/modules.txt does. Signed-off-by: Alexander E. Patrakov Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* | Merge branch 'for-linus' of ↵Linus Torvalds2007-05-0611-440/+1204
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (66 commits) KVM: Remove unused 'instruction_length' KVM: Don't require explicit indication of completion of mmio or pio KVM: Remove extraneous guest entry on mmio read KVM: SVM: Only save/restore MSRs when needed KVM: fix an if() condition KVM: VMX: Add lazy FPU support for VT KVM: VMX: Properly shadow the CR0 register in the vcpu struct KVM: Don't complain about cpu erratum AA15 KVM: Lazy FPU support for SVM KVM: Allow passing 64-bit values to the emulated read/write API KVM: Per-vcpu statistics KVM: VMX: Avoid unnecessary vcpu_load()/vcpu_put() cycles KVM: MMU: Avoid heavy ASSERT at non debug mode. KVM: VMX: Only save/restore MSR_K6_STAR if necessary KVM: Fold drivers/kvm/kvm_vmx.h into drivers/kvm/vmx.c KVM: VMX: Don't switch 64-bit msrs for 32-bit guests KVM: VMX: Reduce unnecessary saving of host msrs KVM: Handle guest page faults when emulating mmio KVM: SVM: Report hardware exit reason to userspace instead of dmesg KVM: Retry sleeping allocation if atomic allocation fails ...
| * | KVM: Remove unused 'instruction_length'Avi Kivity2007-05-031-1/+0
| | | | | | | | | | | | | | | | | | | | | As we no longer emulate in userspace, this is meaningless. We don't compute it on SVM anyway. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Don't require explicit indication of completion of mmio or pioAvi Kivity2007-05-031-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | It is illegal not to return from a pio or mmio request without completing it, as mmio or pio is an atomic operation. Therefore, we can simplify the userspace interface by avoiding the completion indication. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Remove extraneous guest entry on mmio readAvi Kivity2007-05-032-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When emulating an mmio read, we actually emulate twice: once to determine the physical address of the mmio, and, after we've exited to userspace to get the mmio value, we emulate again to place the value in the result register and update any flags. But we don't really need to enter the guest again for that, only to take an immediate vmexit. So, if we detect that we're doing an mmio read, emulate a single instruction before entering the guest again. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: SVM: Only save/restore MSRs when neededAnthony Liguori2007-05-032-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only have to save/restore MSR_GS_BASE on every VMEXIT. The rest can be saved/restored when we leave the VCPU. Since we don't emulate the DEBUGCTL MSRs and the guest cannot write to them, we don't have to worry about saving/restoring them at all. This shaves a whopping 40% off raw vmexit costs on AMD. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: fix an if() conditionAdrian Bunk2007-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It might have worked in this case since PT_PRESENT_MASK is 1, but let's express this correctly. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: VMX: Add lazy FPU support for VTAnthony Liguori2007-05-031-5/+56
| | | | | | | | | | | | | | | | | | | | | | | | Only save/restore the FPU host state when the guest is actually using the FPU. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: VMX: Properly shadow the CR0 register in the vcpu structAnthony Liguori2007-05-034-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | Set all of the host mask bits for CR0 so that we can maintain a proper shadow of CR0. This exposes CR0.TS, paving the way for lazy fpu handling. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Don't complain about cpu erratum AA15Avi Kivity2007-05-031-2/+0
| | | | | | | | | | | | | | | | | | It slows down Windows x64 horribly. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Lazy FPU support for SVMAnthony Liguori2007-05-032-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | Avoid saving and restoring the guest fpu state on every exit. This shaves ~100 cycles off the guest/host switch. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Allow passing 64-bit values to the emulated read/write APIAvi Kivity2007-05-033-99/+24
| | | | | | | | | | | | | | | | | | | | | This simplifies the API somewhat (by eliminating the special-case cmpxchg8b on i386). Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Per-vcpu statisticsAvi Kivity2007-05-036-53/+79
| | | | | | | | | | | | | | | | | | | | | | | | Make the exit statistics per-vcpu instead of global. This gives a 3.5% boost when running one virtual machine per core on my two socket dual core (4 cores total) machine. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: VMX: Avoid unnecessary vcpu_load()/vcpu_put() cyclesYaozu Dong2007-05-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | By checking if a reschedule is needed, we avoid dropping the vcpu. [With changes by me, based on Anthony Liguori's observations] Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: MMU: Avoid heavy ASSERT at non debug mode.Yaozu Dong2007-05-031-0/+6
| | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: VMX: Only save/restore MSR_K6_STAR if necessaryAvi Kivity2007-05-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel hosts only support syscall/sysret in long more (and only if efer.sce is enabled), so only reload the related MSR_K6_STAR if the guest will actually be able to use it. This reduces vmexit cost by about 500 cycles (6400 -> 5870) on my setup. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Fold drivers/kvm/kvm_vmx.h into drivers/kvm/vmx.cAvi Kivity2007-05-032-15/+6
| | | | | | | | | | | | | | | | | | No meat in that file. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: VMX: Don't switch 64-bit msrs for 32-bit guestsAvi Kivity2007-05-031-16/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some msrs are only used by x86_64 instructions, and are therefore not needed when the guest is legacy mode. By not bothering to switch them, we reduce vmexit latency by 2400 cycles (from about 8800) when running a 32-bt guest on a 64-bit host. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: VMX: Reduce unnecessary saving of host msrsAvi Kivity2007-05-031-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | THe automatically switched msrs are never changed on the host (with the exception of MSR_KERNEL_GS_BASE) and thus there is no need to save them on every vm entry. This reduces vmexit latency by ~400 cycles on i386 and by ~900 cycles (10%) on x86_64. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Handle guest page faults when emulating mmioAvi Kivity2007-05-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually, guest page faults are detected by the kvm page fault handler, which detects if they are shadow faults, mmio faults, pagetable faults, or normal guest page faults. However, in ceratin circumstances, we can detect a page fault much later. One of these events is the following combination: - A two memory operand instruction (e.g. movsb) is executed. - The first operand is in mmio space (which is the fault reported to kvm) - The second operand is in an ummaped address (e.g. a guest page fault) The Windows 2000 installer does such an access, an promptly hangs. Fix by adding the missing page fault injection on that path. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: SVM: Report hardware exit reason to userspace instead of dmesgAvi Kivity2007-05-031-6/+1
| | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Retry sleeping allocation if atomic allocation failsAvi Kivity2007-05-031-5/+21
| | | | | | | | | | | | | | | | | | This avoids -ENOMEM under memory pressure. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Use slab caches to allocate mmu data structuresAvi Kivity2007-05-033-4/+45
| | | | | | | | | | | | | | | | | | | | | Better leak detection, statistics, memory use, speed -- goodness all around. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Handle partial pae pdptrAvi Kivity2007-05-031-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some guests (Solaris) do not set up all four pdptrs, but leave some invalid. kvm incorrectly treated these as valid page directories, pinning the wrong pages and causing general confusion. Fix by checking the valid bit of a pae pdpte. This closes sourceforge bug 1698922. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Initialize cr0 to indicate an fpu is presentAvi Kivity2007-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | | Solaris panics if it sees a cpu with no fpu, and it seems to rely on this bit. Closes sourceforge bug 1698920. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Fix overflow bug in overflow detection codeEric Sesterhenn / Snakebyte2007-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The expression sp - 6 < sp where sp is a u16 is undefined in C since 'sp - 6' is promoted to int, and signed overflow is undefined in C. gcc 4.2 actually warns about it. Replace with a simpler test. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Use kernel-standard typesAvi Kivity2007-05-031-3/+3
| | | | | | | | | | | | | | | | | | Noted by Joerg Roedel. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: SVM: enable LBRV virtualization if availableJoerg Roedel2007-05-031-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables the virtualization of the last branch record MSRs on SVM if this feature is available in hardware. It also introduces a small and simple check feature for specific SVM extensions. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Add fpu get/set operationsAvi Kivity2007-05-031-0/+86
| | | | | | | | | | | | | | | | | | | | | These are really helpful when migrating an floating point app to another machine. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Add physical memory aliasing featureAvi Kivity2007-05-032-3/+95
| | | | | | | | | | | | | | | | | | | | | | | | With this, we can specify that accesses to one physical memory range will be remapped to another. This is useful for the vga window at 0xa0000 which is used as a movable window into the (much larger) framebuffer. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Simply gfn_to_page()Avi Kivity2007-05-034-42/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mapping a guest page to a host page is a common operation. Currently, one has first to find the memory slot where the page belongs (gfn_to_memslot), then locate the page itself (gfn_to_page()). This is clumsy, and also won't work well with memory aliases. So simplify gfn_to_page() not to require memory slot translation first, and instead do it internally. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Add mmu cache clear functionDor Laor2007-05-032-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functions that play around with the physical memory map need a way to clear mappings to possibly nonexistent or invalid memory. Both the mmu cache and the processor tlb are cleared. Signed-off-by: Dor Laor <dor.laor@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: x86 emulator: fix bit string operations operand sizeAvi Kivity2007-05-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On x86, bit operations operate on a string of bits that can reside in multiple words. For example, 'btsl %eax, (blah)' will touch the word at blah+4 if %eax is between 32 and 63. The x86 emulator compensates for that by advancing the operand address by (bit offset / BITS_PER_LONG) and truncating the bit offset to the range (0..BITS_PER_LONG-1). This has a side effect of forcing the operand size to 8 bytes on 64-bit hosts. Now, a 32-bit guest goes and fork()s a process. It write protects a stack page at 0xbffff000 using the 'btr' instruction, at offset 0xffc in the page table, with bit offset 1 (for the write permission bit). The emulator now forces the operand size to 8 bytes as previously described, and an innocent page table update turns into a cross-page-boundary write, which is assumed by the mmu code not to be a page table, so it doesn't actually clear the corresponding shadow page table entry. The guest and host permissions are out of sync and guest memory is corrupted soon afterwards, leading to guest failure. Fix by not using BITS_PER_LONG as the word size; instead use the actual operand size, so we get a 32-bit write in that case. Note we still have to teach the mmu to handle cross-page-boundary writes to guest page table; but for now this allows Damn Small Linux 0.4 (2.4.20) to boot. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Remove debug messageAvi Kivity2007-05-031-1/+0
| | | | | | | | | | | | | | | | | | No longer interesting. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Use list_move()Avi Kivity2007-05-031-8/+4
| | | | | | | | | | | | | | | | | | Use list_move() where possible. Noticed by Dor Laor. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Remove unused functionMichal Piotrowski2007-05-031-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused function CC drivers/kvm/svm.o drivers/kvm/svm.c:207: warning: ‘inject_db’ defined but not used Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: SVM: Ensure timestamp counter monotonicityAvi Kivity2007-05-032-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a vcpu is migrated from one cpu to another, its timestamp counter may lose its monotonic property if the host has unsynced timestamp counters. This can confuse the guest, sometimes to the point of refusing to boot. As the rdtsc instruction is rather fast on AMD processors (7-10 cycles), we can simply record the last host tsc when we drop the cpu, and adjust the vcpu tsc offset when we detect that we've migrated to a different cpu. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: MMU: Fix hugepage pdes mapping same physical address with different accessAvi Kivity2007-05-033-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kvm mmu keeps a shadow page for hugepage pdes; if several such pdes map the same physical address, they share the same shadow page. This is a fairly common case (kernel mappings on i386 nonpae Linux, for example). However, if the two pdes map the same memory but with different permissions, kvm will happily use the cached shadow page. If the access through the more permissive pde will occur after the access to the strict pde, an endless pagefault loop will be generated and the guest will make no progress. Fix by making the access permissions part of the cache lookup key. The fix allows Xen pae to boot on kvm and run guest domains. Thanks to Jeremy Fitzhardinge for reporting the bug and testing the fix. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: SVM: forbid guest to execute monitor/mwaitJoerg Roedel2007-05-032-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch forbids the guest to execute monitor/mwait instructions on SVM. This is necessary because the guest can execute these instructions if they are available even if the kvm cpuid doesn't report its existence. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Handle writes to MCG_STATUS msrSergey Kiselev2007-05-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some older (~2.6.7) kernels write MCG_STATUS register during kernel boot (mce_clear_all() function, called from mce_init()). It's not currently handled by kvm and will cause it to inject a GPF. Following patch adds a "nop" handler for this. Signed-off-by: Sergey Kiselev <sergey.kiselev@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Remove unused and write-only variablesAvi Kivity2007-05-032-4/+0
| | | | | | | | | | | | | | | | | | Trivial cleanup. Signed-off-by: Avi Kivity <avi@qumranet.com>
| * | KVM: Don't allow the guest to turn off the cpu cacheAvi Kivity2007-05-031-1/+3
| | | | | | | | | | | | | | | | | | | | | The cpu cache is a host resource; the guest should not be able to turn it off (even for itself). Signed-off-by: Avi Kivity <avi@qumranet.com>
OpenPOWER on IntegriCloud