qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Jan Beulich <JBeulich@suse.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: [Qemu-devel] [Xen-devel] [XEN][RFC PATCH 03/15] hvm-pci: Handle PCI config space in Xen
Date: Mon, 26 Mar 2012 13:20:34 +0100	[thread overview]
Message-ID: <4F705F12.1050308@citrix.com> (raw)
In-Reply-To: <4F6C426B020000780007A722@nat28.tlf.novell.com>

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 ?

> 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 ?

Moreover what is the AMD extension ?

> Jan
>
>    
>> +
>> +    /* We just fill the ioreq, hvm_send_assist_req will send the request */
>> +    if (unlikely(pci == NULL))
>> +    {
>> +        *val = ~0;
>> +        rc = X86EMUL_OKAY;
>> +        goto end_handle;
>> +    }
>> +
>> +    p->type = IOREQ_TYPE_PCI_CONFIG;
>> +    p->addr = (pci_cf8&  ~3) + (p->addr&  3);
>> +
>> +    set_ioreq(v,&pci->server->ioreq, p);
>> +
>> +end_handle:
>> +    spin_unlock(&v->domain->arch.hvm_domain.pci_root.pci_lock);
>> +    return rc;
>> +}
>>      
>
>    

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

Thread overview: 39+ 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 ` [Qemu-devel] [XEN][RFC PATCH 01/15] hvm: Modify interface to support multiple ioreq server Julien Grall
2012-03-23  8:18   ` [Qemu-devel] [Xen-devel] " Jan Beulich
2012-03-26 12:32     ` Julien Grall
2012-03-26 12:53       ` Jan Beulich
2012-03-23 11:33   ` Ian Campbell
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 ` [Qemu-devel] [XEN][RFC PATCH 03/15] hvm-pci: Handle PCI config space in Xen Julien Grall
2012-03-23  8:29   ` [Qemu-devel] [Xen-devel] " Jan Beulich
2012-03-26 12:20     ` Julien Grall [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 ` [Qemu-devel] [XEN][RFC PATCH 05/15] hvm: Modify hvm_op Julien Grall
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 ` [Qemu-devel] [XEN][RFC PATCH 07/15] hvm-io: send invalidate map cache to each registered servers 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 ` [Qemu-devel] [XEN][RFC PATCH 09/15] xc: Add the hypercall for multiple servers Julien Grall
2012-03-23 11:37   ` [Qemu-devel] [Xen-devel] " 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-23 11:39   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 11/15] xc: Fix python build Julien Grall
2012-03-23 11:39   ` [Qemu-devel] [Xen-devel] " 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-23 11:47   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 13:06     ` Julien Grall
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 ` [Qemu-devel] [XEN][RFC PATCH 14/15] xl-parsing: Parse the new option device_models Julien Grall
2012-04-02 17:11   ` [Qemu-devel] [Xen-devel] " Ian Jackson
2012-04-03 10:05     ` Stefano Stabellini
2012-04-03 13:31       ` Ian Jackson
2012-04-03 13:54         ` Julien Grall
2012-04-03 14:02           ` Ian Jackson
2012-04-03 14:16             ` Stefano Stabellini
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 16:59 ` [Qemu-devel] [Xen-devel] [XEN][RFC PATCH 00/15] QEMU disaggregation Tim Deegan
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=4F705F12.1050308@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=julian.pidancet@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 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).