From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Tiejun Chen <tiejun.chen@intel.com>
Cc: peter.maydell@linaro.org, xen-devel@lists.xensource.com,
mst@redhat.com, stefano.stabellini@eu.citrix.com,
allen.m.kay@intel.com, Kelly.Zytaruk@amd.com,
qemu-devel@nongnu.org, yang.z.zhang@intel.com,
anthony@codemonkey.ws, anthony.perard@citrix.com
Subject: Re: [Xen-devel] [v4][PATCH 2/5] xen, gfx passthrough: create intel isa bridge
Date: Fri, 30 May 2014 12:13:34 -0400 [thread overview]
Message-ID: <20140530161334.GF3621@localhost.localdomain> (raw)
In-Reply-To: <1401440369-29929-3-git-send-email-tiejun.chen@intel.com>
On Fri, May 30, 2014 at 04:59:26PM +0800, Tiejun Chen wrote:
> ISA bridge is needed since Intel gfx drive will probe it instead
> of Dev31:Fun0 to make graphics device passthrough work easy for VMM, that
> only need to expose ISA bridge to let driver know the real hardware underneath.
>
> The original patch is from Allen Kay [allen.m.kay@intel.com]
>
> Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
> Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
> Cc: Allen Kay <allen.m.kay@intel.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> v4:
>
> * Remove some unnecessary "return" in void foo().
>
> v3:
>
> * Fix some typos.
> * Improve some return paths.
>
> v2:
>
> * Nothing is changed.
>
> hw/xen/xen_pt_graphics.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 59 insertions(+)
>
> diff --git a/hw/xen/xen_pt_graphics.c b/hw/xen/xen_pt_graphics.c
> index 461e526..236b13a 100644
> --- a/hw/xen/xen_pt_graphics.c
> +++ b/hw/xen/xen_pt_graphics.c
> @@ -230,3 +230,62 @@ out:
> g_free(bios);
> return rc;
> }
> +
> +static uint32_t isa_bridge_read_config(PCIDevice *d, uint32_t addr, int len)
> +{
> + return pci_default_read_config(d, addr, len);
> +}
> +
> +static void isa_bridge_write_config(PCIDevice *d, uint32_t addr, uint32_t v,
> + int len)
> +{
> + pci_default_write_config(d, addr, v, len);
> +}
> +
> +static void isa_bridge_class_init(ObjectClass *klass, void *data)
> +{
> + PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
> +
> + k->config_read = isa_bridge_read_config;
> + k->config_write = isa_bridge_write_config;
> +};
> +
> +typedef struct {
> + PCIDevice dev;
> +} ISABridgeState;
> +
> +static TypeInfo isa_bridge_info = {
> + .name = "intel-pch-isa-bridge",
> + .parent = TYPE_PCI_DEVICE,
> + .instance_size = sizeof(ISABridgeState),
> + .class_init = isa_bridge_class_init,
> +};
> +
> +static void xen_pt_graphics_register_types(void)
> +{
> + type_register_static(&isa_bridge_info);
> +}
> +
> +type_init(xen_pt_graphics_register_types)
> +
> +static int create_pch_isa_bridge(PCIBus *bus, XenHostPCIDevice *hdev)
> +{
> + struct PCIDevice *dev;
> +
> + char rid;
> +
> + dev = pci_create(bus, PCI_DEVFN(0x1f, 0), "intel-pch-isa-bridge");
> +
> + qdev_init_nofail(&dev->qdev);
> +
> + pci_config_set_vendor_id(dev->config, hdev->vendor_id);
> + pci_config_set_device_id(dev->config, hdev->device_id);
> +
> + xen_host_pci_get_block(hdev, PCI_REVISION_ID, (uint8_t *)&rid, 1);
> +
> + pci_config_set_revision(dev->config, rid);
> + pci_config_set_class(dev->config, PCI_CLASS_BRIDGE_ISA);
> +
> + XEN_PT_LOG(dev, "Intel PCH ISA bridge created.\n");
> + return 0;
> +}
> --
> 1.9.1
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-05-30 16:13 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 8:59 [v4][PATCH 0/5] xen: add Intel IGD passthrough support Tiejun Chen
2014-05-30 8:59 ` [v4][PATCH 1/5] xen, gfx passthrough: basic graphics " Tiejun Chen
2014-05-30 16:13 ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-06-02 14:51 ` [Qemu-devel] " Stefano Stabellini
2014-06-02 14:51 ` Stefano Stabellini
2014-05-30 8:59 ` [v4][PATCH 2/5] xen, gfx passthrough: create intel isa bridge Tiejun Chen
2014-05-30 16:13 ` Konrad Rzeszutek Wilk [this message]
2014-06-02 14:52 ` [Qemu-devel] " Stefano Stabellini
2014-06-02 14:52 ` Stefano Stabellini
2014-06-03 8:46 ` [Qemu-devel] " Paolo Bonzini
2014-06-03 8:46 ` Paolo Bonzini
2014-06-03 11:29 ` [Qemu-devel] " Stefano Stabellini
2014-06-03 11:29 ` Stefano Stabellini
2014-06-03 11:39 ` [Qemu-devel] " Paolo Bonzini
2014-06-03 11:39 ` Paolo Bonzini
2014-06-03 11:43 ` [Qemu-devel] " Stefano Stabellini
2014-06-03 11:43 ` Stefano Stabellini
2014-06-03 23:24 ` [Qemu-devel] " Tian, Kevin
2014-06-03 23:24 ` Tian, Kevin
2014-06-03 11:42 ` George Dunlap
2014-06-03 11:42 ` George Dunlap
2014-06-03 12:21 ` [Qemu-devel] [Xen-devel] " Sander Eikelenboom
2014-06-03 12:21 ` Sander Eikelenboom
2014-06-03 12:24 ` [Qemu-devel] " Paolo Bonzini
2014-06-03 12:24 ` Paolo Bonzini
2014-06-03 12:38 ` [Qemu-devel] " Sander Eikelenboom
2014-06-03 12:38 ` Sander Eikelenboom
2014-06-06 3:06 ` [Qemu-devel] " Zhang, Yang Z
2014-06-06 3:06 ` Zhang, Yang Z
2014-06-06 6:44 ` [Qemu-devel] " Paolo Bonzini
2014-06-06 6:44 ` Paolo Bonzini
2014-05-30 8:59 ` [v4][PATCH 3/5] xen, gfx passthrough: support Intel IGD passthrough with VT-D Tiejun Chen
2014-05-30 16:14 ` Konrad Rzeszutek Wilk
2014-06-02 14:53 ` [Qemu-devel] " Stefano Stabellini
2014-06-02 14:53 ` Stefano Stabellini
2014-05-30 8:59 ` [v4][PATCH 4/5] xen, gfx passthrough: create host bridge to passthrough Tiejun Chen
2014-05-30 16:14 ` Konrad Rzeszutek Wilk
2014-06-02 14:54 ` [Qemu-devel] " Stefano Stabellini
2014-06-02 14:54 ` Stefano Stabellini
2014-06-02 20:36 ` [Qemu-devel] " Michael S. Tsirkin
2014-06-02 20:36 ` Michael S. Tsirkin
2014-06-03 1:10 ` [Qemu-devel] " Chen, Tiejun
2014-06-03 1:10 ` Chen, Tiejun
2014-05-30 8:59 ` [v4][PATCH 5/5] xen, gfx passthrough: add opregion mapping Tiejun Chen
2014-05-30 16:15 ` Konrad Rzeszutek Wilk
2014-06-02 14:56 ` [Qemu-devel] " Stefano Stabellini
2014-06-02 14:56 ` Stefano Stabellini
2014-06-02 14:59 ` [Qemu-devel] [v4][PATCH 0/5] xen: add Intel IGD passthrough support Stefano Stabellini
2014-06-02 14:59 ` Stefano Stabellini
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=20140530161334.GF3621@localhost.localdomain \
--to=konrad.wilk@oracle.com \
--cc=Kelly.Zytaruk@amd.com \
--cc=allen.m.kay@intel.com \
--cc=anthony.perard@citrix.com \
--cc=anthony@codemonkey.ws \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tiejun.chen@intel.com \
--cc=xen-devel@lists.xensource.com \
--cc=yang.z.zhang@intel.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.