All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: aik@ozlabs.ru, aliguori@us.ibm.com, qemu-devel@nongnu.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH 2/3] vfio: vfio-pci device assignment driver
Date: Wed, 15 Aug 2012 11:56:20 +0300	[thread overview]
Message-ID: <502B6434.1080604@redhat.com> (raw)
In-Reply-To: <1344964988.4683.276.camel@ul30vt.home>

On 08/14/2012 08:23 PM, Alex Williamson wrote:
> 
>> Unrelated nit: memcmp() doesn't return a boolean or a count, so
>> !memcmp() is really unintuitive, at least to me.
> 
> I figure we're all pretty used to it growing up on !strcmp though.

I hate that one too.

>> > +
>> > +/* XXX This should move to msi.c */
>> 
>> Well?
> 
> Just marking a todo item.  I'll change it formally to TODO.  I think
> there are a few interfaces to msi.c that probably needs some rethinking
> for device assignment.  When they're small like this it seems easier to
> have the user in tree first.

I prefer them in the right place but I don't insist.

>> > +
>> > +    if (unlikely((section->offset_within_address_space & ~TARGET_PAGE_MASK) !=
>> > +                 (section->offset_within_region & ~TARGET_PAGE_MASK))) {
>> > +        error_report("%s received unaligned region\n", __func__);
>> 
>> Is it really an error?  I think you can just add the condition to
>> skipped_section.
> 
> I had left this in as paranoia for myself that I wanted to see if this
> actually happens.  I want to assume that our TARGET_PAGE_ALIGNED
> offset_within_address_space results in an aligned ram pointer.  If one
> is aligned different from the other we're kinda screwed trying to map it
> into the iommu.  So far I haven't seen it.  Thanks for the feedback,

We could have a sub-page RAM region (perhaps inserted as a mapped BAR
from some emulated device, or from vfio if/when it grows that capability).

But you're right, it really is an error, we can't just ignore it.  So
the current code is right.

-- 
error compiling committee.c: too many arguments to function

WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: aik@ozlabs.ru, aliguori@us.ibm.com, qemu-devel@nongnu.org,
	kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 2/3] vfio: vfio-pci device assignment driver
Date: Wed, 15 Aug 2012 11:56:20 +0300	[thread overview]
Message-ID: <502B6434.1080604@redhat.com> (raw)
In-Reply-To: <1344964988.4683.276.camel@ul30vt.home>

On 08/14/2012 08:23 PM, Alex Williamson wrote:
> 
>> Unrelated nit: memcmp() doesn't return a boolean or a count, so
>> !memcmp() is really unintuitive, at least to me.
> 
> I figure we're all pretty used to it growing up on !strcmp though.

I hate that one too.

>> > +
>> > +/* XXX This should move to msi.c */
>> 
>> Well?
> 
> Just marking a todo item.  I'll change it formally to TODO.  I think
> there are a few interfaces to msi.c that probably needs some rethinking
> for device assignment.  When they're small like this it seems easier to
> have the user in tree first.

I prefer them in the right place but I don't insist.

