All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 2/2] x86: latch current‑>domain in do_physdev_op()
Date: Mon, 19 Jan 2015 15:58:49 +0000	[thread overview]
Message-ID: <54BD29B9.9060003@citrix.com> (raw)
In-Reply-To: <54BD329E02000078000568CF@mail.emea.novell.com>

On 19/01/15 15:36, Jan Beulich wrote:
> @@ -483,7 +482,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
>          ret = -EFAULT;
>          if ( copy_from_guest(&apic, arg, 1) != 0 )
>              break;
> -        ret = xsm_apic(XSM_PRIV, v->domain, cmd);
> +        ret = xsm_apic(XSM_PRIV, currd, cmd);
>          if ( ret )
>              break;
>          ret = ioapic_guest_write(apic.apic_physbase, apic.reg, apic.value);
> @@ -499,7 +498,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
>  
>          /* Use the APIC check since this dummy hypercall should still only
>           * be called by the domain with access to program the ioapic */
> -        ret = xsm_apic(XSM_PRIV, v->domain, cmd);
> +        ret = xsm_apic(XSM_PRIV, currd, cmd);
>          if ( ret )
>              break;
>  
> @@ -529,15 +528,16 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H

There is a "is_pvh_vcpu(current)" between these two hunks which wants
latching in the same way as set_iobitmap, allowing the "current" below
to become "curr".

With that fixed, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

>          if ( set_iopl.iopl > 3 )
>              break;
>          ret = 0;
> -        v->arch.pv_vcpu.iopl = set_iopl.iopl;
> +        current->arch.pv_vcpu.iopl = set_iopl.iopl;
>          break;
>      }
>  
>      case PHYSDEVOP_set_iobitmap: {
> +        struct vcpu *curr = current;
>          struct physdev_set_iobitmap set_iobitmap;
>  
>          ret = -ENOSYS;
> -        if ( is_pvh_vcpu(current) )
> +        if ( is_pvh_vcpu(curr) )
>              break;
>  
>          ret = -EFAULT;

      reply	other threads:[~2015-01-19 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 15:30 [PATCH 0/2] x86: physdev-op handling adjustments Jan Beulich
2015-01-19 15:36 ` [PATCH 1/2] x86: slightly simplify PHYSDEVOP_pirq_eoi_gmfn_v* handling Jan Beulich
2015-01-19 15:40   ` Andrew Cooper
2015-01-19 15:36 ` [PATCH 2/2] x86: latch current‑>domain in do_physdev_op() Jan Beulich
2015-01-19 15:58   ` Andrew Cooper [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=54BD29B9.9060003@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --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.