mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: paul@xen.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Paul Durrant <pdurrant@amazon.com>,
	Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org
Subject: Re: [PATCH v4 09/13] KVM: xen: automatically use the vcpu_info embedded in shared_info
Date: Tue, 19 Sep 2023 17:14:21 +0100	[thread overview]
Message-ID: <5f33490c1b9c201fba52fe146aca0cf828754129.camel@infradead.org> (raw)
In-Reply-To: <7de61c43-e88d-9c22-7e5f-2229d8c49523@xen.org>

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

On Tue, 2023-09-19 at 16:47 +0100, Paul Durrant wrote:
> 
> > 
> > I think they look interchangeable in this case. If we *do* take them
> > both in kvm_xen_set_evtchn_fast() then maybe we can simplify the slow
> > path where it set the bits in shared_info but then the vcpu_info gpc
> > was invalid. That currently uses a kvm->arch.xen.evtchn_pending_sel
> > shadow of the bits, and just kicks the vCPU to deliver them for
> > itself... but maybe that whole thing could be dropped, and
> > kvm_xen_set_evtchn_fast() can just return EWOULDBLOCK if it fails to
> > lock *both* shared_info and vcpu_info at the same time?
> > 
> 
> Yes, I think that sounds like a neater approach.
> 
> > I didn't do that before, because I didn't want to introduce lock
> > ordering rules. But I'm happier to do so now. And I think we can ditch
> > a lot of hairy asm in kvm_xen_inject_pending_events() ?
> > 
> 
> Messing with the asm sounds like something for a follow-up though.

AFAICT we can just delete the whole bloody lot. But yes, it's
definitely a later cleanup, enabled by the fact that we (will) now have
an agreed way of taking both locks at once, which I didn't want to do
in the first place.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]

  reply	other threads:[~2023-09-19 16:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19 13:41 [PATCH v4 00/13] KVM: xen: update shared_info and vcpu_info handling Paul Durrant
2023-09-19 13:41 ` [PATCH v4 01/13] KVM: pfncache: add a map helper function Paul Durrant
2023-09-19 13:41 ` [PATCH v4 02/13] KVM: pfncache: add a mark-dirty helper Paul Durrant
2023-09-19 13:41 ` [PATCH v4 03/13] KVM: pfncache: add a helper to get the gpa Paul Durrant
2023-09-19 13:41 ` [PATCH v4 04/13] KVM: pfncache: base offset check on khva rather than gpa Paul Durrant
2023-09-19 13:41 ` [PATCH v4 05/13] KVM: pfncache: allow a cache to be activated with a fixed (userspace) HVA Paul Durrant
2023-09-19 14:20   ` David Woodhouse
2023-09-19 14:22     ` Paul Durrant
2023-09-19 13:41 ` [PATCH v4 06/13] KVM: xen: allow shared_info to be mapped by fixed HVA Paul Durrant
2023-09-19 13:41 ` [PATCH v4 07/13] KVM: xen: prepare for using 'default' vcpu_info Paul Durrant
2023-09-19 13:41 ` [PATCH v4 08/13] KVM: xen: prevent vcpu_id from changing whilst shared_info is valid Paul Durrant
2023-09-19 13:41 ` [PATCH v4 09/13] KVM: xen: automatically use the vcpu_info embedded in shared_info Paul Durrant
2023-09-19 14:18   ` David Woodhouse
2023-09-19 14:34     ` Paul Durrant
2023-09-19 15:38       ` David Woodhouse
2023-09-19 15:47         ` Paul Durrant
2023-09-19 16:14           ` David Woodhouse [this message]
2023-09-19 13:41 ` [PATCH v4 10/13] KVM: selftests / xen: set KVM_XEN_VCPU_ATTR_TYPE_VCPU_ID Paul Durrant
2023-09-19 13:41 ` [PATCH v4 11/13] KVM: selftests / xen: map shared_info using HVA rather than GFN Paul Durrant
2023-09-19 13:41 ` [PATCH v4 12/13] KVM: selftests / xen: don't explicitly set the vcpu_info address Paul Durrant
2023-09-19 13:41 ` [PATCH v4 13/13] KVM: xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability Paul Durrant

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=5f33490c1b9c201fba52fe146aca0cf828754129.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=pdurrant@amazon.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®