Re: [kvm-devel] [PATCH] Use cmpxchg for pte updates on walk_addr()

2007-12-06 Thread Avi Kivity
Marcelo Tosatti wrote: > Right, patch at end of the message restarts the process if the pte > changes under the walker. The goto is pretty ugly, but I fail to see any > elegant way of doing that. Ideas? > > goto is fine for that. But there's a subtle livelock here: suppose vcpu 0 is in guest

Re: [kvm-devel] [PATCH] Use cmpxchg for pte updates on walk_addr()

2007-12-06 Thread Marcelo Tosatti
On Thu, Dec 06, 2007 at 05:24:08PM +0200, Avi Kivity wrote: > Marcelo Tosatti wrote: > > In preparation for multi-threaded guest pte walking, use cmpxchg() > > when updating guest pte's. This guarantees that the assignment of the > > dirty bit can't be lost if two CPU's are faulting the same addres

Re: [kvm-devel] [PATCH] Move CONFIG_X86 decleration tobe x86 specificin configure script

2007-12-06 Thread Zhang, Xiantao
Jerone Young wrote: > On Thu, 2007-12-06 at 21:30 +0200, Avi Kivity wrote: >> Jerone Young wrote: Hi, Young Are you sure it works for you? Seems in script, it can't recognize "+=". Anyway, I also have a fix about it in my patch queue, when I do ia64 porting. >>> >>

Re: [kvm-devel] [PATCH] Move CONFIG_X86 decleration to be x86 specificin configure script

2007-12-06 Thread Jerone Young
On Thu, 2007-12-06 at 21:30 +0200, Avi Kivity wrote: > Jerone Young wrote: > >> Hi, Young > >>Are you sure it works for you? Seems in script, it can't > >> recognize "+=". Anyway, I also have a fix about it in my patch queue, > >> when I do ia64 porting. > >> > > > > Really? Hmmm.. t

Re: [kvm-devel] performance specs on VT-x vmenter/exit

2007-12-06 Thread Dan
Thanks for the lightning-fast response, guys. I'll play around with vmexit.c and let some of this sink in. I was hoping to get a clean count of ticks/vm[enter/exit] without the kvm latency, and I thought putting in into the code in the kvm code in the kernel source would accomplish something like

[kvm-devel] [PATCH] svm: exit to userspace if write to cr8 and not using in-kernel apic

2007-12-06 Thread Joerg Roedel
With this patch KVM on SVM will exit to userspace if the guest writes to CR8 and the in-kernel APIC is disabled. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Markus Rechberger <[EMAIL PROTECTED]> --- drivers/kvm/svm.c | 11 ++- 1 files changed, 10 insertions(+), 1 dele

Re: [kvm-devel] performance specs on VT-x vmenter/exit

2007-12-06 Thread Anthony Liguori
Avi Kivity wrote: > Anthony Liguori wrote: >>> >>> >>> Have a look at user/test/x86/vmexit.c, which does exactly that. >>> >>> >> >> That only gives you the combined count of a vmenter and vmexit. > > Right; furthermore it measures kvm overhead and not just instruction > latency. True. Also,

Re: [kvm-devel] [PATCH] Move CONFIG_X86 decleration to be x86 specificin configure script

2007-12-06 Thread Avi Kivity
Jerone Young wrote: >> Hi, Young >> Are you sure it works for you? Seems in script, it can't >> recognize "+=". Anyway, I also have a fix about it in my patch queue, >> when I do ia64 porting. >> > > Really? Hmmm.. that is valid bash syntax. Seems to work fine when I do > it on the

Re: [kvm-devel] [PATCH] Move CONFIG_X86 decleration to be x86 specificin configure script

2007-12-06 Thread Jerone Young
On Thu, 2007-12-06 at 11:06 +0800, Zhang, Xiantao wrote: > Jerone Young wrote: > > # HG changeset patch > > # User Jerone Young <[EMAIL PROTECTED]> > > # Date 1196891226 21600 > > # Node ID a30e578bd6e2cf7599ce0c57066880658ddf2886 > > # Parent b4cf8e05d20b3f4ca658bb4fdf3db3e4393a5d8a > > Move CON

