[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL v4 09/29] pci/shpc: Move function to generic head
From: |
Yuval Shaia |
Subject: |
Re: [Qemu-devel] [PULL v4 09/29] pci/shpc: Move function to generic header file |
Date: |
Mon, 22 Jan 2018 09:30:03 +0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Thu, Jan 18, 2018 at 03:51:17PM -0600, Eric Blake wrote:
> On 01/18/2018 02:44 PM, Michael S. Tsirkin wrote:
> > From: Yuval Shaia <address@hidden>
> >
> > This function should be declared in generic header file so we can
> > utilize it.
> >
> > Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> > Signed-off-by: Yuval Shaia <address@hidden>
> > Signed-off-by: Marcel Apfelbaum <address@hidden>
> > Reviewed-by: Michael S. Tsirkin <address@hidden>
> > Signed-off-by: Michael S. Tsirkin <address@hidden>
> > ---
> > include/qemu/host-utils.h | 10 ++++++++++
> > hw/pci/shpc.c | 13 ++-----------
> > 2 files changed, 12 insertions(+), 11 deletions(-)
> >
> > diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h
> > index 5ac621c..38da849 100644
> > --- a/include/qemu/host-utils.h
> > +++ b/include/qemu/host-utils.h
> > @@ -400,6 +400,16 @@ static inline uint64_t pow2ceil(uint64_t value)
> > return 0x8000000000000000ull >> (n - 1);
> > }
> >
> > +static inline uint32_t pow2roundup32(uint32_t x)
> > +{
> > + x |= (x >> 1);
> > + x |= (x >> 2);
> > + x |= (x >> 4);
> > + x |= (x >> 8);
> > + x |= (x >> 16);
> > + return x + 1;
> > +}
>
> How does this differ from pow2ceil(), other than the difference in type?
Hi Michael,
I tested pvrdma device with pow2ceil and it works fine however i have no
idea how to test shpc.
So from pvrdma perspective this commit can be dropped. I can replace it
with one that change shpc_bar_size to use pow2ceil but again - compiled,
not tested.
Yuval
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
>
- [Qemu-devel] [PULL v4 01/29] MAINTAINERS: Add myself as maintainer to X86 machines, (continued)
- [Qemu-devel] [PULL v4 01/29] MAINTAINERS: Add myself as maintainer to X86 machines, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 02/29] vhost-user: add new vhost user messages to support virtio config space, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 04/29] contrib/libvhost-user: enable virtio config space messages, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 03/29] vhost-user-blk: introduce a new vhost-user-blk host device, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 06/29] qemu: add a cleanup callback function to EventNotifier, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 08/29] virtio: improve virtio devices initialization time, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 07/29] virtio: postpone the execution of event_notifier_cleanup function, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 05/29] contrib/vhost-user-blk: introduce a vhost-user-blk sample application, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 09/29] pci/shpc: Move function to generic header file, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 10/29] vhost-user: fix multiple queue specification, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 11/29] intel-iommu: Redefine macros to enable supporting 48 bit address width, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 13/29] hw/pci-bridge: fix QEMU crash because of pcie-root-port, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 14/29] ACPI/unit-test: Add a testcase for RAM allocation in numa node, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 12/29] intel-iommu: Extend address width to 48 bits, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 15/29] hw/acpi-build: Make next_base easy to follow, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 16/29] vhost-user-test: fix features mask, Michael S. Tsirkin, 2018/01/18
- [Qemu-devel] [PULL v4 17/29] vhost-user-test: extract read-guest-mem test from main loop, Michael S. Tsirkin, 2018/01/18