From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: [PATCH 1/6 v2] xl: Do not ignore unparseable PCI BDFs
Date: Thu, 16 Jul 2015 16:47:55 +0100 [thread overview]
Message-ID: <1437061675-21113-1-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <559BFBDB.6040508@citrix.com>
[ resending just 1/6 rather than the others as well ]
If xlu_pci_parse_bdf fails, abandon the domain creation, rather than
blundering on.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
---
v2: Print the offending supposed-BDF too.
---
tools/libxl/xl_cmdimpl.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index a08c264..5ab4e16 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1945,8 +1945,14 @@ skip_vfb:
pcidev->power_mgmt = pci_power_mgmt;
pcidev->permissive = pci_permissive;
pcidev->seize = pci_seize;
- if (!xlu_pci_parse_bdf(config, pcidev, buf))
- d_config->num_pcidevs++;
+ e = xlu_pci_parse_bdf(config, pcidev, buf);
+ if (e) {
+ fprintf(stderr,
+ "unable to parse PCI BDF `%s' for passthrough\n",
+ buf);
+ exit(-e);
+ }
+ d_config->num_pcidevs++;
}
if (d_config->num_pcidevs && c_info->type == LIBXL_DOMAIN_TYPE_PV)
libxl_defbool_set(&b_info->u.pv.e820_host, true);
--
1.7.10.4
next prev parent reply other threads:[~2015-07-16 15:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 16:13 [PATCH 0/6] libxl: config file string handling cleanups Ian Jackson
2015-07-07 16:13 ` [PATCH 1/6] xl: Do not ignore unparseable PCI BDFs Ian Jackson
2015-07-07 16:18 ` Andrew Cooper
2015-07-16 15:47 ` Ian Jackson [this message]
2015-07-16 15:52 ` [PATCH 1/6 v2] " Wei Liu
2015-07-07 16:13 ` [PATCH 2/6] xl: Use ARRAY_EXTEND_INIT for vtpms and nics Ian Jackson
2015-07-07 16:13 ` [PATCH 3/6] xl: Provide and use ARRAY_EXTEND_INIT_NODEVID for disks, pcidevs and dtdevs Ian Jackson
2015-07-07 16:13 ` [PATCH 4/6] xl: Provide and use xvasprintf and xasprintf internally Ian Jackson
2015-07-07 16:13 ` [PATCH 5/6] xl: Use xasprintf for cpupoolnumsplit names Ian Jackson
2015-07-07 16:13 ` [PATCH 6/6] xl: Rewrite trim() Ian Jackson
2015-07-07 16:21 ` [PATCH 0/6] libxl: config file string handling cleanups Ian Jackson
2015-07-07 16:30 ` Wei Liu
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=1437061675-21113-1-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=wei.liu2@citrix.com \
--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 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).