Re: [kvm-devel] 2.6.23.1-rt4 and kvm 48

2007-11-01 Thread Dor Laor
David Brown wrote:
> Uhm, not sure who to send this too...
>
> I thought I'd try out the realtime patch set and it didn't work at all
> with kvm. The console didn't dump anything and the system completely
> locked up.
>
> Anyone have any suggestions as to how to get more output on this issue?
>
> It got to the point of bringing up the tap interface and attaching it
> to the bridge but that was about it for the console messages.
>
> Thanks,
> - David Brown
>
>   
I tried to recreate your problem using 2.6.23-1 and latest rt patch (rt5).
The problem is that the kernel is not stable at all, I can't even 
compile the code over vnc -
my connection is constantly lost. So it might not be kvm problem?
Can you try is with -no-kvm and see if it's working - then its just a 
regular userspace process.

Anyway if all other things are stable on your end, can you send us 
dmesg/strace outputs?
Also try without the good -no-kvm-irqchip.
Regards,
Dor.
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>   


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] A question about virtio and KVM

2007-11-01 Thread Ian Brown
Hello, kvm-devel,

As I understand, virtio is not currently integrated into KVM.

However, there is a git tree of kvm  with virtio in:
git://kvm.qumranet.com/home/dor/src/virtio/kvm
and
git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace

Is there any intention to integrate it into KVM
official version in the near future?

Regads,
Ian

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] Rare nude photos of Kate Moss

2007-11-01 Thread Rare nude photos of Kate Moss
Rare nude photos of Kate Moss  http://www.maoker.com/n453c67.aspx

Stone: I have no problem doing nude scene  

http://www.maoker.com/n825c57.aspx

College girls go nude before camera for eternal beauty  

http://www.maoker.com/n436c67.aspx

Lil bro's naked truth   http://www.maoker.com/n830c57.aspx

the end of the naked cord   http://www.maoker.com/n829c57.aspx

Half-naked man howling ‘like a wolf’ up city tree   

http://www.maoker.com/n828c57.aspx

The Egyptian star, Nour Echerif appeared nude in his latest movie   

http://www.maoker.com/n827c57.aspx




-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] A question about virtio and KVM

2007-11-01 Thread Dor Laor
Ian Brown wrote:
>
> Hello, kvm-devel,
>
> As I understand, virtio is not currently integrated into KVM.
>
> However, there is a git tree of kvm  with virtio in:
> git://kvm.qumranet.com/home/dor/src/virtio/kvm
> and
> git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace
>
> Is there any intention to integrate it into KVM
> official version in the near future?
>
Hi Ian,
The intention is there, I just didn't have the time to work on it.
I can promise [there is no way to backoff now] that it will be 
working/merge-able state by December 1st.
Dor.
>
> Regads,
> Ian
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [Patch] improvement of "make rpm"

2007-11-01 Thread Avi Kivity
Akio Takebe wrote:
> Hi,
>
> I updated the patch of the following thread.
> http://thread.gmane.org/gmane.comp.emulators.kvm.devel/8899
> Changelog:
> - don't change Makefile
> - put back some options (BuildRequires and so on).
>
>   

Thanks, it's much improved.

However,  kvm.spec has already changed, so the patch won't apply.  
Please pull from kvm.git to get the latest sources.  Also note the 
comments below.

> If you try my patch with kvm-49, you can do the below.
> 1. rm SOURCES 
> 2. mkdir SOURCES
> 3. ./configure
> 4. make rpm
>
> I tested this patch on RHEL5.
>
> Signed-off-by: Akio Takebe <[EMAIL PROTECTED]>
>
> Best Regards,
>
> Akio Takebe
>
> ---
>
> --- kvm-49.orig/kvm.spec  2007-10-29 02:14:57.0 +0900
> +++ kvm-49/kvm.spec   2007-10-31 23:24:05.0 +0900
> @@ -1,3 +1,12 @@
> +%define Distribution %(rpm -q -qf /etc/redhat-release --qf '%{name}' | cut 
> -d - 
> -f 1)
> +%define os_release %(rpm -q --qf '%%{version}' /etc/redhat-release)
> +%define bindir /usr/bin
> +%define bin %{bindir}/kvm
> +%define initdir /etc/init.d
> +%define confdir /etc/kvm
> +%define utilsdir /etc/kvm/utils
> +%define _prebuilt %{?prebuilt:1}%{!?prebuilt:0}
> +
>   

Why are you moving this around?  It makes the patch harder to review 
because you can't immediately see if the code has changed.

>  Name:   kvm
>  Version:0.0
>  Release:0
> @@ -11,20 +20,8 @@ BuildRoot:  %{_tmppath}/%{name}-%{ve
>  ExclusiveArch:  i386 x86_64
>  
>  Requires:kvm-kmod bridge-utils
> -
> -%define Distribution %(cat /etc/redhat-release | awk '{ print $1}' | tr 
> [A-Z] 
> [a-z])
> -%define os_release %(rpm -q --qf '%%{version}' %{Distribution}-release)
> -
> -%if %{Distribution} == "fedora" && %{os_release} == 5 || %{Distribution} == 
> "centos" && %{os_release} == 4
> -BuildRequires: compat-gcc-32
> -%else
> -BuildRequires: compat-gcc-34
> -%endif
> -
>  BuildRequires:  SDL-devel zlib-devel alsa-lib-devel
>  
> -%define _prebuilt %{?prebuilt:1}%{!?prebuilt:0}
> -
>  %if !%{_prebuilt}
>  Source0: kvm.tar.gz
>  Source1: user.tar.gz
> @@ -32,15 +29,32 @@ Source2: kernel.tar.gz
>  Source3: scripts.tar.gz
>  Source4: Makefile
>  Source5: configure
> -Source5: kvm_stat
> +Source6: kvm_stat
>  %endif
>  
>  %description
>  The Kernel Virtual Machine provides a virtualization enviroment for 
> processors
>  with hardware support for virtualization: Intel's VT and AMD's AMD-V.
>  
> -%prep
> +%if %([ x"%{Distribution}" = x"fedora" -a x"%{os_release}" = x"5" ] && echo 
> 1 |
> | echo 0)
> +%define fedora5 1
> +%endif
>   

Why not use regular rpm conditionals instead of calling the shell?

Can you add an explicit test for RHEL 5?



-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 07 of 27] Move function kvm_create_default_phys_mem to kvmctl-x86 and rename

2007-11-01 Thread Avi Kivity
Jerone Young wrote:
> # HG changeset patch
> # User Jerone Young <[EMAIL PROTECTED]>
> # Date 1193849564 18000
> # Node ID 7445bcdab796596fb97312b97393e4f2936e5450
> # Parent  a809d39bd74d33d221dd98cc6afa02d9a35889a4
> Move function kvm_create_default_phys_mem to kvmctl-x86 and rename
>
> This patch moves function kvm_create_default_phys_mem to kvmctl-x86.
> This function is arch specific to x86 and also today no one allocates
> guest memory in the kernel. To remove confusion the function has
> been renameed x86_kvm_create_default_phys_mem
>
>   

kvm_x86_create_default_phys_mem, please.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 08 of 27] Modify out arch specific code from kvm_create function

2007-11-01 Thread Avi Kivity
Jerone Young wrote:
> # HG changeset patch
> # User Jerone Young <[EMAIL PROTECTED]>
> # Date 1193849564 18000
> # Node ID 179d9b30ab973e6676dcd0b6fa08e9635969d44c
> # Parent  7445bcdab796596fb97312b97393e4f2936e5450
> Modify out arch specific code from kvm_create function
>
> This function removes all x86 specific code and creates
> a hook function arch_kvm_create to accomidate for this code.
> arch_kvm_create is a hook that is placed in kvmctl-$(ARCH).c & h.
>
>   

kvm_arch_create() please.  don't export it.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 00 of 27] Refactor libkvm code Phase 1

