All of lore.kernel.org
 help / color / mirror / Atom feed
From: Big Strong <fangtuo90@gmail.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Tamas K Lengyel <tamas.k.lengyel@gmail.com>,
	"Sahita, Ravi" <ravi.sahita@intel.com>,
	edmund.h.white@intel.com, Jan Beulich <jbeulich@suse.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: xc_altp2m_set_vcpu_enable_notify fail
Date: Mon, 16 May 2016 23:05:48 +0800	[thread overview]
Message-ID: <CAFnE1f2YkezLx3E4aXQdADL760uaL8zcwOXiYykvhhbLbxLGJQ@mail.gmail.com> (raw)
In-Reply-To: <CAFnE1f0oOyVJ2pvEv7w2FF-ovzv=K1H0TLOh2q7dLboSLWutQA@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2430 bytes --]

To solve that, I install xen and tools in the guest, so as to access its
domain id and vcpu info to overcome the 'domain is null' error. Now the
problem is solved, but errors comes at 'domain != DOMID_SELF' checking
<http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/hvm/hvm.c;h=7492030a131a4212d9ca8e700621b2c8836867a9;hb=4f6aea066fe2cf3bf4929d6dac1e558071566f73#l5238>.
The DOMID_SELF is always 32752 (0x7FF0), while a.domain is the domid of the
guest, which induce the checking failed and exit. Any helps?

2016-05-16 17:06 GMT+08:00 Big Strong <fangtuo90@gmail.com>:

> Your opinion is inspiring. During the past days, I've tried to directly
> call HVMOP_altp2m_vcpu_enable_notify in guest by ioctl, this time it fails
> for "domain is null" checking.
> <http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/hvm/hvm.c;h=7492030a131a4212d9ca8e700621b2c8836867a9;hb=4f6aea066fe2cf3bf4929d6dac1e558071566f73#l5167> I
> thought it might because the guest is not able to achieve the vcpu info
> of its current state
> <http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/hvm/hvm.c;h=7492030a131a4212d9ca8e700621b2c8836867a9;hb=4f6aea066fe2cf3bf4929d6dac1e558071566f73#l5164>.
> While in dom0, this is not a problem. But dom0 is unable to
> call  HVMOP_altp2m_vcpu_enable_notify for the guest. How can I solve this
> contradiction?
>
> 2016-05-12 23:17 GMT+08:00 Wei Liu <wei.liu2@citrix.com>:
>
>> On Thu, May 12, 2016 at 09:00:12PM +0800, Big Strong wrote:
>> > I'm still not very clear why would do_altp2m_op change the domain to
>> > current domain (which is dom0 in my case) when the cmd is
>> > HVMOP_altp2m_vcpu_enable_notify
>> > <
>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/hvm/hvm.c;hb=743289d0296268fe6bad64531a24d8053afeb062#l6198
>> >.
>> > As to my case, it would prevent the dom0 to set the #ve info page for
>> other
>> > domUs because the check of is_hvm_domain would fail
>> > <
>> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/hvm/hvm.c;hb=743289d0296268fe6bad64531a24d8053afeb062#l6204
>> >and
>> > the function will returns directly.
>> >
>>
>> Maybe the intent of that HVMOP is to get called directly by the guest
>> that is interested in such event?
>>
>> I looks like a natural restriction to me because the vcpu needs to set
>> up handler for #ve AIUI. It's not likely that Dom0 can do this for
>> arbitrary guest.
>>
>> Wei.
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 3748 bytes --]

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

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

  reply	other threads:[~2016-05-16 15:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-02  8:36 xc_altp2m_set_vcpu_enable_notify fail Big Strong
2016-05-02 10:47 ` Wei Liu
2016-05-02 11:42   ` Big Strong
2016-05-04 10:43     ` Wei Liu
2016-05-04 10:48       ` Wei Liu
2016-05-04 12:59         ` Big Strong
2016-05-06 11:10           ` Wei Liu
2016-05-07  7:34             ` Big Strong
     [not found]               ` <CABfawhkfYqX6t2QFDfE=SF+xjBzqGtn7kvA0hfkDv841CarYBQ@mail.gmail.com>
2016-05-07 14:47                 ` Tamas K Lengyel
2016-05-09  7:37                   ` Big Strong
2016-05-09  8:59                     ` Wei Liu
2016-05-09 15:30                       ` Big Strong
2016-05-10 10:07                         ` Wei Liu
2016-05-10 16:29                           ` Big Strong
2016-05-11  3:37                             ` Big Strong
2016-05-11  7:56                               ` Big Strong
2016-05-11 15:37                                 ` Big Strong
2016-05-11 16:26                                   ` Sahita, Ravi
2016-05-12 13:00                                     ` Big Strong
2016-05-12 15:17                                       ` Wei Liu
2016-05-12 15:53                                         ` Tamas K Lengyel
2016-05-12 15:59                                           ` Sahita, Ravi
2016-05-16  9:06                                         ` Big Strong
2016-05-16 15:05                                           ` Big Strong [this message]
2016-05-17 12:05                                             ` Big Strong
2016-05-18  2:43                                               ` Big Strong
2016-05-18  4:56                                                 ` Tamas K Lengyel
2016-05-18  9:48                                               ` Wei Liu
2016-05-18 13:14                                                 ` Tamas K Lengyel
2016-05-18 13:22                                                   ` Wei Liu

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=CAFnE1f2YkezLx3E4aXQdADL760uaL8zcwOXiYykvhhbLbxLGJQ@mail.gmail.com \
    --to=fangtuo90@gmail.com \
    --cc=edmund.h.white@intel.com \
    --cc=jbeulich@suse.com \
    --cc=ravi.sahita@intel.com \
    --cc=tamas.k.lengyel@gmail.com \
    --cc=wei.liu2@citrix.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.