>> > +
>> > +    if (unlikely((section->offset_within_address_space & ~TARGET_PAGE_MASK) !=
>> > +                 (section->offset_within_region & ~TARGET_PAGE_MASK))) {
>> > +        error_report("%s received unaligned region\n", __func__);
>> 
>> Is it really an error?  I think you can just add the condition to
>> skipped_section.
> 
> I had left this in as paranoia for myself that I wanted to see if this
> actually happens.  I want to assume that our TARGET_PAGE_ALIGNED
> offset_within_address_space results in an aligned ram pointer.  If one
> is aligned different from the other we're kinda screwed trying to map it
> into the iommu.  So far I haven't seen it.  Thanks for the feedback,

We could have a sub-page RAM region (perhaps inserted as a mapped BAR
from some emulated device, or from vfio if/when it grows that capability).

But you're right, it really is an error, we can't just ignore it.  So
the current code is right.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2012-08-15  8:56 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01  5:18 [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2 Alex Williamson
2012-08-01  5:18 ` [Qemu-devel] " Alex Williamson
2012-08-01  5:18 ` [PATCH 1/3] vfio: Import vfio kernel header Alex Williamson
2012-08-01  5:18   ` [Qemu-devel] " Alex Williamson
2012-08-01  7:13   ` Jan Kiszka
2012-08-01  7:13     ` [Qemu-devel] " Jan Kiszka
2012-08-01 18:09     ` Alex Williamson
2012-08-01 18:09       ` [Qemu-devel] " Alex Williamson
2012-08-02  9:02       ` Jan Kiszka
2012-08-02  9:02         ` [Qemu-devel] " Jan Kiszka
2012-08-02 16:37         ` Alex Williamson
2012-08-02 16:37           ` [Qemu-devel] " Alex Williamson
2012-08-02 16:45           ` Jan Kiszka
2012-08-02 16:45             ` [Qemu-devel] " Jan Kiszka
2012-08-01  5:18 ` [PATCH 2/3] vfio: vfio-pci device assignment driver Alex Williamson
2012-08-01  5:18   ` [Qemu-devel] " Alex Williamson
2012-08-13 22:18   ` Anthony Liguori
2012-08-13 22:18     ` [Qemu-devel] " Anthony Liguori
2012-08-14  5:25     ` Alex Williamson
2012-08-14  5:25       ` [Qemu-devel] " Alex Williamson
2012-08-14  7:12   ` Stefan Hajnoczi
2012-08-14  7:12     ` [Qemu-devel] " Stefan Hajnoczi
2012-08-14 13:51     ` Alex Williamson
2012-08-14 13:51       ` [Qemu-devel] " Alex Williamson
2012-08-14 15:53   ` Avi Kivity
2012-08-14 15:53     ` [Qemu-devel] " Avi Kivity
2012-08-14 17:23     ` Alex Williamson
2012-08-14 17:23       ` [Qemu-devel] " Alex Williamson
2012-08-15  8:56       ` Avi Kivity [this message]
2012-08-15  8:56         ` Avi Kivity
2012-08-01  5:18 ` [PATCH 3/3] vfio: Enable vfio-pci and mark supported Alex Williamson
2012-08-01  5:18   ` [Qemu-devel] " Alex Williamson
2012-08-01  7:15   ` Jan Kiszka
2012-08-01  7:15     ` [Qemu-devel] " Jan Kiszka
2012-08-01 18:14     ` Alex Williamson
2012-08-01 18:14       ` [Qemu-devel] " Alex Williamson
2012-08-01 19:40       ` Alex Williamson
2012-08-01 19:40         ` [Qemu-devel] " Alex Williamson
2012-08-02  9:03         ` Jan Kiszka
2012-08-02  9:03           ` [Qemu-devel] " Jan Kiszka
2012-08-13 22:19     ` Anthony Liguori
2012-08-13 22:19       ` [Qemu-devel] " Anthony Liguori
2012-08-14  5:27       ` Alex Williamson
2012-08-14  5:27         ` [Qemu-devel] " Alex Williamson
2012-08-14 14:35         ` Avi Kivity
2012-08-14 14:35           ` [Qemu-devel] " Avi Kivity
2012-08-13 13:27 ` [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2 Anthony Liguori
2012-08-13 13:27   ` [Qemu-devel] " Anthony Liguori
2012-08-13 13:58   ` Avi Kivity
2012-08-13 13:58     ` [Qemu-devel] " Avi Kivity
2012-08-13 14:04     ` Jan Kiszka
2012-08-13 14:04       ` [Qemu-devel] " Jan Kiszka
2012-08-13 19:31       ` Anthony Liguori
2012-08-13 19:31         ` [Qemu-devel] " Anthony Liguori
2012-08-14  7:19         ` Jan Kiszka
2012-08-14  7:19           ` [Qemu-devel] " Jan Kiszka
2012-08-14 14:42         ` Avi Kivity
2012-08-14 14:42           ` [Qemu-devel] " Avi Kivity
2012-08-14 14:53         ` Cole Robinson
2012-08-14 14:53           ` [Qemu-devel] " Cole Robinson
2012-08-14 15:04           ` Jan Kiszka
2012-08-14 15:04             ` [Qemu-devel] " Jan Kiszka
2012-08-14 15:28             ` Cole Robinson
2012-08-14 15:28               ` [Qemu-devel] " Cole Robinson
2012-08-13 14:23   ` Alex Williamson
2012-08-13 14:23     ` [Qemu-devel] " Alex Williamson
2012-08-13 15:48     ` Andreas Hartmann
2012-08-13 15:48       ` [Qemu-devel] " Andreas Hartmann
2012-08-13 16:14       ` Alex Williamson
2012-08-13 16:14         ` [Qemu-devel] " Alex Williamson
2012-08-13 16:36         ` Andreas Hartmann
2012-08-13 16:36           ` [Qemu-devel] " Andreas Hartmann
2012-08-13 16:57           ` Alex Williamson
2012-08-13 16:57             ` [Qemu-devel] " Alex Williamson
2012-08-13 18:32             ` Andreas Hartmann
2012-08-13 18:32               ` [Qemu-devel] " Andreas Hartmann
2012-08-13 19:33     ` Anthony Liguori
2012-08-13 19:33       ` [Qemu-devel] " Anthony Liguori
2012-08-13 20:48       ` Blue Swirl
2012-08-13 20:48         ` [Qemu-devel] " Blue Swirl
2012-08-13 20:56         ` Alex Williamson
2012-08-13 20:56           ` [Qemu-devel] " Alex Williamson
2012-08-13 20:55       ` VFIO: Call for reviewers (was Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2) Alex Williamson
2012-08-13 20:55         ` [Qemu-devel] " Alex Williamson

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=502B6434.1080604@redhat.com \
    --to=avi@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.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.