2007-11-01 Thread Avi Kivity
Jerone Young wrote:
> Kaniciwa!
> I am here to once again bring great honorable patches to refactor
> libkvm x86 code. Patches that I sent in the past for this really took
> the wrong approach, and also many variables that I was splitting out actually
> could be shared amongst many architectures.
>
> This is the first phase as much of the code is tightly written for 
> x86 
> but can be reused by other archs, it's just a matter of an agreed upon method.
> Also since there are about 27 of these lets get through these before moving
> through more.
>
>   

Apart from the namespace issues (don't export library-private functions, 
start names with kvm_) this looks good.  Please make sure that it's 
bisect friendly (should compile as each patch is applied in sequence).  
With git I use something like

   for rev in $(git rev-list foo..bar); do git checkout $rev; make; done

to make sure that's the case.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 02 of 27] Make static slot & kvm_memory region funcions public

2007-11-01 Thread Avi Kivity
Jerone Young wrote:
> # HG changeset patch
> # User Jerone Young <[EMAIL PROTECTED]>
> # Date 1193849563 18000
> # Node ID 9c74b8e493e67f544c017b6bef8dd047c128c8d3
> # Parent  19a7c6d2ddfd1383aeb8a9bc09d9fe0673e7f9cc
> Make static slot & kvm_memory region funcions public
>
> This patch changes static functions for manipulation of memory slots
> and regions public in kvmctl.c. This also makes a decleration for these
> functions in kvmctl.h.
>
> This allow for breaking out code into other files and still keep this
> functionality. These functions can later be broken up some to
> move there x86 specific stuff (ex. TSS).
>
>   

We have to differentiate between exported functions (to user of the 
library) to global functions (visible inside the library, but not to its 
users).  IMO these belong to the latter kind, and so should not be in 
libkvm.h (update the comment, too).

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] A question about virtio and KVM

2007-11-01 Thread Ian Brown
Dor,
Thanks for the info!
Ian

On 11/1/07, Dor Laor <[EMAIL PROTECTED]> wrote:
> Ian Brown wrote:
> >
> > Hello, kvm-devel,
> >
> > As I understand, virtio is not currently integrated into KVM.
> >
> > However, there is a git tree of kvm  with virtio in:
> > git://kvm.qumranet.com/home/dor/src/virtio/kvm
> > and
> > git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace
> >
> > Is there any intention to integrate it into KVM
> > official version in the near future?
> >
> Hi Ian,
> The intention is there, I just didn't have the time to work on it.
> I can promise [there is no way to backoff now] that it will be
> working/merge-able state by December 1st.
> Dor.
> >
> > Regads,
> > Ian
> >
> > -
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > ___
> > kvm-devel mailing list
> > kvm-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/kvm-devel
> >
>
>

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 0 of 4] More x86 code movement

2007-11-01 Thread Avi Kivity
Hollis Blanchard wrote:
> More straightforward code movement from kvm_main.c to x86.c.
> These patches have been build-tested on x86-32, but not run.
>
>   

Patches are good, but I get

> drivers/kvm/vmx.c: In function ‘vmx_vcpu_put’:
> drivers/kvm/vmx.c:534: error: implicit declaration of function 
> ‘kvm_put_guest_fpu’
> drivers/kvm/x86.c: In function ‘__vcpu_run’:
> drivers/kvm/x86.c:1852: error: implicit declaration of function 
> ‘kvm_load_guest_fpu’
> drivers/kvm/x86.c: At top level:
> drivers/kvm/x86.c:2306: warning: conflicting types for 
> ‘kvm_load_guest_fpu’
> drivers/kvm/x86.c:1852: warning: previous implicit declaration of 
> ‘kvm_load_guest_fpu’ was here

on x86_64.

The problem's only in the last patch, so I dropped it and applied the 
other three.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 0 of 2] Refactor vcpu creation path.

2007-11-01 Thread Avi Kivity
Hollis Blanchard wrote:
> These patches are not simple code movement, and I haven't yet tested them so
> I'm just putting them out for comment.
>
> Basically we're expanding the VCPU creation path to add an "arch" layer 
> between
> main.c and svm/vmx.c. Since there is one call in each direction (main.c ->
> svm/vmx.c, svm/vmx.c -> main.c) we end up with two new architecture functions
> in the middle.
>
>   

The approach looks good.  Will apply once they've been run tested and 
the failure paths reviewed (only gave them a cursory look now).

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit paravirt

2007-11-01 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeremy Fitzhardinge escreveu:
> Glauber de Oliveira Costa wrote:
>> This patch introduces, and patch callers when needed, native
>> versions for read/write_crX functions, clts and wbinvd.
>>
>> Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]>
>> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]>
>> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]>
>> ---
>>  arch/x86/mm/pageattr_64.c   |3 +-
>>  include/asm-x86/system_64.h |   60 
>> ++
>>  2 files changed, 45 insertions(+), 18 deletions(-)
>>
>> diff --git a/arch/x86/mm/pageattr_64.c b/arch/x86/mm/pageattr_64.c
>> index c40afba..59a52b0 100644
>> --- a/arch/x86/mm/pageattr_64.c
>> +++ b/arch/x86/mm/pageattr_64.c
>> @@ -12,6 +12,7 @@
>>  #include 
>>  #include 
>>  #include 
>> +#include 
>>  
>>  pte_t *lookup_address(unsigned long address)
>>  { 
>> @@ -77,7 +78,7 @@ static void flush_kernel_map(void *arg)
>> much cheaper than WBINVD. */
>>  /* clflush is still broken. Disable for now. */
>>  if (1 || !cpu_has_clflush)
>> -asm volatile("wbinvd" ::: "memory");
>> +wbinvd();
>>  else list_for_each_entry(pg, l, lru) {
>>  void *adr = page_address(pg);
>>  clflush_cache_range(adr, PAGE_SIZE);
>> diff --git a/include/asm-x86/system_64.h b/include/asm-x86/system_64.h
>> index 4cb2384..b558cb2 100644
>> --- a/include/asm-x86/system_64.h
>> +++ b/include/asm-x86/system_64.h
>> @@ -65,53 +65,62 @@ extern void load_gs_index(unsigned);
>>  /*
>>   * Clear and set 'TS' bit respectively
>>   */
>> -#define clts() __asm__ __volatile__ ("clts")
>> +static inline void native_clts(void)
>> +{
>> +asm volatile ("clts");
>> +}
>>  
>> -static inline unsigned long read_cr0(void)
>> -{ 
>> +static inline unsigned long native_read_cr0(void)
>> +{
>>  unsigned long cr0;
>>  asm volatile("movq %%cr0,%0" : "=r" (cr0));
>>  return cr0;
>>  }
>>   
> 
> This is a pre-existing bug, but it seems to me that these read/write crX
> asms should have a constraint to stop the compiler from reordering them
> with respect to each other.  The brute-force approach would be to add
> "memory" clobbers, but the subtle fix would be to add a variable which
> is only used to sequence:
> 
I in fact have seen bugs with mixed reads and writes to the same cr,
(cr4), but adding the volatile
flag to the read function seemed to fix it. Yet, I agree with you that
the theorectical problem exists for the reorder, and your proposed fix
seems fine (although if we're really desperate about memory usage, we
can use a char instead a int and save 3 bytes!)

It also just ocurred to me that this part of the patch can also go into
the consolidation part. So I'll respin it.

Thanks for the comment
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Remi - http://enigmail.mozdev.org

iD8DBQFHKdkujYI8LaFUWXMRAhV2AKDPIjwGQnoLtldys/OWtIEs6biwxwCg1Jd/
o36S+qcb4sWJ6peqhrSRnos=
=YmeC
-END PGP SIGNATURE-

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 11/16] turn priviled operation into a macro in head_64.S

2007-11-01 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeremy Fitzhardinge escreveu:
> Glauber de Oliveira Costa wrote:
>> under paravirt, read cr2 cannot be issued directly anymore.
>> So wrap it in a macro, defined to the operation itself in case
>> paravirt is off, but to something else if we have paravirt
>> in the game
>>   
> 
> Is this actually needed?  It's only used in the early fault handler in
> head_64.S.  Will we be taking that path in the paravirt case?  If so,
> should we disable the fault handler altogether, since the hypervisor can
> probably provide better diagnositcs.
> 

Well, as you told me earlier, xen won't use it. Neither does lguest.
None of us goes through the normal boot process anyway. But maybe some
other technology uses it?

Zach, how does it work for vmware?


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Remi - http://enigmail.mozdev.org

iD8DBQFHKdmVjYI8LaFUWXMRAgxkAKCQB+VtpGSlm+zuyRRWmi3h+k9NqQCgyfmD
cpPyQcfxo9hcSI0WaDFmpWg=
=Oa4v
-END PGP SIGNATURE-

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit paravirt

2007-11-01 Thread Jeremy Fitzhardinge
Glauber de Oliveira Costa wrote:
> I in fact have seen bugs with mixed reads and writes to the same cr,
> (cr4), but adding the volatile
> flag to the read function seemed to fix it.

Well, volatile will make a read be repeated rather than caching the
previous value, but it has no effect on ordering.

> Yet, I agree with you that
> the theorectical problem exists for the reorder, and your proposed fix
> seems fine (although if we're really desperate about memory usage, we
> can use a char instead a int and save 3 bytes!)

Sure.  Ideally the compiler would never even generate a reference to it,
and it could just be extern, but in practice the compiler will generate
references sometimes.

J

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] Fix writing back APIC reset to inkernel APIC

2007-11-01 Thread Markus Rechberger
This patch synchronises the APIC reset with the inkernel implementation 
which fixes the reboot issues which can be seen with Linux and Windows.


Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]>
Signed-off-by: Markus Rechberger <[EMAIL PROTECTED]>
diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c
index 2011247..60d31fa 100644
--- a/qemu/hw/apic.c
+++ b/qemu/hw/apic.c
@@ -930,6 +930,13 @@ static void apic_reset(void *opaque)
  * processor when local APIC is enabled.
  */
 s->lvt[APIC_LVT_LINT0] = 0x700;
