All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Juergen Gross <jgross@suse.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>, Olaf Hering <ohering@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: Regression in xen-unstable due to commit 3802ecbaa9eb36
Date: Thu, 16 May 2019 13:42:30 +0100	[thread overview]
Message-ID: <20190516124230.GC2798@zion.uk.xensource.com> (raw)
In-Reply-To: <20190516114255.7t6re7yot6wp3mom@Air-de-Roger>

On Thu, May 16, 2019 at 01:42:55PM +0200, Roger Pau Monné wrote:
> On Thu, May 16, 2019 at 12:24:50PM +0100, Wei Liu wrote:
> > On Thu, May 16, 2019 at 12:57:35PM +0200, Olaf Hering wrote:
> > > Am Thu, 16 May 2019 12:45:40 +0200
> > > schrieb Roger Pau Monné <roger.pau@citrix.com>:
> > > 
> > > > Having a field in build_info with a default value that depends on
> > > > fields outside of build_info is problematic, since not all callers of
> > > > libxl__domain_build_info_setdefault have access to libxl_domain_config.
> > > 
> > > One option would be a new API that gets a libxl_domain_config and which
> > > calls libxl__domain_set_device_model, libxl__domain_create_info_setdefault
> > > and libxl__domain_build_info_setdefault. To me it looks like create_domain
> > > can not build a proper d_config all on its own, it just has not enough info.
> > 
> > If you're talking about adding a new _public_ API:
> > 
> > The problem with this approach is that it doesn't help existing libxl
> > users. They will need to be fixed by calling this new API.
> > 
> > Will it work if 1) you make libxl__domain_set_device_model idempotent
> > and 2) call it from within libxl__domain_build_info_setdefault (which
> > basically restores the original code path before your patch)?
> 
> Calling libxl__domain_set_device_model from
> libxl__domain_build_info_setdefault would require passing
> domain_config to libxl__domain_build_info_setdefault, which gets back
> to my proposal.
> 

Oh I see what you were getting at.

I have merely been looking at the one patch that introduced this
regression which didn't use any field in d_config. But in the subsequent
patch d_config was used.

> In order to know if a PV or PVH domain requires a device model (for
> the PV backends) libxl needs to look at the contents of domain_config
> because that's where the list of devices is stored.
> 
> Another option would be to differentiate between device model and PV
> backend. In the PV/PVH case QEMU is not acting as a device model but
> rather as a PV backend, hence it could be signaled using a different
> field, that could live in domain_config instead of
> domain_build_info?

I think this is generally a good idea. Not sure how much code churn is
going to be though.

Wei.

> 
> Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Wei Liu <wei.liu2@citrix.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Juergen Gross <jgross@suse.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>, Olaf Hering <ohering@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] Regression in xen-unstable due to commit 3802ecbaa9eb36
Date: Thu, 16 May 2019 13:42:30 +0100	[thread overview]
Message-ID: <20190516124230.GC2798@zion.uk.xensource.com> (raw)
Message-ID: <20190516124230.g4DFRSIz7F0_iQrwq5QNkAZe_uPaSxW2Y-glOoxQiD0@z> (raw)
In-Reply-To: <20190516114255.7t6re7yot6wp3mom@Air-de-Roger>

On Thu, May 16, 2019 at 01:42:55PM +0200, Roger Pau Monné wrote:
> On Thu, May 16, 2019 at 12:24:50PM +0100, Wei Liu wrote:
> > On Thu, May 16, 2019 at 12:57:35PM +0200, Olaf Hering wrote:
> > > Am Thu, 16 May 2019 12:45:40 +0200
> > > schrieb Roger Pau Monné <roger.pau@citrix.com>:
> > > 
> > > > Having a field in build_info with a default value that depends on
> > > > fields outside of build_info is problematic, since not all callers of
> > > > libxl__domain_build_info_setdefault have access to libxl_domain_config.
> > > 
> > > One option would be a new API that gets a libxl_domain_config and which
> > > calls libxl__domain_set_device_model, libxl__domain_create_info_setdefault
> > > and libxl__domain_build_info_setdefault. To me it looks like create_domain
> > > can not build a proper d_config all on its own, it just has not enough info.
> > 
> > If you're talking about adding a new _public_ API:
> > 
> > The problem with this approach is that it doesn't help existing libxl
> > users. They will need to be fixed by calling this new API.
> > 
> > Will it work if 1) you make libxl__domain_set_device_model idempotent
> > and 2) call it from within libxl__domain_build_info_setdefault (which
> > basically restores the original code path before your patch)?
> 
> Calling libxl__domain_set_device_model from
> libxl__domain_build_info_setdefault would require passing
> domain_config to libxl__domain_build_info_setdefault, which gets back
> to my proposal.
> 

Oh I see what you were getting at.

I have merely been looking at the one patch that introduced this
regression which didn't use any field in d_config. But in the subsequent
patch d_config was used.

> In order to know if a PV or PVH domain requires a device model (for
> the PV backends) libxl needs to look at the contents of domain_config
> because that's where the list of devices is stored.
> 
> Another option would be to differentiate between device model and PV
> backend. In the PV/PVH case QEMU is not acting as a device model but
> rather as a PV backend, hence it could be signaled using a different
> field, that could live in domain_config instead of
> domain_build_info?

I think this is generally a good idea. Not sure how much code churn is
going to be though.

Wei.

> 
> Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-05-16 12:43 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16  8:09 Regression in xen-unstable due to commit 3802ecbaa9eb36 Juergen Gross
2019-05-16  8:09 ` [Xen-devel] " Juergen Gross
2019-05-16  8:27 ` Olaf Hering
2019-05-16  8:27   ` [Xen-devel] " Olaf Hering
2019-05-16  8:29   ` Juergen Gross
2019-05-16  8:29     ` [Xen-devel] " Juergen Gross
2019-05-16  8:30   ` Olaf Hering
2019-05-16  8:30     ` [Xen-devel] " Olaf Hering
2019-05-16  8:34     ` Juergen Gross
2019-05-16  8:34       ` [Xen-devel] " Juergen Gross
2019-05-16  8:40 ` Olaf Hering
2019-05-16  8:40   ` [Xen-devel] " Olaf Hering
2019-05-16  8:50   ` Olaf Hering
2019-05-16  8:50     ` [Xen-devel] " Olaf Hering
2019-05-16  8:54   ` Juergen Gross
2019-05-16  8:54     ` [Xen-devel] " Juergen Gross
2019-05-16  9:07 ` Olaf Hering
2019-05-16  9:07   ` [Xen-devel] " Olaf Hering
2019-05-16 10:45   ` Roger Pau Monné
2019-05-16 10:45     ` [Xen-devel] " Roger Pau Monné
2019-05-16 10:57     ` Olaf Hering
2019-05-16 10:57       ` [Xen-devel] " Olaf Hering
2019-05-16 11:24       ` Wei Liu
2019-05-16 11:24         ` [Xen-devel] " Wei Liu
2019-05-16 11:38         ` Olaf Hering
2019-05-16 11:38           ` [Xen-devel] " Olaf Hering
2019-05-16 11:50           ` Wei Liu
2019-05-16 11:50             ` [Xen-devel] " Wei Liu
2019-05-16 12:04             ` Olaf Hering
2019-05-16 12:04               ` [Xen-devel] " Olaf Hering
2019-05-16 12:18               ` Olaf Hering
2019-05-16 12:18                 ` [Xen-devel] " Olaf Hering
2019-05-16 12:50                 ` Wei Liu
2019-05-16 12:50                   ` [Xen-devel] " Wei Liu
2019-05-16 11:52           ` Olaf Hering
2019-05-16 11:52             ` [Xen-devel] " Olaf Hering
2019-05-16 11:42         ` Roger Pau Monné
2019-05-16 11:42           ` [Xen-devel] " Roger Pau Monné
2019-05-16 12:42           ` Wei Liu [this message]
2019-05-16 12:42             ` Wei Liu
2019-05-16 11:24     ` Wei Liu
2019-05-16 11:24       ` [Xen-devel] " 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=20190516124230.GC2798@zion.uk.xensource.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jgross@suse.com \
    --cc=ohering@suse.com \
    --cc=roger.pau@citrix.com \
    --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.