Re: [kvm-devel] [PATCH] x86: emulate read/write access to cr8

2007-12-06 Thread Joerg Roedel
On Thu, Dec 06, 2007 at 07:51:49PM +0200, Avi Kivity wrote: > Avi Kivity wrote: > >Joerg Roedel wrote: > > > >>From: Joerg Roedel <[EMAIL PROTECTED]> > >> > >>This patch adds code to emulate the access to the cr8 register to the x86 > >>instruction emulator in kvm. > >> > >> > > > >I wrote

Re: [kvm-devel] performance specs on VT-x vmenter/exit

2007-12-06 Thread Avi Kivity
Anthony Liguori wrote: >> >> >> Have a look at user/test/x86/vmexit.c, which does exactly that. >> >> > > That only gives you the combined count of a vmenter and vmexit. Right; furthermore it measures kvm overhead and not just instruction latency. -- Any sufficiently difficult bug is indisti

Re: [kvm-devel] performance specs on VT-x vmenter/exit

2007-12-06 Thread Anthony Liguori
Avi Kivity wrote: > Dan wrote: > >> Greetings Honorable KVM Devs! >> >> I am doing research on the performance characteristics of the Intel >> VMX instructions, specifically with respect to KVM. I need to count >> the cycles for a VMENTER and VMEXIT instruction under various >> conditions. (But

Re: [kvm-devel] performance specs on VT-x vmenter/exit

2007-12-06 Thread Avi Kivity
Dan wrote: > Greetings Honorable KVM Devs! > > I am doing research on the performance characteristics of the Intel > VMX instructions, specifically with respect to KVM. I need to count > the cycles for a VMENTER and VMEXIT instruction under various > conditions. (But getting it to work at all would

[kvm-devel] performance specs on VT-x vmenter/exit

2007-12-06 Thread Dan
Greetings Honorable KVM Devs! I am doing research on the performance characteristics of the Intel VMX instructions, specifically with respect to KVM. I need to count the cycles for a VMENTER and VMEXIT instruction under various conditions. (But getting it to work at all would be cool :) So the id

Re: [kvm-devel] [PATCH] x86: emulate read/write access to cr8

2007-12-06 Thread Avi Kivity
Avi Kivity wrote: > Joerg Roedel wrote: > >> From: Joerg Roedel <[EMAIL PROTECTED]> >> >> This patch adds code to emulate the access to the cr8 register to the x86 >> instruction emulator in kvm. >> >> >> > > I wrote a unit test for 'mov cr8', and it passes! > > Seems we aren't trapping

Re: [kvm-devel] [PATCH] x86: emulate read/write access to cr8

2007-12-06 Thread Avi Kivity
Joerg Roedel wrote: > From: Joerg Roedel <[EMAIL PROTECTED]> > > This patch adds code to emulate the access to the cr8 register to the x86 > instruction emulator in kvm. > > I wrote a unit test for 'mov cr8', and it passes! Seems we aren't trapping cr8 access at all for svm. -- error compili

Re: [kvm-devel] KVM Test result, kernel 51727a1.. , userspace 6a385c9..

2007-12-06 Thread Izik Eidus
Avi Kivity wrote: > Izik Eidus wrote: >> Avi Kivity wrote: >> >>> Izik Eidus wrote: >>> >> [Yunfeng] Yes, it may not be a recent regression, and it may be a >> platform related issue. >> Before we used Harwitch /paxville to do the test, and in a period >> the installation te

Re: [kvm-devel] KVM Test result, kernel 51727a1.. , userspace 6a385c9..

2007-12-06 Thread Avi Kivity
Izik Eidus wrote: > Avi Kivity wrote: > >> Izik Eidus wrote: >> > [Yunfeng] Yes, it may not be a recent regression, and it may be a > platform related issue. > Before we used Harwitch /paxville to do the test, and in a period > the installation test could pass without any

[kvm-devel] China NXY _ Kyna---professional in compatible bulk ink, CISS, ink cartridge, toner cartridge, toner powder, photo paper etc_.eml

2007-12-06 Thread kyna_zhou
Dear Sir or Madam, I got your name and address from Internet and knew you are in the business of printer consumable products, which is within the scope of our business. We got factory in both ShenZhen and DongGuan in China, DongGuan facotry cover 3500 square meters,and ShenZhen 2600 square mete

Re: [kvm-devel] [PATCH] x86: emulate read/write access to cr8

2007-12-06 Thread Avi Kivity
Joerg Roedel wrote: > This patch adds code to emulate the access to the cr8 register to the x86 > instruction emulator in kvm. > Applied, thanks. -- error compiling committee.c: too many arguments to function - SF.Net

Re: [kvm-devel] [PATCH] Use cmpxchg for pte updates on walk_addr()

2007-12-06 Thread Avi Kivity
Marcelo Tosatti wrote: > In preparation for multi-threaded guest pte walking, use cmpxchg() > when updating guest pte's. This guarantees that the assignment of the > dirty bit can't be lost if two CPU's are faulting the same address > simultaneously. > > In case of pte update via write emulation, n

Re: [kvm-devel] QEMU/KVM reboot after loading from statefile

2007-12-06 Thread Lukasz Lempart
On Dec 6, 2007 5:13 AM, Uri Lublin <[EMAIL PROTECTED]> wrote: > Lukasz Lempart wrote: > > Hi, > > > > I am having a problem with starting qemu/kvm from a previously saved > > statefile. qemu/kvm starts and the console output is the same as when > > I initially stopped the vm and saved state. Howev

[kvm-devel] [PATCH] Use cmpxchg for pte updates on walk_addr()

2007-12-06 Thread Marcelo Tosatti
In preparation for multi-threaded guest pte walking, use cmpxchg() when updating guest pte's. This guarantees that the assignment of the dirty bit can't be lost if two CPU's are faulting the same address simultaneously. In case of pte update via write emulation, no synchronization is necessary si

[kvm-devel] [PATCH] x86: emulate read/write access to cr8

2007-12-06 Thread Joerg Roedel
From: Joerg Roedel <[EMAIL PROTECTED]> This patch adds code to emulate the access to the cr8 register to the x86 instruction emulator in kvm. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Markus Rechberger <[EMAIL PROTECTED]> --- drivers/kvm/x86.c |5 + 1 files changed,

Re: [kvm-devel] [PATCH] RFC: simplify kvm-userspace to qemu-kvm callback structure

2007-12-06 Thread Avi Kivity
Christian Ehrhardt wrote: > Background: > In our ppc code for the demo we only needed a call to > cpu_physical_memory_rw to handle all kind of mmio we needed. Looking > at all the callback pointers for read/write mmio in kvm_callbacks I > wondered if this can be simplified with cpu_physical_memo

[kvm-devel] [PATCH] virtnet: remove double ether_setup

2007-12-06 Thread Christian Borntraeger
Hello Rusty, virtnet_probe already calls alloc_etherdev, which calls ether_setup. There is no need to do that again. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/net/virtio_net.c |1 - 1 file changed, 1 deletion(-) Index: kvm/drivers/net/virtio_net.c

Re: [kvm-devel] [PATCH 0/7] Rework irq injection infrastructure

2007-12-06 Thread Avi Kivity
Dong, Eddie wrote: >> What I mean is we pre-load 2 pages where the stack are in, the >> logic may >> be: >> >> If (real mode) >> get 2 pages. >> enter critical path >> >> VM Resume. >> put these 2 pages. >> handle VM Exit normally. >> >> >> > With 2nd thinking, We can cache these 2

Re: [kvm-devel] KVM Test result, kernel 51727a1.. , userspace 6a385c9..

2007-12-06 Thread Izik Eidus
Avi Kivity wrote: > Dong, Eddie wrote: > >> How do u disable TPR? Remove the patch, or just remove the setting? >> >> > > Just put 'return 0' in cpu_has_tpr_shadow() (or however it is called). > > > avi, can you please ask from alexeye to test it with this fix? (some times i had boote

Re: [kvm-devel] KVM Test result, kernel 51727a1.. , userspace 6a385c9..

2007-12-06 Thread Avi Kivity
Dong, Eddie wrote: > How do u disable TPR? Remove the patch, or just remove the setting? > Just put 'return 0' in cpu_has_tpr_shadow() (or however it is called). -- error compiling committee.c: too many arguments to function -

Re: [kvm-devel] [PATCH 0/7] Rework irq injection infrastructure

2007-12-06 Thread Dong, Eddie
> >What I mean is we pre-load 2 pages where the stack are in, the >logic may >be: > >If (real mode) > get 2 pages. >enter critical path > >VM Resume. >put these 2 pages. >handle VM Exit normally. > > With 2nd thinking, We can cache these 2 pages. Something like: if (real mode) ca

Re: [kvm-devel] KVM Test result, kernel 51727a1.. , userspace 6a385c9..

2007-12-06 Thread Dong, Eddie
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of >Izik Eidus >Sent: 2007年12月6日 19:27 >To: Avi Kivity >Cc: kvm-devel >Subject: Re: [kvm-devel] KVM Test result, kernel 51727a1.. >,userspace 6a385c9.. > >Avi Kivity wrote: >> Izik Eidus wrote: > >>>

Re: [kvm-devel] KVM Test result, kernel 51727a1.. , userspace 6a385c9..

2007-12-06 Thread Izik Eidus
Avi Kivity wrote: > Izik Eidus wrote: [Yunfeng] Yes, it may not be a recent regression, and it may be a platform related issue. Before we used Harwitch /paxville to do the test, and in a period the installation test could pass without any problem. But after we switch

Re: [kvm-devel] QEMU/KVM reboot after loading from statefile

2007-12-06 Thread Uri Lublin
Lukasz Lempart wrote: > Hi, > > I am having a problem with starting qemu/kvm from a previously saved > statefile. qemu/kvm starts and the console output is the same as when > I initially stopped the vm and saved state. However, after a 'cont' > the guest reboots (i.e. takes me back to the grub m

Re: [kvm-devel] [PATCH 0/7] Rework irq injection infrastructure

2007-12-06 Thread Dong, Eddie
>> >> One of the optimization, which can be used in pure SW is that >> we can shadow APIC state as "RO" to guest so that all guest >> read to APIC registers can run in full speed. T >> >> > >This can still be done with unacked interrupts: modify the >state to "as >if" the interrupt was i

Re: [kvm-devel] [PATCH 0/7] Rework irq injection infrastructure

2007-12-06 Thread Avi Kivity
Dong, Eddie wrote: >>> Mmm, how can you know if it is injected successfully? >>> From the patch, it looks like you know this by checking >>> IDT_Vectoring in next VM Exit. That means the virtual >>> interrupt controller state in memory is incorrect temply. >>> >>> If the injection success & we can

Re: [kvm-devel] [PATCH 0/7] Rework irq injection infrastructure

2007-12-06 Thread Dong, Eddie
>> >> Mmm, how can you know if it is injected successfully? >> From the patch, it looks like you know this by checking >> IDT_Vectoring in next VM Exit. That means the virtual >> interrupt controller state in memory is incorrect temply. >> >> If the injection success & we can get VM Exit before >

Re: [kvm-devel] KVM Test result, kernel 51727a1.. , userspace 6a385c9..

2007-12-06 Thread Avi Kivity
Izik Eidus wrote: >>> >>> [Yunfeng] Yes, it may not be a recent regression, and it may be a platform >>> related issue. >>> Before we used Harwitch /paxville to do the test, and in a period the >>> installation test could pass without any problem. >>> But after we switched the test machine to Dem

Re: [kvm-devel] [PATCH 0/7] Rework irq injection infrastructure

2007-12-06 Thread Avi Kivity
Dong, Eddie wrote: > It is not a small change, I still need to study the whole patch :( > If I can get some question clarified earlier, that helps a lot. > > > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> Avi Kivity >> Sent: 2007年12月4日 1