[COMMIT master] Fix rpm top directory

2009-05-15 Thread Avi Kivity
From: Avi Kivity a...@redhat.com We inherited kvm-userspace's directory structure, which is now wrong. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/Makefile b/Makefile index 1e0420e..a8e8e0b 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ install: tmpspec =

RE: event injection MACROs

2009-05-15 Thread Dong, Eddie
Gleb Natapov wrote: On Thu, May 14, 2009 at 10:34:11PM +0800, Dong, Eddie wrote: Gleb Natapov wrote: On Thu, May 14, 2009 at 09:43:33PM +0800, Dong, Eddie wrote: Avi Kivity wrote: Dong, Eddie wrote: OK. Also back to Gleb's question, the reason I want to do that is to simplify event

[PATCH 5/6] Nested SVM: Implement INVLPGA

2009-05-15 Thread Alexander Graf
SVM adds another way to do INVLPG by ASID which Hyper-V makes use of, so let's implement it! For now we just do the same thing invlpg does, as asid switching means we flush the mmu anyways. That might change one day though. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/svm.c |

[PATCH 3/6] Emulator: Inject #PF when page was not found

2009-05-15 Thread Alexander Graf
If we couldn't find a page on read_emulated, it might be a good idea to tell the guest about that and inject a #PF. We do the same already for write faults. I don't know why it was not implemented for reads. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/x86.c |7 +-- 1

[PATCH 4/6] Implement Hyper-V MSRs

2009-05-15 Thread Alexander Graf
Hyper-V uses some MSRs, some of which are actually reserved for BIOS usage. But let's be nice today and have it its way, because otherwise it fails terribly. For MSRs where I could find a name I used the name, otherwise they're just added in their hex form for now. Signed-off-by: Alexander Graf

[PATCH 0/6] Add rudimentary Hyper-V guest support

2009-05-15 Thread Alexander Graf
Now that we have nested SVM in place, let's make use of it and virtualize something non-kvm. The first interesting target that came to my mind here was Hyper-V. This patchset makes Windows Server 2008 boot with Hyper-V, which runs the dom0 in virtualized mode already. I haven't been able to run a

[PATCH 2/6] MMU: don't bail on PAT bits in PTE

2009-05-15 Thread Alexander Graf
A 64bit PTE can have bit7 set to 1 which means Use this bit for the PAT. Currently KVM's MMU code treats this bit as reserved, even though it's not. As long as we're not required to make use of the PAT bits which is only required for DMA/MMIO from my understanding, we can safely ignore it.

[PATCH 6/6] Nested SVM: Improve interrupt injection

2009-05-15 Thread Alexander Graf
While trying to get Hyper-V running, I realized that the interrupt injection mechanisms that are in place right now are not 100% correct. This patch makes nested SVM's interrupt injection behave more like on a real machine. Signed-off-by: Alexander Graf ag...@suse.de --- arch/x86/kvm/svm.c |

Re: [PATCH][KVM-AUTOTEST] TAP network support in kvm-autotest

