qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device
Date: Tue, 11 Sep 2012 09:05:36 -0400 (EDT)	[thread overview]
Message-ID: <1221316208.33090140.1347368736495.JavaMail.root@redhat.com> (raw)
In-Reply-To: <504F36AD.9080308@redhat.com>

> > ok, I'm missing something here. (and trying to catch up via Vol 3A
> > is taking too long).
> > I thought the order is:
> > (1) qemu raises interrupt
> > (2) qemu calls kvm ioctl
> > (3) guest interrupt handler
> > (4) guest clears interrupt by writing ~0 to qxl
> > ram_header->int_mask.
> > (5) qemu detects this next time it raises interrupt.
> 
> > so where does qemu/hw/qxl.c get a chance to see this masking
> > *immediately* after it raises the interrupt, i.e. before (2) above,
> > since otherwise there is a timeout here, you need to add a
> > callback,
> > it gets complicated, and then the unconditional two way sending
> > looks
> > much better. (I'm already on the same page with you on not needing
> > guest capabilities at this point, even though for the future it did
> > look like a good thing to have).
> 
> There are two registers:
> 
>   (1) the interrupt enable register (aka ram->int_mask)
>   (2) the interrupt status register (aka ram->int_pending)
> 
> qemu sets the irq bit in the status register each time the irq
> condition
> is meet.  qemu actually raises an irq in case the guest has the irq
> bit
> set in the enable register.  guest acks the irq by clearing the irq
> bit
> in the status register (then issue QXL_IO_UPDATE_IRQ to notify qemu
> that
> it touched interrupt registers, which we need because our registers
> in
> memory not mmio space).
> 
> So qxl can simply look at the enable register bit to figure whenever
> the
> guest is interested in specific interrupts or not.

Hans and myself discussed offline the current windows driver implementation. In short, it sets ram->int_mask to ~0, thereby claiming to support all 32 interrupts (including those we haven't thought of yet..).

> 
> cheers,
>   Gerd
> 
> 

  reply	other threads:[~2012-09-11 13:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11  6:56 [Qemu-devel] [PATCH 1/3] hw/qxl: tracing fixes Alon Levy
2012-09-11  6:56 ` [Qemu-devel] [PATCH 2/3] hw/qxl: add support for QXL_IO_CAPABILITIES_SET Alon Levy
2012-09-11  6:56 ` [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device Alon Levy
2012-09-11  8:45   ` Gerd Hoffmann
2012-09-11  9:35     ` Alon Levy
2012-09-11 11:05       ` Gerd Hoffmann
2012-09-11 11:29         ` Alon Levy
2012-09-11 12:10           ` Gerd Hoffmann
2012-09-11 11:43     ` Hans de Goede
2012-09-11 12:03       ` Alon Levy
2012-09-11 12:10         ` Alon Levy
2012-09-11 12:16         ` Hans de Goede
2012-09-11 12:23           ` Gerd Hoffmann
2012-09-11 12:37             ` Alon Levy
2012-09-11 13:03               ` Gerd Hoffmann
2012-09-11 13:05                 ` Alon Levy [this message]
2012-09-11 13:24                   ` Hans de Goede
2012-09-11 13:55                     ` Alon Levy
  -- strict thread matches above, loose matches on Subject: below --
2012-09-12 13:13 [Qemu-devel] [PATCH 0/3] client monitors config support Alon Levy
2012-09-12 13:13 ` [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device Alon Levy

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=1221316208.33090140.1347368736495.JavaMail.root@redhat.com \
    --to=alevy@redhat.com \
    --cc=hdegoede@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.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).