All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Sander Eikelenboom <linux@eikelenboom.it>,
	xen-devel@lists.xensource.com,
	Ian Jackson <iwj@mariner.uk.xensource.com>
Subject: Re: [PATCH for-4.5] libxl: Fix if{} nesting in do_pci_remove
Date: Mon, 5 Jan 2015 11:39:53 -0500	[thread overview]
Message-ID: <20150105163953.GA15497@l.oracle.com> (raw)
In-Reply-To: <1420475676-19080-1-git-send-email-ian.jackson@eu.citrix.com>

On Mon, Jan 05, 2015 at 04:34:36PM +0000, Ian Jackson wrote:
> From: Ian Jackson <iwj@mariner.uk.xensource.com>
> 
> do_pci_remove contained this:
> 
>     if (type == LIBXL_DOMAIN_TYPE_HVM) {
>        [stuff]
>     } else if (type != LIBXL_DOMAIN_TYPE_PV)
>         abort();
>     {
> 
> This is bizarre, and not correct.  The effect is that HVM guests end
> up running both the proper code and that intended for PV guests.  This
> causes (amongst other things) trouble when PCI devices are
> hot-unplugged from HVM guests.
> 
> This bug was introduced in abfb006f "tools/libxl: explicitly grant
> access to needed I/O-memory ranges".
> 
> This is clear candidate for Xen 4.5, being a bugfix to an important
> feature.
> 
> Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
> Tested-by: Robert Hu <robert.hu@intel.com>
> CC: Konrad Wilk <konrad.wilk@oracle.com>

RElease-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

> CC: Sander Eikelenboom <linux@eikelenboom.it>
> CC: George Dunlap <George.Dunlap@eu.citrix.com>
> ---
>  tools/libxl/libxl_pci.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
> index 316643c..9ae37fa 100644
> --- a/tools/libxl/libxl_pci.c
> +++ b/tools/libxl/libxl_pci.c
> @@ -1247,9 +1247,9 @@ static int do_pci_remove(libxl__gc *gc, uint32_t domid,
>              rc = ERROR_FAIL;
>              goto out_fail;
>          }
> -    } else if (type != LIBXL_DOMAIN_TYPE_PV)
> -        abort();
> -    {
> +    } else {
> +        assert(type == LIBXL_DOMAIN_TYPE_PV);
> +
>          char *sysfs_path = libxl__sprintf(gc, SYSFS_PCI_DEV"/"PCI_BDF"/resource", pcidev->domain,
>                                           pcidev->bus, pcidev->dev, pcidev->func);
>          FILE *f = fopen(sysfs_path, "r");
> -- 
> 1.7.10.4
> 

  parent reply	other threads:[~2015-01-05 16:39 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12  6:58 [TestDay] VMX test report for Xen 4.5.0-rc1 Hu, Robert
2014-11-12  9:49 ` Jan Beulich
2014-11-12 10:53   ` Hu, Robert
2014-11-12 11:05     ` Jan Beulich
2014-11-12 13:23     ` Ian Campbell
2014-11-12  9:59 ` Fabio Fantoni
2014-11-13  2:40   ` Hu, Robert
2014-11-14  7:50   ` Hu, Robert
2014-11-14  9:42   ` Ian Campbell
2014-11-14  9:59     ` Wei Liu
2014-11-14 10:14     ` Hu, Robert
2014-11-14 10:38       ` Fabio Fantoni
2014-11-14 11:04       ` Wei Liu
2014-11-14 11:28       ` Ian Campbell
2014-11-19  1:41         ` Hu, Robert
2014-11-26  9:15     ` Robert Hu
2014-11-12 11:07 ` Wei Liu
2014-11-13  1:22   ` Hu, Robert
2014-11-13  9:39     ` Ian Campbell
2014-11-13  9:54     ` Wei Liu
2014-11-12 12:38 ` Boris Ostrovsky
2014-11-24  7:43   ` Hu, Robert
2014-11-24 14:54     ` Is: Fixes for xl pci-attach for Xen 4.5 confirmed to fix by Intel.Was:Re: " Konrad Rzeszutek Wilk
2014-11-24 15:13       ` Boris Ostrovsky
2014-12-18  4:55         ` Hu, Robert
2015-01-05 12:48           ` George Dunlap
2015-01-05 15:27             ` Konrad Rzeszutek Wilk
2015-01-05 15:54               ` Boris Ostrovsky
2015-01-05 15:56                 ` Ian Jackson
2015-01-05 16:34                   ` [PATCH for-4.5] libxl: Fix if{} nesting in do_pci_remove Ian Jackson
2015-01-05 16:38                     ` Ian Campbell
2015-01-05 16:39                     ` Konrad Rzeszutek Wilk [this message]
2015-01-05 16:46                       ` [PATCH for-4.5] libxl: Fix if{} nesting in do_pci_remove [and 1 more messages] Ian Jackson
2014-11-12 16:06 ` [TestDay] VMX test report for Xen 4.5.0-rc1 Konrad Rzeszutek Wilk
2014-11-12 22:29   ` Konrad Rzeszutek Wilk

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=20150105163953.GA15497@l.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=iwj@mariner.uk.xensource.com \
    --cc=linux@eikelenboom.it \
    --cc=xen-devel@lists.xensource.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 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.