From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757580Ab0GHVjS (ORCPT ); Thu, 8 Jul 2010 17:39:18 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:37126 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753068Ab0GHVjQ (ORCPT ); Thu, 8 Jul 2010 17:39:16 -0400 X-Greylist: delayed 570 seconds by postgrey-1.27 at vger.kernel.org; Thu, 08 Jul 2010 17:39:16 EDT X-IronPort-AV: E=Sophos;i="4.53,560,1272859200"; d="scan'208";a="104831602" Subject: Re: [Xen-devel] Re: [PATCH 12/13] Unplug emulated disks and nics From: Ian Campbell To: "ddutile@redhat.com" CC: Stefano Stabellini , "jeremy@goop.org" , "xen-devel@lists.xensource.com" , "stefano@stabellini.net" , "linux-kernel@vger.kernel.org" , "sheng@linux.intel.com" In-Reply-To: <4C362DC3.7000101@redhat.com> References: <1277136847-13266-12-git-send-email-stefano@stabellini.net> <4C2CEF56.4050008@redhat.com> <4C34DD1B.3010601@redhat.com> <4C362DC3.7000101@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Organization: Citrix Systems, Inc. Date: Thu, 8 Jul 2010 22:29:43 +0100 Message-ID: <1278624583.12109.15.camel@localhost.localdomain> MIME-Version: 1.0 X-Mailer: Evolution 2.30.1.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2010-07-08 at 20:57 +0100, Don Dutile wrote: > I guess what I'm wondering is why not set xen_emul_unplug to ignore by > default (static int xen_emul_unplug=XEN_UNPLUG_IGNORE), which handles > the case I mentioned (just take existing guest config file as is, no edits, > pre-pv-hvm added to guest kernel), and if person edits config file to > change boot device to xvda, they would then edit the config to add > -x xen_emul_unplug=[all|ide-disks|...] as well. Can you guarantee that nobody is running an HVM guest today with a configuration file that specifies xvda (I believe it would work)? In other words can you be sure that defaulting to XEN_UNPLUG_IGNORE is _always_ going to be safe? Not just on RHEL hosts and with configurations generated by the RH tools or according to the RH docs but on any host with any (possibly hand-crafted) configuration? Any guest which uses xvda in its configuration file today will be using emulated devices but I think that with Stefano's patch and your proposed change in default on a Xen system without support for unplug will start using PV devices without unplugging the emulated ones first. I don't think there is any way for a guest running on a platform which does not support the unplug protocol to know automatically if it is safe to use the PV devices or not, therefore we have to err on the side of caution and ask users with such systems who know that their configuration is safe to explicitly request PV devices by using the command line option. Doing anything else is taking risks with people's data. Ian. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: Re: [PATCH 12/13] Unplug emulated disks and nics Date: Thu, 8 Jul 2010 22:29:43 +0100 Message-ID: <1278624583.12109.15.camel@localhost.localdomain> References: <1277136847-13266-12-git-send-email-stefano@stabellini.net> <4C2CEF56.4050008@redhat.com> <4C34DD1B.3010601@redhat.com> <4C362DC3.7000101@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C362DC3.7000101@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "ddutile@redhat.com" Cc: "jeremy@goop.org" , "xen-devel@lists.xensource.com" , Stefano Stabellini , "linux-kernel@vger.kernel.org" , "stefano@stabellini.net" , "sheng@linux.intel.com" List-Id: xen-devel@lists.xenproject.org On Thu, 2010-07-08 at 20:57 +0100, Don Dutile wrote: > I guess what I'm wondering is why not set xen_emul_unplug to ignore by > default (static int xen_emul_unplug=XEN_UNPLUG_IGNORE), which handles > the case I mentioned (just take existing guest config file as is, no edits, > pre-pv-hvm added to guest kernel), and if person edits config file to > change boot device to xvda, they would then edit the config to add > -x xen_emul_unplug=[all|ide-disks|...] as well. Can you guarantee that nobody is running an HVM guest today with a configuration file that specifies xvda (I believe it would work)? In other words can you be sure that defaulting to XEN_UNPLUG_IGNORE is _always_ going to be safe? Not just on RHEL hosts and with configurations generated by the RH tools or according to the RH docs but on any host with any (possibly hand-crafted) configuration? Any guest which uses xvda in its configuration file today will be using emulated devices but I think that with Stefano's patch and your proposed change in default on a Xen system without support for unplug will start using PV devices without unplugging the emulated ones first. I don't think there is any way for a guest running on a platform which does not support the unplug protocol to know automatically if it is safe to use the PV devices or not, therefore we have to err on the side of caution and ask users with such systems who know that their configuration is safe to explicitly request PV devices by using the command line option. Doing anything else is taking risks with people's data. Ian.