+#ifdef USE_KVM
+#ifdef KVM_CAP_IRQCHIP
+if (kvm_allowed && kvm_irqchip_in_kernel(kvm_context)) {
+kvm_kernel_lapic_load_from_user(s);
+}
+#endif
+#endif
 }
 
 static CPUReadMemoryFunc *apic_mem_read[3] = {
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit paravirt

2007-11-01 Thread Keir Fraser
On 1/11/07 15:30, "Jeremy Fitzhardinge" <[EMAIL PROTECTED]> wrote:

> Glauber de Oliveira Costa wrote:
>> I in fact have seen bugs with mixed reads and writes to the same cr,
>> (cr4), but adding the volatile
>> flag to the read function seemed to fix it.
> 
> Well, volatile will make a read be repeated rather than caching the
> previous value, but it has no effect on ordering.

volatile prevents the asm from being 'moved significantly', according to the
gcc manual. I take that to mean that reordering is not allowed.

 -- Keir



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit paravirt

2007-11-01 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Keir Fraser escreveu:
> On 1/11/07 15:30, "Jeremy Fitzhardinge" <[EMAIL PROTECTED]> wrote:
> 
>> Glauber de Oliveira Costa wrote:
>>> I in fact have seen bugs with mixed reads and writes to the same cr,
>>> (cr4), but adding the volatile
>>> flag to the read function seemed to fix it.
>> Well, volatile will make a read be repeated rather than caching the
>> previous value, but it has no effect on ordering.
> 
> volatile prevents the asm from being 'moved significantly', according to the
> gcc manual. I take that to mean that reordering is not allowed.
> 
According to a gcc developer to whom I asked this question, volatile
prevents the code
to be removed, but does not prevent it to be moved (pun indented). In
practice, it should force
a re-read, but not influence the ordering decisions from the compiler.
Besides , 'significantly'
sounds like a significantly unprecise word, whose specific meaning may
be implementation dependant.

So I agree that adding a memory location reference is probably the best
alternative.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Remi - http://enigmail.mozdev.org

iD8DBQFHKftDjYI8LaFUWXMRAiLTAKDqf/M8umNYw6u7r9ONozTEUVy8SwCgygma
jWNKQmxmLpyPxr00KbQy9Vg=
=JM4K
-END PGP SIGNATURE-

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit paravirt

2007-11-01 Thread Jeremy Fitzhardinge
Keir Fraser wrote:
> volatile prevents the asm from being 'moved significantly', according to the
> gcc manual. I take that to mean that reordering is not allowed.
>   

That phrase doesn't appear in the gcc manual; in fact, it specifically
says that reordering can happen:

The `volatile' keyword indicates that the instruction has important
side-effects.  GCC will not delete a volatile `asm' if it is reachable.
(The instruction can still be deleted if GCC can prove that
control-flow will never reach the location of the instruction.)  Note
that even a volatile `asm' instruction can be moved relative to other
code, including across jump instructions.  For example, on many targets
there is a system register which can be set to control the rounding
mode of floating point operations.  You might try setting it with a
volatile `asm', like this PowerPC example:

asm volatile("mtfsf 255,%0" : : "f" (fpenv));
sum = x + y;

This will not work reliably, as the compiler may move the addition back
before the volatile `asm'.  To make it work you need to add an
artificial dependency to the `asm' referencing a variable in the code
you don't want moved, for example:

 asm volatile ("mtfsf 255,%1" : "=X"(sum): "f"(fpenv));
 sum = x + y;

I take from this that it is not a good idea to assume "asm volatile" has
any ordering effects at all.

J

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] [v2] Move x86 vcpu ioctl handlers to x86.c

2007-11-01 Thread Hollis Blanchard
3 files changed, 450 insertions(+), 442 deletions(-)
drivers/kvm/kvm.h  |   10 +
drivers/kvm/kvm_main.c |  448 
drivers/kvm/x86.c  |  434 ++


Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]>
---
It might be preferable to handle these by defining a kvm_arch_vcpu_ioctl()
rather creating lots of new functions. I could go either way.

Changes from v1: don't remove kvm_load_guest_fpu() and kvm_put_guest_fpu()
prototypes.

diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -634,6 +634,16 @@ int kvm_arch_vcpu_ioctl_get_fpu(struct k
 int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu);
 int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu);
 
+int kvm_arch_vcpu_ioctl_get_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs);
+int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs);
+int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
+ struct kvm_sregs *sregs);
+int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
+ struct kvm_sregs *sregs);
+int kvm_arch_vcpu_ioctl_debug_guest(struct kvm_vcpu *vcpu,
+   struct kvm_debug_guest *dbg);
+int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run);
+
 __init void kvm_arch_init(void);
 
 static inline void kvm_guest_enter(void)
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -768,428 +768,6 @@ void kvm_resched(struct kvm_vcpu *vcpu)
 }
 EXPORT_SYMBOL_GPL(kvm_resched);
 
-/*
- * Check if userspace requested an interrupt window, and that the
- * interrupt window is open.
- *
- * No need to exit to userspace if we already have an interrupt queued.
- */
-static int dm_request_for_irq_injection(struct kvm_vcpu *vcpu,
- struct kvm_run *kvm_run)
-{
-   return (!vcpu->irq_summary &&
-   kvm_run->request_interrupt_window &&
-   vcpu->interrupt_window_open &&
-   (kvm_x86_ops->get_rflags(vcpu) & X86_EFLAGS_IF));
-}
-
-static void post_kvm_run_save(struct kvm_vcpu *vcpu,
- struct kvm_run *kvm_run)
-{
-   kvm_run->if_flag = (kvm_x86_ops->get_rflags(vcpu) & X86_EFLAGS_IF) != 0;
-   kvm_run->cr8 = get_cr8(vcpu);
-   kvm_run->apic_base = kvm_get_apic_base(vcpu);
-   if (irqchip_in_kernel(vcpu->kvm))
-   kvm_run->ready_for_interrupt_injection = 1;
-   else
-   kvm_run->ready_for_interrupt_injection =
-   (vcpu->interrupt_window_open &&
-vcpu->irq_summary == 0);
-}
-
-static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
-{
-   int r;
-
-   if (unlikely(vcpu->mp_state == VCPU_MP_STATE_SIPI_RECEIVED)) {
-   pr_debug("vcpu %d received sipi with vector # %x\n",
-  vcpu->vcpu_id, vcpu->sipi_vector);
-   kvm_lapic_reset(vcpu);
-   r = kvm_x86_ops->vcpu_reset(vcpu);
-   if (r)
-   return r;
-   vcpu->mp_state = VCPU_MP_STATE_RUNNABLE;
-   }
-
-preempted:
-   if (vcpu->guest_debug.enabled)
-   kvm_x86_ops->guest_debug_pre(vcpu);
-
-again:
-   r = kvm_mmu_reload(vcpu);
-   if (unlikely(r))
-   goto out;
-
-   kvm_inject_pending_timer_irqs(vcpu);
-   clear_bit(KVM_REQ_INTR, &vcpu->requests);
-   if (irqchip_in_kernel(vcpu->kvm))
-   kvm_x86_ops->inject_pending_irq(vcpu);
-   else if (!vcpu->mmio_read_completed)
-   kvm_x86_ops->inject_pending_vectors(vcpu, kvm_run);
-
-   preempt_disable();
-
-   kvm_x86_ops->prepare_guest_switch(vcpu);
-   kvm_load_guest_fpu(vcpu);
-
-   local_irq_disable();
-
-   if (signal_pending(current)) {
-   local_irq_enable();
-   preempt_enable();
-   r = -EINTR;
-   kvm_run->exit_reason = KVM_EXIT_INTR;
-   ++vcpu->stat.signal_exits;
-   goto out;
-   }
-
-   if (vcpu->requests) {
-   if (test_and_clear_bit(KVM_REQ_TLB_FLUSH, &vcpu->requests))
-   kvm_x86_ops->tlb_flush(vcpu);
-   if (test_bit(KVM_REQ_INTR, &vcpu->requests)) {
-   local_irq_enable();
-   preempt_enable();
-   r = 1;
-   goto out;
-   }
-   }
-
-   vcpu->guest_mode = 1;
-   kvm_guest_enter();
-
-   kvm_x86_ops->run(vcpu, kvm_run);
-
-   vcpu->guest_mode = 0;
-   local_irq_enable();
-
-   ++vcpu->stat.exits;
-
-   /*
-* We must have an instruction between local_irq_enable() and
-* kvm_guest_e

[kvm-devel] Starting a VM reboots my machine

2007-11-01 Thread Cam Macdonell

Hi,

I'm running an AMD

vendor_id   : AuthenticAMD
cpu family  : 15
model   : 75
model name  : AMD Athlon(tm) 64 X2 Dual Core Processor 4600+

with 4GB of RAM and Scientific Linux 5.0. I've compiled kvm-48 on it and 
the compile works and loading the modules works fine, the only dmesg 
line referring to kvm is SELinux: initialized (dev kvm_anon_inodefs, 
type kvm_anon_inodefs), not configured for labeling.

However, when I boot any KVM, the machine reboots.  It works fine with 
the no-kvm flag.  Has anyone else seen this behaviour?

Thanks,
Cam

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Starting a VM reboots my machine

2007-11-01 Thread Dor Laor

Cam Macdonell wrote:


Hi,

I'm running an AMD

vendor_id   : AuthenticAMD
cpu family  : 15
model   : 75
model name  : AMD Athlon(tm) 64 X2 Dual Core Processor 4600+

with 4GB of RAM and Scientific Linux 5.0. I've compiled kvm-48 on it and
the compile works and loading the modules works fine, the only dmesg
line referring to kvm is SELinux: initialized (dev kvm_anon_inodefs,
type kvm_anon_inodefs), not configured for labeling.

However, when I boot any KVM, the machine reboots.  It works fine with
the no-kvm flag.  Has anyone else seen this behaviour?

We have some instabilities with AMD. These issues are under debug these 
days.
Can you please supply netconsole debug messages from the host. This can 
be very helpful.

Also what's the guest OS?

These is a slight chance that kvm-49 and -no-kvm-irqchip will help.
Dor.


Thanks,
Cam

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] Fix writing back APIC reset to inkernel APIC

2007-11-01 Thread Dor Laor

Markus Rechberger wrote:
This patch synchronises the APIC reset with the inkernel 
implementation which fixes the reboot issues which can be seen with 
Linux and Windows.


Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]>
Signed-off-by: Markus Rechberger <[EMAIL PROTECTED]>


diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c
index 2011247..60d31fa 100644
--- a/qemu/hw/apic.c
+++ b/qemu/hw/apic.c
@@ -930,6 +930,13 @@ static void apic_reset(void *opaque)
  * processor when local APIC is enabled.
  */
 s->lvt[APIC_LVT_LINT0] = 0x700;
+#ifdef USE_KVM
+#ifdef KVM_CAP_IRQCHIP
+if (kvm_allowed && kvm_irqchip_in_kernel(kvm_context)) {
+kvm_kernel_lapic_load_from_user(s);
+}
+#endif
+#endif
 }
 
In general your approach might work but there are some inconsistencies - 
there is kvm_apic_reset
in the kernel too. We can either drop it and use your load method or add 
an apic-reset ioctl.

Eddie/Avi which approach do you think is better?
There is also the ioapic who should get reset too.
Thanks,
Dor.

 static CPUReadMemoryFunc *apic_mem_read[3] = {
  
-

This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/


___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Avi Kivity
Today's big change is FlexPriority, which drastically improves Windows 
SMP and/or ACPI performance on newer Intel processors.

Changes from kvm-49:
- fix smp_call_function_mask() emulation on preemptible kernels
- move libkvm into own directory (Hollis Blanchard)
- fix save/restore/migrate for new memory slot management (Uri Lublin)
- compile fixes (Uri Lublin, me)
- fix recursive locking on mmap() (Anthony Liguori)
- remove some cr2 dependencies from x86 emulator
- further simplify x86 emulator
- more portability work (Carsten Otte, Hollis Blanchard)
- Intel FlexPriority support (Sheng Yang)
- fix dirty page tracking on aliased pages (Uri Lublin)

Notes:
  If you use the modules bundled with kvm-50, you can use any version
of Linux from 2.6.9 upwards.
  If you use the modules bundled with Linux 2.6.20, you need to use
kvm-12.
  If you use the modules bundled with Linux 2.6.21, you need to use
kvm-17.
  Modules from Linux 2.6.22 and up will work with any kvm version from
kvm-22.  Some features may only be available in newer releases.
  For best performance, use Linux 2.6.23-rc2 or later as the host.

http://kvm.qumranet.com


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Avi Kivity
Avi Kivity wrote:
> Today's big change is FlexPriority, which drastically improves Windows 
> SMP and/or ACPI performance on newer Intel processors.
>

Whoops, this is kvm-50, not as the subject line suggests.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [ kvm-Bugs-1824398 ] poor/weird performance in sandra (kvm50/acpi/windows)

2007-11-01 Thread SourceForge.net
Bugs item #1824398, was opened at 2007-11-02 11:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1824398&group_id=180599

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Wilson (wilsone)
Assigned to: Nobody/Anonymous (nobody)
Summary: poor/weird performance in sandra (kvm50/acpi/windows)

Initial Comment:
CPU Model: Intel Core 2 Duo Q6600
KVM Version: KVM-50
Host Kernel: Linux 2.6.23.1 
Arch: X86_64
Guest: 32bit Windows XP Sp2 ACPI HAL
QEMU Command line: qemu-system-x86_64 -hda /common/stor2/wxp32acpi.qcow2 -m 512 
-net nic,model=rtl8139,macaddr=50:17:99:55:4E:90 -net tap & 
no-kvm: vm won't even boot with -no-kvm

Issue: When doing the CPU benchmarks (arithmetic or multimedia), the system 
takes a very long time and gives a dodgy result. This doesn't happen with a 
non-acpi hal vm. 

Sisoft Sandra can be downloaded here:

http://www.sisoftware.co.uk/index.html?dir=dload&location=sware_dl_3264&langx=en&a=


I'm assuming this should be very easy to replicate for anyone running kvm-50 or 
older with the tpr patch and an acpi hal windows.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1824398&group_id=180599

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [Lguest] [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit paravirt

2007-11-01 Thread Zachary Amsden
On Thu, 2007-11-01 at 10:41 -0700, Jeremy Fitzhardinge wrote:
> Keir Fraser wrote:
> > volatile prevents the asm from being 'moved significantly', according to the
> > gcc manual. I take that to mean that reordering is not allowed.
> >   

I understood it as reordering was permitted, but no re-ordering across
another volatile load, store, or asm was permitted.  And of course, as
long as input and output constraints are written properly, the
re-ordering should not be vulnerable to pathological movement causing
the code to malfunction.

It seems that CPU state side effects which can't be expressed in C need
special care - FPU is certainly one example.

Also, memory clobber on a volatile asm should stop invalid movement
across TLB flushes and other problems areas.  Even memory fences should
have memory clobber in order to stop movement of loads and stores across
the fence by the compiler.

Zach


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Haydn Solomon
How can I tell that my cpu has flexpriority?

(Resending this as didn't cc list last time.)

On Nov 1, 2007 7:12 PM, Avi Kivity <[EMAIL PROTECTED]> wrote:

> Today's big change is FlexPriority, which drastically improves Windows
> SMP and/or ACPI performance on newer Intel processors.
>
> Changes from kvm-49:
> - fix smp_call_function_mask() emulation on preemptible kernels
> - move libkvm into own directory (Hollis Blanchard)
> - fix save/restore/migrate for new memory slot management (Uri Lublin)
> - compile fixes (Uri Lublin, me)
> - fix recursive locking on mmap() (Anthony Liguori)
> - remove some cr2 dependencies from x86 emulator
> - further simplify x86 emulator
> - more portability work (Carsten Otte, Hollis Blanchard)
> - Intel FlexPriority support (Sheng Yang)
> - fix dirty page tracking on aliased pages (Uri Lublin)
>
> Notes:
>  If you use the modules bundled with kvm-50, you can use any version
> of Linux from 2.6.9 upwards.
>  If you use the modules bundled with Linux 2.6.20, you need to use
> kvm-12.
>  If you use the modules bundled with Linux 2.6.21, you need to use
> kvm-17.
>  Modules from Linux 2.6.22 and up will work with any kvm version from
> kvm-22.  Some features may only be available in newer releases.
>  For best performance, use Linux 2.6.23-rc2 or later as the host.
>
> http://kvm.qumranet.com
>
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [Lguest] [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit paravirt

2007-11-01 Thread Jeremy Fitzhardinge
Zachary Amsden wrote:
> I understood it as reordering was permitted, but no re-ordering across
> another volatile load, store, or asm was permitted.

It doesn't say that, so I wouldn't assume it.  Certainly we had problems
with the pda code; until I added the _proxy_pda dependency variable, the
only fix Andi could find was adding both "volatile" and a memory clobber.

>   And of course, as
> long as input and output constraints are written properly, the
> re-ordering should not be vulnerable to pathological movement causing
> the code to malfunction.
>   

Yes.  I think constraints are the only way to control ordering (even if
it's as heavy-handed as a memory clobber).  It would be nice if gcc had
a constraint which was only used for ordering, and never generated a
reference.  Then you could make up pseudo-variables in order to express
dependencies without having the risk that the compiler would generate
references.

> It seems that CPU state side effects which can't be expressed in C need
> special care - FPU is certainly one example.
>   

Not an immediate problem, fortunately.

> Also, memory clobber on a volatile asm should stop invalid movement
> across TLB flushes and other problems areas.

Yes.  Any asm which has global effects on how addresses are interpreted
(like tlbflush, reloading the pagetable base, changing modes, etc) needs
to have a memory clobber.

>   Even memory fences should
> have memory clobber in order to stop movement of loads and stores across
> the fence by the compiler.
>   

Pretty sure they do.  A normal compiler barrier is *just* a memory clobber.

J

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Sheng Yang
On Friday 02 November 2007 09:10:31 Haydn Solomon wrote:
> How can I tell that my cpu has flexpriority?
>
> (Resending this as didn't cc list last time.)

Oops, forgot the patch...

>
> On Nov 1, 2007 7:12 PM, Avi Kivity <[EMAIL PROTECTED]> wrote:
> > Today's big change is FlexPriority, which drastically improves Windows
> > SMP and/or ACPI performance on newer Intel processors.
> >
> > Changes from kvm-49:
> > - fix smp_call_function_mask() emulation on preemptible kernels
> > - move libkvm into own directory (Hollis Blanchard)
> > - fix save/restore/migrate for new memory slot management (Uri Lublin)
> > - compile fixes (Uri Lublin, me)
> > - fix recursive locking on mmap() (Anthony Liguori)
> > - remove some cr2 dependencies from x86 emulator
> > - further simplify x86 emulator
> > - more portability work (Carsten Otte, Hollis Blanchard)
> > - Intel FlexPriority support (Sheng Yang)
> > - fix dirty page tracking on aliased pages (Uri Lublin)
> >
> > Notes:
> >  If you use the modules bundled with kvm-50, you can use any version
> > of Linux from 2.6.9 upwards.
> >  If you use the modules bundled with Linux 2.6.20, you need to use
> > kvm-12.
> >  If you use the modules bundled with Linux 2.6.21, you need to use
> > kvm-17.
> >  Modules from Linux 2.6.22 and up will work with any kvm version from
> > kvm-22.  Some features may only be available in newer releases.
> >  For best performance, use Linux 2.6.23-rc2 or later as the host.
> >
> > http://kvm.qumranet.com
> >
> >
> > -
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > ___
> > kvm-devel mailing list
> > kvm-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/kvm-devel



-- 
Thanks
Yang, Sheng
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 42e7fad..8f01c8d 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1684,9 +1684,12 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu)
 		vmcs_write32(TPR_THRESHOLD, 0);
 	}
 
-	if (vm_need_virtualize_apic_accesses(vmx->vcpu.kvm))
+	if (vm_need_virtualize_apic_accesses(vmx->vcpu.kvm)) {
 		vmcs_write64(APIC_ACCESS_ADDR,
 			 page_to_phys(vmx->vcpu.kvm->apic_access_page));
+		if (vm_need_tpr_shadow(vmx->vcpu.kvm))
+			printk(KERN_INFO "kvm: FlexPriority enabled!\n");
+	}
 
 	vmx->vcpu.cr0 = 0x6010;
 	vmx_set_cr0(&vmx->vcpu, vmx->vcpu.cr0); /* enter rmode */
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Sheng Yang
On Friday 02 November 2007 09:10:31 Haydn Solomon wrote:
> How can I tell that my cpu has flexpriority?
>
> (Resending this as didn't cc list last time.)

Try attached "printk" patch. 

And generally, E6850, E6750, E6550, Core2 Duo processors
starting from
G0 stepping should support this.

>
> On Nov 1, 2007 7:12 PM, Avi Kivity <[EMAIL PROTECTED]> wrote:
> > Today's big change is FlexPriority, which drastically improves Windows
> > SMP and/or ACPI performance on newer Intel processors.
> >
> > Changes from kvm-49:
> > - fix smp_call_function_mask() emulation on preemptible kernels
> > - move libkvm into own directory (Hollis Blanchard)
> > - fix save/restore/migrate for new memory slot management (Uri Lublin)
> > - compile fixes (Uri Lublin, me)
> > - fix recursive locking on mmap() (Anthony Liguori)
> > - remove some cr2 dependencies from x86 emulator
> > - further simplify x86 emulator
> > - more portability work (Carsten Otte, Hollis Blanchard)
> > - Intel FlexPriority support (Sheng Yang)
> > - fix dirty page tracking on aliased pages (Uri Lublin)
> >
> > Notes:
> >  If you use the modules bundled with kvm-50, you can use any version
> > of Linux from 2.6.9 upwards.
> >  If you use the modules bundled with Linux 2.6.20, you need to use
> > kvm-12.
> >  If you use the modules bundled with Linux 2.6.21, you need to use
> > kvm-17.
> >  Modules from Linux 2.6.22 and up will work with any kvm version from
> > kvm-22.  Some features may only be available in newer releases.
> >  For best performance, use Linux 2.6.23-rc2 or later as the host.
> >
> > http://kvm.qumranet.com
> >
> >
> > -
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > ___
> > kvm-devel mailing list
> > kvm-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/kvm-devel



-- 
Thanks
Yang, Sheng

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Yang, Sheng
From: Haydn Solomon [mailto:[EMAIL PROTECTED] 
Sent: 2007年11月2日 10:15
To: Yang, Sheng
Cc: kvm-devel@lists.sourceforge.net; Avi Kivity
Subject: Re: [kvm-devel] [ANNOUNCE] kvm-49 release





On Nov 1, 2007 9:54 PM, Haydn Solomon <[EMAIL PROTECTED]> wrote:





On Nov 1, 2007 9:36 PM, Sheng Yang <[EMAIL PROTECTED]> wrote:


On Friday 02 November 2007 09:10:31 Haydn Solomon wrote:

> How can I tell that my cpu has flexpriority?
>
> (Resending this as didn't cc list last time.) 


Oops, forgot the patch...


Thanks Sheng.

Luckily for me I've got the Flexpriority feature

[EMAIL PROTECTED] winxptest]# dmesg | grep lex
kvm: FlexPriority enabled! 

One thing I do notice apart from noticeably very good responsiveness 
and performance on windows guest ( xp sp2 ) is that this is the lowest cpu 
usage I've seen on the qemu kvm process to date. I haven't tried smp yet but 
that will be my next test and will report on how that goes. Thanks guys and 
well done! 




One issue I do see. When I run my windows xp guest which is ACPI Multiprocessor 
PC HAL with -smp 2, it runs much slower and cpu usage is high. 
 
Thanks, I am checking it. :)
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Haydn Solomon
On Nov 1, 2007 9:54 PM, Haydn Solomon <[EMAIL PROTECTED]> wrote:

>
>
> On Nov 1, 2007 9:36 PM, Sheng Yang <[EMAIL PROTECTED]> wrote:
>
> > On Friday 02 November 2007 09:10:31 Haydn Solomon wrote:
> > > How can I tell that my cpu has flexpriority?
> > >
> > > (Resending this as didn't cc list last time.)
> >
> > Oops, forgot the patch...
>
>
> Thanks Sheng.
>
> Luckily for me I've got the Flexpriority feature
>
> [EMAIL PROTECTED] winxptest]# dmesg | grep lex
> kvm: FlexPriority enabled!
>
> One thing I do notice apart from noticeably very good responsiveness and
> performance on windows guest ( xp sp2 ) is that this is the lowest cpu usage
> I've seen on the qemu kvm process to date. I haven't tried smp yet but that
> will be my next test and will report on how that goes. Thanks guys and well
> done!
>


One issue I do see. When I run my windows xp guest which is ACPI
Multiprocessor PC HAL with -smp 2, it runs much slower and cpu usage is
high.
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Haydn Solomon
On Nov 1, 2007 9:36 PM, Sheng Yang <[EMAIL PROTECTED]> wrote:

> On Friday 02 November 2007 09:10:31 Haydn Solomon wrote:
> > How can I tell that my cpu has flexpriority?
> >
> > (Resending this as didn't cc list last time.)
>
> Oops, forgot the patch...


Thanks Sheng.

Luckily for me I've got the Flexpriority feature

[EMAIL PROTECTED] winxptest]# dmesg | grep lex
kvm: FlexPriority enabled!

One thing I do notice apart from noticeably very good responsiveness and
performance on windows guest ( xp sp2 ) is that this is the lowest cpu usage
I've seen on the qemu kvm process to date. I haven't tried smp yet but that
will be my next test and will report on how that goes. Thanks guys and well
done!



>
> >
> > On Nov 1, 2007 7:12 PM, Avi Kivity <[EMAIL PROTECTED]> wrote:
> > > Today's big change is FlexPriority, which drastically improves Windows
> > > SMP and/or ACPI performance on newer Intel processors.
> > >
> > > Changes from kvm-49:
> > > - fix smp_call_function_mask() emulation on preemptible kernels
> > > - move libkvm into own directory (Hollis Blanchard)
> > > - fix save/restore/migrate for new memory slot management (Uri Lublin)
> > > - compile fixes (Uri Lublin, me)
> > > - fix recursive locking on mmap() (Anthony Liguori)
> > > - remove some cr2 dependencies from x86 emulator
> > > - further simplify x86 emulator
> > > - more portability work (Carsten Otte, Hollis Blanchard)
> > > - Intel FlexPriority support (Sheng Yang)
> > > - fix dirty page tracking on aliased pages (Uri Lublin)
> > >
> > > Notes:
> > >  If you use the modules bundled with kvm-50, you can use any
> version
> > > of Linux from 2.6.9 upwards.
> > >  If you use the modules bundled with Linux 2.6.20, you need to use
> > > kvm-12.
> > >  If you use the modules bundled with Linux 2.6.21, you need to use
> > > kvm-17.
> > >  Modules from Linux 2.6.22 and up will work with any kvm version
> from
> > > kvm-22.  Some features may only be available in newer releases.
> > >  For best performance, use Linux 2.6.23-rc2 or later as the host.
> > >
> > > http://kvm.qumranet.com
> > >
> > >
> > >
> -
> > > This SF.net email is sponsored by: Splunk Inc.
> > > Still grepping through log files to find problems?  Stop.
> > > Now Search log events and configuration files using AJAX and a
> browser.
> > > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > > ___
> > > kvm-devel mailing list
> > > kvm-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>
>
> --
> Thanks
> Yang, Sheng
>
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Zhao, Yunfeng
Save/restore still fails in today's testing.

kvm_get_mem_map failed: Unknown error 18446744073709551594


Thanks
Yunfeng
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Avi Kivity
Sent: 2007年11月2日 7:12
To: kvm-devel
Subject: [kvm-devel] [ANNOUNCE] kvm-49 release

Today's big change is FlexPriority, which drastically improves Windows 
SMP and/or ACPI performance on newer Intel processors.

Changes from kvm-49:
- fix smp_call_function_mask() emulation on preemptible kernels
- move libkvm into own directory (Hollis Blanchard)
- fix save/restore/migrate for new memory slot management (Uri Lublin)
- compile fixes (Uri Lublin, me)
- fix recursive locking on mmap() (Anthony Liguori)
- remove some cr2 dependencies from x86 emulator
- further simplify x86 emulator
- more portability work (Carsten Otte, Hollis Blanchard)
- Intel FlexPriority support (Sheng Yang)
- fix dirty page tracking on aliased pages (Uri Lublin)

Notes:
  If you use the modules bundled with kvm-50, you can use any version
of Linux from 2.6.9 upwards.
  If you use the modules bundled with Linux 2.6.20, you need to use
kvm-12.
  If you use the modules bundled with Linux 2.6.21, you need to use
kvm-17.
  Modules from Linux 2.6.22 and up will work with any kvm version from
kvm-22.  Some features may only be available in newer releases.
  For best performance, use Linux 2.6.23-rc2 or later as the host.

http://kvm.qumranet.com


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] Fix writing back APIC reset to inkernel APIC

2007-11-01 Thread Dong, Eddie
Yes, when reseting, we need to reset both APIC/PIC/IOAPIC and pv
driver in future, and also VCPU.
 
But isn't apic_reset a pure user level APIC thing?
 
BTW
 
I posted a patch to support kernel device reset which is still pending.
And I think Avi has some idea to support too and is working on:-)
Eddie
 
 
 




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dor Laor
Sent: 2007年11月2日 7:02
To: Markus Rechberger
Cc: kvm-devel@lists.sourceforge.net; [EMAIL PROTECTED]
Subject: Re: [kvm-devel] [PATCH] Fix writing back APIC reset to 
inkernel APIC


Markus Rechberger wrote: 

This patch synchronises the APIC reset with the inkernel 
implementation which fixes the reboot issues which can be seen with Linux and 
Windows. 

Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]>   
Signed-off-by: Markus Rechberger <[EMAIL PROTECTED]> 
  






diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c
index 2011247..60d31fa 100644
--- a/qemu/hw/apic.c
+++ b/qemu/hw/apic.c
@@ -930,6 +930,13 @@ static void apic_reset(void *opaque)
  * processor when local APIC is enabled.
  */
 s->lvt[APIC_LVT_LINT0] = 0x700;
+#ifdef USE_KVM
+#ifdef KVM_CAP_IRQCHIP
+if (kvm_allowed && kvm_irqchip_in_kernel(kvm_context)) {
+kvm_kernel_lapic_load_from_user(s);
+}
+#endif
+#endif
 }
 

In general your approach might work but there are some inconsistencies 
- there is kvm_apic_reset 
in the kernel too. We can either drop it and use your load method or 
add an apic-reset ioctl.
Eddie/Avi which approach do you think is better?
There is also the ioapic who should get reset too.
Thanks,
Dor.



 static CPUReadMemoryFunc *apic_mem_read[3] = {
  


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a 
browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/




___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Sheng Yang
On Friday 02 November 2007 10:14:35 Haydn Solomon wrote:
> On Nov 1, 2007 9:54 PM, Haydn Solomon <[EMAIL PROTECTED]> wrote:
> > On Nov 1, 2007 9:36 PM, Sheng Yang <[EMAIL PROTECTED]> wrote:
> > > On Friday 02 November 2007 09:10:31 Haydn Solomon wrote:
> > > > How can I tell that my cpu has flexpriority?
> > > >
> > > > (Resending this as didn't cc list last time.)
> > >
> > > Oops, forgot the patch...
> >
> > Thanks Sheng.
> >
> > Luckily for me I've got the Flexpriority feature
> >
> > [EMAIL PROTECTED] winxptest]# dmesg | grep lex
> > kvm: FlexPriority enabled!
> >
> > One thing I do notice apart from noticeably very good responsiveness and
> > performance on windows guest ( xp sp2 ) is that this is the lowest cpu
> > usage I've seen on the qemu kvm process to date. I haven't tried smp yet
> > but that will be my next test and will report on how that goes. Thanks
> > guys and well done!
>
> One issue I do see. When I run my windows xp guest which is ACPI
> Multiprocessor PC HAL with -smp 2, it runs much slower and cpu usage is
> high.

Please try the attach patch. 

-- 
Thanks
Yang, Sheng
From 8009718459efe41e0e8bc943a62734353c7828a2 Mon Sep 17 00:00:00 2001
From: Sheng Yang <[EMAIL PROTECTED]>
Date: Fri, 2 Nov 2007 11:15:15 +0800
Subject: [PATCH] KVM: VMX: Fix repeatly allocate of apic access page

For SMP guest, alloc_apic_access_page() would be called more than once.
So only the last one works, causing SMP guest can't benifit from FlexPriority.

This patch fixed this issue.

Signed-off-by: Sheng Yang <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |1 +
 drivers/kvm/vmx.c  |2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 34a681d..519626d 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -245,6 +245,7 @@ static struct kvm *kvm_create_vm(void)
 	spin_lock(&kvm_lock);
 	list_add(&kvm->vm_list, &vm_list);
 	spin_unlock(&kvm_lock);
+	kvm->apic_access_page = NULL;
 	return kvm;
 }
 
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 42e7fad..de4441a 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1466,6 +1466,8 @@ static int alloc_apic_access_page(struct kvm *kvm)
 	int r;
 
 	r = -EFAULT;
+	if (kvm->apic_access_page)
+		return 0;
 	kvm_userspace_mem.slot = APIC_ACCESS_PAGE_PRIVATE_MEMSLOT;
 	kvm_userspace_mem.flags = 0;
 	kvm_userspace_mem.guest_phys_addr = 0xfee0ULL;
-- 
1.5.2

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Sheng Yang
On Friday 02 November 2007 12:56:26 Haydn Solomon wrote:
> On Nov 1, 2007 11:15 PM, Sheng Yang <[EMAIL PROTECTED]> wrote:
> > On Friday 02 November 2007 10:14:35 Haydn Solomon wrote:
> > > On Nov 1, 2007 9:54 PM, Haydn Solomon <[EMAIL PROTECTED]> wrote:
> > > > On Nov 1, 2007 9:36 PM, Sheng Yang <[EMAIL PROTECTED]> wrote:
> > > > > On Friday 02 November 2007 09:10:31 Haydn Solomon wrote:
> > > > > > How can I tell that my cpu has flexpriority?
> > > > > >
> > > > > > (Resending this as didn't cc list last time.)
> > > > >
> > > > > Oops, forgot the patch...
> > > >
> > > > Thanks Sheng.
> > > >
> > > > Luckily for me I've got the Flexpriority feature
> > > >
> > > > [EMAIL PROTECTED] winxptest]# dmesg | grep lex
> > > > kvm: FlexPriority enabled!
> > > >
> > > > One thing I do notice apart from noticeably very good responsiveness
> >
> > and
> >
> > > > performance on windows guest ( xp sp2 ) is that this is the lowest
> > > > cpu usage I've seen on the qemu kvm process to date. I haven't tried
> > > > smp
> >
> > yet
> >
> > > > but that will be my next test and will report on how that goes.
> > > > Thanks guys and well done!
> > >
> > > One issue I do see. When I run my windows xp guest which is ACPI
> > > Multiprocessor PC HAL with -smp 2, it runs much slower and cpu usage is
> > > high.
> >
> > Please try the attach patch.
>
> Oh yeah... this is much much better. Windows seems to performing extremely
> fast and cpu usage is very low using -smp 2 after applying this patch.
> Thank you.
>

My pleasure. :)