2009-05-15 Thread jason wang
Michael Goldish 写道: Hi Micheal, thanks for your comments. Hi Jason, We already have patches that implement similar functionality here in TLV, as mentioned in the to-do list (item #4 under 'Framework'). They're not yet committed upstream because they're still quite fresh. OK, I would pay

Re: kvm-autotest: The automation plans?

2009-05-15 Thread jason wang
Michael Goldish 写道: - sudhir kumar smalik...@gmail.com wrote: On Thu, May 14, 2009 at 12:22 PM, jason wang jasow...@redhat.com wrote: sudhir kumar 写道: Hi Uri/Lucas, Do you have any plans for enhancing kvm-autotest? I was looking mainly on the following 2 aspects: (1). we

[PATCH] Don't try to mess with CPUID when running nested SVM

2009-05-15 Thread Alexander Graf
When using nested SVM we usually want the guest to see the exact CPUID values we gave it and not some mangled ones. Hyper-V for example doesn't even start when the hypervisor present bit is set. Signed-off-by: Alexander Graf ag...@suse.de --- target-i386/helper.c |4 ++-- 1 files changed, 2

Re: kvm build error with latest commit

2009-05-15 Thread Avi Kivity
Xu, Jiajun wrote: Hi all, Latest kvm can not build with 2.6.30-rc4 kernel. Could anyone help on the issue? Error as following: make[1]: Leaving directory `/workspace/ia32e/nightly/kvm-master-2.6.30-rc4-20090515011054681/qemu-kvm' The external module is now build using the kvm-kmod

Re: [PATCH 0/6] Add rudimentary Hyper-V guest support

2009-05-15 Thread Alexander Graf
On 15.05.2009, at 10:22, Alexander Graf wrote: Now that we have nested SVM in place, let's make use of it and virtualize something non-kvm. The first interesting target that came to my mind here was Hyper-V. This patchset makes Windows Server 2008 boot with Hyper-V, which runs the dom0 in

Re: Status of pci passthrough work?

2009-05-15 Thread Amit Shah
Hello, On (Thu) May 14 2009 [11:08:29], Passera, Pablo R wrote: Amit, I trying to use PVDMA. I've downloaded a kernel snapshot from the your kvm git, but I couldn't download a snapshot or the repo from your kvm-userspace tree. I tried to launch the VM using kvm-85 user space but it

Re: [PATCH] Don't try to mess with CPUID when running nested SVM

2009-05-15 Thread Avi Kivity
Alexander Graf wrote: When using nested SVM we usually want the guest to see the exact CPUID values we gave it and not some mangled ones. That would triggered by -cpu host, not nesting. @@ -1506,7 +1506,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,

Re: [PATCH] Don't try to mess with CPUID when running nested SVM

2009-05-15 Thread Alexander Graf
On 15.05.2009, at 13:09, Avi Kivity wrote: Alexander Graf wrote: When using nested SVM we usually want the guest to see the exact CPUID values we gave it and not some mangled ones. That would triggered by -cpu host, not nesting. Oh we have -cpu host already? If so, we don't need that

Re: [PATCH] Don't try to mess with CPUID when running nested SVM

2009-05-15 Thread Avi Kivity
Alexander Graf wrote: When using nested SVM we usually want the guest to see the exact CPUID values we gave it and not some mangled ones. That would triggered by -cpu host, not nesting. Oh we have -cpu host already? No, we don't :) hm - treating the hypervisor bit like any other cpuid

[PATCH] Set bit 1 in disabled processor's _STA

2009-05-15 Thread Glauber Costa
This patch sets bits 1 in disabled processor's _STA. According to the ACPI spec, this bit means: Set if the device is enabled and decoding its resources. Without it, Windows 2008 device manager shows the processors as malfunctioning hardware. Signed-off-by: Glauber Costa glom...@redhat.com ---

RE: Status of pci passthrough work?

2009-05-15 Thread Passera, Pablo R
Hi Amit, Thanks for your answer. I was able to get your userspace pvdma version. So now, I am using the PVDMA patched kernel and the PVDMA patches userspace. However, I am not able to start the VM. I am running qemu with the following options (I am trying without any pci passthrough

Re: [PATCH -tip] x86: kvm replace MSR_IA32_TIME_STAMP_COUNTER with MSR_IA32_TSC of msr-index.h

2009-05-15 Thread Jaswinder Singh Rajput
Hello Avi, On Thu, 2009-05-14 at 11:57 +0530, Jaswinder Singh Rajput wrote: Use standard msr-index.h's MSR declaration. MSR_IA32_TSC is better than MSR_IA32_TIME_STAMP_COUNTER as it also solves 80 column issue. Signed-off-by: Jaswinder Singh Rajput jaswinderraj...@gmail.com --- If this

Re: [PATCH -tip] x86: kvm/x86.c use MSR names in place of address

2009-05-15 Thread Jaswinder Singh Rajput
On Thu, 2009-05-14 at 11:00 +0530, Jaswinder Singh Rajput wrote: Here is the patch: [PATCH -tip] x86: kvm/x86.c use MSR names in place of address Replace 0xc0010010 with MSR_K8_SYSCFG and 0xc0010015 with MSR_K7_HWCR. Signed-off-by: Jaswinder Singh Rajput jaswinderraj...@gmail.com ---

Re: [PATCH 2/6] MMU: don't bail on PAT bits in PTE

2009-05-15 Thread Joerg Roedel
On Fri, May 15, 2009 at 12:53:42PM +0200, Alexander Graf wrote: On 15.05.2009, at 12:25, Michael S. Tsirkin wrote: On Fri, May 15, 2009 at 10:22:16AM +0200, Alexander Graf wrote: A 64bit PTE can have bit7 set to 1 which means Use this bit for the PAT. Currently KVM's MMU code treats this

Re: [PATCH 3/6] Emulator: Inject #PF when page was not found

2009-05-15 Thread Joerg Roedel
On Fri, May 15, 2009 at 10:22:17AM +0200, Alexander Graf wrote: If we couldn't find a page on read_emulated, it might be a good idea to tell the guest about that and inject a #PF. We do the same already for write faults. I don't know why it was not implemented for reads. Have you checked

Re: [PATCH 5/6] Nested SVM: Implement INVLPGA

2009-05-15 Thread Joerg Roedel
On Fri, May 15, 2009 at 10:22:19AM +0200, Alexander Graf wrote: SVM adds another way to do INVLPG by ASID which Hyper-V makes use of, so let's implement it! For now we just do the same thing invlpg does, as asid switching means we flush the mmu anyways. That might change one day though.

Re: XP smp using a lot of CPU

2009-05-15 Thread Ross Boylan
On Fri, 2009-05-15 at 11:56 -0300, Marcelo Tosatti wrote: Ross, Can you confirm the qemu process CPU consumption is down to acceptable levels if you dont specify -no-acpi? Thanks Simply starting without -no-acpi did not help. I tried to do a Windows XP repair, but seemed to end up

[PATCH] kmod: Update .gitignore

2009-05-15 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- .gitignore | 118 +++- 1 files changed, 60 insertions(+), 58 deletions(-) diff --git a/.gitignore b/.gitignore index 22a8200..bdebd0a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,64

Re: [PATCH] bios: Fix MADT corruption and RSDT size when using -acpitable

2009-05-15 Thread Marcelo Tosatti
Beth, On Thu, May 14, 2009 at 12:20:29PM -0400, Beth Kon wrote: Anthony Liguori wrote: Vincent Minet wrote: External ACPI tables are counted twice for the RSDT size and the load address for the first external table is in the MADT (interrupt override entries are overwritten). Signed-off-by:

[PATCH v2] kmod: Add distclean rule

2009-05-15 Thread Jan Kiszka
Jan Kiszka wrote: --- a/Makefile +++ b/Makefile @@ -68,3 +68,6 @@ rpm:all clean: $(MAKE) -C $(KERNELDIR) M=`pwd` $@ + +distclean: + rm -f config.kbuild config.mak This one is cleaner: - Remove the configure output config.kbuild and config.mak via distclean.

[KVM PATCH v2 0/4] iosignalfd

2009-05-15 Thread Gregory Haskins
[ Applies to kvm.git:833367b57c plus the irqfd patch, v8, as posted here: http://lkml.org/lkml/2009/5/14/258 ] This is v2 of the series. For more details, please see the header to patch 4/4. [ Changelog: v2: *) added optional data-matching capability (via

[KVM PATCH v2 1/4] eventfd: export eventfd interfaces for module use

2009-05-15 Thread Gregory Haskins
We want to use eventfd from KVM which can be compiled as a module, so export the interfaces. Signed-off-by: Gregory Haskins ghask...@novell.com --- fs/eventfd.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 2a701d5..3f0e197 100644

[KVM PATCH v2 2/4] kvm: add return value to kvm_io_bus_register_dev

2009-05-15 Thread Gregory Haskins
Today this function returns void and will internally BUG_ON if it fails. We want to create dynamic MMIO/PIO entries driven from userspace later in the series, so enhance this API to return an error code on failure. We also fix up all the callsites to check the return code and BUG_ON if it fails.

[KVM PATCH v2 3/4] kvm: add io_bus unregister function

2009-05-15 Thread Gregory Haskins
We want to support the notion of dynamic MMIO/PIO registrations and therefore will need to support both register as well as unregister. However, the current io_bus code is structured as a linear array and is not conducive to unregistering, so refactor to allow holes in the array. We then enhance

[KVM PATCH v2 4/4] kvm: add iosignalfd support

2009-05-15 Thread Gregory Haskins
iosignalfd is a mechanism to register PIO/MMIO regions to trigger an eventfd signal when written to by a guest. Host userspace can register any arbitrary IO address with a corresponding eventfd and then pass the eventfd to a specific end-point of interest for handling. Normal IO requires a

Re: [KVM PATCH v2 0/4] iosignalfd

2009-05-15 Thread Gregory Haskins
Gregory Haskins wrote: [ Applies to kvm.git:833367b57c plus the irqfd patch, v8, as posted here: http://lkml.org/lkml/2009/5/14/258 I should also mention: NOT FOR INCLUSION I am still testing this code, so this is an rfc for now. ] This is v2 of the series. For more

[PATCH v2] qemu-kvm: add iosignalfd support

2009-05-15 Thread Gregory Haskins
An iosignalfd allows an eventfd to attach to a specific PIO/MMIO region in the guest. Any guest-writes to that region will trigger an eventfd signal. For more details, see the kernel side patches submitted here: http://lkml.org/lkml/2009/5/15/303 Signed-off-by: Gregory Haskins

[PATCH v3] kmod: Add distclean rule

2009-05-15 Thread Jan Kiszka
The smaller the patch... sigh. Remove the configure output config.kbuild, config.mak and arch links via distclean. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Makefile |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index

Re: RFC: convert KVMTRACE to event traces

2009-05-15 Thread Christoph Hellwig
On Thu, May 14, 2009 at 05:30:16PM -0300, Marcelo Tosatti wrote: + trace_kvm_cr_write(cr, val); switch (cr) { case 0: - kvm_set_cr0(vcpu, kvm_register_read(vcpu, reg)); + kvm_set_cr0(vcpu, val);

Re: [PATCH v4 resend 0/6] ATS capability support for Intel IOMMU

2009-05-15 Thread Jesse Barnes
On Thu, 14 May 2009 10:32:05 +0800 Yu Zhao yu.z...@intel.com wrote: This patch series implements Address Translation Service support for the Intel IOMMU. The PCIe Endpoint that supports ATS capability can request the DMA address translation from the IOMMU and cache the translation itself.

Re: RFC: convert KVMTRACE to event traces

2009-05-15 Thread Marcelo Tosatti
On Fri, May 15, 2009 at 01:10:34PM -0400, Christoph Hellwig wrote: On Thu, May 14, 2009 at 05:30:16PM -0300, Marcelo Tosatti wrote: + trace_kvm_cr_write(cr, val); switch (cr) { case 0: - kvm_set_cr0(vcpu, kvm_register_read(vcpu, reg));

Re: [PATCH] bios: Fix MADT corruption and RSDT size when using -acpitable

2009-05-15 Thread Beth Kon
Marcelo Tosatti wrote: Beth, On Thu, May 14, 2009 at 12:20:29PM -0400, Beth Kon wrote: Anthony Liguori wrote: Vincent Minet wrote: External ACPI tables are counted twice for the RSDT size and the load address for the first external table is in the MADT (interrupt override

Re: XP smp using a lot of CPU [SOLVED]

2009-05-15 Thread Ross Boylan
Using ACPI fixes the problem; CPU useage is now quite low. Start line was sudo vdeq kvm -net nic,vlan=1,macaddr=52:54:a0:12:01:00 \ -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl \ -boot d -cdrom /usr/local/backup/XPProSP3.iso \ -std-vga -hda /dev/turtle/XP00 \ -soundhw es1370

Re: [PATCH v4] qemu-kvm: Make PC speaker emulation aware of in-kernel PIT

2009-05-15 Thread Marcelo Tosatti
On Thu, May 14, 2009 at 10:43:05PM +0200, Jan Kiszka wrote: When using the in-kernel PIT the speaker emulation has to synchronize the PIT state with KVM. Enhance the existing speaker sound device and allow it to take over port 0x61 by using KVM_CREATE_PIT2 where available. This unbreaks

Re: XP smp using a lot of CPU [SOLVED]

2009-05-15 Thread Brian Jackson
On May 15, 2009, at 3:24 PM, Ross Boylan wrote: Using ACPI fixes the problem; CPU useage is now quite low. Start line was sudo vdeq kvm -net nic,vlan=1,macaddr=52:54:a0:12:01:00 \ -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl \ -boot d -cdrom /usr/local/backup/XPProSP3.iso \ -std-vga

Subject:[PATCH 1/2] Clean up MADT Table Creation

2009-05-15 Thread Beth Kon
This patch is also based on the patch by Vincent Minet. It corrects the size calculation of the RSDT, and checks for overflow of MAX_RSDT_ENTRIES, assuming that the external table entry count is contained within MAX_RSDT_ENTRIES. Signed-off-by: Beth Kon e...@us.ibm.com diff --git

RE: [PATCH v2] Shared memory device with interrupt support

2009-05-15 Thread Kumar, Venkat
Hi Cam, I have gone through you latest shared memory patch. I have a few questions and comments. Comment:- +if (ivshmem_enabled) { +ivshmem_init(ivshmem_device); +ram_size += ivshmem_get_size(); +} + In your initial patch this part of the patch is +if

Re: Subject:[PATCH 1/2] Clean up MADT Table Creation

2009-05-15 Thread Beth Kon
Beth Kon wrote: This patch is also based on the patch by Vincent Minet. It corrects the size calculation of the RSDT, and checks for overflow of MAX_RSDT_ENTRIES, assuming that the external table entry count is contained within MAX_RSDT_ENTRIES. Signed-off-by: Beth Kon e...@us.ibm.com

[PATCH 2/2] Clean up RSDT Table Creation

2009-05-15 Thread Beth Kon
This patch is also based on the patch by Vincent Minet. It corrects the size calculation of the RSDT, and checks for overflow of MAX_RSDT_ENTRIES, assuming that the external table entry count is contained within MAX_RSDT_ENTRIES. Signed-off-by: Beth Kon e...@us.ibm.com diff --git

Re: [PATCH v2] Shared memory device with interrupt support

2009-05-15 Thread Cam Macdonell
On 15-May-09, at 8:45 PM, Kumar, Venkat wrote: Hi Cam, I have gone through you latest shared memory patch. I have a few questions and comments. Comment:- +if (ivshmem_enabled) { +ivshmem_init(ivshmem_device); +ram_size += ivshmem_get_size(); +} + In your initial patch

Re: [PATCH v2] Shared memory device with interrupt support

2009-05-15 Thread Cam Macdonell
On 15-May-09, at 8:54 PM, Kumar, Venkat wrote: Cam, A questions on interrupts as well. What is unix:path that needs to be passed in the argument list? Can it be any string? It has to be a valid path on the host. It will create a unix domain socket on that path. If my understanding is

[PATCH 2/5] kvm/e500: Add shadow ID mapping support

2009-05-15 Thread Liu Yu
Based on Hollis's idea, this patch map (vcpu, as, pid) to individual shadow id. Every vcpu has a mapping table, which keep the mapping from guest (as, id) to shadow id. Every hardware core has a shadow id reference table, which keep the mapping from shadow id to (vcpu, as, pid). When mapping is

[PATCH 1/5] kvm/e500: Discard shadow TLB

2009-05-15 Thread Liu Yu
There are several reasons to discard shadow TLB. 1. After implement shadow ID support for E500, keep shadow TLB may incur potential coherence problem. (if shadow ID mappings change, shadow TLB cannot be updated intime) 2. We use shadow TLB restore hardware TLB in vcpu_load(). However, since

[PATCH 4/5] kvm/e500: minmize the TLB flush

2009-05-15 Thread Liu Yu
Only flush TLB when a reset to the shadow mappings is needed. For guest tlbia, we can reset vcpu's mappings instead of a real flush. And because different vcpu maps to different IDs, no flush is needed at vcpu_put() and mmu_destroy(). Signed-off-by: Liu Yu yu@freescale.com ---

[PATCH 5/5] kvm/e500: Add tlb0 entry invalidate

2009-05-15 Thread Liu Yu
Invalidate TLB0 hardware entry when the related guest TLB entry is invalidated. It's a bug we didn't do this before. It didn't make problem is because that we flushed TLB every time when we enterred to guest's userspace. Signed-off-by: Liu Yu yu@freescale.com ---