kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	kvm@vger.kernel.org
Subject: Re:
Date: Mon, 27 Apr 2009 21:16:14 +0800	[thread overview]
Message-ID: <200904272116.15710.sheng@linux.intel.com> (raw)
In-Reply-To: <20090427104117.GB29082@redhat.com>

On Monday 27 April 2009 18:41:17 Michael S. Tsirkin wrote:
> Sheng, Marcelo,
> I've been reading code in qemu/hw/device-assignment.c, and
> I have a couple of questions about msi-x implementation:

Hi Michael

> 1. What is the reason that msix_table_page is allocated
>    with mmap and not with e.g. malloc?

msix_table_page is a page, and mmap allocate memory on page boundary. So I use 
it.

> 2. msix_table_page has the guest view of the msix table for the device.
>    However, even this memory isn't mapped into guest directly, instead
>    msix_mmio_read/msix_mmio_write perform the write in qemu.
>    Won't it be possible to map this page directly into
>    guest memory, reducing the overhead for table writes?

First, Linux configured the real MSI-X table in device, which is out of our 
scope. KVM accepted the interrupt from Linux, then inject it to the guest 
according to the MSI-X table setting of guest. So KVM should know about the 
page modification. For example, MSI-X table got mask bit which can be written 
by guest at any time(this bit haven't been implement yet, but should be soon), 
then we should mask the correlated vector of real MSI-X table; then guest may 
modified the MSI address/data, that also should be intercepted by KVM and used 
to update our knowledge of guest. So we can't passthrough the modification.

If guest can write to the real device MSI-X table directly, it would cause 
chaos on interrupt delivery, for what guest see is totally different with 
what's host see...

-- 
regards
Yang, Sheng

>
> Could you shed light on this for me please?
> Thanks,



       reply	other threads:[~2009-04-27 13:16 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090427104117.GB29082@redhat.com>
2009-04-27 13:16 ` Sheng Yang [this message]
2009-04-27 13:51   ` qemu/hw/device-assignment: questions about msix_table_page Michael S. Tsirkin
2009-04-27 14:03     ` Sheng Yang
2009-04-27 14:15       ` Michael S. Tsirkin
2009-04-27 14:30         ` Sheng Yang
2009-04-27 14:35           ` Michael S. Tsirkin
2009-05-05  9:51           ` Michael S. Tsirkin
2009-05-05 10:19             ` Marcelo Tosatti
2009-05-05 10:34               ` Michael S. Tsirkin
2009-05-05 10:49                 ` Marcelo Tosatti
2009-05-05 11:45                   ` Michael S. Tsirkin
2009-05-05 11:51                     ` Marcelo Tosatti
2009-05-05 12:46                   ` Michael S. Tsirkin
2009-05-06  2:35                     ` Sheng Yang
2009-05-06  7:31                       ` Michael S. Tsirkin
2009-05-06  8:17                         ` Sheng Yang
2009-04-28  9:31       ` Avi Kivity
2022-01-14 10:54 Li RongQing
2022-01-14 10:55 ` Paolo Bonzini
2022-01-14 17:13   ` Re: Sean Christopherson
2022-01-14 17:17     ` Re: Paolo Bonzini
     [not found] <E1hUrZM-0007qA-Q8@sslproxy01.your-server.de>
2019-05-29 19:54 ` Re: Alex Williamson
  -- strict thread matches above, loose matches on Subject: below --
2019-03-19 14:41 (unknown) Maxim Levitsky
2019-03-20 11:03 ` Felipe Franciosi
2019-03-20 19:08   ` Re: Maxim Levitsky
2019-03-21 16:12     ` Re: Stefan Hajnoczi
2019-03-21 16:21       ` Re: Keith Busch
2019-03-21 16:41         ` Re: Felipe Franciosi
2019-03-21 17:04           ` Re: Maxim Levitsky
2019-03-22  7:54             ` Re: Felipe Franciosi
2019-03-22 10:32               ` Re: Maxim Levitsky
2019-03-22 15:30               ` Re: Keith Busch
2019-03-25 15:44                 ` Re: Felipe Franciosi
2018-02-05  5:28 Re: Fahama Vaserman
2017-11-13 14:44 Re: Amos Kalonzo
     [not found] <CAMj-D2DO_CfvD77izsGfggoKP45HSC9aD6auUPAYC9Yeq_aX7w@mail.gmail.com>
2017-05-04 16:44 ` Re: gengdongjiu
2017-02-23 15:09 Qin's Yanjun
     [not found] <D0613EBE33E8FD439137DAA95CCF59555B7A5A4D@MGCCCMAIL2010-5.mgccc.cc.ms.us>
2015-11-24 13:21 ` RE: Amis, Ryann
2014-04-13 21:01 (unknown), Marcus White
2014-04-15  0:59 ` Marcus White
2014-04-16 21:17   ` Re: Marcelo Tosatti
2014-04-17 21:33     ` Re: Marcus White
2014-04-21 21:49       ` Re: Marcelo Tosatti
2013-06-28 10:14 Re: emirates
2013-06-28 10:12 Re: emirates
2013-06-27 21:21 Re: emirates
2011-10-29 21:27 Re: Young Chang
2010-12-14  3:03 Re: Irish Online News
2009-03-08 22:05 "-vga std" causes guest OS to crash (on disk io?) on a 1440x900 latpop Dylan Reid
2009-03-14  5:09 ` Dylan
2009-02-25  0:50 (unknown), Josh Borke
2009-02-25  0:58 ` Atsushi SAKAI
2009-01-10 21:53 (unknown) Ekin Meroğlu
2009-11-07 15:59 ` Bulent Abali
2009-11-07 16:36   ` Neil Aggarwal
2008-07-28 21:27 (unknown) Mohammed Gamal
2008-07-28 21:29 ` Mohammed Gamal

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=200904272116.15710.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.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).