From: Juergen Gross <jgross@suse.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: George.Dunlap@eu.citrix.com, stefano.stabellini@eu.citrix.com,
ian.jackson@eu.citrix.com, cyliu@suse.com,
xen-devel@lists.xen.org
Subject: Re: [PATCH v5 1/5] libxl: make libxl__need_xenpv_qemu() operate on domain config
Date: Wed, 30 Mar 2016 16:02:53 +0200 [thread overview]
Message-ID: <56FBDC8D.3040306@suse.com> (raw)
In-Reply-To: <20160330133830.GA5656@citrix.com>
On 30/03/16 15:38, Wei Liu wrote:
> On Wed, Mar 30, 2016 at 02:05:54PM +0200, Juergen Gross wrote:
>> libxl__need_xenpv_qemu() is called with configuration data for console,
>> vfbs, disks and channels today in order to evaluate the need for
>> starting a device model for a pv domain.
>>
>> The console data is local to the caller and setup in a way to never
>> require a device model. All other data is taken from the domain config
>> structure.
>>
>> In order to support other device backends via qemu change the interface
>> of libxl__need_xenpv_qemu() to take the domain config structure as
>> input instead of the single device arrays.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>> V4: Return (negative) error value in case of failure, 0 or 1 else
>>
>
> I think this is a backport candidate -- can you please split it out
> from the rest of changes?
Sure.
>
> Other than that, the code looks good.
>
>> V2: Return false if libxl__get_domid() fails as requested by George Dunlap
>> ---
>> tools/libxl/libxl_create.c | 12 +++------
>> tools/libxl/libxl_dm.c | 60 +++++++++++++-------------------------------
>> tools/libxl/libxl_internal.h | 5 +---
>> 3 files changed, 23 insertions(+), 54 deletions(-)
>>
>> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
>> index 61b5c01..0681103 100644
>> --- a/tools/libxl/libxl_create.c
>> +++ b/tools/libxl/libxl_create.c
>> @@ -1304,7 +1304,6 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev,
>> }
>> case LIBXL_DOMAIN_TYPE_PV:
>> {
>> - int need_qemu = 0;
>> libxl__device_console console;
>> libxl__device device;
>>
>> @@ -1314,17 +1313,14 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev,
>> }
>>
>> init_console_info(gc, &console, 0);
>> -
>> - need_qemu = libxl__need_xenpv_qemu(gc, 1, &console,
>> - d_config->num_vfbs, d_config->vfbs,
>> - d_config->num_disks, &d_config->disks[0],
>> - d_config->num_channels, &d_config->channels[0]);
>> -
>> console.backend_domid = state->console_domid;
>> libxl__device_console_add(gc, domid, &console, state, &device);
>> libxl__device_console_dispose(&console);
>>
>> - if (need_qemu) {
>> + ret = libxl__need_xenpv_qemu(gc, d_config);
>> + if (ret < 0)
>> + goto error_out;
>> + if (ret) {
>> dcs->dmss.dm.guest_domid = domid;
>> libxl__spawn_local_dm(egc, &dcs->dmss.dm);
>> return;
>> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
>> index cfda24c..0d88c37 100644
>> --- a/tools/libxl/libxl_dm.c
>> +++ b/tools/libxl/libxl_dm.c
>> @@ -2113,61 +2113,37 @@ int libxl__destroy_device_model(libxl__gc *gc, uint32_t domid)
>> GCSPRINTF("/local/domain/%d/image/device-model-pid", domid));
>> }
>>
>> -int libxl__need_xenpv_qemu(libxl__gc *gc,
>> - int nr_consoles, libxl__device_console *consoles,
>> - int nr_vfbs, libxl_device_vfb *vfbs,
>> - int nr_disks, libxl_device_disk *disks,
>> - int nr_channels, libxl_device_channel *channels)
>
> Maybe add a comment here about return values?
Yes, can do.
Juergen
>
>> +int libxl__need_xenpv_qemu(libxl__gc *gc, libxl_domain_config *d_config)
>> {
>
> Wei.
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-03-30 14:02 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 12:05 [PATCH v5 0/5] libxl: add support for qemu base pvusb backend Juergen Gross
2016-03-30 12:05 ` [PATCH v5 1/5] libxl: make libxl__need_xenpv_qemu() operate on domain config Juergen Gross
2016-03-30 13:38 ` Wei Liu
2016-03-30 14:02 ` Juergen Gross [this message]
2016-03-30 12:05 ` [PATCH v5 2/5] libxl: add query function for backend support by device model Juergen Gross
2016-03-30 13:44 ` George Dunlap
2016-03-30 13:59 ` Juergen Gross
2016-03-30 13:53 ` Wei Liu
2016-03-30 14:02 ` Juergen Gross
2016-03-30 14:09 ` Wei Liu
2016-03-30 14:11 ` Juergen Gross
2016-03-30 14:26 ` Wei Liu
2016-03-30 15:55 ` Anthony PERARD
2016-03-30 15:59 ` Wei Liu
2016-03-30 16:07 ` Anthony PERARD
2016-03-30 14:10 ` George Dunlap
2016-03-30 14:27 ` Wei Liu
2016-03-30 12:05 ` [PATCH v5 3/5] libxl: add new pvusb backend "qusb" provided by qemu Juergen Gross
2016-03-30 14:19 ` Wei Liu
2016-03-30 14:34 ` Juergen Gross
2016-03-30 14:38 ` Wei Liu
2016-03-30 16:16 ` Wei Liu
2016-03-30 17:09 ` Juergen Gross
2016-03-30 12:05 ` [PATCH v5 4/5] libxl: add service function to check whether device model is running Juergen Gross
2016-03-30 12:05 ` [PATCH v5 5/5] libxl: check for dynamic device model start required Juergen Gross
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=56FBDC8D.3040306@suse.com \
--to=jgross@suse.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=cyliu@suse.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.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.