public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 3/3] QEMU/KVM: bail out if PCI region is not power of two
Date: Mon, 17 Mar 2008 17:20:16 -0300	[thread overview]
Message-ID: <20080317202125.458235841@localhost.localdomain> (raw)
In-Reply-To: 20080317202013.949027343@localhost.localdomain

[-- Attachment #1: pci-warn-region-mem --]
[-- Type: text/plain, Size: 859 bytes --]

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: kvm-userspace.hotplug3/qemu/hw/pci.c
===================================================================
--- kvm-userspace.hotplug3.orig/qemu/hw/pci.c
+++ kvm-userspace.hotplug3/qemu/hw/pci.c
@@ -236,6 +236,11 @@ void pci_register_io_region(PCIDevice *p
 
     if ((unsigned int)region_num >= PCI_NUM_REGIONS)
         return;
+
+    if (size & (size-1))
+        term_printf("WARNING: PCI region size must be pow2 "
+                    "type=0x%x, size=0x%x\n", type, size);
+
     r = &pci_dev->io_regions[region_num];
     r->addr = -1;
     r->size = size;

-- 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2008-03-17 20:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 20:20 [patch 0/3] QEMU: virtio should register power of two sized regions Marcelo Tosatti
2008-03-17 20:20 ` [patch 1/3] QEMU/KVM: add fls() Marcelo Tosatti
2008-03-17 20:20 ` [patch 2/3] QEMU/KVM: virtio register pow2 memory regions Marcelo Tosatti
2008-03-17 20:20 ` Marcelo Tosatti [this message]
2008-03-18  6:38 ` [patch 0/3] QEMU: virtio should register power of two sized regions Avi Kivity

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=20080317202125.458235841@localhost.localdomain \
    --to=mtosatti@redhat.com \
    --cc=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /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