All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Chao Peng <chao.p.peng@linux.intel.com>
Cc: wei.liu2@citrix.com, Ian.Campbell@citrix.com,
	stefano.stabellini@eu.citrix.com, Ian.Jackson@eu.citrix.com,
	xen-devel@lists.xen.org, will.auld@intel.com, keir@xen.org
Subject: Re: [PATCH v5 1/6] x86: allow IRQ to be disabled for resource access
Date: Thu, 22 Jan 2015 11:18:43 +0000	[thread overview]
Message-ID: <54C0EAA302000078000580E7@mail.emea.novell.com> (raw)
In-Reply-To: <1421839164-26037-2-git-send-email-chao.p.peng@linux.intel.com>

>>> On 21.01.15 at 12:19, <chao.p.peng@linux.intel.com> wrote:
> --- a/xen/arch/x86/platform_hypercall.c
> +++ b/xen/arch/x86/platform_hypercall.c
> @@ -90,7 +90,9 @@ static void check_resource_access(struct xen_resource_access *ra)
>          int ret = 0;
>          xenpf_resource_entry_t *entry = ra->entries + i;
>  
> -        if ( entry->rsvd )
> +        /* DISABLE_IRQ flag should never be set for the last entry */
> +        if ( entry->flags & XEN_RESOURCE_ENTRY_FLAGS_DISABLE_IRQ &&

This needs checking that all the other 31 bits are clear as well as
parenthesizing.

> @@ -124,11 +126,19 @@ static void resource_access(void *info)
>  {
>      struct xen_resource_access *ra = info;
>      unsigned int i;
> +    unsigned long irqflags = 0;
> +    bool_t irq_disabled = 0;

I don't think you need two variables for this - this is x86-only code
and EFLAGS bit 1 is always set.

Jan

  reply	other threads:[~2015-01-22 11:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 11:19 [PATCH v5 0/6] enable Memory Bandwidth Monitoring (MBM) for VMs Chao Peng
2015-01-21 11:19 ` [PATCH v5 1/6] x86: allow IRQ to be disabled for resource access Chao Peng
2015-01-22 11:18   ` Jan Beulich [this message]
2015-01-21 11:19 ` [PATCH v5 2/6] x86: allow reading MSR_IA32_TSC with XENPF_resource_op Chao Peng
2015-01-22 11:20   ` Jan Beulich
2015-01-22 12:53     ` Chao Peng
2015-01-22 13:36       ` Jan Beulich
2015-01-22 14:03         ` Andrew Cooper
2015-01-22 14:09           ` Jan Beulich
2015-01-23  8:42             ` Chao Peng
2015-01-23  8:58               ` Jan Beulich
2015-01-21 11:19 ` [PATCH v5 3/6] tools: add routine to get CMT L3 event mask Chao Peng
2015-01-21 11:19 ` [PATCH v5 4/6] tools: correct coding style for psr Chao Peng
2015-01-21 11:19 ` [PATCH v5 5/6] tools: code refactoring for MBM Chao Peng
2015-01-21 11:19 ` [PATCH v5 6/6] tools, docs: add total/local memory bandwith monitoring Chao Peng
2015-01-21 11:28 ` [PATCH v5 0/6] enable Memory Bandwidth Monitoring (MBM) for VMs Jan Beulich
2015-01-22  1:12   ` Chao Peng
2015-01-22  7:59     ` Jan Beulich
2015-01-22 10:36       ` Chao Peng

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=54C0EAA302000078000580E7@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=will.auld@intel.com \
    --cc=xen-devel@lists.xen.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.