From: Gleb Natapov <gleb@redhat.com>
To: "Zhang, Yang Z" <yang.z.zhang@intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"Shan, Haitao" <haitao.shan@intel.com>,
"Tian, Kevin" <kevin.tian@intel.com>
Subject: Re: [PATCH v7 2/3] x86, apicv: add virtual interrupt delivery support
Date: Thu, 27 Dec 2012 08:38:36 +0200 [thread overview]
Message-ID: <20121227063835.GM17584@redhat.com> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E2EB314@SHSMSX101.ccr.corp.intel.com>
On Thu, Dec 27, 2012 at 06:34:37AM +0000, Zhang, Yang Z wrote:
> Gleb Natapov wrote on 2012-12-27:
> > On Thu, Dec 27, 2012 at 03:32:47AM +0000, Zhang, Yang Z wrote:
> >> Marcelo Tosatti wrote on 2012-12-21:
> >>> On Mon, Dec 17, 2012 at 01:30:49PM +0800, Yang Zhang wrote:
> >>>> From: Yang Zhang <yang.z.zhang@Intel.com>
> >>>>
> >>>> @@ -3925,6 +3942,15 @@ static int vmx_vcpu_setup(struct vcpu_vmx
> > *vmx)
> >>>> vmx_secondary_exec_control(vmx));
> >>>> }
> >>>> + if (enable_apicv_reg_vid) {
> >>>> + vmcs_write64(EOI_EXIT_BITMAP0, 0);
> >>>> + vmcs_write64(EOI_EXIT_BITMAP1, 0);
> >>>> + vmcs_write64(EOI_EXIT_BITMAP2, 0);
> >>>> + vmcs_write64(EOI_EXIT_BITMAP3, 0);
> >>>> +
> >>>> + vmcs_write16(GUEST_INTR_STATUS, 0);
> >>>> + }
> >>>
> >>> AFAICS SVI should be regenerated on migration. Consider:
> >>>
> >>> 1. vintr delivery, sets SVI = vector = RVI.
> >>> 2. clears RVI.
> >>> 3. migration.
> >>> 4. RVI properly set from VIRR on entry.
> >>> 5. SVI = 0.
> >>> 6. EOI -> EOI virtualization with SVI = 0.
> >>>
> >>> Could hook into kvm_apic_post_state_restore() to do that (set highest
> >>> index of bit set in VISR).
> >> Ok. How about to make a request(KVM_REQ_UPDATE_SVI) and handle it in
> >> vmentry to set highest index of bit in VISR to RVI.
> >>
> > Just do it in kvm_apic_post_state_restore() directly, no need to do
> > a request.
> What you mean "do it directly". Since we are not in target vcpu's context, we cannot access vmcs at this point. We still need a request or variable to indicate the migration happened.
>
We are in a target vcpu context.
--
Gleb.
next prev parent reply other threads:[~2012-12-27 6:38 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 5:30 [PATCH v7 0/3] x86, apicv: Add APIC virtualization support Yang Zhang
2012-12-17 5:30 ` [PATCH v7 1/3] x86, apicv: add APICv register " Yang Zhang
2012-12-17 5:30 ` [PATCH v7 2/3] x86, apicv: add virtual interrupt delivery support Yang Zhang
2012-12-20 0:59 ` Marcelo Tosatti
2012-12-20 1:01 ` Marcelo Tosatti
2012-12-20 6:42 ` Gleb Natapov
2012-12-20 12:53 ` Marcelo Tosatti
2012-12-20 13:12 ` Gleb Natapov
2012-12-20 23:07 ` Marcelo Tosatti
2012-12-25 7:49 ` Zhang, Yang Z
2012-12-20 1:26 ` Marcelo Tosatti
2012-12-20 6:51 ` Gleb Natapov
2012-12-20 13:01 ` Marcelo Tosatti
2012-12-20 13:02 ` Marcelo Tosatti
2012-12-20 22:00 ` Marcelo Tosatti
2012-12-27 3:32 ` Zhang, Yang Z
2012-12-27 6:20 ` Gleb Natapov
2012-12-27 6:34 ` Zhang, Yang Z
2012-12-27 6:38 ` Gleb Natapov [this message]
2012-12-27 6:50 ` Zhang, Yang Z
2012-12-20 22:59 ` Marcelo Tosatti
2012-12-21 7:51 ` Gleb Natapov
2012-12-21 11:39 ` Marcelo Tosatti
2012-12-21 12:08 ` Gleb Natapov
2012-12-27 2:24 ` Zhang, Yang Z
2012-12-27 6:23 ` Gleb Natapov
2012-12-27 6:25 ` Zhang, Yang Z
2012-12-31 15:02 ` Marcelo Tosatti
2012-12-17 5:30 ` [PATCH v7 3/3] x86, apicv: add virtual x2apic support Yang Zhang
2012-12-20 8:31 ` Gleb Natapov
2012-12-24 1:41 ` Zhang, Yang Z
2012-12-24 2:35 ` Zhang, Yang Z
2012-12-24 9:23 ` Gleb Natapov
2012-12-24 23:53 ` Zhang, Yang Z
2012-12-25 6:38 ` Gleb Natapov
2012-12-25 6:42 ` Zhang, Yang Z
2012-12-25 6:50 ` Gleb Natapov
2012-12-25 7:25 ` Zhang, Yang Z
2012-12-25 7:31 ` Gleb Natapov
2012-12-25 7:46 ` Zhang, Yang Z
2012-12-25 7:52 ` Gleb Natapov
2012-12-25 8:24 ` Zhang, Yang Z
2012-12-25 11:58 ` Gleb Natapov
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=20121227063835.GM17584@redhat.com \
--to=gleb@redhat.com \
--cc=haitao.shan@intel.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=yang.z.zhang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.