All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@suse.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: libvir-list@redhat.com, xen-devel@lists.xen.org
Subject: Re: [libvirt] [PATCH V2 3/3] libxl: support PARAVIRT and ACPI reboot flags
Date: Fri, 02 May 2014 08:43:57 -0600	[thread overview]
Message-ID: <5363AF2D.8020104__47241.7686869905$1399041951$gmane$org@suse.com> (raw)
In-Reply-To: <20140502141451.GB5206@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]

Daniel P. Berrange wrote:
> On Fri, May 02, 2014 at 08:01:00AM -0600, Jim Fehlig wrote:
>   
>> Daniel P. Berrange wrote:
>>     
>>> Given that Xen has a decent paravirt reboot facility I'd probably
>>> just not bother with trying to fake the controlled reboot via ACPI.
>>>   
>>>       
>> Ok, that sounds reasonable to me.  I'll drop this patch when pushing the
>> others, post 1.2.4.  Should 1/3 retain the VIR_DOMAIN_REBOOT_PARAVIRT
>> addition tovirDomainRebootFlagValues?
>>     
>
> I don't think you need to drop the patch/code. It is still useful, IMHO,
> to have the explicit flag for VIR_DOMAIN_REBOOT_PARAVIRT. I'd just
> suggest you remove the block of code for VIR_DOMAIN_REBOOT_ACPI_POWER_BTN
> impl in the reboot method.
>   

Just to clarify, do you mean changing this patch to the attached one?

Regards,
Jim


[-- Attachment #2: libxl-PARAVIRT-reboot-flag.patch --]
[-- Type: text/x-patch, Size: 1529 bytes --]

>From e76f891bd843dd4f7b895d3929c9f561162a69a9 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Thu, 1 May 2014 15:00:47 -0600
Subject: [PATCH 3/3] libxl: support PARAVIRT reboot flag

Add support for the VIR_DOMAIN_REBOOT_PARAVIRT flag in
libxlDomainReboot().

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
 src/libxl/libxl_driver.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 28e8512..edbfa57 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -938,7 +938,9 @@ libxlDomainReboot(virDomainPtr dom, unsigned int flags)
     int ret = -1;
     libxlDomainObjPrivatePtr priv;
 
-    virCheckFlags(0, -1);
+    virCheckFlags(VIR_DOMAIN_REBOOT_PARAVIRT, -1);
+    if (flags == 0)
+        flags = VIR_DOMAIN_REBOOT_PARAVIRT;
 
     if (!(vm = libxlDomObjFromDomain(dom)))
         goto cleanup;
@@ -953,13 +955,16 @@ libxlDomainReboot(virDomainPtr dom, unsigned int flags)
     }
 
     priv = vm->privateData;
-    if (libxl_domain_reboot(priv->ctx, vm->def->id) != 0) {
+    if (flags & VIR_DOMAIN_REBOOT_PARAVIRT) {
+        ret = libxl_domain_reboot(priv->ctx, vm->def->id);
+        if (ret == 0)
+            goto cleanup;
+
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("Failed to reboot domain '%d' with libxenlight"),
                        vm->def->id);
-        goto cleanup;
+        ret = -1;
     }
-    ret = 0;
 
  cleanup:
     if (vm)
-- 
1.8.1.4


[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2014-05-02 14:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1398982479-20632-1-git-send-email-jfehlig@suse.com>
2014-05-01 22:14 ` [PATCH V2 1/3] Introduce a new flag for controlling shutdown/reboot Jim Fehlig
2014-05-01 22:14 ` [PATCH V2 2/3] libxl: support PARAVIRT and ACPI shutdown flags Jim Fehlig
2014-05-01 22:14 ` [PATCH V2 3/3] libxl: support PARAVIRT and ACPI reboot flags Jim Fehlig
     [not found] ` <1398982479-20632-3-git-send-email-jfehlig@suse.com>
2014-05-02  8:24   ` [PATCH V2 2/3] libxl: support PARAVIRT and ACPI shutdown flags Ian Campbell
2014-05-02  9:40   ` [libvirt] " Daniel P. Berrange
     [not found] ` <1398982479-20632-2-git-send-email-jfehlig@suse.com>
2014-05-02  9:41   ` [libvirt] [PATCH V2 1/3] Introduce a new flag for controlling shutdown/reboot Daniel P. Berrange
     [not found] ` <1398982479-20632-4-git-send-email-jfehlig@suse.com>
2014-05-02  8:24   ` [PATCH V2 3/3] libxl: support PARAVIRT and ACPI reboot flags Ian Campbell
2014-05-02  9:46   ` [libvirt] " Daniel P. Berrange
     [not found]   ` <20140502094650.GF22878@redhat.com>
2014-05-02 14:01     ` Jim Fehlig
2014-05-02 14:14       ` Daniel P. Berrange
     [not found]       ` <20140502141451.GB5206@redhat.com>
2014-05-02 14:43         ` Jim Fehlig [this message]
     [not found]         ` <5363AF2D.8020104@suse.com>
2014-05-02 14:57           ` Daniel P. Berrange
2014-05-05 16:56 ` [libvirt] [PATCH V2 0/3] support flags in libxlDomain{Shutdown, Reboot} Jim Fehlig

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='5363AF2D.8020104__47241.7686869905$1399041951$gmane$org@suse.com' \
    --to=jfehlig@suse.com \
    --cc=berrange@redhat.com \
    --cc=libvir-list@redhat.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.