xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Isaku Yamahata <yamahata@valinux.co.jp>
To: anthony.perard@citrix.com
Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] [PATCH RFC V3 04/12] xen: Add the Xen platform pci device
Date: Fri, 24 Sep 2010 14:10:28 +0900	[thread overview]
Message-ID: <20100924051028.GD4701@valinux.co.jp> (raw)
In-Reply-To: <1284722107-28550-5-git-send-email-anthony.perard@citrix.com>

On Fri, Sep 17, 2010 at 12:14:59PM +0100, anthony.perard@citrix.com wrote:
> +static int xen_platform_initfn(PCIDevice *dev)
> +{
> +    PCIXenPlatformState *d = DO_UPCAST(PCIXenPlatformState, pci_dev, dev);
> +    uint8_t *pci_conf;
> +
> +    pci_conf = d->pci_dev.config;
> +
> +    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_XENSOURCE);
> +    pci_config_set_device_id(pci_conf, 0x0001);
> +    pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
> +
> +    pci_config_set_revision(pci_conf, 1);
> +    pci_config_set_prog_interface(pci_conf, 0);
> +
> +    pci_config_set_class(pci_conf, PCI_CLASS_OTHERS << 8 | 0x80);
> +
> +    pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL;

Eliminate this line. Don't overwrite multifunction bit.
Please refer to 
498238687fd3a2bf3efb32694732f88ceac72e99
6eab3de16d36c48a983366b09d0a0029a5260bc3



> +    pci_conf[PCI_INTERRUPT_PIN] = 1;
> +
> +    /* Microsoft WHQL requires non-zero subsystem IDs. */
> +    /* http://www.pcisig.com/reflector/msg02205.html.  */
> +    pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, pci_conf[PCI_VENDOR_ID]);
> +    pci_set_word(pci_conf + PCI_SUBSYSTEM_ID, 0x0001);
> +
> +    pci_register_bar(&d->pci_dev, 0, 0x100,
> +            PCI_BASE_ADDRESS_SPACE_IO, platform_ioport_map);
> +
> +    /* reserve 16MB mmio address for share memory*/
> +    pci_register_bar(&d->pci_dev, 1, 0x1000000,
> +            PCI_BASE_ADDRESS_MEM_PREFETCH, platform_mmio_map);
> +
> +    platform_fixed_ioport_init(d);
> +
> +    return 0;
> +}

-- 
yamahata

  parent reply	other threads:[~2010-09-24  5:10 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-17 11:14 [PATCH RFC V3 00/12] xen device model support anthony.perard
2010-09-17 11:14 ` [PATCH RFC V3 01/12] xen: Support new libxc calls from xen unstable anthony.perard
2010-09-17 11:14 ` [PATCH RFC V3 02/12] xen: Add xen_machine_fv anthony.perard
2010-09-17 11:14 ` [PATCH RFC V3 03/12] xen: Introduce --enable-xen command options anthony.perard
2010-09-17 11:41   ` [Qemu-devel] " Alexander Graf
2010-09-21 11:18     ` Anthony PERARD
2010-09-17 11:14 ` [PATCH RFC V3 04/12] xen: Add the Xen platform pci device anthony.perard
2010-09-17 18:06   ` [Qemu-devel] " Blue Swirl
2010-09-20 16:10     ` Anthony PERARD
2010-09-24  5:10   ` Isaku Yamahata [this message]
2010-09-24  5:52   ` Isaku Yamahata
2010-09-17 11:15 ` [PATCH RFC V3 05/12] piix_pci: Introduces Xen specific call for irq anthony.perard
2010-09-17 18:10   ` [Qemu-devel] " Blue Swirl
2010-09-20 16:43     ` Anthony PERARD
2010-09-24  5:17   ` Isaku Yamahata
2010-09-24 13:42     ` Anthony PERARD
2010-09-17 11:15 ` [PATCH RFC V3 06/12] xen: add a 8259 Interrupt Controller anthony.perard
2010-09-17 11:15 ` [PATCH RFC V3 07/12] xen: Introduce the Xen mapcache anthony.perard
2010-09-17 19:07   ` [Qemu-devel] " Blue Swirl
2010-09-21 10:42     ` Anthony PERARD
2010-09-17 11:15 ` [PATCH RFC V3 08/12] Intruduce qemu_ram_ptr_unlock anthony.perard
2010-09-17 19:42   ` [Qemu-devel] " Blue Swirl
2010-09-21 11:41     ` Anthony PERARD
2010-09-17 11:15 ` [PATCH RFC V3 09/12] vl.c: Introduce getter for shutdown_requested and reset_requested anthony.perard
2010-09-17 11:15 ` [PATCH RFC V3 10/12] xen: Initialize event channels and io rings anthony.perard
2010-09-17 19:27   ` [Qemu-devel] " Blue Swirl
2010-09-22 10:28     ` Stefano Stabellini
2010-09-17 11:15 ` [PATCH RFC V3 11/12] xen: Set running state in xenstore anthony.perard
2010-09-17 11:15 ` [PATCH RFC V3 12/12] xen: Add a Xen specific ACPI Implementation to target-xen anthony.perard
2010-09-17 20:03   ` [Qemu-devel] " Blue Swirl
2010-09-21 12:19     ` Anthony PERARD

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=20100924051028.GD4701@valinux.co.jp \
    --to=yamahata@valinux.co.jp \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).