All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: KVM <kvm@vger.kernel.org>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Jens Freimann <jfrei@linux.vnet.ibm.com>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Alexander Graf <agraf@suse.de>,
	Tony Krowiak <akrowiak@linux.vnet.ibm.com>
Subject: Re: [PATCH 4/7] KVM: s390/CPACF: Choose crypto control block format
Date: Wed, 04 Feb 2015 14:05:32 +0100	[thread overview]
Message-ID: <54D2191C.9000604@de.ibm.com> (raw)
In-Reply-To: <54D217F8.5050302@redhat.com>

Am 04.02.2015 um 14:00 schrieb Paolo Bonzini:
> 
> 
> On 04/02/2015 10:44, Christian Borntraeger wrote:
>> +static void kvm_s390_set_crycb_format(struct kvm *kvm)
>> +{
>> +	kvm->arch.crypto.crycbd = (__u32)(unsigned long) kvm->arch.crypto.crycb;
>> +
>> +	if (kvm_s390_apxa_installed())
>> +		kvm->arch.crypto.crycbd |= CRYCB_FORMAT2;
>> +	else
>> +		kvm->arch.crypto.crycbd |= CRYCB_FORMAT1;
>> +}
>> +
>>  static int kvm_s390_crypto_init(struct kvm *kvm)
>>  {
>>  	if (!test_vfacility(76))
>> @@ -663,8 +709,7 @@ static int kvm_s390_crypto_init(struct kvm *kvm)
>>  	if (!kvm->arch.crypto.crycb)
>>  		return -ENOMEM;
>>  
>> -	kvm->arch.crypto.crycbd = (__u32) (unsigned long) kvm->arch.crypto.crycb |
>> -				  CRYCB_FORMAT1;
>> +	kvm_s390_set_crycb_format(kvm);
> 
> Could this also be part of the "things" that KVM can choose to enable,
> even though it's not a facility?

Can you re-ask that question? Not sure what you want to know. 

This is mostly a fixup for z13, which wants to have a bigger control block. but
this block is not guest visible.
Talking about key wrapping, this is actually masked via a facility bit (for MSA-3
and MSA-4), therefore we have the test_vfacility thing in that function.

Christian

  reply	other threads:[~2015-02-04 13:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04  9:44 [PATCH 0/7] KVM: s390: fixes and features for kvm/next (3.20) Christian Borntraeger
2015-02-04  9:44 ` [PATCH 1/7] KVM: s390: floating irqs: fix user triggerable endless loop Christian Borntraeger
2015-02-04  9:44 ` [PATCH 2/7] KVM: s390: reenable LPP facility Christian Borntraeger
2015-02-04 12:57   ` Paolo Bonzini
2015-02-04 14:59     ` Christian Borntraeger
2015-02-04  9:44 ` [PATCH 3/7] s390/kernel: Update /proc/sysinfo file with Extended Name and UUID Christian Borntraeger
2015-02-04 12:57   ` Paolo Bonzini
2015-02-04 13:01     ` Christian Borntraeger
2015-02-04 13:03       ` Paolo Bonzini
2015-02-04 19:32         ` Christian Borntraeger
2015-02-05 11:13           ` Paolo Bonzini
2015-02-04  9:44 ` [PATCH 4/7] KVM: s390/CPACF: Choose crypto control block format Christian Borntraeger
2015-02-04 13:00   ` Paolo Bonzini
2015-02-04 13:05     ` Christian Borntraeger [this message]
2015-02-04 13:48       ` Paolo Bonzini
2015-02-04 14:00         ` Christian Borntraeger
2015-02-04  9:44 ` [PATCH 5/7] KVM: s390: use facilities and cpu_id per KVM Christian Borntraeger
2015-02-04  9:44 ` [PATCH 6/7] KVM: s390: add cpu model support Christian Borntraeger
2015-02-04  9:44 ` [PATCH 7/7] KVM: s390: Create ioctl for Getting/Setting guest storage keys Christian Borntraeger
2015-02-04 13:03 ` [PATCH 0/7] KVM: s390: fixes and features for kvm/next (3.20) Paolo Bonzini

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=54D2191C.9000604@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=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 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.