All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] s390x fixes
@ 2017-01-24 15:08 Cornelia Huck
  2017-01-24 15:08 ` [Qemu-devel] [PULL 1/2] s390x/kvm: include hw_accel.h instead of kvm.h Cornelia Huck
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Cornelia Huck @ 2017-01-24 15:08 UTC (permalink / raw)
  To: peter.maydell; +Cc: borntraeger, agraf, jfrei, qemu-devel, Cornelia Huck

The following changes since commit 48cef39bf39846ce4aaf79d4a2ae620373b3e181:

  Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20170123' into staging (2017-01-24 09:52:42 +0000)

are available in the git repository at:

  git://github.com/cohuck/qemu tags/s390x-20170124

for you to fetch changes up to 0cf4d747cb8d053e6a6161aadfd3531fa1a62be1:

  s390x/kvm: fix cmma reset for KVM (2017-01-24 15:47:31 +0100)

----------------------------------------------------------------
Two s390x fixes: One for the kvm.c build failure, and one for a bug
that might cause random guest crashes with zeroed out pages on host
kernels with working cmma (< 4.6 and likely >= 4.10).

----------------------------------------------------------------

Christian Borntraeger (1):
  s390x/kvm: fix cmma reset for KVM

Cornelia Huck (1):
  s390x/kvm: include hw_accel.h instead of kvm.h

 target/s390x/kvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 1/2] s390x/kvm: include hw_accel.h instead of kvm.h
  2017-01-24 15:08 [Qemu-devel] [PULL 0/2] s390x fixes Cornelia Huck
@ 2017-01-24 15:08 ` Cornelia Huck
  2017-01-24 15:08 ` [Qemu-devel] [PULL 2/2] s390x/kvm: fix cmma reset for KVM Cornelia Huck
  2017-01-24 19:25 ` [Qemu-devel] [PULL 0/2] s390x fixes Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Cornelia Huck @ 2017-01-24 15:08 UTC (permalink / raw)
  To: peter.maydell; +Cc: borntraeger, agraf, jfrei, qemu-devel, Cornelia Huck

Commit b394662 ("kvm: move cpu synchronization code") switched
to hw_accel.h instead of kvm.h, but missed s390x, resulting in

  CC      s390x-softmmu/target/s390x/kvm.o
/home/cohuck/git/qemu/target/s390x/kvm.c: In function ‘kvm_sclp_service_call’:
/home/cohuck/git/qemu/target/s390x/kvm.c:1034:5: error: implicit declaration of function ‘cpu_synchronize_state’ [-Werror=implicit-function-declaration]
     cpu_synchronize_state(CPU(cpu));
     ^
/home/cohuck/git/qemu/target/s390x/kvm.c:1034:5: error: nested extern declaration of ‘cpu_synchronize_state’ [-Werror=nested-externs]
/home/cohuck/git/qemu/target/s390x/kvm.c: In function ‘sigp_initial_cpu_reset’:
/home/cohuck/git/qemu/target/s390x/kvm.c:1628:5: error: implicit declaration of function ‘cpu_synchronize_post_reset’ [-Werror=implicit-function-declaration]
     cpu_synchronize_post_reset(cs);
     ^
/home/cohuck/git/qemu/target/s390x/kvm.c:1628:5: error: nested extern declaration of ‘cpu_synchronize_post_reset’ [-Werror=nested-externs]
/home/cohuck/git/qemu/target/s390x/kvm.c: In function ‘sigp_set_prefix’:
/home/cohuck/git/qemu/target/s390x/kvm.c:1665:5: error: implicit declaration of function ‘cpu_synchronize_post_init’ [-Werror=implicit-function-declaration]
     cpu_synchronize_post_init(cs);
     ^
/home/cohuck/git/qemu/target/s390x/kvm.c:1665:5: error: nested extern declaration of ‘cpu_synchronize_post_init’ [-Werror=nested-externs]
cc1: all warnings being treated as errors
/home/cohuck/git/qemu/rules.mak:64: recipe for target 'target/s390x/kvm.o' failed

Fix this.

Fixes: b394662 ("kvm: move cpu synchronization code")
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Vincent Palatin <vpalatin@chromium.org>
---
 target/s390x/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 3ac29f92b3..5ad0acbc82 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -32,7 +32,7 @@
 #include "qemu/error-report.h"
 #include "qemu/timer.h"
 #include "sysemu/sysemu.h"
-#include "sysemu/kvm.h"
+#include "sysemu/hw_accel.h"
 #include "hw/hw.h"
 #include "sysemu/device_tree.h"
 #include "qapi/qmp/qjson.h"
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 2/2] s390x/kvm: fix cmma reset for KVM
  2017-01-24 15:08 [Qemu-devel] [PULL 0/2] s390x fixes Cornelia Huck
  2017-01-24 15:08 ` [Qemu-devel] [PULL 1/2] s390x/kvm: include hw_accel.h instead of kvm.h Cornelia Huck
@ 2017-01-24 15:08 ` Cornelia Huck
  2017-01-24 19:25 ` [Qemu-devel] [PULL 0/2] s390x fixes Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Cornelia Huck @ 2017-01-24 15:08 UTC (permalink / raw)
  To: peter.maydell
  Cc: borntraeger, agraf, jfrei, qemu-devel, qemu-stable, Cornelia Huck

From: Christian Borntraeger <borntraeger@de.ibm.com>

We must reset the CMMA states for normal memory (when not on mem path),
but the current code does the opposite. This was unnoticed for some time
as the kernel since 4.6 also had a bug which mostly disabled the paging
optimizations.

Fixes: 07059effd14e ("s390x/kvm: let the CPU model control CMM(A)")
Cc: qemu-stable@nongnu.org
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 target/s390x/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 5ad0acbc82..6ed387671e 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -197,7 +197,7 @@ void kvm_s390_cmma_reset(void)
         .attr = KVM_S390_VM_MEM_CLR_CMMA,
     };
 
-    if (!mem_path || !kvm_s390_cmma_available()) {
+    if (mem_path || !kvm_s390_cmma_available()) {
         return;
     }
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] s390x fixes
  2017-01-24 15:08 [Qemu-devel] [PULL 0/2] s390x fixes Cornelia Huck
  2017-01-24 15:08 ` [Qemu-devel] [PULL 1/2] s390x/kvm: include hw_accel.h instead of kvm.h Cornelia Huck
  2017-01-24 15:08 ` [Qemu-devel] [PULL 2/2] s390x/kvm: fix cmma reset for KVM Cornelia Huck
@ 2017-01-24 19:25 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2017-01-24 19:25 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Christian Borntraeger, Alexander Graf, Jens Freimann, QEMU Developers

On 24 January 2017 at 15:08, Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> The following changes since commit 48cef39bf39846ce4aaf79d4a2ae620373b3e181:
>
>   Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20170123' into staging (2017-01-24 09:52:42 +0000)
>
> are available in the git repository at:
>
>   git://github.com/cohuck/qemu tags/s390x-20170124
>
> for you to fetch changes up to 0cf4d747cb8d053e6a6161aadfd3531fa1a62be1:
>
>   s390x/kvm: fix cmma reset for KVM (2017-01-24 15:47:31 +0100)
>
> ----------------------------------------------------------------
> Two s390x fixes: One for the kvm.c build failure, and one for a bug
> that might cause random guest crashes with zeroed out pages on host
> kernels with working cmma (< 4.6 and likely >= 4.10).
>
> ----------------------------------------------------------------
>
> Christian Borntraeger (1):
>   s390x/kvm: fix cmma reset for KVM
>
> Cornelia Huck (1):
>   s390x/kvm: include hw_accel.h instead of kvm.h
>
>  target/s390x/kvm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-24 19:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 15:08 [Qemu-devel] [PULL 0/2] s390x fixes Cornelia Huck
2017-01-24 15:08 ` [Qemu-devel] [PULL 1/2] s390x/kvm: include hw_accel.h instead of kvm.h Cornelia Huck
2017-01-24 15:08 ` [Qemu-devel] [PULL 2/2] s390x/kvm: fix cmma reset for KVM Cornelia Huck
2017-01-24 19:25 ` [Qemu-devel] [PULL 0/2] s390x fixes Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.