Re: RCU red-black tree (was: Re: [PATCH 4/6] kvm tools: Add rwlock wrapper)

2011-05-30 Thread Sasha Levin
On Sun, 2011-05-29 at 22:54 -0400, Mathieu Desnoyers wrote: Please note that what I currently have is a normal rbtree, not an interval rbtree. Can you elaborate on your use-case so I can try to figure out how we could augment it to support the interval rbtree you need ? We don't need anything

Re: [PATCHv2 10/14] virtio_net: limit xmit polling

2011-05-30 Thread Rusty Russell
On Sat, 28 May 2011 23:02:04 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Thu, May 26, 2011 at 12:58:23PM +0930, Rusty Russell wrote: ie. free two packets for every one we're about to add. For steady state that would work really well. Sure, with indirect buffers, but if we don't

kvm-tool seems to be stuck

2011-05-30 Thread Francis Moreau
Hello, I just wanted to give kvm-tool a try and it unfortunately seems to be stuck somewhere: $ ./kvm run --disk linux-0.2.img --kernel ../../../linux-2.6/arch/x86/boot/bzImage  # kvm run -k ../../../linux-2.6/arch/x86/boot/bzImage -m 448 -c 4  Warning: Unable to open /dev/net/tun PPrroobbiinngg

Re: kvm-tool seems to be stuck

2011-05-30 Thread Pekka Enberg
Hi Francis, [ Please remember to CC me and/or other tools/kvm developers for bug reports. ] On Mon, May 30, 2011 at 9:55 AM, Francis Moreau francis.m...@gmail.com wrote: I just wanted to give kvm-tool a try and it unfortunately seems to be stuck somewhere: $ ./kvm run --disk linux-0.2.img

Re: kvm-tool seems to be stuck

2011-05-30 Thread Francis Moreau
Hello Pekka, On Mon, May 30, 2011 at 9:18 AM, Pekka Enberg penb...@kernel.org wrote: [ Please remember to CC me and/or other tools/kvm developers for bug reports. ] Ok, I'll do. On Mon, May 30, 2011 at 9:55 AM, Francis Moreau francis.m...@gmail.com wrote: I just wanted to give kvm-tool

Re: Graphics card pass-through working with two pass pci-initialization

2011-05-30 Thread Gerd Hoffmann
Hi, If I am not mistaken then the graphics card needs 2 bars, one with 256MB and one with 128K. The sound card then needs 1 bar with 16K of PCI memory. How big is the PCI memory with seabios? Some comments on that (apply to the kraxel.q35 branch): You can add this to the qemu command line

