[PATCH 2/3] kvm-s390: fix signal handling

2009-05-25 Thread ehrhardt
From: Christian Ehrhardt If signal pending is true we exit without updating kvm_run, userspace currently just does nothing and jumps to kvm_run again. Since we did not set an exit_reason we might end up with a random one (whatever was the last exit). Therefore it was possible to e.g. jump to the

[PATCH 0/3] kvm-s390: revised version of kvm-s390 guest memory handling - v2

2009-05-25 Thread ehrhardt
From: Christian Ehrhardt *update in v2* added optimization to patch 3/3 to skip (addtional) kickout of vcpu's that had the request already set. This patch series results from our discussions about handling memslots and vcpu mmu reloads. It streamlines kvm-s390 a bit by using slots_lock,

[PATCH 1/3] kvm-s390: infrastructure to kick vcpus out of guest state

2009-05-25 Thread ehrhardt
From: Christian Ehrhardt To ensure vcpu's come out of guest context in certain cases this patch adds a s390 specific way to kick them out of guest context. Currently it kicks them out to rerun the vcpu_run path in the s390 code, but the mechanism itself is expandable and with a new flag we

[PATCH] kvm-s390: streamline memslot handling - v2

2009-05-25 Thread ehrhardt
From: Christian Ehrhardt *update in v2* added optimization to skip (addtional) kickout of vcpu's that had the request already set. This patch relocates the variables kvm-s390 uses to track guest mem addr/size. As discussed dropping the variables at struct kvm_arch level allows to use the c

[PATCH 3/5] kvm-s390: update vcpu->cpu

2009-05-28 Thread ehrhardt
From: Christian Ehrhardt kvm on s390 formerly ignored vcpu->cpu. This patch adds set/unset vcpu->cpu in kvm_arch_vcpu_load/put to allow further architecture unification e.g. let generic code not find -1 on currently scheduled vcpus. Signed-off-by: Christian Ehrhardt --- [diffstat] kvm-

[PATCH 5/5] kvm-s390: streamline memslot handling - v4

2009-05-28 Thread ehrhardt
From: Christian Ehrhardt *updates in v4* - kickout only scheduled vcpus (its superfluous and wait might hang forever on not running vcpus) *updates in v3* - handling the mmu reload vcpu request can now be handled inside the sigp handling avoiding an addtional exit

[PATCH 1/5] kvm-s390: infrastructure to kick vcpus out of guest state - v3

2009-05-28 Thread ehrhardt
From: Christian Ehrhardt *updates in v3* - ensure allocations (might_sleep) are out of atomic context *updates in v2* instead of a "kick to level" behaviour the patch now implements a kick to the lowest level. The check there bails out to upper levels if not all outstanding vcpu->r

[PATCH 4/5] kvm: remove redundant declarations

