From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
To: xen-devel <xen-devel@lists.xen.org>
Cc: Feng Jin <joe.jin@oracle.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH] Simulate mask bit of msix entry in qemu
Date: Thu, 21 Mar 2013 11:38:40 +0800 [thread overview]
Message-ID: <514A80C0.3050709@oracle.com> (raw)
Since xen has its own control of mask bit in msix entry, it's better to
simulate a vmask for hvm guest.
This will let changing irq affinity of old kernel(2.6.32 no msi_pirq support)
work and avoid no irq handler error in guest.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
---
hw/pt-msi.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/hw/pt-msi.c b/hw/pt-msi.c
index 73f737d..6f28522 100644
--- a/hw/pt-msi.c
+++ b/hw/pt-msi.c
@@ -445,18 +445,10 @@ static void pci_msix_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
if ( offset != 3 )
{
- const volatile uint32_t *vec_ctrl;
-
if ( entry->io_mem[offset] == val )
return;
- /*
- * If Xen intercepts the mask bit access, io_mem[3] may not be
- * up-to-date. Read from hardware directly.
- */
- vec_ctrl = msix->phys_iomem_base + 16 * entry_nr + 12;
-
- if ( msix->enabled && !(*vec_ctrl & 0x1) )
+ if ( msix->enabled && !(entry->io_mem[3] & 0x1) )
{
PT_LOG("Can't update entry %d since MSI-X is already enabled"
" (%08"PRIx32" -> %08"PRIx32")\n",
--
1.7.3
reply other threads:[~2013-03-21 3:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=514A80C0.3050709@oracle.com \
--to=zhenzhong.duan@oracle.com \
--cc=joe.jin@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xen.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 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).