From: Paolo Bonzini <pbonzini@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: rmuncrief@humanavance.com, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: SVM: allocate AVIC data structures based on kvm_amd moduleparameter
Date: Tue, 25 Feb 2020 15:01:52 +0100 [thread overview]
Message-ID: <d2c3471d-3234-5e0a-0c76-872040a65bb6@redhat.com> (raw)
In-Reply-To: <874kven5kv.fsf@vitty.brq.redhat.com>
On 25/02/20 14:45, Vitaly Kuznetsov wrote:
>> int ret;
>> + struct kvm_vcpu *vcpu = &svm->vcpu;
>>
>> - if (!kvm_vcpu_apicv_active(&svm->vcpu))
>> + if (!avic || !irqchip_in_kernel(vcpu->kvm))
>> return 0;
>>
>> ret = avic_init_backing_page(&svm->vcpu);
> Out of pure curiosity,
>
> when irqchip_in_kernel() is false, can we still get to .update_pi_irte()
> (svm_update_pi_irte()) -> get_pi_vcpu_info() -> "vcpu_info->pi_desc_addr
> = __sme_set(page_to_phys((*svm)->avic_backing_page));" -> crash! or is
> there anything which make this impossible?
No, because kvm_arch_irqfd_allowed returns false so you cannot create
any irqfd (svm_update_pi_irte is called when virt/lib/irqbypass.c finds
a match between two eventfds in KVM and VFIO).
Paolo
next prev parent reply other threads:[~2020-02-25 14:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 7:54 Paolo Bonzini
2020-02-25 13:45 ` Vitaly Kuznetsov
2020-02-25 14:01 ` Paolo Bonzini [this message]
2020-02-25 9:26 linmiaohe
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=d2c3471d-3234-5e0a-0c76-872040a65bb6@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmuncrief@humanavance.com \
--cc=vkuznets@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
all inboxes | Powered by JetHome®