All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Julien Grall <julien.grall@citrix.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	xen-devel <xen-devel@lists.xen.org>,
	Julian Pidancet <julian.pidancet@citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [XEN][RFC PATCH 03/15] hvm-pci: Handle PCI config space in Xen
Date: Mon, 26 Mar 2012 13:52:42 +0100	[thread overview]
Message-ID: <4F7082BA020000780007AE70__7650.08944222263$1332766434$gmane$org@nat28.tlf.novell.com> (raw)
In-Reply-To: <4F705F12.1050308@citrix.com>

>>> On 26.03.12 at 14:20, Julien Grall <julien.grall@citrix.com> wrote:
> On 03/23/2012 08:29 AM, Jan Beulich wrote:
>> Is there a reasonably low enforced boundary on the number
>> of devices? Otherwise, a linear lookup would seem overly
>> simple to me.
>>    
> The maximum of bdf is 2^16 => 65536.
> Which kind of structure do you advice ? Array ? Hash Table ?

Radix tree, especially if you fold in the segment number.

>> Further, with how PCI_CMP_BDF() is defined, you're doing the
>> wrong thing here anyway - bit 31 is required to be set for the
>> port CFC access to be a config space one. Plus there's an AMD
>> extension to this interface, so I think other than shifting out
>> the low 8 bits and checking that the high bit is set, you shouldn't
>> do any other masking here.
>>    
> Actually in config address register the 24-30 bits are reserved.
> So, do I need to mask it ?

Not necessarily - I'd suggest considering the part of the address
(which should generally result in a mismatch on any comparison. This
so that this ...

> Moreover what is the AMD extension ?

... can work without additional code. For an implementation, please
have a look at current Linux'es arch/x86/pci/direct.c - bits 24...27
are used for extended config space register accesses (which will be
needed for advanced PCIe or PCI-X functionality, and which may
be particularly important as long as we don't emulate MMCFG - at
least I don't think we do).

Jan

  reply	other threads:[~2012-03-26 12:52 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 15:59 [Qemu-devel] [XEN][RFC PATCH 00/15] QEMU disaggregation Julien Grall
2012-03-22 15:59 ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 01/15] hvm: Modify interface to support multiple ioreq server Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23  8:18   ` [Qemu-devel] [Xen-devel] " Jan Beulich
2012-03-23  8:18     ` Jan Beulich
2012-03-26 12:32     ` [Qemu-devel] [Xen-devel] " Julien Grall
2012-03-26 12:53       ` Jan Beulich
2012-03-26 12:53       ` [Qemu-devel] [Xen-devel] " Jan Beulich
2012-03-26 12:32     ` Julien Grall
2012-03-23 11:33   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 11:33     ` Ian Campbell
2012-04-12 19:33     ` [Xen-devel] " Julien Grall
2012-04-02 17:12   ` [Qemu-devel] " Ian Jackson
2012-04-02 17:12     ` Ian Jackson
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 02/15] hvm: Add functions to handle ioreq servers Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 03/15] hvm-pci: Handle PCI config space in Xen Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23  8:29   ` [Qemu-devel] [Xen-devel] " Jan Beulich
2012-03-23  8:29     ` Jan Beulich
2012-03-26 12:20     ` Julien Grall
2012-03-26 12:20     ` [Qemu-devel] [Xen-devel] " Julien Grall
2012-03-26 12:52       ` Jan Beulich [this message]
2012-03-26 12:52       ` Jan Beulich
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 04/15] hvm: Change initialization/destruction of an hvm Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 05/15] hvm: Modify hvm_op Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-04-26 17:50   ` Christian Limpach
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 06/15] hvm-io: IO refactoring with ioreq server Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 07/15] hvm-io: send invalidate map cache to each registered servers Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 08/15] hvm-io: Handle server in buffered IO Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 09/15] xc: Add the hypercall for multiple servers Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23 11:37   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 11:37     ` Ian Campbell
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 10/15] xc: Add argument to allocate more special pages Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23 11:39   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 11:39     ` Ian Campbell
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 11/15] xc: Fix python build Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23 11:39   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 11:39     ` Ian Campbell
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 12/15] xl: Add interface to handle multiple device models Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23 11:47   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 11:47     ` Ian Campbell
2012-03-23 13:06     ` [Qemu-devel] [Xen-devel] " Julien Grall
2012-03-23 13:06       ` Julien Grall
2012-03-23 13:55       ` [Qemu-devel] " Ian Campbell
2012-03-23 13:55         ` Ian Campbell
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 13/15] xl-qmp: add device model id to qmp function Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 14/15] xl-parsing: Parse the new option device_models Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-04-02 17:11   ` [Qemu-devel] [Xen-devel] " Ian Jackson
2012-04-02 17:11     ` Ian Jackson
2012-04-03 10:05     ` [Qemu-devel] " Stefano Stabellini
2012-04-03 10:05       ` Stefano Stabellini
2012-04-03 13:31       ` [Qemu-devel] " Ian Jackson
2012-04-03 13:31         ` Ian Jackson
2012-04-03 13:54         ` [Qemu-devel] " Julien Grall
2012-04-03 13:54           ` Julien Grall
2012-04-03 14:02           ` [Qemu-devel] [Xen-devel] " Ian Jackson
2012-04-03 14:02             ` Ian Jackson
2012-04-03 14:16             ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2012-04-03 14:16               ` Stefano Stabellini
2012-04-03 14:23               ` [Qemu-devel] " Ian Jackson
2012-04-03 14:23                 ` Ian Jackson
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 15/15] xl: Launch and destroy all device models Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 16:59 ` [Qemu-devel] [Xen-devel] [XEN][RFC PATCH 00/15] QEMU disaggregation Tim Deegan
2012-03-22 16:59   ` Tim Deegan
2012-03-23 13:44   ` [Qemu-devel] [Xen-devel] " Julien Grall
2012-03-23 13:44     ` Julien Grall

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='4F7082BA020000780007AE70__7650.08944222263$1332766434$gmane$org@nat28.tlf.novell.com' \
    --to=jbeulich@suse.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=julian.pidancet@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --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.