2009-05-28 Thread ehrhardt
From: Christian Ehrhardt Changing s390 code in kvm_arch_vcpu_load/put come across this header declarations. They are complete duplicates, not even useful forward declarations as nothing using it is in between (according to git blame the s390 and ia64 contributions introducing the first arch

[PATCH 2/5] kvm-s390: fix interruption casued by signal - v2

2009-05-28 Thread ehrhardt
From: Christian Ehrhardt *updates in v2* merged a small piece of code from patch 1/1 that belongs here themtically If signal pending is true we exit without updating kvm_run, userspace currently just does nothing and jumps to kvm_run again. Since we did not set an exit_reason we might end up

[PATCH 0/5] kvm-s390: revised version of kvm-s390 guest memory handling - v4

2009-05-28 Thread ehrhardt
From: Christian Ehrhardt *updates in v3* - ensure kick allocations (might_sleep) are out of atomic context - replaced "kick to level" behaviour by "kick to low level and bail out" - updates on running vcpus can now be handled without need to rerun the vcpu - kvm_arch_set

[PATCH 2/5] kvm-s390: fix interruption casued by signal - v2

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt *updates in v2* merged a small piece of code from patch 1/1 that belongs here themtically If signal pending is true we exit without updating kvm_run, userspace currently just does nothing and jumps to kvm_run again. Since we did not set an exit_reason we might end up

[PATCH 1/5] kvm-s390: infrastructure to kick vcpus out of guest state - v3

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt *updates in v3* - ensure allocations (might_sleep) are out of atomic context *updates in v2* instead of a "kick to level" behaviour the patch now implements a kick to the lowest level. The check there bails out to upper levels if not all outstanding vcpu->r

[PATCH 3/5] kvm-s390: update vcpu->cpu

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt kvm on s390 formerly ignored vcpu->cpu. This patch adds set/unset vcpu->cpu in kvm_arch_vcpu_load/put to allow further architecture unification e.g. let generic code not find -1 on currently scheduled vcpus. Signed-off-by: Christian Ehrhardt --- [diffstat] kvm-

[PATCH 4/5] kvm: remove redundant declarations

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt Changing s390 code in kvm_arch_vcpu_load/put come across this header declarations. They are complete duplicates, not even useful forward declarations as nothing using it is in between (maybe it was that in the past). This patch removes the two dispensable lines. Signed

[PATCH 5/5] kvm-s390: streamline memslot handling - v5

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt *updates in v5* - ensure dropping all vcpu requests while freeing a vcpu *updates in v4* - kickout only scheduled vcpus (its superfluous and wait might hang forever on not running vcpus) *updates in v3* - handling the mmu reload vcpu request can now be handled inside

[PATCH 0/5] kvm-s390: revised version of kvm-s390 guest memory handling - v5

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt *updates in v5* - ensure dropping all vcpu requests while freeing a vcpu *updates in v4* - ensure kick allocations (might_sleep) are out of atomic context - update vcpu->cpu in kvm-s390 arch handler for load/put - remove a redundant declaration in kvm_host.h related

[PATCH 3/4] kvm-s390: update vcpu->cpu

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt kvm on s390 formerly ignored vcpu->cpu. This patch adds set/unset vcpu->cpu in kvm_arch_vcpu_load/put to allow further architecture unification e.g. let generic code not find -1 on currently scheduled vcpus. Signed-off-by: Christian Ehrhardt --- [diffstat] kvm-

[PATCH 4/4] kvm-s390: streamline memslot handling - v6

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt *updates in v6* - ensure the wait_on_bit waiter is notified - move the reset of requests to kvm_vcpu_release to drop them early *updates in v5* - ensure dropping vcpu all requests while freeing a vcpu *updates in v4* - kickout only scheduled vcpus (its superfluous and

[PATCH 2/4] kvm-s390: fix interruption caused by signal - v2

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt *updates in v2* merged a small piece of code from patch 1/1 that belongs here themtically If signal pending is true we exit without updating kvm_run, userspace currently just does nothing and jumps to kvm_run again. Since we did not set an exit_reason we might end up

[PATCH] kvm: remove redundant declarations

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt Changing s390 code in kvm_arch_vcpu_load/put come across this header declarations. They are complete duplicates, not even useful forward declarations as nothing using it is in between (maybe it was that in the past). This patch removes the two dispensable lines. Signed

[PATCH 1/4] kvm-s390: infrastructure to kick vcpus out of guest state - v3

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt *updates in v3* - ensure allocations (might_sleep) are out of atomic context *updates in v2* instead of a "kick to level" behaviour the patch now implements a kick to the lowest level. The check there bails out to upper levels if not all outstanding vcpu->r

[PATCH 0/4] kvm-s390: revised version of kvm-s390 guest memory handling - v6

2009-05-29 Thread ehrhardt
From: Christian Ehrhardt *updates in v6* - drop the unrelated fix to kvm_host.h from the series to clear it thematically - ensure the wait_on_bit waiter is notified - move the reset of requests to kvm_vcpu_release to drop them early Note: I beg a pardon for the change rate of these series in

[PATCH 1/3] kvm-s390: infrastructure to kick vcpus out of guest state - rebased

2009-06-02 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to already applied version* - ensure allocations (might_sleep) are out of atomic context - centralize consumption of vcpu->request bits To ensure vcpu's com

[PATCH 0/3] kvm-s390: revised version of kvm-s390 guest memory handling - rebased

2009-06-02 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to already applied version* - ensure the wait_on_bit waiter is notified - move the reset of requests to kvm_vcpu_release to drop them early - ensure dropping all vcpu

[PATCH 3/3] kvm-s390: streamline memslot handling - rebased

2009-06-02 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to applied version* - ensure the wait_on_bit waiter is notified - ensure dropping vcpu all requests while freeing a vcpu - kickout only scheduled vcpus (its superfluous

[PATCH 2/3] kvm-s390: update vcpu->cpu - rebased

2009-06-02 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. kvm on s390 formerly ignored vcpu->cpu. This patch adds set/unset vcpu->cpu in kvm_arch_vcpu_load/put to allow further architecture unification e.g. let generic code not f

[PATCH] kvm-s390: fix interrupt field widths

2009-06-05 Thread ehrhardt
From: Christian Ehrhardt This code waants the same number as KVM_MAX_VCPUS but uses a hard coded 64 instead of the constant. This patch changes the field width definitions of the s390 specific interrupt handling to use the constant. Signed-off-by: Christian Ehrhardt --- [diffstat] kvm_host.h

[PATCH 3/3] kvm-s390: streamline memslot handling - rebased v2

2009-06-15 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to applied version* - remove dependency to KVM_REQ_MMU_RELOAD in generic code - remove explicit barrier after test_and_clear_bit as it is implied - ensure the wait_on_bit

[PATCH 2/3] kvm-s390: update vcpu->cpu - rebased

2009-06-15 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. kvm on s390 formerly ignored vcpu->cpu. This patch adds set/unset vcpu->cpu in kvm_arch_vcpu_load/put to allow further architecture unification e.g. let generic code not f

[PATCH 1/3] kvm-s390: infrastructure to kick vcpus out of guest state - rebased

2009-06-15 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to already applied version* - ensure allocations (might_sleep) are out of atomic context - centralize consumption of vcpu->request bits To ensure vcpu's com

[PATCH 0/3] kvm-s390: revised version of kvm-s390 guest memory handling - rebased v2

2009-06-15 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to already applied version* - remove dependency to KVM_REQ_MMU_RELOAD in generic code - remove explicit barrier after test_and_clear_bit as it is implied - ensure the

[PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc

2008-09-16 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Updating and testing kvm-userspace for ppc after a too long time brought up some issues fixed in this series. The patches are small and their description should be comprehendible. Due to the fact that most of the issues where build time issues

[PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c

2008-09-16 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> It came up in the review of the s390 libkvm code that we have some broken headers too. Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat] libkvm-powerpc.c | 14 +- 1 file changed, 5 insertions(+),

[PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling

2008-09-16 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> The kvm merge with qemu brought code for 64bit power that broke cross compilation. The issue is caused by configure trying to execute target architecture binaries where configure is executed. I tried to change that detection so that it work

[PATCH] kvm-userspace: kvmppc: fix building userspace for powerpc

2008-09-16 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Commit 2d5737d8 added the requirement for an $arch/Makefile.pre in the kernel subdirectory. This patch adds a stub for powerpc. Additionally now a file kernel/$arch/hack-module.awk is needed and a simple version for ppc is added for that one t

[PATCH 3/3] kvm-userspace: kvmppc: fix building userspace for powerpc

2008-09-16 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Last submission missed the right 3/3 tag so I resend it to be recognized. Commit 2d5737d8 added the requirement for an $arch/Makefile.pre in the kernel subdirectory. This patch adds a stub for powerpc. Additionally now a file kernel/$arc

[PATCH 2/3][RESEND] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling

2008-09-29 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> The kvm merge with qemu brought code for 64bit power that broke cross compilation. The issue is caused by configure trying to execute target architecture binaries where configure is executed. I tried to change that detection so that it work

[PATCH 3/3][RESEND] kvm-userspace: kvmppc: fix building userspace for powerpc

2008-09-29 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Last submission missed the right 3/3 tag so I resend it to be recognized. Commit 2d5737d8 added the requirement for an $arch/Makefile.pre in the kernel subdirectory. This patch adds a stub for powerpc. Additionally now a file kernel/$arc

[PATCH 1/3][RESEND] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c

2008-09-29 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> It came up in the review of the s390 libkvm code that we have some broken headers too. Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat] libkvm-powerpc.c | 14 +- 1 file changed, 5 insertions(+),

[PATCH 0/3][RESEND] kvm-userspace: kvmppc: fix build for ppc

2008-09-29 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> * I got neither pro/con comments nor an accepted message -> resend Updating and testing kvm-userspace for ppc after a too long time brought up some issues fixed in this series. The patches are small and their description should be comprehend

[PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc v2

2008-09-29 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> *update Short after resending v1 I realized that I forgot to put Avi and [EMAIL PROTECTED] (for 2/3) on cc. I also updated the header text in 1/3 a bit and verified my hostlongbits proposal on recent cross toolchain versions because there

[PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling

2008-09-29 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> A recent kvm merge with qemu brought code for 64bit power that broke cross compilation. The issue is caused by configure trying to execute target architecture binaries where configure is executed. I tried to change that detection so that it work

[PATCH 3/3] kvm-userspace: kvmppc: fix building userspace for powerpc

2008-09-29 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Last submission missed the right 3/3 tag so I resend it to be recognized. Commit 2d5737d8 added the requirement for an $arch/Makefile.pre in the kernel subdirectory. This patch adds a stub for powerpc. Additionally now a file kernel/$arc

[PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c v2

2008-09-29 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> It came up in the review of the s390 libkvm code that we have some broken headers too. Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat] libkvm-powerpc.c | 14 +- 1 file changed, 5 insertions(+),

[PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2

2008-09-30 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> *update* further debugging according to some requests revealed that ARCH_CFLAGS does not contain all CFLAGS that might be needed, especially those supplied via extra-cflags. Therefore people supplying things via extra-cflags instead of an envir

[PATCH] kvmppc: comply with requirement for kvm_arch_try_push_nmi

2008-10-17 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Since a recent patch all architetcures need a kvm_arch_try_push_nmi function. Powerpc has no direct nmi equivalent, so this patch fixes only build for powerpc by adding an empty stub. If powerpc later wants to support the nmi monitor command s

[PATCH 1/3] qemu: ppc: define maximum SMP limit as 1 for Bamboo

2008-10-28 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Fix for qemu runtime error. Full error message: Number of SMP cpus requested (1), exceeds max cpus supported by machine `bamboo' (0) Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> Signed-off-by: Hollis Blanchard

[PATCH 2/3] kvm: external module: Treat NONARCH_CONFIG as a list

2008-10-28 Thread ehrhardt
From: Hollis Blanchard <[EMAIL PROTECTED]> As discussed on the list the unifdef changes break powerpc (and more ?). A fix is to treat NONARCH_CONFIG as a list instead of a single item. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[

[PATCH 5/5] user: ppc: add stub nmi handler

2008-10-28 Thread ehrhardt
From: Hollis Blanchard <[EMAIL PROTECTED]> Adding a nmi stub handler for user/main-ppc.c. We already pushed a stub for qemu but not for the test suite in the user dir. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> ---

[PATCH 3/5] user: ppc: implement PowerPC 44x libcflat

2008-10-28 Thread ehrhardt
TED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat] config-powerpc-44x.mak | 14 +++ config-powerpc.mak | 46 ++ test/lib/powerpc/44x/map.c | 51 +++ test/li

[PATCH 2/5] user: ppc: better error reporting in load_file

2008-10-28 Thread ehrhardt
From: Hollis Blanchard <[EMAIL PROTECTED]> Fancy description. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat] main-ppc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) [diff] diff --git a

[PATCH 4/5] libcflat: ppc: add timebase accessor

2008-10-28 Thread ehrhardt
Provide a timebase accessor for ppc testcases. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> [diffstat] config-powerpc-44x.mak |3 ++- test/lib/powerpc/44x/timebase.S | 28 test

[PATCH 0/3] kvm-userspace: ppc: userspace fixes for powerpc

2008-10-28 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> This is a set of fixes for the powerpc tests kvm-userspace/user. Patch 1&2 fix main-ppc.c while patch 3 introduces libcflat for powerpc. Further on patch 4 provides a timebase accessor for the ppc testcases (not used yet) and patch 5 fina

[PATCH 1/5] user: ppc: fix threading bugs in main-ppc.c

2008-10-28 Thread ehrhardt
From: Hollis Blanchard <[EMAIL PROTECTED]> - call io_table_register() before any vcpus have started - wait for all vcpus to exit before exiting the parent thread Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [dif

[PATCH] qemu: ppc: if not a uImage, try to load kernel as ELF

2008-10-28 Thread ehrhardt
Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat] ppc440_bamboo.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) [diff] diff --git a/qemu/hw/ppc440_bamboo.c b/qemu/hw/ppc440_bamboo.c --- a/qemu/hw/p

[PATCH 0/3] kvm-userspace: ppc: userspace fixes for powerpc

2008-10-28 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> This is a set of various functional fixes in kvm-userspace for powerpc. Patch 1 fullfils the requirement to provide a max smp cpu in the machine struct, without that value qemu denies to run the guest (cpu 1 > maxcpu 0) Patch 2 is a interme

[PATCH 3/3] kvm-userspace: ppc: fix initial ppc memory setup

2008-10-28 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> The old memory initialization code was broken for all cases not fitting in one ram stick. This patch fixes the ram_stick calculation, now sets the proper base adresses per stick and removes the old workaround. Signed-off-by: Christian Ehrhardt &

[PATCH 0/6] kvm-s390: collection of kvm-s390 fixes

2009-05-05 Thread ehrhardt
From: Christian Ehrhardt This is a collection of fixes for kvm-s390 that originate from several tests made in the last few months. They are now tested a while and should be ready to be merged. All six patches are created either by Carsten Otte or Christain Borntraeger. I'm just th

[PATCH 3/6] kvm-s390: optimize float int lock: spin_lock_bh --> spin_lock

2009-05-05 Thread ehrhardt
From: Christian Borntraeger The floating interrupt lock is only taken in process context. We can replace all spin_lock_bh with standard spin_lock calls. Signed-off-by: Christian Borntraeger --- arch/s390/kvm/interrupt.c | 20 ++-- arch/s390/kvm/kvm-s390.c |4 ++-- arch/s

[PATCH 1/6] kvm-s390: Fix memory slot versus run

2009-05-05 Thread ehrhardt
From: Carsten Otte This patch fixes an incorrectness in the kvm backend for s390. In case virtual cpus are being created before the corresponding memory slot is being registered, we need to update the sie control blocks for the virtual cpus. In order to do that, we use the vcpu->mutex to lock out

[PATCH 2/6] kvm-s390: use hrtimer for clock wakeup from idle

2009-05-05 Thread ehrhardt
From: Christian Borntraeger This patch reworks the s390 clock comparator wakeup to hrtimer. The clock comparator is a per-cpu value that is compared against the TOD clock. If ckc <= TOD an external interrupt 1004 is triggered. Since the clock comparator and the TOD clock have a much higher resolu

[PATCH 5/6] kvm-s390: Sanity check on validity intercept

2009-05-05 Thread ehrhardt
From: Carsten Otte This patch adds a sanity check for the content of the guest prefix register content before faulting in the cpu lowcore that it refers to. The guest might end up in an endless loop where SIE complains about missing lowcore with incorrect content of the prefix register without th

[PATCH 4/6] kvm-s390: Unlink vcpu on destroy

2009-05-05 Thread ehrhardt
From: Carsten Otte This patch makes sure we do unlink a vcpu's sie control block from the system control area in kvm_arch_vcpu_destroy. This prevents illegal accesses to the sie control block from other virtual cpus after free. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte --- arch/s

[PATCH 6/6] kvm-s390: Verify memory in kvm run

2009-05-05 Thread ehrhardt
From: Carsten Otte This check verifies that the guest we're trying to run in KVM_RUN has some memory assigned to it. It enters an endless exception loop if this is not the case. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte --- arch/s390/kvm/kvm-s390.c |6 ++ 1 file changed,

[PATCH 4/6]: kvm-s390: Unlink vcpu on destroy - v2

2009-05-12 Thread ehrhardt
d-off-by: Christian Ehrhardt --- kvm-s390.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) Index: kvm/arch/s390/kvm/kvm-s390.c === --- kvm.orig/arch/s390/kvm/kvm-s390.c +++ kvm/arch/s390/kvm/kvm-s390.c @@ -

[PATCH 1/6] kvm-s390: Fix memory slot versus run - v3

2009-05-12 Thread ehrhardt
. Additionally most of the discussed special conditions for s390 like only one memslot and no user_alloc are now checked for validity in kvm_arch_set_memory_region. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt --- kv

[PATCH 0/6] kvm-s390: collection of kvm-s390 fixes - v3

2009-05-12 Thread ehrhardt
From: Christian Ehrhardt *updates in v3* - fix memory slot vs. run uses trylock to avoid a potential livelock - fix memory slot vs. run checks if it is the first and only memslot registered *updates in v2* - hrtimer wakeup use a more accurate calculation - unlink vcpu uses smb_mb so the pointer

[PATCH 5/6] kvm-s390: Sanity check on validity intercept

2009-05-12 Thread ehrhardt
this fix. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt --- arch/s390/kvm/intercept.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) Index: kvm/arch/s390/kvm/intercept.c

[PATCH 3/6] kvm-s390: optimize float int lock: spin_lock_bh --> spin_lock

2009-05-12 Thread ehrhardt
From: Christian Borntraeger The floating interrupt lock is only taken in process context. We can replace all spin_lock_bh with standard spin_lock calls. Signed-off-by: Christian Borntraeger Signed-off-by: Christian Ehrhardt --- arch/s390/kvm/interrupt.c | 20 ++-- arch/s390

[PATCH 6/6] kvm-s390: Verify memory in kvm run

2009-05-12 Thread ehrhardt
From: Carsten Otte This check verifies that the guest we're trying to run in KVM_RUN has some memory assigned to it. It enters an endless exception loop if this is not the case. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt --- arch/s390/kv

[PATCH 2/6] kvm-s390: use hrtimer for clock wakeup from idle - v2

2009-05-12 Thread ehrhardt
tte Signed-off-by: Christian Ehrhardt --- arch/s390/include/asm/kvm_host.h |5 - arch/s390/kvm/interrupt.c| 33 +++-- arch/s390/kvm/kvm-s390.c |7 +-- arch/s390/kvm/kvm-s390.h |4 +++- 4 files changed, 35 insertions(+),

[PATCH 2/3] kvm-s390: fix signal handling

2009-05-20 Thread ehrhardt
From: Christian Ehrhardt If signal pending is true we exit without updating kvm_run, userspace currently just does nothing and jumps to kvm_run again. Since we did not set an exit_reason we might end up with a random one (whatever was the last exit). Therefore it was possible to e.g. jump to the

[PATCH 3/3] kvm-s390: streamline memslot handling

2009-05-20 Thread ehrhardt
From: Christian Ehrhardt This patch relocates the variables kvm-s390 uses to track guest mem addr/size. As discussed dropping the variables at struct kvm_arch level allows to use the common vcpu->request based mechanism to reload guest memory if e.g. changes via set_memory_region. The k

[PATCH 0/3] kvm-s390: revised version of kvm-s390 guest memory handling

2009-05-20 Thread ehrhardt
From: Christian Ehrhardt This patch series results from our discussions about handling memslots and vcpu mmu reloads. It streamlines kvm-s390 a bit by using slots_lock, vcpu-request (KVM_REQ_MMU_RELOAD) and a kick mechanism to ensure vcpus come out of guest context to catch the update. I tested

[PATCH 1/3] kvm-s390: infrastructure to kick vcpus out of guest state

2009-05-20 Thread ehrhardt
From: Christian Ehrhardt To ensure vcpu's come out of guest context in certain cases this patch adds a s390 specific way to kick them out of guest context. Currently it kicks them out to rerun the vcpu_run path in the s390 code, but the mechanism itself is expandable and with a new flag we

[PATCH] qemu: report issues causing the kvm probe to fail v3

2009-01-08 Thread ehrhardt
From: Christian Ehrhardt The patch applies to upstream qemu as well as kvm-userspace, but since it is the qemu configure script I think it should go to upstream qemu (Anthony) first and with the next merge to kvm-userspace. On the other hand it is the kvm probe so an ack from Avi in case v3 is

[PATCH] qemu: fix configuring kvm probe when using --kerneldir

2009-01-09 Thread ehrhardt
From: Christian Ehrhardt There is already a variable kvm_cflags which gets the path of the kernel includes when using --kerneldir. But eventually with newer kernels we all will need arch/$arch/include too (my case was a incldue of asm/kvm.h which was not found anymore). Headers in a full kernel

[PATCH 4/5] kvmppc: kvmtrace: adds trace points for ppc tlb activity v2

2008-07-07 Thread ehrhardt
TECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat] arch/powerpc/kvm/44x_tlb.c | 15 ++- arch/powerpc/kvm/emulate.c |4 include/linux/kvm.h|3 +++ 3 files changed, 21 insertions(+), 1 deletion(-) [diff] diff --git a/arch/powe

[PATCH 2/5] kvmtrace: make cycle calculation architecture aware

2008-07-07 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> The current implementation of kvmtrace uses always a 64 bit cycle variable, but get_cycles() which is used to fill it is "unsigned long" which might be 32 bit. This reduces the accuracy e.g. on embedded powerpc since we would have a

[PATCH 5/5] kvmppc: kvmtrace: trace powerpc instruction emulation

2008-07-07 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch adds trace points for the instruction emulation on embedded powerpc utilizing the KVM_TRACE interface. The userspace portion to map and analyze the new ppc trace records will follow soon. Signed-off-by: Christian Ehrhardt <[EMAIL

[PATCH 1/5] kvmtrace: Remove use of bit fields in kvm trace structure v3

2008-07-07 Thread ehrhardt
[PATCH 1/5] kvmtrace: Remove use of bit fields in kvm trace structure v3 From: Christian Ehrhardt <[EMAIL PROTECTED]> From: Jerone Young <[EMAIL PROTECTED]> This patch fixes kvmtrace use on big endian systems. When using bit fields the compiler will lay data out in the wrong order e

[PATCH 0/5] kvmtrace: add powerpc support for KVM_TRACE

2008-07-07 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> This series contains the revised patch set Jerone/Hollis posted last week as well as the extension to use the KVM_TRACE infrastructure to trace the embedded powerpc instruction emulation. The series contains five patches (2 generic / 3 powerp

[PATCH 3/5] kvmppc: kvmtrace: enable KVM_TRACE building for powerpc

2008-07-07 Thread ehrhardt
From: Jerone Young <[EMAIL PROTECTED]> This patch enables KVM_TRACE to build for PowerPC arch. This means just adding sections to Kconfig and Makefile. Signed-off-by: Jerone Young <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat

[PATCH 9/9] kvm-userspace: kvmtrace: rename cycles to timestamp

2008-07-10 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Due to the fact that the cycle counter is now completely replaced by the more generic time based code (getnstimeofday) this patch renames all occurances of the old cycle code to make it clear that this is now a timestamp. Due to some values now g

[PATCH 5/9] kvmppc: kvmtrace: trace powerpc instruction emulation

2008-07-10 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch adds a trace point for the instruction emulation on embedded powerpc utilizing the KVM_TRACE interface. Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat] arch/powerpc/kvm/emulate.c |2 ++ include

[PATCH 7/9] kvm-userspace: kvmtrace_format: add ppc instruction emulation

2008-07-10 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch adds the handling of the ppc instruction emulation trace records. Due to the fact that those are more complex than the classic "formats" file way this patch adds a check of the event id and maps to the internal handler fu

[PATCH 3/9] kvmppc: kvmtrace: enable KVM_TRACE building for powerpc

2008-07-10 Thread ehrhardt
From: Jerone Young <[EMAIL PROTECTED]> This patch enables KVM_TRACE to build for PowerPC arch. This means just adding sections to Kconfig and Makefile. Signed-off-by: Jerone Young <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat

[PATCH 2/9] kvmtrace: replace get_cycles with getnstimeofday

2008-07-10 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> The current kvmtrace code uses get_cycles() while the interpretation would be easier using using nanoseconds. Getnstimeofday should give the same accuracy as get_cycles on all architectures but at a better unit (e.g. comparable between two host

[PATCH 3/9] kvmtrace: rename cycles to timestamp

2008-07-10 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Due to the fact that the cycle counter is now completely replaced by the more generic time based code (getnstimeofday) this patch renames all occurances of the old cycle code to make it clear that this is now a timestamp. Signed-off-by: Chr

[PATCH 4/9] kvmppc: kvmtrace: adds trace points for ppc tlb activity v2

2008-07-10 Thread ehrhardt
From: Jerone Young <[EMAIL PROTECTED]> From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch adds trace points to track powerpc TLB activities using the KVM_TRACE infrastructure. Update to v1: - fixed wrong indents reported by checkpatch Signed-off-by: Jerone Young <[

[PATCH 0/5] kvmtrace: powerpc support and timestamps for KVM_TRACE

2008-07-10 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Chaning kvmtrace code to use timestamp and add powerpc support. This is the revised series including the feedback from the earlier submission this week. I now also added the userspace changes which completes the series. The series contain

[PATCH 1/9] kvmtrace: Remove use of bit fields in kvm trace structure v3

2008-07-10 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> From: Jerone Young <[EMAIL PROTECTED]> This patch fixes kvmtrace use on big endian systems. When using bit fields the compiler will lay data out in the wrong order expected when laid down into a file. This fixes it by using one variabl

[PATCH 8/9] kvm-userspace: kvmtrace_format: add statistic section

2008-07-10 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Usually people don't want to read thousands of trace log lines to interpret the data, a condensed statistic about the traced events is usually better to read. This patch adds a new command line switch -s that tells kvmtrace_format

[PATCH 4/8] kvmppc: kvmtrace: adds trace points for ppc tlb activity v2

2008-07-14 Thread ehrhardt
From: Jerone Young <[EMAIL PROTECTED]> From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch adds trace points to track powerpc TLB activities using the KVM_TRACE infrastructure. Update to v1: - fixed wrong indents reported by checkpatch Signed-off-by: Jerone Young <[

[PATCH 5/8] kvmppc: kvmtrace: trace powerpc instruction emulation

2008-07-14 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch adds a trace point for the instruction emulation on embedded powerpc utilizing the KVM_TRACE interface. Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat] arch/powerpc/kvm/emulate.c |2 ++ include

[PATCH 3/8] kvmppc: kvmtrace: enable KVM_TRACE building for powerpc

2008-07-14 Thread ehrhardt
From: Jerone Young <[EMAIL PROTECTED]> This patch enables KVM_TRACE to build for PowerPC arch. This means just adding sections to Kconfig and Makefile. Signed-off-by: Jerone Young <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> --- [diffstat

[PATCH 7/8] kvm-userspace: kvmtrace_format: add statistic section

2008-07-14 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Usually people don't want to read thousands of trace log lines to interpret the data, a condensed statistic about the traced events is usually better to read. This patch adds a new command line switch -s that tells kvmtrace_format

[PATCH 6/8] kvm-userspace: kvmtrace_format: add ppc instruction emulation

2008-07-14 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch adds the handling of the ppc instruction emulation trace records. Due to the fact that those are more complex than the classic "formats" file way this patch adds a check of the event id and maps to the internal handler fu

[PATCH 8/8] kvm-userspace: kvmtrace: cycles are now ktime_t timestamps

2008-07-14 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Due to the fact that the cycle counter is now completely replaced by the more generic time based code (getnstimeofday) this patch renames all occurances of the old cycle code to make it clear that this is now a timestamp. Due to some values now g

[PATCH 0/8] kvmtrace: powerpc support and timestamps for KVM_TRACE v3

2008-07-14 Thread ehrhardt
From: Christian Ehrhardt <[EMAIL PROTECTED]> Changing kvmtrace code to use timestamps and add powerpc support. This is the revised series including the feedback from the earlier submission last week. I now also added the userspace changes which complete the series. Updated in v3:

  1   2   >