From: Alex Williamson <alex.williamson@redhat.com>
To: kvm@vger.kernel.org
Cc: alex.williamson@redhat.com, avi@redhat.com, mst@redhat.com,
jan.kiszka@siemens.com, shashidhar.patil@gmail.com
Subject: [PATCH v2 7/8] pci-assign: Use MSIX_PAGE_SIZE
Date: Tue, 31 Jan 2012 22:33:06 -0700 [thread overview]
Message-ID: <20120201053306.9843.67444.stgit@bling.home> (raw)
In-Reply-To: <20120201052203.9843.80792.stgit@bling.home>
We've already got it defined, use it.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
hw/device-assignment.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index fe10a23..71685ee 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -1468,7 +1468,7 @@ static void msix_reset(AssignedDevice *dev)
return;
}
- memset(dev->msix_table, 0, 0x1000);
+ memset(dev->msix_table, 0, MSIX_PAGE_SIZE);
for (i = 0, entry = dev->msix_table; i < dev->msix_max; i++, entry++) {
entry->ctrl = cpu_to_le32(0x1); /* Masked */
@@ -1477,7 +1477,7 @@ static void msix_reset(AssignedDevice *dev)
static int assigned_dev_register_msix_mmio(AssignedDevice *dev)
{
- dev->msix_table = mmap(NULL, 0x1000, PROT_READ|PROT_WRITE,
+ dev->msix_table = mmap(NULL, MSIX_PAGE_SIZE, PROT_READ|PROT_WRITE,
MAP_ANONYMOUS|MAP_PRIVATE, 0, 0);
if (dev->msix_table == MAP_FAILED) {
fprintf(stderr, "fail allocate msix_table! %s\n", strerror(errno));
@@ -1499,7 +1499,7 @@ static void assigned_dev_unregister_msix_mmio(AssignedDevice *dev)
memory_region_destroy(&dev->mmio);
- if (munmap(dev->msix_table, 0x1000) == -1) {
+ if (munmap(dev->msix_table, MSIX_PAGE_SIZE) == -1) {
fprintf(stderr, "error unmapping msix_table! %s\n",
strerror(errno));
}
next prev parent reply other threads:[~2012-02-01 5:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 5:32 [PATCH v2 0/8] pci-assign: better MSI-X table support Alex Williamson
2012-02-01 5:32 ` [PATCH v2 1/8] pci-assign: Fix warnings with DEBUG enabled Alex Williamson
2012-02-01 5:32 ` [PATCH v2 2/8] pci-assign: Update MSI-X MMIO to Memory API Alex Williamson
2012-02-01 5:32 ` [PATCH v2 3/8] pci-assign: Use struct for MSI-X table Alex Williamson
2012-02-01 5:32 ` [PATCH v2 4/8] pci-assign: Only calculate maximum MSI-X vector entries once Alex Williamson
2012-02-01 5:32 ` [PATCH v2 5/8] pci-assign: Proper initialization for MSI-X table Alex Williamson
2012-02-01 5:32 ` [PATCH v2 6/8] pci-assign: Allocate entries for all MSI-X vectors Alex Williamson
2012-02-01 5:33 ` Alex Williamson [this message]
2012-02-01 5:33 ` [PATCH v2 8/8] pci-assign: Update MSI-X config based on table writes Alex Williamson
2012-02-01 7:22 ` Michael S. Tsirkin
2012-02-01 13:48 ` Alex Williamson
2012-02-01 14:13 ` Jan Kiszka
2012-02-01 15:13 ` Michael S. Tsirkin
2012-02-01 7:25 ` Michael S. Tsirkin
2012-02-01 13:51 ` Alex Williamson
2012-02-07 20:04 ` [PATCH v2 0/8] pci-assign: better MSI-X table support Marcelo Tosatti
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=20120201053306.9843.67444.stgit@bling.home \
--to=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=shashidhar.patil@gmail.com \
/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).