From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "Dong, Eddie" <eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] KVM: VMX: Fix repeatlycalling alloc_apic_access_page()
Date: Mon, 05 Nov 2007 15:58:09 +0200 [thread overview]
Message-ID: <472F2171.9050704@qumranet.com> (raw)
In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A02557D41-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
Dong, Eddie wrote:
>>> - if (vm_need_virtualize_apic_accesses(vmx->vcpu.kvm))
>>> + if ((vmx->vcpu.vcpu_id == 0) &&
>>> + (vm_need_virtualize_apic_accesses(vmx->vcpu.kvm)))
>>> if (alloc_apic_access_page(vmx->vcpu.kvm) != 0)
>>> return -ENOMEM;
>>>
>>>
>>>
>> We may not have vcpu id 0 (though it's very unlikely).
>>
>>
>
> Current LAPIC code assume vcpu_id = 0 for BSP.
> And even no real support of APIC_ID change.
>
> How about use (vcpu->apic_base & MSR_IA32_APICBASE_BSP) ?
>
Taking kvm->mutex and checking avoids hidden dependencies and is
necessary anyway.
I need to sit down and document the kvm locking rules.
--
Any sufficiently difficult bug is indistinguishable from a feature.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
prev parent reply other threads:[~2007-11-05 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 5:13 [PATCH] KVM: VMX: Fix repeatly calling alloc_apic_access_page() Sheng Yang
[not found] ` <200711021313.43013.sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2007-11-04 7:46 ` Avi Kivity
[not found] ` <472D78CA.6080508-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-05 5:52 ` [PATCH] KVM: VMX: Fix repeatly calling alloc_apic_access_page () Sheng Yang
[not found] ` <200711051352.15366.sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2007-11-05 13:55 ` [PATCH] KVM: VMX: Fix repeatly calling alloc_apic_access_page() Avi Kivity
2007-11-05 8:52 ` [PATCH] KVM: VMX: Fix repeatlycalling alloc_apic_access_page() Dong, Eddie
[not found] ` <10EA09EFD8728347A513008B6B0DA77A02557D41-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-11-05 13:58 ` Avi Kivity [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=472F2171.9050704@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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