From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <seanjc@google.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
fwilhelm@google.com, oupton@google.com
Subject: Re: [PATCH 0/8] KVM: SEV-ES: fixes for string I/O emulation
Date: Fri, 22 Oct 2021 15:33:49 +0200 [thread overview]
Message-ID: <43fd49ff-d54d-558f-f5c8-6dcc5dc726b2@redhat.com> (raw)
In-Reply-To: <YXH8hmB64gnwxIx6@google.com>
On 22/10/21 01:49, Sean Christopherson wrote:
> On Wed, Oct 13, 2021, Paolo Bonzini wrote:
>> Patches 2 to 7 are a bunch of cleanups to emulator_pio_in and
>> emulator_pio_in_out, so that the final SEV code is a little easier
>> to reason on. Just a little, no big promises.
> IMO, this series goes in the wrong direction and doesn't make the mess any better,
> just different.
>
> The underlying issue is that kernel_pio() does the completely horrendous thing
> of consuming vcpu->arch.pio. That leads to the juggling that this series tries
> to clean up, but it's essentially an impossible problem to solve because the
> approach itself is broken.
I agree on this, but I disagree that the series does not make the mess
any better. At the very least, the new signatures for
__emulator_pio_in, complete_emulator_pio_in and emulator_pio_in_out are
improvements regarding the _role_ of vcpu->arch.pio*:
- complete_emulator_pio_in clearly takes the values from vcpu->arch.pio,
which _is_ the right thing to do for a complete_userspace_io function.
This is not clear of emulator_pio_in before the patch
- __emulator_pio_in and emulator_pio_in_out do not take anymore the
buffer argument, making it clear that they operate on the internal
pio_data buffer and only complete_emulator_pio_in copies out of it.
Which yes is horrible, but at least it is clearly visible in the code now.
I managed to clean things up quite satisfactorily with just 6 patches on
top of these eight, so I'll post the full series as soon as I finish
testing them. 5.15 can then include these to fix the bug at hand.
Paolo
prev parent reply other threads:[~2021-10-22 13:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 16:56 Paolo Bonzini
2021-10-13 16:56 ` [PATCH 1/8] KVM: SEV-ES: fix length of string I/O Paolo Bonzini
2021-10-14 20:13 ` Tom Lendacky
2021-10-21 23:10 ` Maxim Levitsky
2021-10-25 1:31 ` Marc Orr
2021-10-25 8:59 ` Paolo Bonzini
2021-10-13 16:56 ` [PATCH 2/8] KVM: SEV-ES: rename guest_ins_data to sev_pio_data Paolo Bonzini
2021-10-21 23:12 ` Maxim Levitsky
2021-10-13 16:56 ` [PATCH 3/8] KVM: x86: leave vcpu->arch.pio.count alone in emulator_pio_in_out Paolo Bonzini
2021-10-21 23:12 ` Maxim Levitsky
2021-10-13 16:56 ` [PATCH 4/8] KVM: SEV-ES: clean up kvm_sev_es_ins/outs Paolo Bonzini
2021-10-21 23:14 ` Maxim Levitsky
2021-10-22 16:31 ` Paolo Bonzini
2021-10-13 16:56 ` [PATCH 5/8] KVM: x86: split the two parts of emulator_pio_in Paolo Bonzini
2021-10-21 23:14 ` Maxim Levitsky
2021-10-13 16:56 ` [PATCH 6/8] KVM: x86: remove unnecessary arguments from complete_emulator_pio_in Paolo Bonzini
2021-10-21 23:14 ` Maxim Levitsky
2021-10-13 16:56 ` [PATCH 7/8] KVM: SEV-ES: keep INS functions together Paolo Bonzini
2021-10-21 23:14 ` Maxim Levitsky
2021-10-13 16:56 ` [PATCH 8/8] KVM: SEV-ES: go over the sev_pio_data buffer in multiple passes if needed Paolo Bonzini
2021-10-21 23:15 ` Maxim Levitsky
2021-10-21 17:47 ` [PATCH 0/8] KVM: SEV-ES: fixes for string I/O emulation Paolo Bonzini
2021-10-21 20:04 ` Sean Christopherson
2021-10-21 23:49 ` Sean Christopherson
2021-10-22 13:33 ` Paolo Bonzini [this message]
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=43fd49ff-d54d-558f-f5c8-6dcc5dc726b2@redhat.com \
--to=pbonzini@redhat.com \
--cc=fwilhelm@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oupton@google.com \
--cc=seanjc@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
all inboxes | Powered by JetHome®