I will send this patch out.

-- 
Thanks
Yang, Sheng

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-49 release

2007-11-01 Thread Haydn Solomon
On Nov 1, 2007 11:15 PM, Sheng Yang <[EMAIL PROTECTED]> wrote:

> On Friday 02 November 2007 10:14:35 Haydn Solomon wrote:
> > On Nov 1, 2007 9:54 PM, Haydn Solomon <[EMAIL PROTECTED]> wrote:
> > > On Nov 1, 2007 9:36 PM, Sheng Yang <[EMAIL PROTECTED]> wrote:
> > > > On Friday 02 November 2007 09:10:31 Haydn Solomon wrote:
> > > > > How can I tell that my cpu has flexpriority?
> > > > >
> > > > > (Resending this as didn't cc list last time.)
> > > >
> > > > Oops, forgot the patch...
> > >
> > > Thanks Sheng.
> > >
> > > Luckily for me I've got the Flexpriority feature
> > >
> > > [EMAIL PROTECTED] winxptest]# dmesg | grep lex
> > > kvm: FlexPriority enabled!
> > >
> > > One thing I do notice apart from noticeably very good responsiveness
> and
> > > performance on windows guest ( xp sp2 ) is that this is the lowest cpu
> > > usage I've seen on the qemu kvm process to date. I haven't tried smp
> yet
> > > but that will be my next test and will report on how that goes. Thanks
> > > guys and well done!
> >
> > One issue I do see. When I run my windows xp guest which is ACPI
> > Multiprocessor PC HAL with -smp 2, it runs much slower and cpu usage is
> > high.
>
> Please try the attach patch.
>

