From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Tiejun Chen <tiejun.chen@intel.com>
Cc: xen-devel@lists.xensource.com, allen.m.kay@intel.com,
qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough
Date: Thu, 21 Aug 2014 12:16:49 -0400 [thread overview]
Message-ID: <20140821161649.GA18265@laptop.dumpdata.com> (raw)
In-Reply-To: <1408584508-5946-3-git-send-email-tiejun.chen@intel.com>
On Thu, Aug 21, 2014 at 09:28:28AM +0800, Tiejun Chen wrote:
> Currenjly this ISA bridge should be fixed at 1f.0, and pass the
Currently
> real vendor/device ids as the driver expect.
Could you add a bit more description to this patch please? Explain
the rationale, etc.
>
> Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
> ---
> hw/i386/pc_piix.c | 24 +++++++++++++++++++++++-
> 1 file changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 7710724..b131fa3 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -50,7 +50,8 @@
> #include "cpu.h"
> #include "qemu/error-report.h"
> #ifdef CONFIG_XEN
> -# include <xen/hvm/hvm_info_table.h>
> +#include <xen/hvm/hvm_info_table.h>
> +#include <hw/xen/xen-host-pci-device.h>
> #endif
>
> #define MAX_IDE_BUS 2
> @@ -463,6 +464,26 @@ static void pc_xen_hvm_init(MachineState *machine)
> }
> }
>
> +static void xen_igd_passthrough_isa_bridge_create(PCIBus *bus)
> +{
> + struct PCIDevice *dev;
> + XenHostPCIDevice hdev;
> + int r = 0;
> +
> + /* This shoudl be fixed at 1f.0 then pass vendor/device ids.
should
However I would remove the comment as it does not add anything extra
to the function. It is pretty clear what it is doing.
What would help is if you said:
Must be fixed at 1f.0 because .. bla blah
> + */
> + dev = pci_create_simple(bus, PCI_DEVFN(0x1f, 0),
> + "xen-igd-passthrough-isa-bridge");
> + if (dev) {
> + r = xen_host_pci_device_get(&hdev, 0, 0, PCI_DEVFN(0x1f, 0), 0);
> + if (!r) {
> + pci_config_set_vendor_id(dev->config, hdev.vendor_id);
> + pci_config_set_device_id(dev->config, hdev.device_id);
> + } else
> + fprintf(stderr, "xen set xen-igd-passthrough-isa-bridge failed\n");
> + }
> +}
> +
> static void xen_igd_passthrough_pc_hvm_init(MachineState *machine)
> {
> PCIBus *bus;
> @@ -472,6 +493,7 @@ static void xen_igd_passthrough_pc_hvm_init(MachineState *machine)
> bus = pci_find_primary_bus();
> if (bus != NULL) {
> pci_create_simple(bus, -1, "xen-platform");
> + xen_igd_passthrough_isa_bridge_create(bus);
> }
> }
> #endif
> --
> 1.9.1
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
WARNING: multiple messages have this Message-ID (diff)
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Tiejun Chen <tiejun.chen@intel.com>
Cc: xen-devel@lists.xensource.com, allen.m.kay@intel.com,
qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough
Date: Thu, 21 Aug 2014 12:16:49 -0400 [thread overview]
Message-ID: <20140821161649.GA18265@laptop.dumpdata.com> (raw)
In-Reply-To: <1408584508-5946-3-git-send-email-tiejun.chen@intel.com>
On Thu, Aug 21, 2014 at 09:28:28AM +0800, Tiejun Chen wrote:
> Currenjly this ISA bridge should be fixed at 1f.0, and pass the
Currently
> real vendor/device ids as the driver expect.
Could you add a bit more description to this patch please? Explain
the rationale, etc.
>
> Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
> ---
> hw/i386/pc_piix.c | 24 +++++++++++++++++++++++-
> 1 file changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 7710724..b131fa3 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -50,7 +50,8 @@
> #include "cpu.h"
> #include "qemu/error-report.h"
> #ifdef CONFIG_XEN
> -# include <xen/hvm/hvm_info_table.h>
> +#include <xen/hvm/hvm_info_table.h>
> +#include <hw/xen/xen-host-pci-device.h>
> #endif
>
> #define MAX_IDE_BUS 2
> @@ -463,6 +464,26 @@ static void pc_xen_hvm_init(MachineState *machine)
> }
> }
>
> +static void xen_igd_passthrough_isa_bridge_create(PCIBus *bus)
> +{
> + struct PCIDevice *dev;
> + XenHostPCIDevice hdev;
> + int r = 0;
> +
> + /* This shoudl be fixed at 1f.0 then pass vendor/device ids.
should
However I would remove the comment as it does not add anything extra
to the function. It is pretty clear what it is doing.
What would help is if you said:
Must be fixed at 1f.0 because .. bla blah
> + */
> + dev = pci_create_simple(bus, PCI_DEVFN(0x1f, 0),
> + "xen-igd-passthrough-isa-bridge");
> + if (dev) {
> + r = xen_host_pci_device_get(&hdev, 0, 0, PCI_DEVFN(0x1f, 0), 0);
> + if (!r) {
> + pci_config_set_vendor_id(dev->config, hdev.vendor_id);
> + pci_config_set_device_id(dev->config, hdev.device_id);
> + } else
> + fprintf(stderr, "xen set xen-igd-passthrough-isa-bridge failed\n");
> + }
> +}
> +
> static void xen_igd_passthrough_pc_hvm_init(MachineState *machine)
> {
> PCIBus *bus;
> @@ -472,6 +493,7 @@ static void xen_igd_passthrough_pc_hvm_init(MachineState *machine)
> bus = pci_find_primary_bus();
> if (bus != NULL) {
> pci_create_simple(bus, -1, "xen-platform");
> + xen_igd_passthrough_isa_bridge_create(bus);
> }
> }
> #endif
> --
> 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-08-21 16:17 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 1:28 [Qemu-devel] [PATCH 0/2] qemu:xen: implement isa bridge specific to IGD passthrough Tiejun Chen
2014-08-21 1:28 ` Tiejun Chen
2014-08-21 1:28 ` [Qemu-devel] [PATCH 1/2] hw:xen:xen_pt: register " Tiejun Chen
2014-08-21 1:28 ` Tiejun Chen
2014-08-21 1:28 ` [Qemu-devel] [PATCH 2/2] xen:i386:pc_piix: create " Tiejun Chen
2014-08-21 1:28 ` Tiejun Chen
2014-08-21 16:16 ` Konrad Rzeszutek Wilk [this message]
2014-08-21 16:16 ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-08-22 1:06 ` [Qemu-devel] " Chen, Tiejun
2014-08-22 1:06 ` Chen, Tiejun
2014-08-24 11:12 ` [Qemu-devel] " Michael S. Tsirkin
2014-08-24 11:12 ` Michael S. Tsirkin
2014-08-25 5:18 ` [Qemu-devel] " Chen, Tiejun
2014-08-25 5:18 ` Chen, Tiejun
2014-08-26 2:49 ` [Qemu-devel] " Chen, Tiejun
2014-08-26 2:49 ` Chen, Tiejun
2014-08-28 0:56 ` [Qemu-devel] " Chen, Tiejun
2014-08-28 0:56 ` Chen, Tiejun
2014-08-29 1:28 ` [Qemu-devel] " Chen, Tiejun
2014-08-29 1:28 ` Chen, Tiejun
2014-08-31 8:58 ` [Qemu-devel] " Michael S. Tsirkin
2014-08-31 8:58 ` Michael S. Tsirkin
2014-09-01 2:50 ` [Qemu-devel] " Chen, Tiejun
2014-09-01 2:50 ` Chen, Tiejun
2014-09-01 6:05 ` [Qemu-devel] " Michael S. Tsirkin
2014-09-01 6:05 ` Michael S. Tsirkin
2014-09-01 7:49 ` [Qemu-devel] " Chen, Tiejun
2014-09-01 7:49 ` Chen, Tiejun
2014-09-03 1:40 ` [Qemu-devel] " Kay, Allen M
2014-09-03 1:40 ` Kay, Allen M
2014-09-03 6:27 ` [Qemu-devel] " Michael S. Tsirkin
2014-09-03 6:27 ` Michael S. Tsirkin
2014-09-03 15:06 ` [Qemu-devel] " Kay, Allen M
2014-09-03 15:06 ` Kay, Allen M
2014-09-28 2:59 ` [Qemu-devel] " Chen, Tiejun
2014-09-28 2:59 ` Chen, Tiejun
2014-09-28 5:38 ` [Qemu-devel] " Chen, Tiejun
2014-09-28 5:38 ` Chen, Tiejun
2014-10-07 7:27 ` [Qemu-devel] " Michael S. Tsirkin
2014-10-07 7:27 ` Michael S. Tsirkin
2014-10-09 2:16 ` [Qemu-devel] " Chen, Tiejun
2014-10-09 2:16 ` Chen, Tiejun
2014-09-29 10:01 ` [Qemu-devel] " Michael S. Tsirkin
2014-09-29 10:01 ` Michael S. Tsirkin
2014-09-30 2:43 ` [Qemu-devel] " Chen, Tiejun
2014-09-30 2:43 ` Chen, Tiejun
2014-10-07 1:02 ` [Qemu-devel] " Chen, Tiejun
2014-10-07 1:02 ` Chen, Tiejun
2014-10-07 7:26 ` [Qemu-devel] " Michael S. Tsirkin
2014-10-07 7:26 ` Michael S. Tsirkin
2014-10-09 5:53 ` [Qemu-devel] " Chen, Tiejun
2014-10-09 5:53 ` Chen, Tiejun
2014-10-12 9:50 ` [Qemu-devel] " Michael S. Tsirkin
2014-10-12 9:50 ` Michael S. Tsirkin
2014-10-24 7:36 ` [Qemu-devel] " Chen, Tiejun
2014-10-24 7:36 ` Chen, Tiejun
2014-10-24 13:47 ` [Qemu-devel] " Michael S. Tsirkin
2014-10-24 13:47 ` Michael S. Tsirkin
2014-10-30 7:47 ` [Qemu-devel] " Chen, Tiejun
2014-10-30 7:47 ` Chen, Tiejun
2014-11-03 7:48 ` [Qemu-devel] " Chen, Tiejun
2014-11-03 7:48 ` Chen, Tiejun
2014-11-03 11:35 ` [Qemu-devel] " Paolo Bonzini
2014-11-03 11:35 ` Paolo Bonzini
2014-11-03 11:36 ` [Qemu-devel] " Chen, Tiejun
2014-11-03 11:36 ` Chen, Tiejun
2014-11-03 11:47 ` [Qemu-devel] " Chen, Tiejun
2014-11-03 11:47 ` Chen, Tiejun
2014-11-03 12:01 ` [Qemu-devel] " Paolo Bonzini
2014-11-03 12:01 ` Paolo Bonzini
2014-11-03 13:10 ` [Qemu-devel] [Xen-devel] " Michael S. Tsirkin
2014-11-03 13:10 ` Michael S. Tsirkin
2014-11-05 7:23 ` [Qemu-devel] " Chen, Tiejun
2014-11-05 7:23 ` Chen, Tiejun
2014-08-22 18:23 ` [Qemu-devel] " Michael S. Tsirkin
2014-08-22 18:23 ` Michael S. Tsirkin
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=20140821161649.GA18265@laptop.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=allen.m.kay@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=tiejun.chen@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.