]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agouwb: use kcalloc where appropriate
David Vrabel [Wed, 15 Oct 2008 13:50:10 +0000 (14:50 +0100)]
uwb: use kcalloc where appropriate

Signed-off-by: David Vrabel <david.vrabel@csr.com>
17 years agouwb: use time_after() when purging stale beacons
David Vrabel [Wed, 15 Oct 2008 13:41:56 +0000 (14:41 +0100)]
uwb: use time_after() when purging stale beacons

Signed-off-by: David Vrabel <david.vrabel@csr.com>
17 years ago[SCSI] sd: fix compile failure with CONFIG_BLK_DEV_INTEGRITY=n
James Bottomley [Mon, 13 Oct 2008 19:20:06 +0000 (15:20 -0400)]
[SCSI] sd: fix compile failure with CONFIG_BLK_DEV_INTEGRITY=n

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years agoKVM: ia64: Add intel iommu support for guests.
Xiantao Zhang [Wed, 8 Oct 2008 00:29:33 +0000 (08:29 +0800)]
KVM: ia64: Add intel iommu support for guests.

With intel iommu hardware, we can assign devices to kvm/ia64 guests.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: ia64: add directed mmio range support for kvm guests
Xiantao Zhang [Sun, 28 Sep 2008 08:39:46 +0000 (01:39 -0700)]
KVM: ia64: add directed mmio range support for kvm guests

Using vt-d, kvm guests can be assigned physcial devices, so
this patch introduce a new mmio type (directed mmio)
to handle its mmio access.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: ia64: Make pmt table be able to hold physical mmio entries.
Xiantao Zhang [Fri, 3 Oct 2008 06:58:09 +0000 (14:58 +0800)]
KVM: ia64: Make pmt table be able to hold physical mmio entries.

Don't try to do put_page once the entries are mmio.
Set the tag to indicate the mmio space for vmm setting
TLB's memory attribute.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: Move irqchip_in_kernel() from ioapic.h to irq.h
Xiantao Zhang [Sat, 27 Sep 2008 03:46:36 +0000 (11:46 +0800)]
KVM: Move irqchip_in_kernel() from ioapic.h to irq.h

Moving irqchip_in_kernel() from ioapic.h to irq.h.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: Separate irq ack notification out of arch/x86/kvm/irq.c
Xiantao Zhang [Mon, 6 Oct 2008 05:48:45 +0000 (13:48 +0800)]
KVM: Separate irq ack notification out of arch/x86/kvm/irq.c

Moving irq ack notification logic as common, and make
it shared with ia64 side.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: Change is_mmio_pfn to kvm_is_mmio_pfn, and make it common for all archs
Xiantao Zhang [Sat, 27 Sep 2008 02:55:40 +0000 (10:55 +0800)]
KVM: Change is_mmio_pfn to kvm_is_mmio_pfn, and make it common for all archs

Add a kvm_ prefix to avoid polluting kernel's name space.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: Move device assignment logic to common code
Xiantao Zhang [Mon, 6 Oct 2008 05:47:38 +0000 (13:47 +0800)]
KVM: Move device assignment logic to common code

To share with other archs, this patch moves device assignment
logic to common parts.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: Device Assignment: Move vtd.c from arch/x86/kvm/ to virt/kvm/
Zhang xiantao [Thu, 11 Sep 2008 05:19:32 +0000 (13:19 +0800)]
KVM: Device Assignment: Move vtd.c from arch/x86/kvm/ to virt/kvm/

Preparation for kvm/ia64 VT-d support.

Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: VMX: enable invlpg exiting if EPT is disabled
Marcelo Tosatti [Tue, 7 Oct 2008 20:01:27 +0000 (17:01 -0300)]
KVM: VMX: enable invlpg exiting if EPT is disabled

Manually disabling EPT via module option fails to re-enable INVLPG
exiting.

Reported-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86: Silence various LAPIC-related host kernel messages
Jan Kiszka [Tue, 30 Sep 2008 08:41:06 +0000 (10:41 +0200)]
KVM: x86: Silence various LAPIC-related host kernel messages

KVM-x86 dumps a lot of debug messages that have no meaning for normal
operation:
 - INIT de-assertion is ignored
 - SIPIs are sent and received
 - APIC writes are unaligned or < 4 byte long
   (Windows Server 2003 triggers this on SMP)

Degrade them to true debug messages, keeping the host kernel log clean
for real problems.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: Device Assignment: Map mmio pages into VT-d page table
Weidong Han [Thu, 25 Sep 2008 15:32:02 +0000 (23:32 +0800)]
KVM: Device Assignment: Map mmio pages into VT-d page table

Assigned device could DMA to mmio pages, so also need to map mmio pages
into VT-d page table.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: PIC: enhance IPI avoidance
Marcelo Tosatti [Wed, 24 Sep 2008 23:28:34 +0000 (20:28 -0300)]
KVM: PIC: enhance IPI avoidance

The PIC code makes little effort to avoid kvm_vcpu_kick(), resulting in
unnecessary guest exits in some conditions.

For example, if the timer interrupt is routed through the IOAPIC, IRR
for IRQ 0 will get set but not cleared, since the APIC is handling the
acks.

This means that everytime an interrupt < 16 is triggered, the priority
logic will find IRQ0 pending and send an IPI to vcpu0 (in case IRQ0 is
not masked, which is Linux's case).

Introduce a new variable isr_ack to represent the IRQ's for which the
guest has been signalled / cleared the ISR. Use it to avoid more than
one IPI per trigger-ack cycle, in addition to the avoidance when ISR is
set in get_priority().

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: add "oos_shadow" parameter to disable oos
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:41 +0000 (13:18 -0300)]
KVM: MMU: add "oos_shadow" parameter to disable oos

Subject says it all.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: speed up mmu_unsync_walk
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:40 +0000 (13:18 -0300)]
KVM: MMU: speed up mmu_unsync_walk

Cache the unsynced children information in a per-page bitmap.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: out of sync shadow core
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:39 +0000 (13:18 -0300)]
KVM: MMU: out of sync shadow core

Allow guest pagetables to go out of sync.  Instead of emulating write
accesses to guest pagetables, or unshadowing them, we un-write-protect
the page table and allow the guest to modify it at will.  We rely on
invlpg executions to synchronize individual ptes, and will synchronize
the entire pagetable on tlb flushes.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: mmu_convert_notrap helper
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:38 +0000 (13:18 -0300)]
KVM: MMU: mmu_convert_notrap helper

Need to convert shadow_notrap_nonpresent -> shadow_trap_nonpresent when
unsyncing pages.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: awareness of new kvm_mmu_zap_page behaviour
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:37 +0000 (13:18 -0300)]
KVM: MMU: awareness of new kvm_mmu_zap_page behaviour

kvm_mmu_zap_page will soon zap the unsynced children of a page. Restart
list walk in such case.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: mmu_parent_walk
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:36 +0000 (13:18 -0300)]
KVM: MMU: mmu_parent_walk

Introduce a function to walk all parents of a given page, invoking a handler.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: x86: trap invlpg
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:35 +0000 (13:18 -0300)]
KVM: x86: trap invlpg

With pages out of sync invlpg needs to be trapped. For now simply nuke
the entry.

Untested on AMD.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: sync roots on mmu reload
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:34 +0000 (13:18 -0300)]
KVM: MMU: sync roots on mmu reload

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: mode specific sync_page
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:33 +0000 (13:18 -0300)]
KVM: MMU: mode specific sync_page

Examine guest pagetable and bring the shadow back in sync. Caller is responsible
for local TLB flush before re-entering guest mode.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: do not write-protect large mappings
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:32 +0000 (13:18 -0300)]
KVM: MMU: do not write-protect large mappings

There is not much point in write protecting large mappings. This
can only happen when a page is shadowed during the window between
is_largepage_backed and mmu_lock acquision. Zap the entry instead, so
the next pagefault will find a shadowed page via is_largepage_backed and
fallback to 4k translations.

Simplifies out of sync shadow.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: move local TLB flush to mmu_set_spte
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:31 +0000 (13:18 -0300)]
KVM: MMU: move local TLB flush to mmu_set_spte

Since the sync page path can collapse flushes.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: split mmu_set_spte
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:30 +0000 (13:18 -0300)]
KVM: MMU: split mmu_set_spte

Split the spte entry creation code into a new set_spte function.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: MMU: flush remote TLBs on large->normal entry overwrite
Marcelo Tosatti [Tue, 23 Sep 2008 16:18:29 +0000 (13:18 -0300)]
KVM: MMU: flush remote TLBs on large->normal entry overwrite

It is necessary to flush all TLB's when a large spte entry is
overwritten with a normal page directory pointer.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agox86: pvclock: fix shadowed variable warning
Harvey Harrison [Tue, 23 Sep 2008 18:01:45 +0000 (11:01 -0700)]
x86: pvclock: fix shadowed variable warning

arch/x86/kernel/pvclock.c:102:6: warning: symbol 'tsc_khz' shadows an earlier one
include/asm/tsc.h:18:21: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: ia64: add support for Tukwila processors
Xiantao Zhang [Fri, 12 Sep 2008 22:21:22 +0000 (06:21 +0800)]
KVM: ia64: add support for Tukwila processors

In Tukwila processor, VT-i has been enhanced in its
implementation, it is often called VT-i2 techonology.
With VTi-2 support, virtulization performance should be
improved. In this patch, we added the related stuff to
support kvm/ia64 for Tukwila processors.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: ia64: Implement a uniform vps interface
Xiantao Zhang [Fri, 12 Sep 2008 12:23:11 +0000 (20:23 +0800)]
KVM: ia64: Implement a uniform vps interface

An uniform entry kvm_vps_entry is added for
vps_sync_write/read, vps_resume_handler/guest,
and branches to differnt PAL service according to the offset.

Singed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: Remove useless intel-iommu.h header inclusion
Weidong Han [Wed, 24 Sep 2008 05:39:57 +0000 (13:39 +0800)]
KVM: Remove useless intel-iommu.h header inclusion

Currently "#include <linux/intel-iommu.h>" is not needed in
virt/kvm/kvm_main.c.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: Don't destroy vcpu in case vcpu_setup fails
Glauber Costa [Thu, 18 Sep 2008 02:16:59 +0000 (23:16 -0300)]
KVM: Don't destroy vcpu in case vcpu_setup fails

One of vcpu_setup responsibilities is to do mmu initialization.
However, in case we fail in kvm_arch_vcpu_reset, before we get the
chance to init mmu. OTOH, vcpu_destroy will attempt to destroy mmu,
triggering a bug. Keeping track of whether or not mmu is initialized
would unnecessarily complicate things. Rather, we just make return,
making sure any needed uninitialization is done before we return, in
case we fail.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: don't enter guest after SIPI was received by a CPU
Gleb Natapov [Mon, 22 Sep 2008 11:28:53 +0000 (14:28 +0300)]
KVM: don't enter guest after SIPI was received by a CPU

The vcpu should process pending SIPI message before entering guest mode again.
kvm_arch_vcpu_runnable() returns true if the vcpu is in SIPI state, so
we can't call it here.

Signed-off-by: Gleb Natapov <gleb@qumranet.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoMAINTAINERS: Update Avi Kivity's email address
Avi Kivity [Sat, 20 Sep 2008 02:25:30 +0000 (19:25 -0700)]
MAINTAINERS: Update Avi Kivity's email address

Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: x86.c make kvm_load_realmode_segment static
Harvey Harrison [Fri, 22 Aug 2008 20:29:17 +0000 (13:29 -0700)]
KVM: x86.c make kvm_load_realmode_segment static

Noticed by sparse:
arch/x86/kvm/x86.c:3591:5: warning: symbol 'kvm_load_realmode_segment' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: switch to get_user_pages_fast
Marcelo Tosatti [Tue, 16 Sep 2008 23:54:47 +0000 (20:54 -0300)]
KVM: switch to get_user_pages_fast

Convert gfn_to_pfn to use get_user_pages_fast, which can do lockless
pagetable lookups on x86. Kernel compilation on 4-way guest is 3.7%
faster on VMX.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: opencode gfn_to_page in kvm_vm_fault
Marcelo Tosatti [Tue, 16 Sep 2008 23:54:46 +0000 (20:54 -0300)]
KVM: opencode gfn_to_page in kvm_vm_fault

kvm_vm_fault is invoked with mmap_sem held in read mode. Since gfn_to_page
will be converted to get_user_pages_fast, which requires this lock NOT
to be held, switch to opencoded get_user_pages.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: Device Assignment: Free device structures if IRQ allocation fails
Amit Shah [Tue, 16 Sep 2008 15:04:28 +0000 (18:04 +0300)]
KVM: Device Assignment: Free device structures if IRQ allocation fails

When an IRQ allocation fails, we free up the device structures and
disable the device so that we can unregister the device in the
userspace and not expose it to the guest at all.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
17 years agoKVM: Device Assignment with VT-d
Ben-Ami Yassour [Sun, 14 Sep 2008 00:48:28 +0000 (03:48 +0300)]
KVM: Device Assignment with VT-d

Based on a patch by: Kay, Allen M <allen.m.kay@intel.com>

This patch enables PCI device assignment based on VT-d support.
When a device is assigned to the guest, the guest memory is pinned and
the mapping is updated in the VT-d IOMMU.

[Amit: Expose KVM_CAP_IOMMU so we can check if an IOMMU is present
and also control enable/disable from userspace]

Signed-off-by: Kay, Allen M <allen.m.kay@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Ben-Ami Yassour <benami@il.ibm.com>
Signed-off-by: Amit Shah <amit.shah@qumranet.com>
Acked-by: Mark Gross <mgross@linux.intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoVT-d: Changes to support KVM
Kay, Allen M [Tue, 9 Sep 2008 15:37:29 +0000 (18:37 +0300)]
VT-d: Changes to support KVM

This patch extends the VT-d driver to support KVM

[Ben: fixed memory pinning]
[avi: move dma_remapping.h as well]

Signed-off-by: Kay, Allen M <allen.m.kay@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Ben-Ami Yassour <benami@il.ibm.com>
Signed-off-by: Amit Shah <amit.shah@qumranet.com>
Acked-by: Mark Gross <mgross@linux.intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years ago[ARM] 5308/1: Fix Viper ISA IRQ handling
Marc Zyngier [Wed, 15 Oct 2008 11:54:05 +0000 (12:54 +0100)]
[ARM] 5308/1: Fix Viper ISA IRQ handling

The ISA IRQ renumbering broke the Viper ISA code in interesting ways.
It originally assumed that ISA interrupt were numbered in the order that
is defined by the CPLD registers. Unfortunately, this is no longer the
case.

Furthermore, the viper_irq_handler() function being a chained IRQ
handler, it must ACK the interrupt by itself, or the handler will be
immediately reentered, with the expected damages.

This fix was made possible thanks to the help of David Raeman, who
provided debug information and tested each version of this patch.

Tested-by: David Raeman <david.raeman@gmail.com>
Signed-off-by: Marc Zyngier <maz@misterjones.org>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoMIPS: Kill unused <asm/debug.h> inclusions
Shinya Kuribayashi [Sun, 12 Oct 2008 13:56:11 +0000 (22:56 +0900)]
MIPS: Kill unused <asm/debug.h> inclusions

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: IP32: Add platform device for CMOS RTC; remove dead code
Thomas Bogendoerfer [Mon, 22 Sep 2008 22:53:20 +0000 (00:53 +0200)]
MIPS: IP32: Add platform device for CMOS RTC; remove dead code

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoRTC: M48T35: new RTC driver
Thomas Bogendoerfer [Tue, 14 Oct 2008 15:17:32 +0000 (17:17 +0200)]
RTC: M48T35: new RTC driver

This driver replaces the broken ip27-rtc driver in drivers/char and
gives back RTC support for SGI IP27 machines.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Alessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: IP27: Switch over to RTC class driver
Thomas Bogendoerfer [Tue, 14 Oct 2008 15:17:28 +0000 (17:17 +0200)]
MIPS: IP27: Switch over to RTC class driver

This patchset removes some dead code and creates a platform device
for the RTC class driver.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: DS1286: New RTC driver
Thomas Bogendoerfer [Tue, 14 Oct 2008 15:16:59 +0000 (17:16 +0200)]
MIPS: DS1286: New RTC driver

This driver replaces the broken DS1286 driver in drivers/char and gives back
RTC support for SGI IP22 and IP28 machines.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Alessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: IP22/28: Switch over to RTC class driver
Thomas Bogendoerfer [Tue, 14 Oct 2008 15:16:55 +0000 (17:16 +0200)]
MIPS: IP22/28: Switch over to RTC class driver

This patchset removes some dead code and creates a platform device
for the RTC class driver.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: PCI: Scan busses when they are registered
Aurelien Jarno [Tue, 14 Oct 2008 09:45:09 +0000 (11:45 +0200)]
MIPS: PCI: Scan busses when they are registered

The patch below changes register_pci_controller() such that controllers
being added after pcibios_init() has run are be scanned immediately.

This is needed for example by the BCM47xx PCI controller, which is located
on the SSB bus, which is now initialized after the PCI subsystem.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: WGT634U: Add reset button support
Aurelien Jarno [Tue, 14 Oct 2008 09:44:43 +0000 (11:44 +0200)]
MIPS: WGT634U: Add reset button support

This patch adds support for the reset button of WGT634U machine, using
GPIO interrupts. Based on a patch from Michel Lespinasse.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: BCM47xx: Use the new SSB GPIO API
Aurelien Jarno [Tue, 14 Oct 2008 09:44:26 +0000 (11:44 +0200)]
MIPS: BCM47xx: Use the new SSB GPIO API

This patch simplifies the BCM47xx GPIO code by using the new SSB GPIO
API, which does a lot things that were implemented directly in the
BCM47xx code.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: BCM47xx: Remove references to BCM947XX
Aurelien Jarno [Tue, 14 Oct 2008 09:43:47 +0000 (11:43 +0200)]
MIPS: BCM47xx: Remove references to BCM947XX

This patch removes the remaining reference to the BCM947xx development
board codename.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: WGT634U: Add machine detection message
Aurelien Jarno [Tue, 14 Oct 2008 09:42:10 +0000 (11:42 +0200)]
MIPS: WGT634U: Add machine detection message

This adds a printk message when a WGT634U machine is detected.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: Align .data.cacheline_aligned based on CONFIG_MIPS_L1_CACHE_SHIFT
David Daney [Mon, 13 Oct 2008 23:36:13 +0000 (16:36 -0700)]
MIPS: Align .data.cacheline_aligned based on CONFIG_MIPS_L1_CACHE_SHIFT

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: show_cpuinfo prints the type of the calling CPU
Johannes Dickgreber [Mon, 13 Oct 2008 17:36:21 +0000 (19:36 +0200)]
MIPS: show_cpuinfo prints the type of the calling CPU

It should print the type of the Nth processor.

Signed-off-by: Johannes Dickgreber <tanzy@gmx.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: Fix wrong branch target in new spin_lock code.
Johannes Dickgreber [Mon, 13 Oct 2008 17:33:32 +0000 (19:33 +0200)]
MIPS: Fix wrong branch target in new spin_lock code.

Signed-off-by: Johannes Dickgreber <tanzy@gmx.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMIPS: Have a heart for a lonely, lost header file ...
Ralf Baechle [Mon, 13 Oct 2008 12:41:55 +0000 (13:41 +0100)]
MIPS: Have a heart for a lonely, lost header file ...

... and move it to where all its brothers and sisters reside.  Requested by
Shane McDonald <mcdonald.shane@gmail.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agoMerge branch 'linus' into stackprotector
Ingo Molnar [Wed, 15 Oct 2008 11:46:29 +0000 (13:46 +0200)]
Merge branch 'linus' into stackprotector

Conflicts:
arch/x86/kernel/Makefile
include/asm-x86/pda.h

17 years ago[ARM] 5307/1: pxa: fix CM-X2XX PCMCIA build error
Mike Rapoport [Wed, 15 Oct 2008 10:37:35 +0000 (11:37 +0100)]
[ARM] 5307/1: pxa: fix CM-X2XX PCMCIA build error

Fix build error introduced by commit 27c4cae28148ad97baa2bf8275f7ebc9e2c37c34
[ARM] pxa: allow multi-machine PCMCIA builds

MODPOST 76 modules
ERROR: "cmx270_pcmcia_exit" [drivers/pcmcia/pxa2xx_cm_x2xx.ko] undefined!
ERROR: "cmx255_pcmcia_exit" [drivers/pcmcia/pxa2xx_cm_x2xx.ko] undefined!
ERROR: "cmx270_pcmcia_init" [drivers/pcmcia/pxa2xx_cm_x2xx.ko] undefined!
ERROR: "cmx255_pcmcia_init" [drivers/pcmcia/pxa2xx_cm_x2xx.ko] undefined!
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make: *** [sub-make] Error 2

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 5306/1: pxa: fix build error on CM-X270
Mike Rapoport [Wed, 15 Oct 2008 10:07:21 +0000 (11:07 +0100)]
[ARM] 5306/1: pxa: fix build error on CM-X270

Fix build for CM-X2XX with CONFIG_RTC_DRV_V3020 unset:

CC      arch/arm/mach-pxa/cm-x270.o
/mnt/sdb1/git/linux-2.6-arm/arch/arm/mach-pxa/cm-x270.c: In function 'cmx270_init':
/mnt/sdb1/git/linux-2.6-arm/arch/arm/mach-pxa/cm-x270.c:338: error: implicit declaration of function 'cmx270_init_rtc'
make[2]: *** [arch/arm/mach-pxa/cm-x270.o] Error 1

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agomd: build failure due to missing delay.h
Stephen Rothwell [Tue, 14 Oct 2008 22:09:21 +0000 (09:09 +1100)]
md: build failure due to missing delay.h

Today's linux-next build (powerpc ppc64_defconfig) failed like this:

drivers/md/raid1.c: In function 'sync_request':
drivers/md/raid1.c:1759: error: implicit declaration of function 'msleep_interruptible'
make[3]: *** [drivers/md/raid1.o] Error 1
make[3]: *** Waiting for unfinished jobs....
drivers/md/raid10.c: In function 'sync_request':
drivers/md/raid10.c:1749: error: implicit declaration of function 'msleep_interruptible'
make[3]: *** [drivers/md/raid10.o] Error 1
drivers/md/md.c: In function 'md_do_sync':
drivers/md/md.c:5915: error: implicit declaration of function 'msleep'

Caused by commit 6caa3b0bbdb474647f6bdd8a958ffc46f78d8d58 ("md: Remove
unnecessary #includes, #defines, and function declarations").  I added
the following patch.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NeilBrown <neilb@suse.de>
17 years agoMerge branches 'core/softlockup', 'core/softirq', 'core/resources', 'core/printk...
Ingo Molnar [Wed, 15 Oct 2008 10:48:44 +0000 (12:48 +0200)]
Merge branches 'core/softlockup', 'core/softirq', 'core/resources', 'core/printk' and 'core/misc' into core-v28-for-linus

17 years agoALSA: us122l: fix missing unlock in usb_stream_hwdep_vm_fault()
Li Zefan [Wed, 15 Oct 2008 02:07:23 +0000 (10:07 +0800)]
ALSA: us122l: fix missing unlock in usb_stream_hwdep_vm_fault()

Should unlock us122l->mutex before returning VM_FAULT_SIGBUS.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: hda - Fix quirk lists for realtek codecs
Kailang Yang [Wed, 15 Oct 2008 09:23:27 +0000 (11:23 +0200)]
ALSA: hda - Fix quirk lists for realtek codecs

- Fix Toshiba S06 SSID to 1179:ff7b
- Fix ASUS G50V quirk name
- Add ASUS N20 quirk

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: hda - Add support of ALC272
Kailang Yang [Wed, 15 Oct 2008 09:22:09 +0000 (11:22 +0200)]
ALSA: hda - Add support of ALC272

Added the support of ALC272 codec.  It's almost compatible with ALC663.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: hda - Add ALC887 support
Kailang Yang [Wed, 15 Oct 2008 09:20:21 +0000 (11:20 +0200)]
ALSA: hda - Add ALC887 support

Added ALC887 support.  It's almost compatible with ALC883/888.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: hda - Add ALC1200 support
Kailang Yang [Wed, 15 Oct 2008 09:18:05 +0000 (11:18 +0200)]
ALSA: hda - Add ALC1200 support

Add ALC1200 codec support.  Almost compatible with ALC888.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: hda - Fix PCI SSID of ASUS M90V
Kailang Yang [Wed, 15 Oct 2008 09:14:58 +0000 (11:14 +0200)]
ALSA: hda - Fix PCI SSID of ASUS M90V

ASUS M90V has PCI SSID 1043:1873.  Corrected in the quirk list.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoALSA: hda - Add auto mic switch in realtek auto-probe mode
Kailang Yang [Wed, 15 Oct 2008 09:12:35 +0000 (11:12 +0200)]
ALSA: hda - Add auto mic switch in realtek auto-probe mode

Add the automatic mic switch via jack sensing in auto-probe mode
for Realtek codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years ago[WATCHDOG] ib700wdt.c - fix buffer_underflow bug
Wim Van Sebroeck [Wed, 15 Oct 2008 08:53:06 +0000 (08:53 +0000)]
[WATCHDOG] ib700wdt.c - fix buffer_underflow bug

This fixes Bug 11399:
if ibwdt_set_heartbeat(int t) is called with value 30 then
the check "if ((t < 0) || (t > 30))" in ibwdt_set_heartbeat
is not going to fail because t == 30, but in the loop, the
check wd_times[i] > t is never going to be true because
none of the wd_times are greater than the value of t (i.e. 30).
So we are exiting the loop with i == -1 and therefore setting
wd_margin to -1 which is wrong.

Reported-by: Zvonimir Rakamaric <zrakamar@cs.ubc.ca>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years agoKVM: x86 emulator: Use DstAcc for 'and'
Guillaume Thouvenin [Fri, 12 Sep 2008 11:52:18 +0000 (13:52 +0200)]
KVM: x86 emulator: Use DstAcc for 'and'

For instruction 'and al,imm' we use DstAcc instead of doing
the emulation directly into the instruction's opcode.

Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86 emulator: Add cmp al, imm and cmp ax, imm instructions (ocodes 3c, 3d)
Guillaume Thouvenin [Fri, 12 Sep 2008 11:51:15 +0000 (13:51 +0200)]
KVM: x86 emulator: Add cmp al, imm and cmp ax, imm instructions (ocodes 3c, 3d)

Add decode entries for these opcodes; execution is already implemented.

Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86 emulator: Add DstAcc operand type
Guillaume Thouvenin [Fri, 12 Sep 2008 11:50:25 +0000 (13:50 +0200)]
KVM: x86 emulator: Add DstAcc operand type

Add DstAcc operand type. That means that there are 4 bits now for
DstMask.

"In the good old days cpus would have only one register that was able to
 fully participate in arithmetic operations, typically called A for
 Accumulator.  The x86 retains this tradition by having special, shorter
 encodings for the A register (like the cmp opcode), and even some
 instructions that only operate on A (like mul).

 SrcAcc and DstAcc would accommodate these instructions by decoding A
 into the corresponding 'struct operand'."
  -- Avi Kivity

Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agox86: Move FEATURE_CONTROL bits to msr-index.h
Sheng Yang [Thu, 11 Sep 2008 07:27:50 +0000 (15:27 +0800)]
x86: Move FEATURE_CONTROL bits to msr-index.h

For MSR_IA32_FEATURE_CONTROL is already there.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: VMX: Rename IA32_FEATURE_CONTROL bits
Sheng Yang [Thu, 11 Sep 2008 07:27:49 +0000 (15:27 +0800)]
KVM: VMX: Rename IA32_FEATURE_CONTROL bits

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoMAINTAINERS: add entry for the KVM AMD module
Joerg Roedel [Wed, 10 Sep 2008 18:01:07 +0000 (20:01 +0200)]
MAINTAINERS: add entry for the KVM AMD module

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86 emulator: fix jmp r/m64 instruction
Avi Kivity [Thu, 11 Sep 2008 16:47:13 +0000 (19:47 +0300)]
KVM: x86 emulator: fix jmp r/m64 instruction

jmp r/m64 doesn't require the rex.w prefix to indicate the operand size
is 64 bits.  Set the Stack attribute (even though it doesn't involve the
stack, really) to indicate this.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: VMX: Cleanup stalled INTR_INFO read
Jan Kiszka [Thu, 11 Sep 2008 10:58:00 +0000 (12:58 +0200)]
KVM: VMX: Cleanup stalled INTR_INFO read

Commit 1c0f4f5011829dac96347b5f84ba37c2252e1e08 left a useless access
of VM_ENTRY_INTR_INFO_FIELD in vmx_intr_assist behind. Clean this up.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: ppc: kvmppc_44x_shadow_release() does not require mmap_sem to be locked
Hollis Blanchard [Thu, 11 Sep 2008 15:04:29 +0000 (10:04 -0500)]
KVM: ppc: kvmppc_44x_shadow_release() does not require mmap_sem to be locked

And it gets in the way of get_user_pages_fast().

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86: unhalt vcpu0 on reset
Marcelo Tosatti [Wed, 10 Sep 2008 19:40:55 +0000 (16:40 -0300)]
KVM: x86: unhalt vcpu0 on reset

Since "KVM: x86: do not execute halted vcpus", HLT by vcpu0 before system
reset by the IO thread will hang the guest.

Mark vcpu as runnable in such case.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86 emulator: Add call near absolute instruction (opcode 0xff/2)
Mohammed Gamal [Mon, 8 Sep 2008 18:47:19 +0000 (21:47 +0300)]
KVM: x86 emulator: Add call near absolute instruction (opcode 0xff/2)

Add call near absolute instruction.

Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86: do not execute halted vcpus
Marcelo Tosatti [Mon, 8 Sep 2008 18:23:48 +0000 (15:23 -0300)]
KVM: x86: do not execute halted vcpus

Offline or uninitialized vcpu's can be executed if requested to perform
userspace work.

Follow Avi's suggestion to handle halted vcpu's in the main loop,
simplifying kvm_emulate_halt(). Introduce a new vcpu->requests bit to
indicate events that promote state from halted to running.

Also standardize vcpu wake sites.

Signed-off-by: Marcelo Tosatti <mtosatti <at> redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86 emulator: Add in/out instructions (opcodes 0xe4-0xe7, 0xec-0xef)
Mohammed Gamal [Sat, 6 Sep 2008 14:22:29 +0000 (17:22 +0300)]
KVM: x86 emulator: Add in/out instructions (opcodes 0xe4-0xe7, 0xec-0xef)

The patch adds in/out instructions to the x86 emulator.

The instruction was encountered while running the BIOS while using
the invalid guest state emulation patch.

Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: Add statistics for guest irq injections
Avi Kivity [Mon, 1 Sep 2008 12:57:51 +0000 (15:57 +0300)]
KVM: Add statistics for guest irq injections

These can help show whether a guest is making progress or not.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: MMU: Modify kvm_shadow_walk.entry to accept u64 addr
Sheng Yang [Mon, 1 Sep 2008 11:41:20 +0000 (19:41 +0800)]
KVM: MMU: Modify kvm_shadow_walk.entry to accept u64 addr

EPT is 4 level by default in 32pae(48 bits), but the addr parameter
of kvm_shadow_walk->entry() only accept unsigned long as virtual
address, which is 32bit in 32pae. This result in SHADOW_PT_INDEX()
overflow when try to fetch level 4 index.

Fix it by extend kvm_shadow_walk->entry() to accept 64bit addr in
parameter.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: ia64: Implement kvm_arch_vcpu_ioctl_{set,get}_mpstate
Xiantao Zhang [Thu, 28 Aug 2008 01:34:08 +0000 (09:34 +0800)]
KVM: ia64: Implement kvm_arch_vcpu_ioctl_{set,get}_mpstate

Two ioctl arch functions are added to set vcpu's smp state.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86 emulator: Add std and cld instructions (opcodes 0xfc-0xfd)
Mohammed Gamal [Mon, 1 Sep 2008 01:52:24 +0000 (04:52 +0300)]
KVM: x86 emulator: Add std and cld instructions (opcodes 0xfc-0xfd)

This adds the std and cld instructions to the emulator.

Encountered while running the BIOS with invalid guest
state emulation enabled.

Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: s390: change help text of guest Kconfig
Christian Borntraeger [Fri, 29 Aug 2008 11:30:56 +0000 (13:30 +0200)]
KVM: s390: change help text of guest Kconfig

The current help text for CONFIG_S390_GUEST is not very helpful.
Lets add more text.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: s390: Make facility bits future-proof
Christian Borntraeger [Fri, 29 Aug 2008 11:29:45 +0000 (13:29 +0200)]
KVM: s390: Make facility bits future-proof

Heiko Carstens pointed out, that its safer to activate working facilities
instead of disabling problematic facilities. The new code uses the host
facility bits and masks it with known good ones.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: add MC5_MISC msr read support
Joerg Roedel [Fri, 29 Aug 2008 09:52:07 +0000 (11:52 +0200)]
KVM: add MC5_MISC msr read support

Currently KVM implements MC0-MC4_MISC read support. When booting Linux this
results in KVM warnings in the kernel log when the guest tries to read
MC5_MISC. Fix this warnings with this patch.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: SVM: No need to unprotect memory during event injection when using npt
Avi Kivity [Thu, 28 Aug 2008 15:27:15 +0000 (18:27 +0300)]
KVM: SVM: No need to unprotect memory during event injection when using npt

No memory is protected anyway.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: MMU: Fix setting the accessed bit on non-speculative sptes
Avi Kivity [Wed, 27 Aug 2008 17:01:04 +0000 (20:01 +0300)]
KVM: MMU: Fix setting the accessed bit on non-speculative sptes

The accessed bit was accidentally turned on in a random flag word, rather
than, the spte itself, which was lucky, since it used the non-EPT compatible
PT_ACCESSED_MASK.

Fix by turning the bit on in the spte and changing it to use the portable
accessed mask.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: MMU: Flush tlbs after clearing write permission when accessing dirty log
Avi Kivity [Wed, 27 Aug 2008 13:40:51 +0000 (16:40 +0300)]
KVM: MMU: Flush tlbs after clearing write permission when accessing dirty log

Otherwise, the cpu may allow writes to the tracked pages, and we lose
some display bits or fail to migrate correctly.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: MMU: Add locking around kvm_mmu_slot_remove_write_access()
Avi Kivity [Wed, 27 Aug 2008 13:32:24 +0000 (16:32 +0300)]
KVM: MMU: Add locking around kvm_mmu_slot_remove_write_access()

It was generally safe due to slots_lock being held for write, but it wasn't
very nice.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: MMU: Account for npt/ept/realmode page faults
Avi Kivity [Wed, 27 Aug 2008 13:30:56 +0000 (16:30 +0300)]
KVM: MMU: Account for npt/ept/realmode page faults

Now that two-dimensional paging is becoming common, account for tdp page
faults.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86 emulator: Add mov r, imm instructions (opcodes 0xb0-0xbf)
Mohammed Gamal [Wed, 27 Aug 2008 02:02:56 +0000 (05:02 +0300)]
KVM: x86 emulator: Add mov r, imm instructions (opcodes 0xb0-0xbf)

The emulator only supported one instance of mov r, imm instruction
(opcode 0xb8), this adds the rest of these instructions.

Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: Don't call get_user_pages(.force = 1)
Avi Kivity [Tue, 26 Aug 2008 14:31:31 +0000 (17:31 +0300)]
KVM: Don't call get_user_pages(.force = 1)

This is esoteric and only needed to break COW on MAP_SHARED mappings.  Since
KVM no longer does these sorts of mappings, breaking COW on them is no longer
necessary.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: Allocate guest memory as MAP_PRIVATE, not MAP_SHARED
Avi Kivity [Tue, 26 Aug 2008 14:22:47 +0000 (17:22 +0300)]
KVM: Allocate guest memory as MAP_PRIVATE, not MAP_SHARED

There is no reason to share internal memory slots with fork()ed instances.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: MMU: Convert the paging mode shadow walk to use the generic walker
Avi Kivity [Fri, 22 Aug 2008 16:11:39 +0000 (19:11 +0300)]
KVM: MMU: Convert the paging mode shadow walk to use the generic walker

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: MMU: Convert direct maps to use the generic shadow walker
Avi Kivity [Fri, 22 Aug 2008 16:28:04 +0000 (19:28 +0300)]
KVM: MMU: Convert direct maps to use the generic shadow walker

Signed-off-by: Avi Kivity <avi@qumranet.com>