public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>
Cc: KVM <kvm@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Jens Freimann <jfrei@linux.vnet.ibm.com>,
	Alexander Graf <agraf@suse.de>,
	Tony Krowiak <akrowiak@linux.vnet.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>
Subject: [GIT PULL 01/20] KVM: s390/cpacf: Enable key wrapping by default
Date: Fri,  6 Mar 2015 14:16:33 +0100	[thread overview]
Message-ID: <1425647812-61838-2-git-send-email-borntraeger@de.ibm.com> (raw)
In-Reply-To: <1425647812-61838-1-git-send-email-borntraeger@de.ibm.com>

From: Tony Krowiak <akrowiak@linux.vnet.ibm.com>

z/VM and LPAR enable key wrapping by default, lets do the same on KVM.

Signed-off-by: Tony Krowiak <akrowiak@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 arch/s390/kvm/kvm-s390.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 0c36239..b4d2030 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -839,9 +839,13 @@ static int kvm_s390_crypto_init(struct kvm *kvm)
 
 	kvm_s390_set_crycb_format(kvm);
 
-	/* Disable AES/DEA protected key functions by default */
-	kvm->arch.crypto.aes_kw = 0;
-	kvm->arch.crypto.dea_kw = 0;
+	/* Enable AES/DEA protected key functions by default */
+	kvm->arch.crypto.aes_kw = 1;
+	kvm->arch.crypto.dea_kw = 1;
+	get_random_bytes(kvm->arch.crypto.crycb->aes_wrapping_key_mask,
+			 sizeof(kvm->arch.crypto.crycb->aes_wrapping_key_mask));
+	get_random_bytes(kvm->arch.crypto.crycb->dea_wrapping_key_mask,
+			 sizeof(kvm->arch.crypto.crycb->dea_wrapping_key_mask));
 
 	return 0;
 }
-- 
2.3.0

  reply	other threads:[~2015-03-06 13:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06 13:16 [GIT PULL 00/20] KVM: s390: Features and Fixes for 4.1 (kvm/next) Christian Borntraeger
2015-03-06 13:16 ` Christian Borntraeger [this message]
2015-03-06 13:16 ` [GIT PULL 02/20] KVM: s390/cpacf: Fix kernel bug under z/VM Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 03/20] KVM: s390: fix in memory copy of facility lists Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 04/20] KVM: s390: include guest facilities in kvm facility test Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 05/20] KVM: s390: non-LPAR case obsolete during facilities mask init Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 06/20] KVM: s390: Zero out current VMDB of STSI before including level3 data Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 07/20] KVM: s390: fix handling of write errors in the tpi handler Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 08/20] KVM: s390: reinjection of irqs can fail " Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 09/20] KVM: s390: Nullify instruction for certain program exceptions Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 10/20] KVM: s390: Forward PSW to next instruction for addressing exceptions Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 11/20] KVM: s390: Use insn_length() to calculate length of instruction Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 12/20] KVM: s390: perform vcpu model setup in a function Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 13/20] KVM: s390: Fix trivial typo in comments Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 14/20] KVM: s390: fix instruction interception trace point Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 15/20] KVM: s390: Use the read_guest_abs() in guest debug functions Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 16/20] KVM: s390: Allocate and save/restore vector registers Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 17/20] KVM: s390: Vector exceptions Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 18/20] KVM: s390: Add new SIGP order to kernel counters Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 19/20] KVM: s390: Machine Check Christian Borntraeger
2015-03-06 13:16 ` [GIT PULL 20/20] KVM: s390: Enable vector support for capable guest Christian Borntraeger
2015-03-13  1:10 ` [GIT PULL 00/20] KVM: s390: Features and Fixes for 4.1 (kvm/next) Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425647812-61838-2-git-send-email-borntraeger@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=akrowiak@linux.vnet.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox