From: "Zhai, Edwin" <edwin.zhai@intel.com>
To: Simon Horman <horms@verge.net.au>
Cc: Christian Tramnitz <chris.ace@gmx.net>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"Han, Weidong" <weidong.han@intel.com>,
Keir Fraser <keir.fraser@eu.citrix.com>,
"Cui, Dexuan" <dexuan.cui@intel.com>
Subject: Re: Bug in pci-detach (Was: Re: Re: VT-d HowTo Update)
Date: Wed, 22 Apr 2009 16:28:10 +0800 [thread overview]
Message-ID: <49EED51A.30508@intel.com> (raw)
In-Reply-To: <20090422041307.GC7916@verge.net.au>
Simon,
In previous solution, the "vslots" entry in xenstore is only used for
qemu => xend communication, and not present until qemu create it.
But with support of vslot in config file, this xenstore entry are
created by xend at the beginning... Now xend will get value from itself
(AUTO_PHP_SLOT when not specified) without waiting for qemu:(
Temp solution is let xend to check if the return value is AUTO_PHP_SLOT,
but xend still can't know qemu's response. We need make sure, if can
not support specified vslots in config, qemu should notify xend. Then
xend should know if this is qemu's response or the specified vslots
requirement.
Simon Horman wrote:
> On Wed, Apr 22, 2009 at 11:37:30AM +0800, Zhai, Edwin wrote:
>
>> Simon Horman wrote:
>>
>>> Hi,
>>>
>>> I've poked a little further into this and the problem is partly
>>> a missunderstanding on my part.
>>>
>>> In the case where a function is specified in the hvm.conf in
>>> the form BUS:DEV:FUNC (e.g. 00:1d.0), then there is a check inside
>>> xm that prevents the function from subsequently being hot-unplugged.
>>> The check is that the vslot number is set to auto-select. And presumably
>>> the idea was that statically assigned devices couldn't be hot-unplugged,
>>> which to be honest was my initial assumption of how things work.
>>>
>>>
>> All assigned device should not has a "auto-select" vslot after being
>> assigned to guest, so I'm curious which lead this "auto-select".
>> Static assigned device also support hotplug, because qemu will select
>> then return the vslot to xend.
>>
>
> That is what I thought too, I'll investigate further.
>
>
>>> If, however, the function in the hvm.conf is of the form BUS:DEV:FUNC@VSLOT
>>> (e.g. 00:1d.00@1e) which I added recently, then the check is bypassed,
>>> because vslot is set to 1e not auto. This is how I was doing my tests. I
>>> assumed this was the behaviour for all cases, and documented it as such.
>>>
>>> This leaves us with 3 choices:
>>>
>>> 1. Leave the inconsistency, which seems like a bad idea.
>>> 2. Add a check to make sure both forms can't be hot-unplugged
>>> This is more work than;
>>> 3. Remove the check and allow statically assigned devies to be removed.
>>> This seems like a good option, and if there is consensus I can
>>> fix this up into a propper patch.
>>>
>>> diff -r 6ba4e34d21d3 tools/python/xen/xend/XendDomainInfo.py
>>> --- a/tools/python/xen/xend/XendDomainInfo.py Tue Apr 21 16:31:26 2009 +0100
>>> +++ b/tools/python/xen/xend/XendDomainInfo.py Wed Apr 22 12:42:58 2009 +1000
>>> @@ -1092,9 +1092,6 @@
>>> if devnum >= pci_len:
>>> raise VmError("Device @ vslot 0x%x doesn't exist." % (vslot))
>>> - if vslot == AUTO_PHP_SLOT:
>>> - raise VmError("Device @ vslot 0x%x doesn't support hotplug." % (vslot))
>>> -
>>> # Check the co-assignment.
>>> # To pci-detach a device D from domN, we should ensure: for each DD in the
>>> # list of D's co-assignment devices, DD is not assigned (to domN).
>>>
>>>
>>>
>> --
>> best rgds,
>> edwin
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>
>
>
--
best rgds,
edwin
next prev parent reply other threads:[~2009-04-22 8:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-22 1:44 Bug in pci-detach (Was: Re: Re: VT-d HowTo Update) Simon Horman
2009-04-22 2:18 ` Akio Takebe
2009-04-22 4:12 ` Simon Horman
2009-04-22 2:50 ` Simon Horman
2009-04-22 3:37 ` Zhai, Edwin
2009-04-22 4:13 ` Simon Horman
2009-04-22 8:28 ` Zhai, Edwin [this message]
2009-04-23 0:36 ` Simon Horman
2009-04-23 0:46 ` Simon Horman
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=49EED51A.30508@intel.com \
--to=edwin.zhai@intel.com \
--cc=chris.ace@gmx.net \
--cc=dexuan.cui@intel.com \
--cc=horms@verge.net.au \
--cc=keir.fraser@eu.citrix.com \
--cc=weidong.han@intel.com \
--cc=xen-devel@lists.xensource.com \
/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.