This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: 2.6.37 PV on HVM and emul_unplug=unnecessary

To: Alex Bligh <alex@xxxxxxxxxxx>
Subject: [Xen-devel] Re: 2.6.37 PV on HVM and emul_unplug=unnecessary
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date: Wed, 12 Jan 2011 14:04:57 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 12 Jan 2011 05:05:12 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:newsgroups:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Gc/tUf6y/UmmpTO1fuLdSFVBg9/cHgZb1uB8vO5C/aE=; b=Ux3/doURpAvAqWuvWpyS4fqB+yBR9qJ/MqnsHQvTfBzKgXVOc2EOX78xuUXSx+J9Ng DeeYFlCFy61fJaxZ6xTMtOe3GJS/M7M9M4uvaGNCFdCyyQRVIuJtSdRzdL6ie6SzsLm7 GyJvyb+8+7x11c0AnUqKToF5Z7jAPj4ZwufGE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:newsgroups:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; b=nPdT1x9CTgjo5V23JcAqzB8Sm+eCjSu3e35xy5ju5H6d2SMhMJUYGQ6hiQNohV4VRb l/4v0wevr73xQIPOnJsy028fTTEdGkqfVoddbPRb1E0+aOH3kuW0VNMV90R4PbgLNQgj FqKB1FHY54WDlZrGvhaqF0NhraMOgatqLE1Jk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <179F0F4F586F923A4B074564@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: gmane.comp.emulators.xen.devel
References: <179F0F4F586F923A4B074564@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6
On 01/12/2011 12:45 PM, Alex Bligh wrote:
On modern mainline, when a PV on HVM kernel boots, it will detect the
ability to PCI unplug the PCI SD devices, so to avoid producing
/dev/xvdX and /dev/sdX referring to the same device. On Xen Dom0 prior
to 3.4.something, this fails because PCI unplug is not supported.
The check can be worked around by using emulunplug=unnecessary, but
this is not optimal as
a) you still end up with 2 devices; and
b) it requires modifying the kernel boot line, which is not always
easy (e.g. if your bootloader is supplied by a third party IAAS
provider and you wish to use a mainline kernel).

Another approach would be to stop sd_mod loading another way
(e.g. blacklist sd_mod). This does not work well as many kernels have
sd_mod built in.

I am trying to think of a non-intrusive way to prevent sd_mod initialising
if we are doing PV on HVM and PCI unplug is not supported (other than
upgrade Xen). One possibility would be to manually register dummy
block major device with the same major number as used by sd. This would
cause register_blkdev to return EBUSY and the module not to init. However,
it would leave the dummy block device around.

On Windows it is possible to add a "filter driver" above the PCI and IDE buses and hide the emulated devices this way. It doesn't leave a dummy disk, but it does leave a dummy device in the PCI tree. It's a kind of kernel-level blacklist. Also, it couldn't be an external module if sd_mod is built in, which makes it much less interesting.

Has someone already looked into this and concluded it's impossible? Or
is this worth a little time?

Something similar was done in the 2.6.18 "XenoLinux" kernels, but it's ugly and it touches into areas of the kernell that Xen support shouldn't affect.

If your "Xen Dom0 prior to 3.4.something" is RHEL/CentOS, the 5.6 version will include a backport of PCI unplug support. Then you only need to bug your cloud provider. :)


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>