Re: [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU

2011-05-30 Thread BrillyWu
From: BrillyWu brill...@viatech.com.cn Hi, Jan I'm very sorry for these bugs in the patch. Now I have made a new patch based on the newest uq/master where the patch has been applied to fix these bugs, is it feasible? If it is not acceptable, should I re-generate a patch based on previous

Re: [Patch v5 1/4] Remove SMEP bit from CR4_RESERVED_BITS

2011-05-30 Thread Ingo Molnar
* Yang, Wei Y wei.y.y...@intel.com wrote: This patch removes SMEP bit from CR4_RESERVED_BITS. I'm wondering, what is the best-practice way for tools/kvm/ to set SMEP for the guest kernel automatically, even if the guest kernel itsef has not requested SMEP? The portion i'm worried about are

Re: kvm-tool seems to be stuck

2011-05-30 Thread Pekka Enberg
Hi Francis, On Mon, May 30, 2011 at 10:30 AM, Francis Moreau francis.m...@gmail.com wrote: Nothing. That looks like a bug. Could you try to do  kill -3 `pidof kvm` Here it is:  #  # vCPU #0's dump:  #  Registers:  --  rip:   rsp: 7e3a flags:

Re: [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU

2011-05-30 Thread Jan Kiszka
On 2011-05-30 09:40, BrillyWu wrote: From: BrillyWu brill...@viatech.com.cn Hi, Jan I'm very sorry for these bugs in the patch. Now I have made a new patch based on the newest uq/master where the patch has been applied to fix these bugs, is it feasible? If it is not acceptable,

Re: [Patch v5 1/4] Remove SMEP bit from CR4_RESERVED_BITS

2011-05-30 Thread Avi Kivity
On 05/30/2011 10:40 AM, Ingo Molnar wrote: * Yang, Wei Ywei.y.y...@intel.com wrote: This patch removes SMEP bit from CR4_RESERVED_BITS. I'm wondering, what is the best-practice way for tools/kvm/ to set SMEP for the guest kernel automatically, even if the guest kernel itsef has not

Re: [Patch v5 1/4] Remove SMEP bit from CR4_RESERVED_BITS

2011-05-30 Thread Ingo Molnar
* Avi Kivity a...@redhat.com wrote: On 05/30/2011 10:40 AM, Ingo Molnar wrote: * Yang, Wei Ywei.y.y...@intel.com wrote: This patch removes SMEP bit from CR4_RESERVED_BITS. I'm wondering, what is the best-practice way for tools/kvm/ to set SMEP for the guest kernel automatically, even

Re: [PATCH 4/6] kvm tools: Add rwlock wrapper

2011-05-30 Thread Ingo Molnar
* Paul E. McKenney paul...@linux.vnet.ibm.com wrote: The stop_machine_run()-alike thing is for brlocks - for which Sasha sent patches already, see these patches on the kvm@vger.kernel.org list: [PATCH 3/4] kvm tools: Add a brlock [PATCH 4/4] kvm tools: Use brlock in MMIO and

[PATCH v2 1/8] kvm tools: Use correct value for user signal base

2011-05-30 Thread Sasha Levin
Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/include/kvm/kvm.h b/tools/kvm/include/kvm/kvm.h index f951f2d..6a17362 100644 --- a/tools/kvm/include/kvm/kvm.h +++

[PATCH v2 2/8] kvm tools: Remove wrong global definition of kvm

2011-05-30 Thread Sasha Levin
Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/mptable.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/include/kvm/mptable.h b/tools/kvm/include/kvm/mptable.h index 3c8362d..8557ae8 100644 --- a/tools/kvm/include/kvm/mptable.h

[PATCH v2 3/8] kvm tools: Allow pausing guests

2011-05-30 Thread Sasha Levin
Allow pausing and unpausing guests running on the host. Pausing a guest means that none of the VCPU threads are running KVM_RUN until they are unpaused. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm-cpu.h |1 + tools/kvm/include/kvm/kvm.h |4 +++

[PATCH v2 5/8] kvm tools: Add a brlock

2011-05-30 Thread Sasha Levin
brlock is a lock which is very cheap for reads, but very expensive for writes. This lock will be used when updates are very rare and reads are common. This lock is currently implemented by stopping the guest while performing the updates. We assume that the only threads which read from the locked

[PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Sasha Levin
Adds a rwlock wrapper which like the mutex wrapper makes rwlock calls similar to their kernel counterparts. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/rwsem.h | 39 +++ 1 files changed, 39 insertions(+), 0 deletions(-)

[PATCH v2 8/8] kvm tools: Use brlock in MMIO and IOPORT

2011-05-30 Thread Sasha Levin
Use brlock to protect mmio and ioport modules and make them update-safe. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/ioport.c | 10 +- tools/kvm/mmio.c | 17 +++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/tools/kvm/ioport.c

[PATCH v2 7/8] kvm tools: Add debug mode to brlock

2011-05-30 Thread Sasha Levin
Adds a debug mode which allows to switch the brlock into a big rwlock. This can be used to verify we don't end up with a BKL kind of lock with the current brlock implementation. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/brlock.h | 16 1 files

Re: [PATCH v2 2/8] kvm tools: Remove wrong global definition of kvm

2011-05-30 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/mptable.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/include/kvm/mptable.h b/tools/kvm/include/kvm/mptable.h index

Re: [PATCH v2 3/8] kvm tools: Allow pausing guests

2011-05-30 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: Allow pausing and unpausing guests running on the host. Pausing a guest means that none of the VCPU threads are running KVM_RUN until they are unpaused. When adding new APIs please mention them in the changelog. Just listing them is enough:

[Bug 36222] New: kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 Summary: kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown Product: Virtualization Version: unspecified Kernel Version: 3.0.0-rc1 Platform: All OS/Version: Linux Tree: Mainline

Re: [Patch v5 1/4] Remove SMEP bit from CR4_RESERVED_BITS

2011-05-30 Thread Avi Kivity
On 05/30/2011 11:05 AM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: On 05/30/2011 10:40 AM, Ingo Molnar wrote: * Yang, Wei Ywei.y.y...@intel.com wrote: This patch removes SMEP bit from CR4_RESERVED_BITS. I'm wondering, what is the best-practice way for tools/kvm/

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 Avi Kivity a...@redhat.com changed: What|Removed |Added CC||a...@redhat.com ---

Re: [PATCH v2 1/8] kvm tools: Use correct value for user signal base

2011-05-30 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: On Mon, 2011-05-30 at 10:35 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm.h |2 +- 1 files changed, 1 insertions(+), 1

Re: [Patch v5 0/4] Enable SMEP feature support for kvm

2011-05-30 Thread Avi Kivity
On 05/30/2011 06:01 AM, Yang, Wei Y wrote: This patchset enables a new CPU feature SMEP (Supervisor Mode Execution Protection) in KVM. SMEP prevents kernel from executing code in application. Updated Intel SDM describes this CPU feature. The document will be published soon. This patchset is

Re: [Patch v5 1/4] Remove SMEP bit from CR4_RESERVED_BITS

2011-05-30 Thread Ingo Molnar
* Avi Kivity a...@redhat.com wrote: Another option would be to try to set the SMEP bit *before* we enable paging. In theory this should not confuse a Linux guest - and while i have not tested it i *think* we let it survive in the saved_cr4_features shadow variable. That would make

Re: [Patch v5 1/4] Remove SMEP bit from CR4_RESERVED_BITS

2011-05-30 Thread Avi Kivity
On 05/30/2011 11:52 AM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: Another option would be to try to set the SMEP bit *before* we enable paging. In theory this should not confuse a Linux guest - and while i have not tested it i *think* we let it survive in the

Re: [Patch v5 1/4] Remove SMEP bit from CR4_RESERVED_BITS

2011-05-30 Thread Ingo Molnar
* Avi Kivity a...@redhat.com wrote: On 05/30/2011 11:52 AM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: Another option would be to try to set the SMEP bit *before* we enable paging. In theory this should not confuse a Linux guest - and while i have not tested it i

Re: [PATCH v2 8/8] kvm tools: Use brlock in MMIO and IOPORT

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 10:47 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: @@ -55,41 +56,53 @@ static const char *to_direction(u8 is_write) bool kvm__register_mmio(u64 phys_addr, u64 phys_addr_len, void (*kvm_mmio_callback_fn)(u64 addr, u8 *data, u32 len, u8

Re: [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU

2011-05-30 Thread BrillyWu
From brill...@viatech.com.cn Hi, Jan Thank you for you review and guide. I have fixed the bugs and re-generated a clean patch which has been checked. It can be compiled without any error and work normally. The patch v3 is here now. Signed-off-by:

Re: [PATCH v2 2/8] kvm tools: Remove wrong global definition of kvm

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 10:38 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/mptable.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

RE: [Patch v5 0/4] Enable SMEP feature support for kvm

2011-05-30 Thread Tian, Kevin
From: Avi Kivity Sent: Monday, May 30, 2011 4:52 PM On 05/30/2011 06:01 AM, Yang, Wei Y wrote: This patchset enables a new CPU feature SMEP (Supervisor Mode Execution Protection) in KVM. SMEP prevents kernel from executing code in application. Updated Intel SDM describes this CPU

Re: [Patch v5 0/4] Enable SMEP feature support for kvm

2011-05-30 Thread Avi Kivity
On 05/30/2011 12:08 PM, Tian, Kevin wrote: From: Avi Kivity Sent: Monday, May 30, 2011 4:52 PM On 05/30/2011 06:01 AM, Yang, Wei Y wrote: This patchset enables a new CPU feature SMEP (Supervisor Mode Execution Protection) in KVM. SMEP prevents kernel from executing code in

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #2 from Török Edwin edwinto...@gmail.com 2011-05-30 09:18:31 --- Created an attachment (id=60032) -- (https://bugzilla.kernel.org/attachment.cgi?id=60032) kvm_stat output when the 100% cpu usage happens -- Configure bugmail:

RE: [Patch v5 0/4] Enable SMEP feature support for kvm

2011-05-30 Thread Tian, Kevin
From: Avi Kivity [mailto:a...@redhat.com] Sent: Monday, May 30, 2011 5:14 PM On 05/30/2011 12:08 PM, Tian, Kevin wrote: From: Avi Kivity Sent: Monday, May 30, 2011 4:52 PM On 05/30/2011 06:01 AM, Yang, Wei Y wrote: This patchset enables a new CPU feature SMEP (Supervisor

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #3 from Török Edwin edwinto...@gmail.com 2011-05-30 09:20:06 --- Created an attachment (id=60042) -- (https://bugzilla.kernel.org/attachment.cgi?id=60042) trace-cmd record -e kvm; ^C; trace-cmd report (In reply to comment #1)

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #4 from Török Edwin edwinto...@gmail.com 2011-05-30 09:25:58 --- (In reply to comment #1) - qemu monitor (qemu) info registers (qemu) x/40i $eip - 32 Hmm libvirt doesn't provide access to qemu monitor on purpose. Run

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Pekka Enberg
On Mon, May 30, 2011 at 11:43 AM, Ingo Molnar mi...@elte.hu wrote: Testing idea: for example 'make test locking' could do the bzImage test-bootup, with rwlocks built instead of the brlocksj? Pekka might have more ideas about how a good locking test-suite should be done, as JATO has one,

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 12:29 +0300, Pekka Enberg wrote: On Mon, May 30, 2011 at 11:43 AM, Ingo Molnar mi...@elte.hu wrote: Testing idea: for example 'make test locking' could do the bzImage test-bootup, with rwlocks built instead of the brlocksj? Pekka might have more ideas about how a

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Pekka Enberg
Hi Sasha, On Mon, May 30, 2011 at 12:34 PM, Sasha Levin levinsasha...@gmail.com wrote: It would mean we need that many VCPUs: current br_read_lock() doesn't really do anything, which means that running these tests with dummy threads won't work. Heh, sure they're doing something - they're

KVM build warnings

2011-05-30 Thread Borislav Petkov
I get the following In file included from arch/x86/kvm/mmu.c:2856: arch/x86/kvm/paging_tmpl.h: In function ‘paging32_walk_addr_generic’: arch/x86/kvm/paging_tmpl.h:124: warning: ‘ptep_user’ may be used uninitialized in this function In file included from arch/x86/kvm/mmu.c:2852:

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 12:40 +0300, Pekka Enberg wrote: Hi Sasha, On Mon, May 30, 2011 at 12:34 PM, Sasha Levin levinsasha...@gmail.com wrote: It would mean we need that many VCPUs: current br_read_lock() doesn't really do anything, which means that running these tests with dummy threads

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Pekka Enberg
On Mon, May 30, 2011 at 12:46 PM, Sasha Levin levinsasha...@gmail.com wrote: I'm just saying that we're limited to as many VCPU threads as we can create. br_read_lock() won't do anything on a non-VCPU thread, which makes it impossible to test it on non-VCPUs. It sure would be useful to be able

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Ingo Molnar
* Pekka Enberg penb...@kernel.org wrote: On Mon, May 30, 2011 at 12:46 PM, Sasha Levin levinsasha...@gmail.com wrote: I'm just saying that we're limited to as many VCPU threads as we can create. br_read_lock() won't do anything on a non-VCPU thread, which makes it impossible to test it on

Re: [Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread Avi Kivity
On 05/30/2011 12:20 PM, bugzilla-dae...@bugzilla.kernel.org wrote: https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #3 from Török Edwinedwinto...@gmail.com 2011-05-30 09:20:06 --- Created an attachment (id=60042) -- (https://bugzilla.kernel.org/attachment.cgi?id=60042)

Re: [Patch v5 1/4] Remove SMEP bit from CR4_RESERVED_BITS

2011-05-30 Thread Avi Kivity
On 05/30/2011 11:57 AM, Ingo Molnar wrote: Oh, it wasn't clear to me that this was your preference as well - and i didnt see such a capability in this series [let me know if i blindly missed it] so i was wondering what the battle plan was fr that :-) There is no plan. If someone is

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: I'm just saying that we're limited to as many VCPU threads as we can create. br_read_lock() won't do anything on a non-VCPU thread, which makes it impossible to test it on non-VCPUs. btw., i wondered about that limit - don't we want to fix it?

Re: Graphics card pass-through working with two pass pci-initialization

2011-05-30 Thread Gerd Hoffmann
Hi, At the end of the day I want the pci address space allocation code have no hard-coded addresses in there but use the e820 table instead to figure how big the address space hole is. Maybe even use multiple holes (i.e. also use the memory below mmconfig @ 0xe000 with q35). First cut

Re: [Patch v5 0/4] Enable SMEP feature support for kvm

2011-05-30 Thread Avi Kivity
On 05/30/2011 12:18 PM, Tian, Kevin wrote: From: Avi Kivity [mailto:a...@redhat.com] Sent: Monday, May 30, 2011 5:14 PM On 05/30/2011 12:08 PM, Tian, Kevin wrote: From: Avi Kivity Sent: Monday, May 30, 2011 4:52 PM On 05/30/2011 06:01 AM, Yang, Wei Y wrote:

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 11:56 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: I'm just saying that we're limited to as many VCPU threads as we can create. br_read_lock() won't do anything on a non-VCPU thread, which makes it impossible to test it on non-VCPUs.

Re: KVM build warnings

2011-05-30 Thread Takuya Yoshikawa
On Mon, 30 May 2011 11:46:04 +0200 Borislav Petkov b...@alien8.de wrote: I get the following In file included from arch/x86/kvm/mmu.c:2856: arch/x86/kvm/paging_tmpl.h: In function ‘paging32_walk_addr_generic’: arch/x86/kvm/paging_tmpl.h:124: warning: ‘ptep_user’ may be used uninitialized

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: On Mon, 2011-05-30 at 11:56 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: I'm just saying that we're limited to as many VCPU threads as we can create. br_read_lock() won't do anything on a non-VCPU thread,

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 12:13 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: On Mon, 2011-05-30 at 11:56 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: I'm just saying that we're limited to as many VCPU threads as we can create.

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: On Mon, 2011-05-30 at 12:13 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: On Mon, 2011-05-30 at 11:56 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: I'm just saying that we're

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #5 from Avi Kivity a...@redhat.com 2011-05-30 10:31:43 --- On 05/30/2011 12:20 PM, bugzilla-dae...@bugzilla.kernel.org wrote: https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #3 from Török

RE: [Patch v5 0/4] Enable SMEP feature support for kvm

2011-05-30 Thread Tian, Kevin
From: Avi Kivity [mailto:a...@redhat.com] Sent: Monday, May 30, 2011 6:00 PM On 05/30/2011 12:18 PM, Tian, Kevin wrote: From: Avi Kivity [mailto:a...@redhat.com] Sent: Monday, May 30, 2011 5:14 PM On 05/30/2011 12:08 PM, Tian, Kevin wrote: From: Avi Kivity

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 12:30 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: On Mon, 2011-05-30 at 12:13 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: On Mon, 2011-05-30 at 11:56 +0200, Ingo Molnar wrote: * Sasha Levin

Re: [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU

2011-05-30 Thread Jan Kiszka
On 2011-05-30 10:59, BrillyWu wrote: From brill...@viatech.com.cn Hi, Jan Thank you for you review and guide. I have fixed the bugs and re-generated a clean patch which has been checked. It can be compiled without any error and work normally. The patch v3 is here

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #6 from Avi Kivity a...@redhat.com 2011-05-30 10:55:39 --- On 05/30/2011 12:26 PM, bugzilla-dae...@bugzilla.kernel.org wrote: https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #4 from Török

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #7 from Török Edwin edwinto...@gmail.com 2011-05-30 10:58:47 --- It says: Will now halt. _ -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are

Re: [PATCH] kvm: Document KVM_IOEVENTFD

2011-05-30 Thread Takuya Yoshikawa
On Sat, 28 May 2011 14:12:30 +0300 Sasha Levin levinsasha...@gmail.com wrote: Document KVM_IOEVENTFD that can be used to receive notifications of PIO/MMIO events without triggering an exit. Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Sasha Levin

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #8 from Török Edwin edwinto...@gmail.com 2011-05-30 11:01:00 --- And that corresponds to this script: log_action_msg Will now halt halt -d -f $netdown $poweroff $hddown -- Configure bugmail:

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Takuya Yoshikawa
On Mon, 30 May 2011 11:54:51 +0200 Ingo Molnar mi...@elte.hu wrote: * Pekka Enberg penb...@kernel.org wrote: On Mon, May 30, 2011 at 12:46 PM, Sasha Levin levinsasha...@gmail.com wrote: I'm just saying that we're limited to as many VCPU threads as we can create. br_read_lock()

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #9 from Török Edwin edwinto...@gmail.com 2011-05-30 11:09:45 --- Using -serial stdio, and console=ttyS0 I see an Oops when running 'halt -f -p' in the guest: /[ 36.308445] invalid opcode: [#1] SMP [ 36.308445] CPU 1 [

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 20:11 +0900, Takuya Yoshikawa wrote: On Mon, 30 May 2011 11:54:51 +0200 Ingo Molnar mi...@elte.hu wrote: * Pekka Enberg penb...@kernel.org wrote: On Mon, May 30, 2011 at 12:46 PM, Sasha Levin levinsasha...@gmail.com wrote: I'm just saying that we're

Re: RCU red-black tree (was: Re: [PATCH 4/6] kvm tools: Add rwlock wrapper)

2011-05-30 Thread Mathieu Desnoyers
* Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Sun, May 29, 2011 at 01:01:04PM -0400, Mathieu Desnoyers wrote: * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: * Sasha Levin (levinsasha...@gmail.com) wrote: [...] Hi Mathieu! In tools/kvm/ we use a rb-tree

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Takuya Yoshikawa
On Mon, 30 May 2011 14:12:34 +0300 Sasha Levin levinsasha...@gmail.com wrote: On Mon, 2011-05-30 at 20:11 +0900, Takuya Yoshikawa wrote: On Mon, 30 May 2011 11:54:51 +0200 Ingo Molnar mi...@elte.hu wrote: * Pekka Enberg penb...@kernel.org wrote: On Mon, May 30, 2011 at

Re: RCU red-black tree (was: Re: [PATCH 4/6] kvm tools: Add rwlock wrapper)

2011-05-30 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: On Sun, 2011-05-29 at 22:54 -0400, Mathieu Desnoyers wrote: Please note that what I currently have is a normal rbtree, not an interval rbtree. Can you elaborate on your use-case so I can try to figure out how we could augment it to support the

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #10 from Avi Kivity a...@redhat.com 2011-05-30 11:38:09 --- On 05/30/2011 02:09 PM, bugzilla-dae...@bugzilla.kernel.org wrote: [ 36.308445] [810018ae] cpu_idle+0x9e/0xb0 [ 36.308445] [8162c73b]

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Avi Kivity
On 05/30/2011 02:26 PM, Takuya Yoshikawa wrote: qemu also allows having more VCPUs than cores. I have to check again, then :) Thank you! I will try both with many VCPUs. Note, with cpu overcommit the results are going to be bad. -- error compiling committee.c: too many arguments to

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Ingo Molnar
* Avi Kivity a...@redhat.com wrote: On 05/30/2011 02:26 PM, Takuya Yoshikawa wrote: qemu also allows having more VCPUs than cores. I have to check again, then :) Thank you! I will try both with many VCPUs. Note, with cpu overcommit the results are going to be bad. And that is

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 14:55 +0300, Pekka Enberg wrote: On Mon, May 30, 2011 at 2:49 PM, Ingo Molnar mi...@elte.hu wrote: [*] Would be nice if tools/kvm/ had a debug option to simulate 'lots of RAM' as well somehow - perhaps by not pre-initializing it and somehow catching all-zeroes

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Avi Kivity
On 05/30/2011 02:49 PM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: On 05/30/2011 02:26 PM, Takuya Yoshikawa wrote: qemu also allows having more VCPUs than cores. I have to check again, then :) Thank you! I will try both with many VCPUs. Note, with cpu

Re: Restoring saved guest causes guest to reboot

2011-05-30 Thread Markus Schade
On Thu, 26 May 2011, Joerg Roedel wrote: On Thu, May 26, 2011 at 05:20:32PM +0200, Markus Schade wrote: On 05/26/2011 01:28 PM, Markus Schade wrote: On 05/26/2011 08:44 AM, Avi Kivity wrote: On 05/25/2011 09:49 AM, Markus Schade wrote: Git bisect tells me that this is the first bad commit:

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: On Mon, 2011-05-30 at 14:55 +0300, Pekka Enberg wrote: On Mon, May 30, 2011 at 2:49 PM, Ingo Molnar mi...@elte.hu wrote: [*] Would be nice if tools/kvm/ had a debug option to simulate 'lots of RAM' as well somehow - perhaps by not

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 14:20 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: On Mon, 2011-05-30 at 14:55 +0300, Pekka Enberg wrote: On Mon, May 30, 2011 at 2:49 PM, Ingo Molnar mi...@elte.hu wrote: [*] Would be nice if tools/kvm/ had a debug option to simulate

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Avi Kivity
On 05/30/2011 03:20 PM, Ingo Molnar wrote: How does this work in practice - i thought we memset() all of RAM during guest kernel bootup. That might have changed with the memblock allocator ... So the guest kernel does not touch all of that 64 GB of RAM, so your box wont OOM straight away? IIRC

[PATCH] x86: fix mwait_play_dead() faulting on mwait-incapable cpus

2011-05-30 Thread Avi Kivity
A logic error in mwait_play_dead() causes the kernel to use mwait even on cpus which don't support it, such as KVM virtual cpus. Introduced by 349c004e3d31fd. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=36222 Reported-by: Török Edwin edwinto...@gmail.com Signed-off-by: Avi Kivity

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Avi Kivity
On 05/30/2011 03:22 PM, Sasha Levin wrote: Oh, that's neat. Btw., i think there should be an option to actually *force* blatant overcommit: if i typo the option i'd like the tool to tell me that i'm probably stupid and refuse to run with that (and suggest the force-overcommit option),

[Bug 36222] kvm: 100% CPU usage after 3.0.0-rc1 guest shutdown

2011-05-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=36222 --- Comment #12 from Török Edwin edwinto...@gmail.com 2011-05-30 12:26:19 --- Bisection tells me this is the offending commit (see below), but I see you found it too. commit 349c004e3d31fda23ad225b61861be38047fff16 Author: Christoph Lameter

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Pekka Enberg
On Mon, May 30, 2011 at 3:23 PM, Avi Kivity a...@redhat.com wrote: IIRC there never was a memset() of all RAM, at least since kvm started booting Linux.  Windows has a zeroing thread which causes all of RAM to be committed shortly after boot, though. Yup, I haven't heard of such thing either.

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Sasha Levin
On Mon, 2011-05-30 at 14:36 +0200, Ingo Molnar wrote: * Avi Kivity a...@redhat.com wrote: On 05/30/2011 02:49 PM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: On 05/30/2011 02:26 PM, Takuya Yoshikawa wrote: qemu also allows having more VCPUs than cores.

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-05-30 Thread Ingo Molnar
* Avi Kivity a...@redhat.com wrote: On 05/30/2011 05:10 PM, Ingo Molnar wrote: [...] Windows has a zeroing thread which causes all of RAM to be committed shortly after boot, though. heh, maybe they read lkml and copied my ancient idea:

Re: drop -enable-nesting

2011-05-30 Thread Jan Kiszka
On 2011-05-30 17:10, Roedel, Joerg wrote: On Mon, May 30, 2011 at 11:04:02AM -0400, Jan Kiszka wrote: On 2011-05-30 16:38, Nadav Har'El wrote: On Mon, May 30, 2011, Jan Kiszka wrote about drop -enable-nesting (was: [PATCH 3/7] cpu model bug fixes and definition corrections...): On 2011-05-30

Re: drop -enable-nesting

2011-05-30 Thread Nadav Har'El
On Mon, May 30, 2011, Jan Kiszka wrote about Re: drop -enable-nesting: -enable-nesting could remain as a synonym for enabling either VMX or SVM in the guest, depending on what was available in the host (because KVM now supports both nested SVM and nested VMX, but not SVM-on-VMX or vice

[PATCH v6 3/4] Mask function7 ebx against host capability word9

2011-05-30 Thread Yang, Wei Y
This patch masks CPUID leaf 7 ebx against host capability word9. Signed-off-by: Yang, Wei wei.y.y...@intel.com Signed-off-by: Shan, Haitao haitao.s...@intel.com Signed-off-by: Li, Xin xin...@intel.com --- arch/x86/kvm/x86.c | 15 ++- 1 files changed, 14 insertions(+), 1

[PATCH v6 2/4] Add SMEP support when setting CR4

2011-05-30 Thread Yang, Wei Y
This patch adds SMEP handling when setting CR4. Signed-off-by: Yang, Wei wei.y.y...@intel.com Signed-off-by: Shan, Haitao haitao.s...@intel.com Signed-off-by: Li, Xin xin...@intel.com --- arch/x86/kvm/x86.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git

[PATCH v6 4/4] Add instruction fetch checking when walking guest page table

2011-05-30 Thread Yang, Wei Y
This patch adds instruction fetch checking when walking guest page table. Signed-off-by: Yang, Wei wei.y.y...@intel.com Signed-off-by: Shan, Haitao haitao.s...@intel.com Signed-off-by: Li, Xin xin...@intel.com --- arch/x86/kvm/paging_tmpl.h |9 - 1 files changed, 8 insertions(+),

[PATCH v6] Enable CPU SMEP feature for QEMU-KVM

2011-05-30 Thread Yang, Wei Y
This patchset enables a new CPU feature SMEP (Supervisor Mode Execution Protection) in QEMU-KVM. SMEP prevents kernel from executing code in application. Updated Intel SDM describes this CPU feature. The document will be published soon. SMEP is identified by CPUID leaf 7 EBX[7], which is 0

[PATCH v6 0/4] Enable SMEP feature support for KVM

2011-05-30 Thread Yang, Wei Y
This patchset enables a new CPU feature SMEP (Supervisor Mode Execution Protection) in KVM. SMEP prevents kernel from executing code in application. Updated Intel SDM describes this CPU feature. The document will be published soon. This patchset is based on Fenghua's SMEP patch series, as

[PATCH v6 1/4] Remove SMEP bit from CR4_RESERVED_BITS

2011-05-30 Thread Yang, Wei Y
This patch removes SMEP bit from CR4_RESERVED_BITS. Signed-off-by: Yang, Wei wei.y.y...@intel.com Signed-off-by: Shan, Haitao haitao.s...@intel.com Signed-off-by: Li, Xin xin...@intel.com --- arch/x86/include/asm/kvm_host.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

Re: drop -enable-nesting

2011-05-30 Thread Avi Kivity
On 05/30/2011 06:15 PM, Jan Kiszka wrote: On 2011-05-30 17:10, Roedel, Joerg wrote: On Mon, May 30, 2011 at 11:04:02AM -0400, Jan Kiszka wrote: On 2011-05-30 16:38, Nadav Har'El wrote: On Mon, May 30, 2011, Jan Kiszka wrote about drop -enable-nesting (was: [PATCH 3/7] cpu model bug fixes

Re: drop -enable-nesting

2011-05-30 Thread Jan Kiszka
On 2011-05-30 17:19, Avi Kivity wrote: On 05/30/2011 06:15 PM, Jan Kiszka wrote: On 2011-05-30 17:10, Roedel, Joerg wrote: On Mon, May 30, 2011 at 11:04:02AM -0400, Jan Kiszka wrote: On 2011-05-30 16:38, Nadav Har'El wrote: On Mon, May 30, 2011, Jan Kiszka wrote about drop -enable-nesting

Re: [PATCH] testdev: adjust for ISA irq changes

2011-05-30 Thread Markus Armbruster
Jan Kiszka jan.kis...@web.de writes: On 2011-05-29 17:26, Avi Kivity wrote: On 05/29/2011 06:21 PM, Jan Kiszka wrote: [...] We also need a better interface to discover and track legacy IRQ routes for device assignment. Markus is currently collecting requirements for qdev enhancements, and I

Re: drop -enable-nesting

2011-05-30 Thread Jan Kiszka
On 2011-05-30 17:27, Jan Kiszka wrote: On 2011-05-30 17:19, Avi Kivity wrote: I think it's safe to drop -enable-nesting immediately. Dan, does libvirt make use of it? I'm currently checking with some customer who played with Proxmox and nesting if that stack was aware of the switch or

Re: drop -enable-nesting

2011-05-30 Thread Jan Kiszka
On 2011-05-30 17:16, Nadav Har'El wrote: On Mon, May 30, 2011, Jan Kiszka wrote about Re: drop -enable-nesting: -enable-nesting could remain as a synonym for enabling either VMX or SVM in the guest, depending on what was available in the host (because KVM now supports both nested SVM and

[PATCH v3 1/8] kvm tools: Use correct value for user signal base

2011-05-30 Thread Sasha Levin
The bug has caused us to exit gracefully when receiving SIGUSR2. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/include/kvm/kvm.h b/tools/kvm/include/kvm/kvm.h index

[PATCH v3 2/8] kvm tools: Remove wrong global definition of kvm

2011-05-30 Thread Sasha Levin
Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/mptable.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/include/kvm/mptable.h b/tools/kvm/include/kvm/mptable.h index 3c8362d..8557ae8 100644 --- a/tools/kvm/include/kvm/mptable.h

  1   2   >