From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <Ian.Campbell@eu.citrix.com>
Cc: Tim Deegan <Tim.Deegan@eu.citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
"keir.fraser@eu.citrix.com" <keir.fraser@eu.citrix.com>
Subject: Re: Re: [PATCH 3 of 4] libxl: Add support for passing in the machine's E820 for PCI passthrough in libxl_device_pci_parse_bdf
Date: Tue, 12 Apr 2011 15:00:40 -0400 [thread overview]
Message-ID: <20110412190040.GA23249@dumpdata.com> (raw)
In-Reply-To: <1302633888.5528.23.camel@localhost.localdomain>
On Tue, Apr 12, 2011 at 07:44:48PM +0100, Ian Campbell wrote:
> On Tue, 2011-04-12 at 18:53 +0100, Konrad Rzeszutek Wilk wrote:
> > On Tue, Apr 12, 2011 at 01:19:43PM +0100, Ian Campbell wrote:
> > > On Mon, 2011-04-11 at 22:35 +0100, Konrad Rzeszutek Wilk wrote:
> > > >
> > > >
> > > > The code libxl_device_pci_parse_bdf calls the libxl__e820_alloc when
> > > > it has parsed one BDF. Subsequent calls to libxl_device_pci_parse_bdf
> > > > will
> > > > not trigger libxl__e820_alloc being called (unless the first call to
> > > > libxl__e820_alloc failed).
> > >
> > > That sounds like a very odd non-intuitive location for that allocation.
> > > Why not do it in libxl_domain_create or somewhere like that?
> > >
> > > I think the e820 map added to the idl should become a simple boolean
> > > flag and this should all be taken care of internally based on that.
> >
> > Like this?
>
> Why no_machine_e820 instead of just machine_e820? You can set a non-zero
> default in the appropriate libxl_foo_init function if need be.
I tried to
("machine_e820", bool, True, "Use machine's E820 for PCI passthrough."),
and it made the the machine_e820 variable be an 'const bool' so that you couldn't
change it anymore.
xl_cmdimpl.c:990: error: assignment of read-only member ‘machine_e820’
112 char * cmdline;
113 libxl_file_reference ramdisk;
114 const char * features;
115 /*
116 * Use machine's E820 for PCI passthrough.
117 */
118 const bool machine_e820;
119 } pv;
120 } u;
121 } libxl_domain_build_info;
If I make an 'integer' I get the same thing. Ah, if I modify the python code:
konrad@phenom:~/hg/xen-unstable.hg/tools/libxl$ hg diff
diff -r cc01692f4b41 tools/libxl/gentypes.py
--- a/tools/libxl/gentypes.py Tue Apr 12 14:46:05 2011 -0400
+++ b/tools/libxl/gentypes.py Tue Apr 12 14:58:24 2011 -0400
@@ -48,7 +48,7 @@ def libxl_C_type_define(ty, indent = "")
s += format_comment(4, f.comment)
x = libxl_C_instance_of(f.type, f.name)
if f.const:
- x = "const " + x
+ x = " " + x
x = x.replace("\n", "\n ")
s += " " + x + ";\n"
if ty.typename is None:
It starts working, but that does not look like the correct fix.
next prev parent reply other threads:[~2011-04-12 19:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 21:35 [PATCH 0 of 4] Patches for PCI passthrough with modified E820 (v2) Konrad Rzeszutek Wilk
2011-04-11 21:35 ` [PATCH 1 of 4] tools: Add xc_domain_set_memory_map and xc_get_machine_memory_map calls (x86, amd64 only) Konrad Rzeszutek Wilk
2011-04-11 21:35 ` [PATCH 2 of 4] x86: make the pv-only e820 array be dynamic Konrad Rzeszutek Wilk
2011-04-12 12:32 ` Keir Fraser
2011-04-12 12:53 ` Konrad Rzeszutek Wilk
2011-04-12 13:06 ` Keir Fraser
2011-04-12 17:21 ` Konrad Rzeszutek Wilk
2011-04-13 7:34 ` Jan Beulich
2011-04-13 13:31 ` Konrad Rzeszutek Wilk
2011-04-13 8:46 ` Keir Fraser
2011-04-13 13:32 ` Konrad Rzeszutek Wilk
2011-04-11 21:35 ` [PATCH 3 of 4] libxl: Add support for passing in the machine's E820 for PCI passthrough in libxl_device_pci_parse_bdf Konrad Rzeszutek Wilk
2011-04-12 12:19 ` Ian Campbell
2011-04-12 17:53 ` Konrad Rzeszutek Wilk
2011-04-12 18:44 ` Ian Campbell
2011-04-12 19:00 ` Konrad Rzeszutek Wilk [this message]
2011-04-12 19:29 ` Ian Campbell
2011-04-11 21:35 ` [PATCH 4 of 4] libxl: Convert E820_UNUSABLE and E820_RAM to E820_UNUSABLE as appropriate 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=20110412190040.GA23249@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Tim.Deegan@eu.citrix.com \
--cc=keir.fraser@eu.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 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.