From: George Dunlap <george.dunlap@eu.citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>,
Anthony PERARD <anthony.perard@citrix.com>
Cc: Yun Wang <bimingery@gmail.com>, Xen Devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] libxl: Fix vcpu-set for PV guest.
Date: Wed, 5 Feb 2014 10:43:45 +0000 [thread overview]
Message-ID: <52F215E1.1040401@eu.citrix.com> (raw)
In-Reply-To: <1391525210.6497.9.camel@kazak.uk.xensource.com>
On 02/04/2014 02:46 PM, Ian Campbell wrote:
> On Fri, 2014-01-31 at 16:35 +0000, Anthony PERARD wrote:
>> vcpu-set will try to use the HVM path (through QEMU) instead of the PV
>> path (through xenstore) for a PV guest, if there is a QEMU running for
>> this domain. This patch check which kind of guest is running before
>> before doing any call.
>>
>> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
>> ---
>>
>> Yun, is this patch fix the issue with your PV guest ?
> Yun, any feedback on this patch?
>
> George -- I think vcpu-set not working for PV guests is a bug worth
> fixing in 4.4 so I intend to apply.
Yes, please do.
-George
>
>>
>> tools/libxl/libxl.c | 19 ++++++++++++++-----
>> 1 file changed, 14 insertions(+), 5 deletions(-)
>>
>> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
>> index 2845ca4..c4fe6af 100644
>> --- a/tools/libxl/libxl.c
>> +++ b/tools/libxl/libxl.c
>> @@ -4692,12 +4692,21 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap)
>> {
>> GC_INIT(ctx);
>> int rc;
>> - switch (libxl__device_model_version_running(gc, domid)) {
>> - case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL:
>> - rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap);
>> + switch (libxl__domain_type(gc, domid)) {
>> + case LIBXL_DOMAIN_TYPE_HVM:
>> + switch (libxl__device_model_version_running(gc, domid)) {
>> + case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL:
>> + rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap);
>> + break;
>> + case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
>> + rc = libxl__set_vcpuonline_qmp(gc, domid, cpumap);
>> + break;
>> + default:
>> + rc = ERROR_INVAL;
>> + }
>> break;
>> - case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
>> - rc = libxl__set_vcpuonline_qmp(gc, domid, cpumap);
>> + case LIBXL_DOMAIN_TYPE_PV:
>> + rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap);
>> break;
>> default:
>> rc = ERROR_INVAL;
>
next prev parent reply other threads:[~2014-02-05 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-31 16:35 [PATCH] libxl: Fix vcpu-set for PV guest Anthony PERARD
2014-02-04 14:46 ` Ian Campbell
2014-02-05 10:43 ` George Dunlap [this message]
2014-02-06 12:40 ` Ian Campbell
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=52F215E1.1040401@eu.citrix.com \
--to=george.dunlap@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=bimingery@gmail.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 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).