Oh yeah... this is much much better. Windows seems to performing extremely
fast and cpu usage is very low using -smp 2 after applying this patch. Thank
you.



>
> --
> Thanks
> Yang, Sheng
>
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] KVM: VMX: Fix repeatly calling alloc_apic_access_page()

2007-11-01 Thread Sheng Yang
From 00a52112d813af983dd4d34cb7dc701f6fe88829 Mon Sep 17 00:00:00 2001
From: Sheng Yang <[EMAIL PROTECTED]>
Date: Fri, 2 Nov 2007 11:56:17 +0800
Subject: [PATCH] KVM: VMX: Fix repeatly calling alloc_apic_access_page()

For SMP guest, alloc_apic_access_page() would be called more than once. So 
only the last vcpu's vmcs get correct apic access address, causing SMP guest 
can't benifit from FlexPriority.

This patch fixed this issue.

Signed-off-by: Sheng Yang <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |1 +
 drivers/kvm/vmx.c  |5 -
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 34a681d..519626d 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -245,6 +245,7 @@ static struct kvm *kvm_create_vm(void)
spin_lock(&kvm_lock);
list_add(&kvm->vm_list, &vm_list);
spin_unlock(&kvm_lock);
+   kvm->apic_access_page = NULL;
return kvm;
 }
 
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 42e7fad..89007b2 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1466,6 +1466,8 @@ static int alloc_apic_access_page(struct kvm *kvm)
int r;
 
