public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
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>,
	"Zhang, Xiantao" <xiantao.zhang@intel.com>
Subject: Re: [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt
Date: Wed, 20 Mar 2013 13:49:13 +0200	[thread overview]
Message-ID: <20130320114913.GJ3889@redhat.com> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E099E8B36@SHSMSX101.ccr.corp.intel.com>

On Wed, Mar 20, 2013 at 11:47:49AM +0000, Zhang, Yang Z wrote:
> Gleb Natapov wrote on 2013-03-20:
> > On Tue, Mar 19, 2013 at 12:27:38PM -0300, Marcelo Tosatti wrote:
> >> On Tue, Mar 19, 2013 at 12:19:55PM -0300, Marcelo Tosatti wrote:
> >>> See the previous argument: should never enter guest mode with PIR ON bit
> >>> set. With logic above:
> >>> 
> >>> context1				context2                      context3
> >>> 					set_bit(PIR-1)
> >>> 					r = pi_test_and_set_on()	set_bit(PIR-40)
> >>> 					set_bit(KVM_REQ_EVENT)
> >>> if (kvm_check_request(KVM_REQ_EVENT)
> >>>  if (test_and_clear_bit(on))
> >>>    kvm_apic_update_irr()						r =
> > pi_test_and_set_on()
> >>> 
> >>> guest entry with PIR ON=1
> >>> 
> >>> 
> >>> Thats the reason for unconditional clearing on guest entry: it is easy
> >>> to verify its correct. I understand and agree the callback (and VMWRITE)
> >>> is not nice.
> >> 
> >> Re: KVM_REQ_EVENT setting after set_bit(KVM_REQ_EVENT) assures no guest
> >> entry with PIR ON=1.
> >> 
> >> Might be, would have to verify. Its trickier though. Maybe add a FIXME:
> >> to the callback and remove it later.
> > We have time still. RTC series is not ready yet. I'll think hard and try
> > to poke holes in the logic in this patch and you do the same for what I
> > propose.
> Any thought? As far as I see, the two solutions are ok. It's hard to say which is better. But clear ON bit when sync_pir_irr should be more clear and close to hardware's behavior.
> 
Lets go with it unless we see why it will not work.

--
			Gleb.

  reply	other threads:[~2013-03-20 11:49 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 13:31 [PATCH v6 0/5] KVM: VMX: Add Posted Interrupt supporting Yang Zhang
2013-03-15 13:31 ` [PATCH v6 1/5] KVM: VMX: Enable acknowledge interupt on vmexit Yang Zhang
2013-03-15 13:31 ` [PATCH v6 2/5] KVM: VMX: Register a new IPI for posted interrupt Yang Zhang
2013-03-15 13:31 ` [PATCH v6 3/5] KVM: VMX: Check the posted interrupt capability Yang Zhang
2013-03-15 13:31 ` [PATCH v6 4/5] KVM: VMX: Add the algorithm of deliver posted interrupt Yang Zhang
2013-03-15 13:31 ` [PATCH v6 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt Yang Zhang
2013-03-19  8:54   ` Gleb Natapov
2013-03-19 12:11     ` Zhang, Yang Z
2013-03-19 12:23       ` Gleb Natapov
2013-03-19 12:42         ` Zhang, Yang Z
2013-03-19 13:29           ` Gleb Natapov
2013-03-19 13:59             ` Zhang, Yang Z
2013-03-19 14:51               ` Gleb Natapov
2013-03-19 15:12                 ` Gleb Natapov
2013-03-19 15:19                   ` Marcelo Tosatti
2013-03-19 15:27                     ` Marcelo Tosatti
2013-03-19 16:10                       ` Gleb Natapov
2013-03-20 11:47                         ` Zhang, Yang Z
2013-03-20 11:49                           ` Gleb Natapov [this message]
2013-03-20 11:52                             ` Zhang, Yang Z
2013-03-19 15:30                     ` Gleb Natapov
2013-03-19 15:13             ` Marcelo Tosatti
2013-03-19 15:21               ` Gleb Natapov
2013-03-19 15:03         ` Marcelo Tosatti
2013-03-19 15:18           ` Gleb Natapov
2013-03-18  2:49 ` [PATCH v6 0/5] KVM: VMX: Add Posted Interrupt supporting Zhang, Yang Z
2013-03-18  9:16   ` Gleb Natapov
2013-03-18 10:43     ` Zhang, Yang Z
2013-03-18 11:28       ` Gleb Natapov
2013-03-18 11:44         ` Zhang, Yang Z
2013-03-18 22:20 ` Marcelo Tosatti

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=20130320114913.GJ3889@redhat.com \
    --to=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=xiantao.zhang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox