[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignmen
From: |
malc |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment |
Date: |
Tue, 28 Aug 2012 23:49:04 +0400 (MSK) |
User-agent: |
Alpine 2.00 (LNX 1167 2008-08-23) |
On Tue, 28 Aug 2012, Anthony Liguori wrote:
> Blue Swirl <address@hidden> writes:
>
> > On Tue, Aug 28, 2012 at 5:28 PM, Michael S. Tsirkin <address@hidden> wrote:
> >> On Tue, Aug 28, 2012 at 05:01:55PM +0000, Blue Swirl wrote:
> >>> On Tue, Aug 28, 2012 at 7:35 AM, Michael Tokarev <address@hidden> wrote:
> >>> > On 27.08.2012 22:56, Blue Swirl wrote:
> >>> > []
> >>> >>> +static uint32_t slow_bar_readb(void *opaque, target_phys_addr_t addr)
> >>> >>> +{
> >>> >>> + AssignedDevRegion *d = opaque;
> >>> >>> + uint8_t *in = d->u.r_virtbase + addr;
> >>> >>
> >>> >> Don't perform arithmetic with void pointers.
> >>> >
> >>> > There are a few places in common qemu code which does this for a very
> >>> > long time. So I guess it is safe now.
> >>>
> >>> It's a non-standard GCC extension.
> >>
> >> So? We use many other GCC extensions. grep for typeof.
> >
> > Dependencies should not be introduced trivially. In this case, it's
> > pretty easy to avoid void pointer arithmetic as Jan's next version
> > shows.
>
> The standard is vague with respect void arithmetic. Most compilers
> allow it. A very good analysis of the standard can be found below.
>
> http://stackoverflow.com/questions/3523145/pointer-arithmetic-for-void-pointer-in-c
>
> BTW: can we please stop arguing about C standards. If we currently are
> using something in QEMU that's supported by clang and GCC, it's fine and
> we ought to continue using it.
No we can not stop arguing. Besides you are wrong.
[..snip..]
--
mailto:address@hidden
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, (continued)
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Blue Swirl, 2012/08/27
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Jan Kiszka, 2012/08/27
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Michael Tokarev, 2012/08/28
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Blue Swirl, 2012/08/28
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Michael S. Tsirkin, 2012/08/28
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Blue Swirl, 2012/08/28
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Anthony Liguori, 2012/08/28
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment,
malc <=
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Blue Swirl, 2012/08/28
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Anthony Liguori, 2012/08/28
- Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Markus Armbruster, 2012/08/29
[Qemu-devel] [PATCH v2 4/4] kvm: i386: Add classic PCI device assignment, Jan Kiszka, 2012/08/28
[Qemu-devel] [PATCH v3 4/4] kvm: i386: Add classic PCI device assignment, Jan Kiszka, 2012/08/30
Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment, Michael S. Tsirkin, 2012/08/29