linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Tejun Heo <tj@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>,
	KVM <kvm@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Sean Christopherson <seanjc@google.com>,
	Vipin Sharma <vipinsh@google.com>
Subject: linux-next: manual merge of the cgroup tree with the kvm tree
Date: Thu, 22 Apr 2021 15:53:55 +1000	[thread overview]
Message-ID: <20210422155355.471c7751@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2025 bytes --]

Hi all,

Today's linux-next merge of the cgroup tree got conflicts in:

  arch/x86/kvm/svm/sev.c

between commit:

  9fa1521daafb ("KVM: SVM: Do not set sev->es_active until KVM_SEV_ES_INIT completes")

from the kvm tree and commit:

  7aef27f0b2a8 ("svm/sev: Register SEV and SEV-ES ASIDs to the misc controller")

from the cgroup tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/kvm/svm/sev.c
index 63923fa0b172,214eefb20414..000000000000
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@@ -93,10 -103,21 +109,21 @@@ static bool __sev_recycle_asids(int min
  	return true;
  }
  
 -static int sev_asid_new(struct kvm_sev_info *sev)
 +static int sev_asid_new(bool es_active)
  {
- 	int pos, min_asid, max_asid;
+ 	int pos, min_asid, max_asid, ret;
  	bool retry = true;
+ 	enum misc_res_type type;
+ 
+ 	type = sev->es_active ? MISC_CG_RES_SEV_ES : MISC_CG_RES_SEV;
+ 	WARN_ON(sev->misc_cg);
+ 	sev->misc_cg = get_current_misc_cg();
+ 	ret = misc_cg_try_charge(type, sev->misc_cg, 1);
+ 	if (ret) {
+ 		put_misc_cg(sev->misc_cg);
+ 		sev->misc_cg = NULL;
+ 		return ret;
+ 	}
  
  	mutex_lock(&sev_bitmap_lock);
  
@@@ -182,17 -224,16 +221,17 @@@ static int sev_guest_init(struct kvm *k
  	if (unlikely(sev->active))
  		return ret;
  
 -	asid = sev_asid_new(sev);
 +	asid = sev_asid_new(es_active);
  	if (asid < 0)
  		return ret;
+ 	sev->asid = asid;
  
  	ret = sev_platform_init(&argp->error);
  	if (ret)
  		goto e_free;
  
  	sev->active = true;
 +	sev->es_active = es_active;
- 	sev->asid = asid;
  	INIT_LIST_HEAD(&sev->regions_list);
  
  	return 0;

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2021-04-22  5:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22  5:53 Stephen Rothwell [this message]
2021-04-22  6:34 ` linux-next: manual merge of the cgroup tree with the kvm tree Paolo Bonzini
2021-04-22  7:33   ` Vipin Sharma
2021-04-22  7:47     ` Paolo Bonzini
2021-04-22 17:09       ` Vipin Sharma
2021-04-22 17:18         ` Paolo Bonzini
2021-04-22 17:30           ` Vipin Sharma
2021-04-22 11:48   ` Tejun Heo
2021-04-22 11:56     ` Paolo Bonzini
2021-04-22  5:57 Stephen Rothwell

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=20210422155355.471c7751@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tj@kernel.org \
    --cc=vipinsh@google.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;
as well as URLs for NNTP newsgroup(s).