All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH] ignore writes to GICD_ICACTIVER ... GICD_ICACTIVERN
Date: Thu, 3 Dec 2015 12:52:17 +0000	[thread overview]
Message-ID: <56603B01.7060800@citrix.com> (raw)
In-Reply-To: <5660480C02000078000BBC73@prv-mh.provo.novell.com>

On 03/12/15 12:47, Jan Beulich wrote:
>>>> On 03.12.15 at 12:41, <julien.grall@citrix.com> wrote:
>> On 03/12/15 11:41, Jan Beulich wrote:
>>>>>> On 03.12.15 at 12:02, <stefano.stabellini@eu.citrix.com> wrote:
>>>> --- a/xen/arch/arm/vgic-v2.c
>>>> +++ b/xen/arch/arm/vgic-v2.c
>>>> @@ -315,11 +315,10 @@ static int vgic_v2_distr_mmio_write(struct vcpu *v, 
>> mmio_info_t *info)
>>>>          return 0;
>>>>  
>>>>      case GICD_ICACTIVER ... GICD_ICACTIVERN:
>>>> -        if ( dabt.size != DABT_WORD ) goto bad_width;
>>>> -        printk(XENLOG_G_ERR
>>>> +        gdprintk(XENLOG_DEBUG,
>>>>                 "%pv: vGICD: unhandled word write %#"PRIregister" to 
>> ICACTIVER%d\n",
>>>>                 v, *r, gicd_reg - GICD_ICACTIVER);
>>>
>>> Do you really mean to print two domain/vcpu ID pairs here, the more
>>> that I suppose v == current?
>>
>> v is not necessarily the current vCPU.
> 
> Okay, that's different then from how MMIO intercepts work on x86.

It really depends of the emulation. This code emulates the state of the
interrupt controller for a given vCPU.

For GICv2, v will always be the current vCPU because the region is
either common or banked.

However for GICv3, each vCPU has its own region (i.e the re-distributor)
and can be accessible by all the other vCPUs.

So the code will look up the vCPU associated to this region and will use
it in the retrieve the correct state (see vgic_v3_rdistr_mmio_{read,write}).

Regards,

-- 
Julien Grall

      reply	other threads:[~2015-12-03 12:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 11:02 [PATCH] ignore writes to GICD_ICACTIVER ... GICD_ICACTIVERN Stefano Stabellini
2015-12-03 11:25 ` Julien Grall
2015-12-03 11:41 ` Jan Beulich
2015-12-03 11:41   ` Julien Grall
2015-12-03 12:47     ` Jan Beulich
2015-12-03 12:52       ` Julien Grall [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=56603B01.7060800@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=Stefano.Stabellini@eu.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 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.