From: "Jan Beulich" <JBeulich@suse.com>
To: Paul Durrant <paul.durrant@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>, KeirFraser <keir@xen.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v6] x86/hvm/viridian: Enable APIC assist enlightenment
Date: Thu, 24 Mar 2016 07:50:59 -0600 [thread overview]
Message-ID: <56F3FED302000078000E0227@prv-mh.provo.novell.com> (raw)
In-Reply-To: <1458297150-1574-1-git-send-email-paul.durrant@citrix.com>
>>> On 18.03.16 at 11:32, <paul.durrant@citrix.com> wrote:
> @@ -278,6 +281,53 @@ static void teardown_apic_assist(struct vcpu *v)
> put_page_and_type(page);
> }
>
> +void viridian_start_apic_assist(struct vcpu *v, int vector)
> +{
> + uint32_t *va = v->arch.hvm_vcpu.viridian.apic_assist.va;
> +
> + if ( !va )
> + return;
> +
> + /*
> + * If there is already an assist pending then something has gone
> + * wrong and the VM will most likely hang so force a crash now
> + * to make the problem clear.
> + */
> + if ( v->arch.hvm_vcpu.viridian.apic_assist.vector >= 0 )
> + domain_crash(v->domain);
> +
> + v->arch.hvm_vcpu.viridian.apic_assist.vector = vector;
Considering the osstest failures I (see also IRC) I now wonder
what happens if the guest gets migrated while a vCPU has this
field holding a valid vector, namely how ...
> @@ -1170,10 +1183,27 @@ int vlapic_has_pending_irq(struct vcpu *v)
> !nestedhvm_vcpu_in_guestmode(v) )
> return irr;
>
> + /*
> + * If APIC assist was used then there may have been no EOI so
> + * we need to clear the requisite bit from the ISR here, before
> + * comparing with the IRR.
> + */
> + vector = viridian_complete_apic_assist(v);
> + if ( vector != -1 )
> + vlapic_clear_vector(vector, &vlapic->regs->data[APIC_ISR]);
... this would then be taken care of on the new host.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-03-24 13:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 10:32 [PATCH v6] x86/hvm/viridian: Enable APIC assist enlightenment Paul Durrant
2016-03-18 11:05 ` Jan Beulich
2016-03-18 12:30 ` Wei Liu
2016-03-24 13:50 ` Jan Beulich [this message]
2016-03-24 13:56 ` Paul Durrant
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=56F3FED302000078000E0227@prv-mh.provo.novell.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=keir@xen.org \
--cc=paul.durrant@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).