From: Peng Fan <van.freenix@gmail.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Julien Grall <julien.grall@arm.com>,
sstabellini@kernel.org
Subject: Re: Unable to add disk on ARM64
Date: Sat, 13 Aug 2016 10:48:18 +0800 [thread overview]
Message-ID: <20160813024816.GA18968@linux-7smt.suse> (raw)
In-Reply-To: <20160812145706.3tzmc2ll7ubd7ukl@mac>
Hi Julien, Roger
On Fri, Aug 12, 2016 at 04:57:06PM +0200, Roger Pau Monné wrote:
>On Fri, Aug 12, 2016 at 03:00:34PM +0200, Julien Grall wrote:
>> On 12/08/2016 14:24, Peng Fan wrote:
>> > Hi,
>>
>> Hello Peng,
>>
>> I have CCed Roger who is more familiar than me with the hotplug scripts.
>>
>> > I am using xen master branch on i.MX8 ARM64.
>> >
>> > My xl configuration:
>> >
>> > kernel = "/root/xen/Image"
>> > memory = "128"
>> > name = "DomU"
>> > vcpus = 1
>> > serial="pty"
>> > disk = [ 'phy:/dev/loop0,xvda,w' ]
>> > extra = "console=hvc0 root=/dev/xvda debug=/bin/sh"
>> >
>> >
>> > And I "losetup /dev/loop0 /root/DomU-rootfs" in Dom0 Linux.
>> >
>> > But I met the following error:
>> > libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: /etc/xen/scripts/block add ^M^M
>> > Device /dev/loop0 is mounted in the privileged domain,^M^M
>> > and so cannot be mounted by a guest.^M^M
>> > libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block add [800] exited with error status 1^M^M
>> > libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0xfee100: deregister unregistered^M^M
>> > libxl: error: libxl_devi
>> > ce.c:1202:device_hotplug_child_death_cb: script: Device /dev/loop0 is mounted in the privileged domain,^M^M
>> > and so cannot be mounted by a guest.^M^M
>>
>> From my understanding, you have mounted /dev/loop0 in Dom0, is that correct?
>> However, we don't support sharing the same mounting point by default (Roger
>> can you confirm).
No I only do "losetup /dev/loop0 DomU-rootfs". And I not mount it.
>
>It seems like the hotplug script has detected that you have the device
>already attached to Dom0, can you paste the output of `xenstore-ls -fp`
>when this happens?
I add xenstore-ls -fp in /etc/xen/scripts/block.
"
test -b "$dev" || fatal "$dev is not a block device."
xenstore-ls -fp ---> Here
claim_lock "block"
check_device_sharing "$dev" "$mode" ---> seems fail in this function
"
I use busybox, not sure whether it supports the xen scripts well or not.
such as "losetup -a" is not supported by busybox.
Log:
device_hotplug: calling hotplug script: /etc/xen/scripts/block add
libxl: debug: libxl_device.c:1135:device_hotplug: extra args:
libxl: debug: libxl_device.c:1143:device_hotplug: env:
libxl: debug: libxl_device.c:1150:device_hotplug: script: /etc/xen/scripts/block
libxl: debug: libxl_device.c:1150:device_hotplug: XENBUS_TYPE: vbd
libxl: debug: libxl_device.c:1150:device_hotplug: XENBUS_PATH: backend/vbd/1/51712
libxl: debug: libxl_device.c:1150:device_hotplug: XENBUS_BASE_PATH: backend
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: /etc/xen/scripts/block add
/tool = "" (n0)
/tool/xenstored = "" (n0)
/local = "" (n0)
/local/domain = "" (n0)
/local/domain/0 = "" (n0)
/local/domain/0/domid = "0" (n0)
/local/domain/0/name = "Domain-0" (n0)
/local/domain/0/backend = "" (n0)
/local/domain/0/backend/vbd = "" (n0)
/local/domain/0/backend/vbd/1 = "" (n0)
/local/domain/0/backend/vbd/1/51712 = "" (n0,r1)
/local/domain/0/backend/vbd/1/51712/frontend = "/local/domain/1/device/vbd/51712" (n0,r1)
/local/domain/0/backend/vbd/1/51712/params = "/dev/loop0" (n0,r1)
/local/domain/0/backend/vbd/1/51712/script = "/etc/xen/scripts/block" (n0,r1)
/local/domain/0/backend/vbd/1/51712/frontend-id = "1" (n0,r1)
/local/domain/0/backend/vbd/1/51712/online = "1" (n0,r1)
/local/domain/0/backend/vbd/1/51712/removable = "0" (n0,r1)
/local/domain/0/backend/vbd/1/51712/bootable = "1" (n0,r1)
/local/domain/0/backend/vbd/1/51712/state = "2" (n0,r1)
/local/domain/0/backend/vbd/1/51712/dev = "xvda" (n0,r1)
/local/domain/0/backend/vbd/1/51712/type = "phy" (n0,r1)
/local/domain/0/backend/vbd/1/51712/mode = "w" (n0,r1)
/local/domain/0/backend/vbd/1/51712/device-type = "disk" (n0,r1)
/local/domain/0/backend/vbd/1/51712/discard-enable = "1" (n0,r1)
/local/domain/1 = "" (n0,r1)
/local/domain/1/vm = "/vm
/63997893-f587-4bdc-9bf3-dd5c7614bb51" (n0,r1)
/local/domain/1/name = "DomU" (n0,r1)
/local/domain/1/cpu = "" (n0,r1)
/local/domain/1/cpu/0 = "" (n0,r1)
/local/domain/1/cpu/0/availability = "online" (n0,r1)
/local/domain/1/memory = "" (n0,r1)
/local/domain/1/memory/static-max = "131072" (n0,r1)
/local/domain/1/memory/target = "131072" (n0,r1)
/local/domain/1/memory/videoram = "0" (n0,r1)
/local/domain/1/device = "" (n0,r1)
/local/domain/1/device/suspend = "" (n0,r1)
/local/domain/1/device/suspend/event-channel = "" (n1)
/local/domain/1/device/vbd = "" (n0,r1)
/local/domain/1/device/vbd/51712 = "" (n1,r0)
/local/domain/1/device/vbd/51712/backend = "/local/domain/0/backend/vbd/1/51712" (n1,r0)
/local/domain/1/device/vbd/51712/backend-id = "0" (n1,r0)
/local/domain/1/device/vbd/51712/state = "1" (n1,r0)
/local/domain/1/device/vbd/51712/virtual-device = "51712" (n1,r0)
/local/domain/1/device/vbd/51712/device-type = "disk" (n1,r0)
/local/domain/1/device/vbd/51712/protocol = "arm-abi" (n1,r0)
/local/domain/1/control = "" (n0,r1)
/local/domain/1/control/shutdown = "" (n1)
/local/domain/1/control/feature-poweroff = "" (n1)
/local/domain/1/control/feature-reboot = "" (n1)
/local/domain/1/control/feature-suspend = "" (n1)
/local/domain/1/control/platform-feature-multiprocessor-suspend = "1" (n0,r1)
/local/domain/1/control/platform-feature-xs_reset_watches = "1" (n0,r1)
/local/domain/1/data = "" (n1)
/local/domain/1/drivers = "" (n1)
/local/domain/1/feature = "" (n1)
/local/domain/1/attr = "" (n1)
/local/domain/1/domid = "1" (n0,r1)
/local/domain/1/store = "" (n0,r1)
/local/domain/1/store/port = "1" (n0,r1)
/local/domain/1/store/ring-ref = "233473" (n0,r1)
/vm = "" (n0)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51 = "" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/name = "DomU" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/uuid = "63997893-f587-4bdc-9bf3-dd5c7614bb51" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/image = "" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/image/ostype = "linux" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/image/kernel = "/root/xen/Image" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/image/cmdline = "console=hvc0 root=/dev/xvda debug=/bin/sh" (n0,r1)
/vm/63997893-f587-4bdc-9bf3-dd5c7614bb51/start_time = "0.80" (n0,r1)
/libxl = "" (n0)
/libxl/1 = "" (n0)
/libxl/1/device = "" (n0)
/libxl/1/device/vbd = "" (n0)
/libxl/1/device/vbd/51712 = "" (n0)
/libxl/1/device/vbd/51712/frontend = "/local/domain/1/device/vbd/51712" (n0)
/libxl/1/device/vbd/51712/backend = "/local/domain/0/backend/vbd/1/51712" (n0)
/libxl/1/device/vbd/51712/params = "/dev/loop0" (n0)
/libxl/1/device/vbd/51712/script = "/etc/xen/scripts/block" (n0)
/libxl/1/device/vbd/51712/frontend-id = "1" (n0)
/libxl/1/device/vbd/51712/online = "1" (n0)
/libxl/1/device/vbd/51712/removable = "0" (n0)
/libxl/1/devic
e/vbd/51712/bootable = "1" (n0)
/libxl/1/device/vbd/51712/state = "1" (n0)
/libxl/1/device/vbd/51712/dev = "xvda" (n0)
/libxl/1/device/vbd/51712/type = "phy" (n0)
/libxl/1/device/vbd/51712/mode = "w" (n0)
/libxl/1/device/vbd/51712/device-type = "disk" (n0)
/libxl/1/device/vbd/51712/discard-enable = "1" (n0)
/libxl/1/dm-version = "qemu_xen_traditional" (n0)
Thanks,
Peng.
>
>It could be that there's some garbage in xenstore from a device that hasn't
>been properly detached.
>
>Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-08-13 2:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-12 12:24 Unable to add disk on ARM64 Peng Fan
2016-08-12 13:00 ` Julien Grall
2016-08-12 14:57 ` Roger Pau Monné
2016-08-13 2:48 ` Peng Fan [this message]
2016-08-13 14:13 ` Peng Fan
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=20160813024816.GA18968@linux-7smt.suse \
--to=van.freenix@gmail.com \
--cc=julien.grall@arm.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--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 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).