Hi Mukesh:
Thanks for your help on enabling gdbsx…
> Hmm... that all seems ok then. Can you check your permissions on :
> /proc/xen/privcmd
root@piet-openxen-blade:~#
ls -l /proc/xen/privcmd
-rw------- 1 root root 0 Aug 11 13:37 /proc/xen/privcmd
Privcmd seems to be a hypervisor call available from userland
For Xen developers:
http://sanifool.com/2013/02/08/invoking-an-hypercall-from-userland-via-privcmd/
> Other possibilities:
> - do you have xsm enabled?
Don’t think so. I’ve heard this security stuff can get in the way.
Doing a ‘xl list –Z’ doesn’t show any security labels.
[Wish I had Synergy Installed]
>- can you put a printk in xen file common/domctl.c:
Sure but first I likely need to start using the openxen code that I compiled from src.
I’m currently using openxen installed via a Ubuntu 14.04 package.
Mind explaining the best way to proceed on switching to the openxen
That I compiled from source? I thought some of it might be installed at /usr/local/
And perhaps just changing a search path or two will be sufficient.
I suspect I’ll need to put a new xen kernel on /boot and update the grub config.
> case XEN_DOMCTL_pausedomain:
> ret = -EINVAL;
>+ printk(">>>>>>>>> Pause domain:%d current:%d\n", d->domain_id,
>+ current->domain->domain_id);
> if ( d != current->domain )
> ret = domain_pause_by_systemcontroller(d);
> break;
Ok, I added your suggested prink() call above.
Ø
if you don't see this printk then the problem is in dom0 linux, prob some permissions either on the privcmd file or somewhere in FS path.
Ø
> Wondering if the host kernel has to be configured to support gdb
Ø
> attaching with gdbsx.
Ø
Nop, at this point you are just not able to establish connection with xen. gdb is not involved.
Great, perhaps I just need to do is install the openxen I just compiled.
Your suggestions on exactly how to do that would be greatly appreciated.
Ø
-Mukesh
-piet
--
Pete/Piet Delaney
O: +1 408 935-1813
C: +1 408 646-8557
H: +1 408 243-8872
Home Email: piet.delaney@xxxxxxxxx
-----Original Message-----
From: Mukesh Rathor [mailto:mukesh.rathor@xxxxxxxxxx]
Sent: Wednesday, August 27, 2014 11:25 AM
To: Pete Delaney
Cc: xen-devel@xxxxxxxxxxxxx; piet.delaney@xxxxxxxxx; Elaine Huang
Subject: Re: gdbsx - xg_attach:Unable to pause domain:1; failed to attach to domain:1 errno:13
On Wed, 27 Aug 2014 03:02:54 +0000
Pete Delaney <pdelaney@xxxxxxxxxxxxxxx> wrote:
> Hi Mukesh:
>
> > Hmm... I just tried and it worked for me, so things are ok it
> > seems on latest xen/linux. The errno EPERM indicates something
> > might not be properly setup. Are you able to run other xen
> > commands like xl list, etc? I see you are running as root, are
> > you running gdbsx on dom0?
>
> Gdbsx runs on dom0, which I believe is the same as running on the host
> when it's booting for Xen support in the grub selection. On the host
> the Xen commands are available as I showed in my initial email, I used
> the "xl list" and "xl pause" commands:
>
> > root@piet-openxen:~# xl list
> > Name ID Mem
> > VCPUs State Time(s)
> > Domain-0 0 14734
> > 12 r----- 8562.9
> > New_PV_Driver 1 1023
> > 4 -b---- 50.3
> > root@piet-openxen:~#
>
> > root@piet-openxen-blade:~# xl pause 1
>
>
> I was running as root on the host/dom0.
Hmm... that all seems ok then. Can you check your permissions on :
/proc/xen/privcmd
Other possibilites:
- do you have xsm enabled?
- can you put a printk in xen file common/domctl.c:
case XEN_DOMCTL_pausedomain:
ret = -EINVAL;
+ printk(">>>>>>>>> Pause domain:%d current:%d\n", d->domain_id,
+ current->domain->domain_id);
if ( d != current->domain )
ret = domain_pause_by_systemcontroller(d);
break;
if you don't see this printk then the problem is in dom0 linux, prob some permissions either on the privcmd file or somewhere in FS path.
> Wondering if the host kernel has to be configured to support gdb
> attaching with gdbsx.
Nop, at this point you are just not able to establish connection with xen. gdb is not involved.
-Mukesh