From: Fabio Fantoni <fabio.fantoni@m2r.biz>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "Huangweidong (C)" <weidong.huang@huawei.com>,
"Ian.Campbell@citrix.com" <Ian.Campbell@citrix.com>,
"Hanweidong (Randy)" <hanweidong@huawei.com>,
"stefano.stabellini@eu.citrix.com"
<stefano.stabellini@eu.citrix.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"JBeulich@suse.com" <JBeulich@suse.com>,
"anthony.perard@citrix.com" <anthony.perard@citrix.com>,
"Gaowei (UVP)" <gao.gaowei@huawei.com>
Subject: Re: [Qemu-devel] [PATCH v3] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching
Date: Fri, 09 May 2014 16:14:27 +0200 [thread overview]
Message-ID: <536CE2C3.1010701@m2r.biz> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF19020815E6DCF@SZXEMA503-MBS.china.huawei.com>
[-- Attachment #1: Type: text/plain, Size: 3973 bytes --]
Il 08/05/2014 13:23, Gonglei (Arei) ha scritto:
> Hi,
>
>> -----Original Message-----
>> From: Fabio Fantoni [mailto:fabio.fantoni@m2r.biz]
>> Sent: Thursday, May 08, 2014 4:17 PM
>> To: Gonglei (Arei); qemu-devel@nongnu.org; xen-devel@lists.xen.org
>> Cc: Ian.Campbell@citrix.com; JBeulich@suse.com;
>> stefano.stabellini@eu.citrix.com; anthony.perard@citrix.com; Huangweidong
>> (C); Hanweidong (Randy); Gaowei (UVP); Michael S. Tsirkin
>> Subject: Re: [PATCH v3] Hvmloader: Modify ACPI to only supply _EJ0 methods
>> for PCIslots that support hotplug by runtime patching
>>
>> Il 08/05/2014 06:12, Gonglei (Arei) ha scritto:
>>> Hi,
>>>
>>>>>> In Xen platform, after using upstream qemu, the all of pci devices will
>> show
>>>>>> hotplug in the windows guest. In this situation, the windows guest may
>>>> occur
>>>>>> blue screen when VM' user click the icon of VGA card for trying unplug
>> VGA
>>>>>> card.
>>>>>> However, we don't hope VM's user can do such dangerous operation, and
>>>>>> showing
>>>>>> all pci devices inside the guest OS is unfriendly.
>>>>>>
>>>>>> This is done by runtime patching:
>>>>>> - Rename _EJ0 methods for PCI slots in DSDT to EJ0_:note that this
>> has
>>>> the
>>>>>> same checksum, but is ignored by OSPM.
>>>>>> - At compile time, look for these methods in ASL source,find the
>>>> matching
>>>>>> AML,
>>>>>> and store the offsets of these methods in a table named
>>>> aml_ej0_data.
>>>>>> - At run time, go over aml_ej0_data, check which slots not support
>>>> hotplug
>>>>>> and
>>>>>> patch the ACPI table, replacing _EJ0 with EJ0_.
>>>>>>
>>>>>> Signed-off-by: Gaowei <gao.gaowei@huawei.com>
>>>>>> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
>>>> Tested-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
>>>>
>>>> Thanks for this very useful patch that avoid that unaware users or as
>>>> mistake make windows domUs unusable.
>>>>
>>> Thanks.
>>>
>>>> I tried to quickly look at the patch to understand how to add some
>>>> optional components, for example on my case the pv drivers, the audio
>>>> card and the spice guest tools (see attachment) but I don't understand
>>>> how to do it.
>>>> Can someone give me some advices about it please?
>>>>
>>> Maybe you can hard code at libxl__build_device_model_args_new()
>>> in tools/libxl/libxl_dm.c
>>>
>>>
>>> Best regards,
>>> -Gonglei
>>>
>> I believe I not understand what you mean.
>> About adding these components I already do this:
>> - gplpv: http://wiki.xen.org/wiki/Xen_Windows_GplPv
>> http://www.ejbdigital.com.au/gplpv
>> - spice:
>> http://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html#spice_graphics_suppo
>> rt
>> http://www.spice-space.org/download/binaries/spice-guest-tools/
>> - audio: add soundhw="hda" in domU's xl cfg file
>>
>> This patch disables hotplug capabilities from essential pci devices.
>>
> No, if pci devices do not support hotplug, which class's no_hotplug property will be
> set to 1, then the pci device will not show in guest os, opposite will be shown, such
> as your pv drivers and Intel hda card.
>
> Please see intel_hda_class_init_common() and xen_platform_class_init() functions.
> As a comparison, you can see vga devices' class init function cirrus_vga_class_init()
> has below code:
>
> k->no_hotplug = 1;
>
> If I understand what you mean wrong, please forgive me.
I saw in qemu code that intel_hda_class_init_common() and
xen_platform_class_init() functions (and probably also virtio serial
one) not have k->no_hotplug but in windows domUs show them in hotplug
devices list, also with this your patch applied. (see part of
screenshoot in attachment)
I not understand how to remove also them from windows hotplug devices list.
Thanks for any reply and sorry for my bad english.
>
>> What I mean if there is a way to prevent some other components being
>> part of the above list of hotplug devices.
>>
>> Thanks for any reply and sorry for my bad english.
> Best regards,
> -Gonglei
[-- Attachment #2: optional-devices.jpg --]
[-- Type: image/jpeg, Size: 21093 bytes --]
next prev parent reply other threads:[~2014-05-09 14:14 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-04 9:25 [Qemu-devel] [PATCH v3] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching arei.gonglei
2014-05-04 9:36 ` Gonglei (Arei)
2014-05-04 9:36 ` [Qemu-devel] " Gonglei (Arei)
2014-05-07 9:43 ` Gonglei (Arei)
2014-05-07 15:21 ` Fabio Fantoni
2014-05-07 15:21 ` [Qemu-devel] " Fabio Fantoni
2014-05-08 4:12 ` Gonglei (Arei)
2014-05-08 4:12 ` [Qemu-devel] " Gonglei (Arei)
2014-05-08 8:17 ` Fabio Fantoni
2014-05-08 8:17 ` [Qemu-devel] " Fabio Fantoni
2014-05-08 11:23 ` Gonglei (Arei)
2014-05-09 14:14 ` Fabio Fantoni [this message]
2014-05-09 14:14 ` Fabio Fantoni
2014-05-08 11:23 ` Gonglei (Arei)
2014-05-07 9:43 ` Gonglei (Arei)
2014-05-07 18:48 ` [Qemu-devel] [Xen-devel] " Konrad Rzeszutek Wilk
2014-05-07 20:14 ` Michael S. Tsirkin
2014-05-08 7:29 ` Gonglei (Arei)
2014-05-08 7:29 ` [Qemu-devel] [Xen-devel] " Gonglei (Arei)
2014-05-08 8:32 ` Michael S. Tsirkin
2014-05-08 8:32 ` [Qemu-devel] [Xen-devel] " Michael S. Tsirkin
2014-05-08 11:28 ` Ian Campbell
2014-05-08 11:28 ` Ian Campbell
2014-05-08 8:47 ` [Qemu-devel] [Xen-devel] " Johannes Krampf
2014-05-08 8:47 ` Johannes Krampf
2014-05-08 11:26 ` [Qemu-devel] [Xen-devel] " Ian Campbell
2014-05-08 11:39 ` Michael S. Tsirkin
2014-05-08 11:39 ` [Qemu-devel] [Xen-devel] " Michael S. Tsirkin
2014-05-08 11:26 ` Ian Campbell
2014-05-08 17:45 ` [Qemu-devel] [Xen-devel] " Kevin O'Connor
2014-05-08 17:45 ` Kevin O'Connor
2014-05-07 20:14 ` Michael S. Tsirkin
2014-05-07 18:48 ` Konrad Rzeszutek Wilk
2014-05-08 11:21 ` [Qemu-devel] " Ian Campbell
2014-05-09 8:38 ` Gonglei (Arei)
2014-05-09 8:38 ` [Qemu-devel] " Gonglei (Arei)
2014-05-09 9:05 ` Ian Campbell
2014-05-09 9:05 ` [Qemu-devel] " Ian Campbell
2014-05-09 9:07 ` Gonglei (Arei)
2014-05-09 9:07 ` [Qemu-devel] " Gonglei (Arei)
2014-05-08 11:21 ` Ian Campbell
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=536CE2C3.1010701@m2r.biz \
--to=fabio.fantoni@m2r.biz \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=anthony.perard@citrix.com \
--cc=arei.gonglei@huawei.com \
--cc=gao.gaowei@huawei.com \
--cc=hanweidong@huawei.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=weidong.huang@huawei.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.