r = -EFAULT;
+   if (kvm->apic_access_page)
+   return 0;
kvm_userspace_mem.slot = APIC_ACCESS_PAGE_PRIVATE_MEMSLOT;
kvm_userspace_mem.flags = 0;
kvm_userspace_mem.guest_phys_addr = 0xfee0ULL;
@@ -1584,7 +1586,8 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
vmcs_writel(CR0_GUEST_HOST_MASK, ~0UL);
vmcs_writel(CR4_GUEST_HOST_MASK, KVM_GUEST_CR4_MASK);
 
-   if (vm_need_virtualize_apic_accesses(vmx->vcpu.kvm))
+   if ((vmx->vcpu.vcpu_id == 0) &&
+   (vm_need_virtualize_apic_accesses(vmx->vcpu.kvm)))
if (alloc_apic_access_page(vmx->vcpu.kvm) != 0)
return -ENOMEM;
 
-- 
1.5.2

From 00a52112d813af983dd4d34cb7dc701f6fe88829 Mon Sep 17 00:00:00 2001
From: Sheng Yang <[EMAIL PROTECTED]>
Date: Fri, 2 Nov 2007 11:56:17 +0800
Subject: [PATCH] KVM: VMX: Fix repeatly allocate of apic access page

For SMP guest, alloc_apic_access_page() would be called more than once.
So only the last one works, causing SMP guest can't benifit from FlexPriority.

This patch fixed this issue.

Signed-off-by: Sheng Yang <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |1 +
 drivers/kvm/vmx.c  |5 -
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 34a681d..519626d 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -245,6 +245,7 @@ static struct kvm *kvm_create_vm(void)
 	spin_lock(&kvm_lock);
 	list_add(&kvm->vm_list, &vm_list);
 	spin_unlock(&kvm_lock);
+	kvm->apic_access_page = NULL;
 	return kvm;
 }
 
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 42e7fad..89007b2 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1466,6 +1466,8 @@ static int alloc_apic_access_page(struct kvm *kvm)
 	int r;
 
 	r = -EFAULT;
+	if (kvm->apic_access_page)
+		return 0;
 	kvm_userspace_mem.slot = APIC_ACCESS_PAGE_PRIVATE_MEMSLOT;
 	kvm_userspace_mem.flags = 0;
 	kvm_userspace_mem.guest_phys_addr = 0xfee0ULL;
@@ -1584,7 +1586,8 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
 	vmcs_writel(CR0_GUEST_HOST_MASK, ~0UL);
 	vmcs_writel(CR4_GUEST_HOST_MASK, KVM_GUEST_CR4_MASK);
 
-	if (vm_need_virtualize_apic_accesses(vmx->vcpu.kvm))
+	if ((vmx->vcpu.vcpu_id == 0) &&
+	(vm_need_virtualize_apic_accesses(vmx->vcpu.kvm)))
 		if (alloc_apic_access_page(vmx->vcpu.kvm) != 0)
 			return -ENOMEM;
 
-- 
1.5.2

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 00 of 27] Refactor libkvm code Phase 1

2007-11-01 Thread Zhang, Xiantao
Hi Young, 
Quick hand! For patch 07/27, 09/27, i have some concerns about them.  
In these two patches you moved the functions kvm_create_kernel_phys_mem, 
kvm_create_default_phys_mem to x86 arch. But I think it should work well for 
most archs. As somebody said, S390 may have a very different memory allocation 
mechanism, but we can't move them directly to x86 arch, because other archs may 
also need them.  We should find another approach to handle them, and make s390 
and other archs all happy ! What about your ideas?:)
thanks 
Xiantao

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jerone Young
Sent: 2007年11月1日 1:05
To: kvm-devel@lists.sourceforge.net
Cc: [EMAIL PROTECTED]
Subject: [kvm-devel] [PATCH 00 of 27] Refactor libkvm code Phase 1

Kaniciwa!
I am here to once again bring great honorable patches to refactor
libkvm x86 code. Patches that I sent in the past for this really took
the wrong approach, and also many variables that I was splitting out actually
could be shared amongst many architectures.

This is the first phase as much of the code is tightly written for x86 
but can be reused by other archs, it's just a matter of an agreed upon method.
Also since there are about 27 of these lets get through these before moving
through more.

Signed-off-by: Jerone Young <[EMAIL PROTECTED]>

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 00 of 27] Refactor libkvm code Phase 1

2007-11-01 Thread Jerone Young
Hmm,
The problem here is in the case of kvm_create_phys_mem &
kvm_create_default_phys_mem, most archs from now on should always be
allocating guest memory from userspace (at least I think this correct).

Now if this is not the case then really adding an architecture hook
function to kvm_create_default_phys_mem would also solve this problem.
As There is a mmap call that maps memory for video(?), which is
something that is just for x86.

With the size of these functions being very small, I think it's best to
move them for now. Then if someone else does need them they can easily
create there own and then we can figure out how to make a common
function in this case.

Anyone disagree?

  
On Fri, 2007-11-02 at 13:26 +0800, Zhang, Xiantao wrote:
> Hi Young, 
>   Quick hand! For patch 07/27, 09/27, i have some concerns about them.  
> In these two patches you moved the functions kvm_create_kernel_phys_mem, 
> kvm_create_default_phys_mem to x86 arch. But I think it should work well for 
> most archs. As somebody said, S390 may have a very different memory 
> allocation mechanism, but we can't move them directly to x86 arch, because 
> other archs may also need them.  We should find another approach to handle 
> them, and make s390 and other archs all happy ! What about your ideas?:)
> thanks 
> Xiantao
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jerone Young
> Sent: 2007年11月1日 1:05
> To: kvm-devel@lists.sourceforge.net
> Cc: [EMAIL PROTECTED]
> Subject: [kvm-devel] [PATCH 00 of 27] Refactor libkvm code Phase 1
> 
> Kaniciwa!
> I am here to once again bring great honorable patches to refactor
> libkvm x86 code. Patches that I sent in the past for this really took
> the wrong approach, and also many variables that I was splitting out actually
> could be shared amongst many architectures.
> 
> This is the first phase as much of the code is tightly written for 
> x86 
> but can be reused by other archs, it's just a matter of an agreed upon method.
> Also since there are about 27 of these lets get through these before moving
> through more.
> 
> Signed-off-by: Jerone Young <[EMAIL PROTECTED]>
> 
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
> 
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___ kvm-devel mailing list 
> kvm-devel@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/kvm-devel


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] removing kvm_init()

2007-11-01 Thread Hollis Blanchard
Hi Avi, I'm looking at kvm_init() right now. Since everything is driven
by the arch-specific modules (svm.c and vmx.c), I think it would
simplify things to fold all of kvm_init() into what is today called
kvm_init_x86().

If that's done, kvm_main.c won't have any "modinit" function, but I
think that would be OK since the init functionality will be executed as
needed by the arch modules.

Does this make sense?

-- 
Hollis Blanchard
IBM Linux Technology Center


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel