[COMMIT master] device assignment: default requires IOMMU

2010-01-11 Thread Avi Kivity
From: Chris Wright chr...@sous-sol.org The default mode for device assignment is to rely on an IOMMU for proper translations and a functioning device in the guest. The current logic makes this requirement advisory, and simply disables the request for IOMMU if one is not found on the host. This

[COMMIT master] remove references of roms/pcbios from configure

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/configure b/configure index cbbf9d0..48816e1 100755 --- a/configure +++ b/configure @@ -2781,12 +2781,12 @@ done # for target in $targets # build tree in object directory if source path is

[COMMIT master] Fix build failure with DEVICE_ASSIGNMENT_DEBUG.

2010-01-11 Thread Avi Kivity
From: Kusanagi Kouichi sl...@ac.auone-net.jp If DEVICE_ASSIGNMENT_DEBUG is defined, build fails. Signed-off-by: Kusanagi Kouichi sl...@ac.auone-net.jp Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 110fd37..f4a1e32 100644

[COMMIT master] Merge branch 'upstream-merge'

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com * upstream-merge: (72 commits) Drop --whole-archive and static libraries vnc: Fix artifacts in hextile decoding Cocoa: Use optimized drawing for the window Cocoa: Suppress window resize animation Cocoa: Shutdown when window is closed Cocoa:

[COMMIT master] configure: Remote cap from kvm options

2010-01-11 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/configure b/configure index 08430e8..20c374a 100755 --- a/configure +++ b/configure @@ -540,13 +540,13 @@ for opt do ;; --enable-kvm) kvm=yes ;; - --disable-kvm-cap-pit) kvm_cap_pit=no +

[COMMIT master] configure: Correct KVM options in help output

2010-01-11 Thread Avi Kivity
From: Pierre Riteau pierre.rit...@irisa.fr Signed-off-by: Pierre Riteau pierre.rit...@irisa.fr Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/configure b/configure index 81c44e8..4254485 100755 --- a/configure +++ b/configure @@ -756,10 +756,10 @@ echo --disable-bluez

[COMMIT master] pci.h: remove duplicate PCI_SLOT/PCI_FUNC defines

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/hw/pci.h b/hw/pci.h index bf63912..8c37f14 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -10,10 +10,6 @@ struct kvm_irq_routing_entry; /* PCI includes legacy ISA access. */ #include isa.h -/*

[COMMIT master] Merge branch 'upstream-merge'

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com * upstream-merge: (23 commits) target-arm: fix strexd linux-user: fix build with gcc-4.1 linuxboot.bin is a generated file qemu-nbd: fix OpenBSD linker warning e1000: add link to data sheet qemu-io: suppress a warning with gcc 4.0.2 Compile

[COMMIT master] KVM: trivial document fixes

2010-01-11 Thread Avi Kivity
From: Wu Fengguang fengguang...@intel.com Signed-off-by: Wu Fengguang fengguang...@intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 2811e45..c6416a3 100644 --- a/Documentation/kvm/api.txt +++

[COMMIT master] KVM: modify alias layout in x86s struct kvm_arch

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Have a pointer to an allocated region inside x86's kvm_arch. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index fe4df46..7cdcb3d 100644 ---

[COMMIT master] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[COMMIT master] KVM: split kvm_arch_set_memory_region into prepare and commit

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Required for SRCU convertion later. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 5fdeec5..4e05dae 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@

[COMMIT master] KVM: use gfn_to_pfn_memslot in kvm_iommu_map_pages

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com So its possible to iommu map a memslot before making it visible to kvm. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index f59233f..7780cce 100644 --- a/include/linux/kvm_host.h +++

[COMMIT master] KVM: use SRCU for dirty log

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 5a7d8ee..030ddef 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2416,27 +2416,60 @@ static int kvm_vm_ioctl_reinject(struct kvm

[COMMIT master] KVM: introduce gfn_to_pfn_memslot

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Which takes a memslot pointer instead of using kvm-memslots. To be used by SRCU convertion later. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 6c61833..f59233f 100644 ---

[COMMIT master] KVM: Fill out ftrace exit reason strings

2010-01-11 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Some exit reasons missed their strings; fill out the table. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 5fd28f5..455984a 100644 --- a/arch/x86/kvm/vmx.c

[COMMIT master] KVM: introduce kvm-srcu and convert kvm_set_memory_region to SRCU update

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Use two steps for memslot deletion: mark the slot invalid (which stops instantiation of new shadow pages for that slot, but allows destruction), then instantiate the new empty slot. Also simplifies kvm_handle_hva locking. Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: switch vcpu context to use SRCU

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index f67a541..28b44cd 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@ -636,12 +636,9 @@ static void

[COMMIT master] KVM: Fix race between APIC TMR and IRR

2010-01-11 Thread Avi Kivity
From: Avi Kivity a...@redhat.com When we queue an interrupt to the local apic, we set the IRR before the TMR. The vcpu can pick up the IRR and inject the interrupt before setting the TMR, and perhaps even EOI it, causing incorrect behaviour. The race is really insignificant since it can only

[COMMIT master] KVM: PPC: Adjust memory slot accesses to SRCU changes

2010-01-11 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Commit 18657960237322b8f6ba84938d27524634212aaf apparently broke PPC Book3S compilation. This patch fixes it. Signed-off-by: Alexander Graf ag...@suse.de Reported-by: Giuseppe Falsetti giuse...@czero.it CC: Marcelo Tosatti mtosa...@redhat.com Signed-off-by:

[COMMIT master] KVM: x86: switch kvm_set_memory_alias to SRCU update

2010-01-11 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Using a similar two-step procedure as for memslots. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 7cdcb3d..6c8c7c5 100644 --- a/arch/x86/include/asm/kvm_host.h +++

[COMMIT master] KVM: Bump maximum vcpu count to 64

2010-01-11 Thread Avi Kivity
From: Avi Kivity a...@redhat.com With slots_lock converted to rcu, the entire kvm hotpath on modern processors (with npt or ept) now scales beautifully. Increase the maximum vcpu count to 64 to reflect this. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: x86: Moving PT_*_LEVEL to mmu.h

2010-01-11 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com We can use them in x86.c and vmx.c now... Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index ed4f1a3..ed40755 100644 --- a/arch/x86/kvm/mmu.c +++

[COMMIT master] KVM: PPC: Fix typo in rebolting code

2010-01-11 Thread Avi Kivity
From: Alexander Graf ag...@suse.de When we're loading bolted entries into the SLB again, we're checking if an entry is in use and only slbmte it when it is. Unfortunately, the check always goes to the skip label of the first entry, resulting in an endless loop when it actually gets triggered.

[COMMIT master] KVM: x86: Fix host_mapping_level()

2010-01-11 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com When found a error hva, should not return PAGE_SIZE but the level... Also clean up the coding style of the following loop. Cc: sta...@kernel.org Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: PPC: Add helpers for CR, XER

2010-01-11 Thread Avi Kivity
From: Alexander Graf ag...@suse.de We now have helpers for the GPRs, so let's also add some for CR and XER. Having them in the PACA simplifies code a lot, as we don't need to care about where to store CC or not to overflow any integers. Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by:

[COMMIT master] KVM: Fix the explanation of write_emulated

2010-01-11 Thread Avi Kivity
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp The explanation of write_emulated is confused with that of read_emulated. This patch fix it. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: PPC: Implement 'skip instruction' mode

2010-01-11 Thread Avi Kivity
From: Alexander Graf ag...@suse.de To fetch the last instruction we were interrupted on, we enable DR in early exit code, where we are still in a very transitional phase between guest and host state. Most of the time this seemed to work, but another CPU can easily flush our TLB and HTAB which

[COMMIT master] KVM: PPC: Get rid of unnecessary RFI

2010-01-11 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Using an RFI in IR=1 is dangerous. We need to set two SRRs and then do an RFI without getting interrupted at all, because every interrupt could potentially overwrite the SRR values. Fortunately, we don't need to RFI in at least this particular case of the code,

[COMMIT master] KVM: PPC: Fix HID5 setting code

2010-01-11 Thread Avi Kivity
From: Alexander Graf ag...@suse.de The code to unset HID5.dcbz32 is broken. This patch makes it do the right rotate magic. Signed-off-by: Alexander Graf ag...@suse.de Reported-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Avi Kivity a...@redhat.com diff --git

[COMMIT master] KVM: x86: Rename gb_page_enable() to get_lpage_level() in kvm_x86_ops

2010-01-11 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Then the callback can provide the maximum supported large page level, which is more flexible. Also move the gb page support into x86_64 specific. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: VMX: Enable EPT 1GB page support

2010-01-11 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h index 713ed9a..43f1e9b 100644 --- a/arch/x86/include/asm/vmx.h +++

[COMMIT master] KVM: PPC: Use PACA backed shadow vcpu

2010-01-11 Thread Avi Kivity
From: Alexander Graf ag...@suse.de We're being horribly racy right now. All the entry and exit code hijacks random fields from the PACA that could easily be used by different code in case we get interrupted, for example by a #MC or even page fault. After discussing this with Ben, we figured it's

[COMMIT master] KVM: PPC: Use accessor functions for GPR access

2010-01-11 Thread Avi Kivity
From: Alexander Graf ag...@suse.de All code in PPC KVM currently accesses gprs in the vcpu struct directly. While there's nothing wrong with that wrt the current way gprs are stored and loaded, it doesn't suffice for the PACA acceleration that will follow in this patchset. So let's just create

[COMMIT master] KVM: PPC: Emulate trap SRR1 flags properly

2010-01-11 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Book3S needs some flags in SRR1 to get to know details about an interrupt. One such example is the trap instruction. It tells the guest kernel that a program interrupt is due to a trap using a bit in SRR1. This patch implements above behavior, making WARN_ON