Re: [Qemu-devel] [PATCH 1/2] apb_pci: convert PCI space to memory API

2011-09-04 Thread Avi Kivity
On 09/04/2011 12:18 AM, Blue Swirl wrote: Add a new memory space for PCI instead of using system memory. This also fixes a bug where VGA region vga.chain4 is accidentally mapped to 0xa instead of 0x1ff000a. Looks good. I assume you'll commit this directly, since it fixes a regressi

[Qemu-devel] Unsubscription Confirmation

2011-09-04 Thread RealEstateMalaysian.com
Thank you for subscribing. You have now unsubscribed and no more messages will be sent.

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/02/2011 05:56 AM, Wen Congyang wrote: > > You could use something like kvm-unit-tests.git to write a simple test > that sets up a BAR (say from hw/ivshmem.c), writes and reads to see that > it is visible, programs the bridge to filter part of the BAR out, then > writes and reads again t

Re: [Qemu-devel] [Spice-devel] [PATCH] server: don't call reds_stream_free from worker thread context

2011-09-04 Thread Yonit Halperin
On 09/02/2011 06:19 PM, Gerd Hoffmann wrote: reds_stream_free() may call the channel_event callback which is not supposed to be callsed from worker thread context. This patch moves the reds_stream_free call for the display channel from the worker to the dispatcher to fix this issue. [ Note: not

Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers

2011-09-04 Thread Michael S. Tsirkin
On Sat, Sep 03, 2011 at 06:19:23PM +0200, Paolo Bonzini wrote: > On 09/02/2011 05:45 PM, Michael S. Tsirkin wrote: > >Well, can you describe an issue in virtio that lfence/sfence help solve > >in terms of a memory model please? > >Pls note that guest uses smp_ variants for barriers. > > /* Mak

Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 12:46:35AM +1000, David Gibson wrote: > On Fri, Sep 02, 2011 at 06:45:50PM +0300, Michael S. Tsirkin wrote: > > On Thu, Sep 01, 2011 at 04:31:09PM -0400, Paolo Bonzini wrote: > > > > > > Why not limit the change to ppc then? > > > > > > > > > > Because the bug is masked by t

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Blue Swirl
On Sat, Sep 3, 2011 at 9:41 PM, Anthony Liguori wrote: > On 09/03/2011 04:10 PM, Blue Swirl wrote: >> >> On Sat, Sep 3, 2011 at 8:07 PM, Anthony Liguori >>  wrote: >>> >>> On 09/01/2011 12:58 AM, Avi Kivity wrote: On 08/31/2011 07:59 PM, Blue Swirl wrote: > >> >> That makes i

Re: [Qemu-devel] [PATCH 1/2] apb_pci: convert PCI space to memory API

2011-09-04 Thread Blue Swirl
On Sun, Sep 4, 2011 at 8:10 AM, Avi Kivity wrote: > On 09/04/2011 12:18 AM, Blue Swirl wrote: >> >> Add a new memory space for PCI instead of using system memory. >> >> This also fixes a bug where VGA region vga.chain4 is >> accidentally mapped to 0xa instead of 0x1ff000a. >> >> > > Looks

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Blue Swirl
On Wed, Aug 31, 2011 at 7:44 PM, Blue Swirl wrote: > On Wed, Aug 31, 2011 at 6:17 PM, Jan Kiszka wrote: >> On 2011-08-31 19:41, Blue Swirl wrote: >>> On Wed, Aug 31, 2011 at 10:53 AM, Jan Kiszka wrote: On 2011-08-31 10:25, Peter Maydell wrote: > On 30 August 2011 20:28, Jan Kiszka wrot

Re: [Qemu-devel] [PATCH v2] rbd: fix leak in qemu_rbd_open failure paths

2011-09-04 Thread Stefan Hajnoczi
On Sat, Sep 3, 2011 at 11:04 PM, Sage Weil wrote: > +failed_shutdown: >     rados_shutdown(s->cluster); > +    qemu_free(s->snap); Sorry for being a pain here. This patch is against an old qemu.git tree. All memory allocation is now using glib's g_malloc()/g_free(). Stefan

Re: [Qemu-devel] [PATCH] hw/qxl: Fix format string errors

2011-09-04 Thread Alon Levy
On Sat, Sep 03, 2011 at 02:48:25PM +0100, Peter Maydell wrote: > Fix format string errors causing compile failure on 32 bit hosts > when spice is enabled. > Patch looks good. Reviewed-by: Alon Levy > Signed-off-by: Peter Maydell > --- > This fixes the easy parts of the 32 bit compile failures

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Jan Kiszka
On 2011-09-03 21:54, Anthony Liguori wrote: > On 08/31/2011 05:53 AM, Jan Kiszka wrote: >> On 2011-08-31 10:25, Peter Maydell wrote: >>> On 30 August 2011 20:28, Jan Kiszka wrote: Yes, that's the current state. Once we have bidirectional IRQ links in place (pushing downward, querying upw

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Avi Kivity
On 08/31/2011 01:53 PM, Jan Kiszka wrote: On 2011-08-31 10:25, Peter Maydell wrote: > On 30 August 2011 20:28, Jan Kiszka wrote: >> Yes, that's the current state. Once we have bidirectional IRQ links in >> place (pushing downward, querying upward - required to skip IRQ routers >> for fast, l

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Gleb Natapov
> On Wed, Aug 31, 2011 at 6:17 PM, Jan Kiszka wrote: >> On 2011-08-31 19:41, Blue Swirl wrote: >>> On Wed, Aug 31, 2011 at 10:53 AM, Jan Kiszka wrote: On 2011-08-31 10:25, Peter Maydell wrote: > On 30 August 2011 20:28, Jan Kiszka wrote: >> Yes, that's the current state. Once we hav

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Aug 28, 2011 at 04:53:33PM +0300, Avi Kivity wrote: > On 08/28/2011 04:42 PM, Michael S. Tsirkin wrote: > >On Sun, Aug 28, 2011 at 04:10:14PM +0300, Avi Kivity wrote: > >> On 08/28/2011 02:41 PM, Michael S. Tsirkin wrote: > >> >> > >> >> If it really matters, you can add a prefetchabil

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Jan Kiszka
On 2011-09-04 14:17, Avi Kivity wrote: > On 08/31/2011 01:53 PM, Jan Kiszka wrote: >> On 2011-08-31 10:25, Peter Maydell wrote: >> > On 30 August 2011 20:28, Jan Kiszka wrote: >> >> Yes, that's the current state. Once we have bidirectional IRQ >> links in >> >> place (pushing downward, querying

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 03:30 PM, Michael S. Tsirkin wrote: > > Create a memory region for the bridge's address space. This region > is not directly added to system_memory or its descendants. I do this for each bridge in the hierarchy, right? Each bridge does this independently (so yes). > fx440 d

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Avi Kivity
On 09/04/2011 03:37 PM, Jan Kiszka wrote: > > (here it's strictly an optimization; with the memory API it's a > requirement since kvm requires a flattened representation, and tcg is > greatly simplified by it). With current kvm device assignment it's mandatory as it only support kernel/kernel

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 03:40:58PM +0300, Avi Kivity wrote: > On 09/04/2011 03:30 PM, Michael S. Tsirkin wrote: > >> > >> Create a memory region for the bridge's address space. This region > >> is not directly added to system_memory or its descendants. > > > >I do this for each bridge in the hie

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 04:01 PM, Michael S. Tsirkin wrote: On Sun, Sep 04, 2011 at 03:40:58PM +0300, Avi Kivity wrote: > On 09/04/2011 03:30 PM, Michael S. Tsirkin wrote: > >> > >> Create a memory region for the bridge's address space. This region > >> is not directly added to system_memory or it

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 04:05 PM, Avi Kivity wrote: It follows naturally: system_memory | +--- pci0_alias0 (aliases part of pci0) | pci0 <-+ The pointer from pci0_alias to pci0 looked a lot better when I drew it. -- error compiling committee.c: too many arguments to function

[Qemu-devel] [PATCH] Fix comment (install patch -> install path)

2011-09-04 Thread Stefan Weil
Signed-off-by: Stefan Weil --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 5ba9b35..c9e1975 100644 --- a/vl.c +++ b/vl.c @@ -3061,7 +3061,7 @@ int main(int argc, char **argv, char **envp) if (!data_dir) { data_dir = os_find_datadi

[Qemu-devel] [PATCH] configure: Remove relicts from --enable-io-thread

2011-09-04 Thread Stefan Weil
Commit 12d4536f7d911b6d87a766ad7300482ea663cea2 removed configure option --enable-io-thread. Remove help message which is now no longer valid. Cc: Anthony Liguori Signed-off-by: Stefan Weil --- configure |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/configure b/confi

Re: [Qemu-devel] [PATCH] Rename qemu -> qemu-system-i386

2011-09-04 Thread Andreas Färber
Am 03.09.2011 um 22:09 schrieb Anthony Liguori: On 09/03/2011 08:44 AM, Andreas Färber wrote: Am 02.09.2011 um 17:40 schrieb Anthony Liguori: On 08/29/2011 09:55 AM, Anthony Liguori wrote: diff --git a/Makefile.target b/Makefile.target index 07af4d4..29287ed 100644 --- a/Makefile.target +++

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/04/2011 07:13 AM, Jan Kiszka wrote: On 2011-09-03 21:54, Anthony Liguori wrote: On 08/31/2011 05:53 AM, Jan Kiszka wrote: On 2011-08-31 10:25, Peter Maydell wrote: On 30 August 2011 20:28, Jan Kiszka wrote: Yes, that's the current state. Once we have bidirectional IRQ links in place (

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/04/2011 07:17 AM, Avi Kivity wrote: On 08/31/2011 01:53 PM, Jan Kiszka wrote: On 2011-08-31 10:25, Peter Maydell wrote: > On 30 August 2011 20:28, Jan Kiszka wrote: >> Yes, that's the current state. Once we have bidirectional IRQ links in >> place (pushing downward, querying upward - requi

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Jan Kiszka
On 2011-09-04 15:32, Anthony Liguori wrote: > On 09/04/2011 07:13 AM, Jan Kiszka wrote: >> On 2011-09-03 21:54, Anthony Liguori wrote: >>> On 08/31/2011 05:53 AM, Jan Kiszka wrote: On 2011-08-31 10:25, Peter Maydell wrote: > On 30 August 2011 20:28, Jan Kiszka wrote: >> Yes, that's t

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/04/2011 07:37 AM, Jan Kiszka wrote: On 2011-09-04 14:17, Avi Kivity wrote: On 08/31/2011 01:53 PM, Jan Kiszka wrote: On 2011-08-31 10:25, Peter Maydell wrote: On 30 August 2011 20:28, Jan Kiszka wrote: Yes, that's the current state. Once we have bidirectional IRQ links in plac

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 04:05:14PM +0300, Avi Kivity wrote: > It follows naturally: OK, so it seems the following is more or less what you suggest? I'm not sure I create/destroy subregions properly. Both the alias and the subregion get the same start value? Is the region name for debugging only? W

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/04/2011 08:36 AM, Jan Kiszka wrote: On 2011-09-04 15:32, Anthony Liguori wrote: I prefer to not think of IRQs as special things. They're just single bits of information that flow through the device model. Having a higher level representation that understands something like paths seems wr

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Jan Kiszka
On 2011-09-04 15:38, Anthony Liguori wrote: > On 09/04/2011 07:37 AM, Jan Kiszka wrote: >> On 2011-09-04 14:17, Avi Kivity wrote: >>> On 08/31/2011 01:53 PM, Jan Kiszka wrote: On 2011-08-31 10:25, Peter Maydell wrote: > On 30 August 2011 20:28, Jan Kiszka wrote: >> Yes, that's th

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Jan Kiszka
On 2011-09-04 15:41, Anthony Liguori wrote: > On 09/04/2011 08:36 AM, Jan Kiszka wrote: >> On 2011-09-04 15:32, Anthony Liguori wrote: >>> I prefer to not think of IRQs as special things. They're just single >>> bits of information that flow through the device model. Having a higher >>> level rep

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/04/2011 08:42 AM, Jan Kiszka wrote: On 2011-09-04 15:38, Anthony Liguori wrote: With current kvm device assignment it's mandatory as it only support kernel/kernel IRQ delivery. Only vfio's eventfds will make it optional (but still highly desirable). It's not mandatory. All you need to b

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 04:41 PM, Michael S. Tsirkin wrote: On Sun, Sep 04, 2011 at 04:05:14PM +0300, Avi Kivity wrote: > It follows naturally: OK, so it seems the following is more or less what you suggest? I'm not sure I create/destroy subregions properly. Both the alias and the subregion get the same

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/04/2011 08:49 AM, Jan Kiszka wrote: On 2011-09-04 15:41, Anthony Liguori wrote: On 09/04/2011 08:36 AM, Jan Kiszka wrote: On 2011-09-04 15:32, Anthony Liguori wrote: I prefer to not think of IRQs as special things. They're just single bits of information that flow through the device mod

Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch

2011-09-04 Thread Avi Kivity
On 08/22/2011 04:12 PM, Anthony Liguori wrote: This patch changes qemu_set_fd_handler to be implemented in terms of g_io_add_watch(). The semantics are a bit different so some glue is required. qemu_set_fd_handler2 is much harder to convert because of its use of polling. The glib main loop has

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Avi Kivity
On 09/04/2011 04:41 PM, Anthony Liguori wrote: See it as you like, but we need the support, not only for device assigment. And I do not see any gain it hacking this instead of designing it. You can design a hack but it's still a hack. Device state belongs in devices. Trying to extract device

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 04:55:33PM +0300, Avi Kivity wrote: > On 09/04/2011 04:41 PM, Michael S. Tsirkin wrote: > >On Sun, Sep 04, 2011 at 04:05:14PM +0300, Avi Kivity wrote: > >> It follows naturally: > > > >OK, so it seems the following is more or less what you suggest? > >I'm not sure I create/

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 05:21 PM, Michael S. Tsirkin wrote: > > > >+static pcibus_t pci_bridge_get_size(const PCIDevice *bridge, uint8_t type) > >+{ > >+return pci_bridge_get_limit(bridge, type)>= > >+pci_bridge_get_base(bridge, type) ? > >+pci_bridge_get_limit(bridge, type) - >

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/04/2011 08:57 AM, Anthony Liguori wrote: On 09/04/2011 08:49 AM, Jan Kiszka wrote: On 2011-09-04 15:41, Anthony Liguori wrote: On 09/04/2011 08:36 AM, Jan Kiszka wrote: Having some sort of global interrupt routing table is just going to add a layer of complexity for very little obvious ga

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/04/2011 09:12 AM, Avi Kivity wrote: On 09/04/2011 04:41 PM, Anthony Liguori wrote: See it as you like, but we need the support, not only for device assigment. And I do not see any gain it hacking this instead of designing it. You can design a hack but it's still a hack. Device state be

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/03/2011 04:01 PM, Blue Swirl wrote: On Sat, Sep 3, 2011 at 7:53 PM, Anthony Liguori wrote: On 08/31/2011 11:59 AM, Blue Swirl wrote: On Wed, Aug 31, 2011 at 8:28 AM, Avi Kivitywrote: On 08/30/2011 10:19 PM, Blue Swirl wrote: We need some kind of two phase restore. In the fir

Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch

2011-09-04 Thread Anthony Liguori
On 09/04/2011 09:03 AM, Avi Kivity wrote: On 08/22/2011 04:12 PM, Anthony Liguori wrote: This patch changes qemu_set_fd_handler to be implemented in terms of g_io_add_watch(). The semantics are a bit different so some glue is required. qemu_set_fd_handler2 is much harder to convert because of i

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 05:36:56PM +0300, Avi Kivity wrote: > On 09/04/2011 05:21 PM, Michael S. Tsirkin wrote: > >> > > >> >+static pcibus_t pci_bridge_get_size(const PCIDevice *bridge, uint8_t > >> type) > >> >+{ > >> >+return pci_bridge_get_limit(bridge, type)>= > >> >+pci_brid

Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch

2011-09-04 Thread Anthony Liguori
On 09/04/2011 09:03 AM, Avi Kivity wrote: On 08/22/2011 04:12 PM, Anthony Liguori wrote: This patch changes qemu_set_fd_handler to be implemented in terms of g_io_add_watch(). The semantics are a bit different so some glue is required. qemu_set_fd_handler2 is much harder to convert because of i

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Avi Kivity
On 09/04/2011 05:43 PM, Anthony Liguori wrote: Pet peeve - saying something is "by definition" a hack is just rhetoric unless the definition of device state is "something that cannot be extracted and externalized". Let's avoid this. Likewise, I would prefer to avoid stating that something is a

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 05:54 PM, Michael S. Tsirkin wrote: > Way too late. And also won't work, since often the offset is > determined by one party and the size by another. For things like BARs, yes - but these don't need to be that big normally. We could add an additinal API that gets first/last para

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/04/2011 10:03 AM, Avi Kivity wrote: On 09/04/2011 05:43 PM, Anthony Liguori wrote: In fact it's exactly what we do with the memory API. Memory routing is part of device state, yet we expose it to the memory API and let it do its thing instead of going through the hierarchy on every single

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Blue Swirl
On Sun, Sep 4, 2011 at 2:37 PM, Anthony Liguori wrote: > On 09/04/2011 08:57 AM, Anthony Liguori wrote: >> >> On 09/04/2011 08:49 AM, Jan Kiszka wrote: >>> >>> On 2011-09-04 15:41, Anthony Liguori wrote: On 09/04/2011 08:36 AM, Jan Kiszka wrote: Having some sort of global interrupt

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 06:14:22PM +0300, Avi Kivity wrote: > On 09/04/2011 05:54 PM, Michael S. Tsirkin wrote: > >> Way too late. And also won't work, since often the offset is > >> determined by one party and the size by another. > > > >For things like BARs, yes - but these don't need to be >

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 05:36:56PM +0300, Avi Kivity wrote: > So long as we're nitpicking ... OK, this should do it then. diff --git a/hw/pci.c b/hw/pci.c index 57ff7b1..56dfa18 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -889,7 +889,6 @@ void pci_register_bar(PCIDevice *pci_dev, int region_num,

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Blue Swirl
On Sun, Sep 4, 2011 at 2:43 PM, Anthony Liguori wrote: > On 09/04/2011 09:12 AM, Avi Kivity wrote: >> >> On 09/04/2011 04:41 PM, Anthony Liguori wrote: See it as you like, but we need the support, not only for device assigment. And I do not see any gain it hacking this instead of >>

Re: [Qemu-devel] [PATCH] Fix comment (install patch -> install path)

2011-09-04 Thread Stefan Hajnoczi
On Sun, Sep 04, 2011 at 03:17:46PM +0200, Stefan Weil wrote: > Signed-off-by: Stefan Weil > --- > vl.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Thanks, applied to the trivial patches -next tree: http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches-next

Re: [Qemu-devel] [PATCH] configure: Remove relicts from --enable-io-thread

2011-09-04 Thread Stefan Hajnoczi
On Sun, Sep 04, 2011 at 03:29:32PM +0200, Stefan Weil wrote: > Commit 12d4536f7d911b6d87a766ad7300482ea663cea2 removed > configure option --enable-io-thread. > > Remove help message which is now no longer valid. > > Cc: Anthony Liguori > Signed-off-by: Stefan Weil > --- > configure |1 - >

[Qemu-devel] [PULL] Memory API batch 5, v2

2011-09-04 Thread Avi Kivity
Please pull from git://github.com/avikivity/qemu.git memory/batch v2: just a rebase to make sure bisects see the rom_device fix. Avi Kivity (22): mips_fulong2e: convert to memory API stellaris_enet: convert to memory API sysbus: add helpers to add and delete memory regions t

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Anthony Liguori
On 09/04/2011 10:20 AM, Blue Swirl wrote: On Sun, Sep 4, 2011 at 2:37 PM, Anthony Liguori wrote: On 09/04/2011 08:57 AM, Anthony Liguori wrote: On 09/04/2011 08:49 AM, Jan Kiszka wrote: On 2011-09-04 15:41, Anthony Liguori wrote: On 09/04/2011 08:36 AM, Jan Kiszka wrote: Having some sort

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Avi Kivity
On 09/04/2011 06:19 PM, Anthony Liguori wrote: Yes, and the memory API is complicated and invasive :-) But it's worth it at the end of the day (although I think it could be simplified at the expensive of not allowing as much flattening). (we should have spent a few hours at kf2011 to convince y

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 06:24 PM, Michael S. Tsirkin wrote: > > Of course it doesn't ignore it. See the 440fx implementation, if > you disable VGA access (via the SMRAM register), vga goes away. Yes but that's for VGA RAM, right? I'm talking about the IO addresses: are tons of aliases created as you su

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 06:26 PM, Michael S. Tsirkin wrote: On Sun, Sep 04, 2011 at 05:36:56PM +0300, Avi Kivity wrote: > So long as we're nitpicking ... +static void pci_bridge_init_alias(PCIBridge *bridge, MemoryRegion *alias, + uint8_t type, const char *name, +

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 06:37:08PM +0300, Avi Kivity wrote: > On 09/04/2011 06:24 PM, Michael S. Tsirkin wrote: > >> > >> Of course it doesn't ignore it. See the 440fx implementation, if > >> you disable VGA access (via the SMRAM register), vga goes away. > > > >Yes but that's for VGA RAM, right

Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path

2011-09-04 Thread Blue Swirl
On Sun, Sep 4, 2011 at 3:31 PM, Anthony Liguori wrote: > On 09/04/2011 10:20 AM, Blue Swirl wrote: >> >> On Sun, Sep 4, 2011 at 2:37 PM, Anthony Liguori >>  wrote: >>> >>> On 09/04/2011 08:57 AM, Anthony Liguori wrote: On 09/04/2011 08:49 AM, Jan Kiszka wrote: > > On 2011-09-04 1

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 06:42:42PM +0300, Avi Kivity wrote: > On 09/04/2011 06:26 PM, Michael S. Tsirkin wrote: > >On Sun, Sep 04, 2011 at 05:36:56PM +0300, Avi Kivity wrote: > >> So long as we're nitpicking ... > > > >+static void pci_bridge_init_alias(PCIBridge *bridge, MemoryRegion *alias, > >+

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 06:45 PM, Michael S. Tsirkin wrote: On Sun, Sep 04, 2011 at 06:37:08PM +0300, Avi Kivity wrote: > On 09/04/2011 06:24 PM, Michael S. Tsirkin wrote: > >> > >> Of course it doesn't ignore it. See the 440fx implementation, if > >> you disable VGA access (via the SMRAM register

[Qemu-devel] [PATCH 0/9] clang analyzer patches

2011-09-04 Thread Blue Swirl
I run the sources through clang analyzer again and made patches for some of the issues. Blue Swirl (9): win32: improve version.o dependency qemu-io: remove unnecessary assignment scsi-bus: remove duplicate table entries hid: fix misassignment kvm: remove unnecessary assignments cpu-exe

[Qemu-devel] [PATCH 1/9] win32: improve version.o dependency

2011-09-04 Thread Blue Swirl
Actually, version.rc doesn't need config-host.mak but config-host.h, fix it. Signed-off-by: Blue Swirl --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index e0cf51a..7e9382f 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ ui/vnc

[Qemu-devel] [PATCH 2/9] qemu-io: remove unnecessary assignment

2011-09-04 Thread Blue Swirl
Remove an unnecessary assignment, spotted by clang analyzer: /src/qemu/qemu-io.c:995:9: warning: Value stored to 'offset' is never read offset += reqs[i].qiov->size; Signed-off-by: Blue Swirl --- qemu-io.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/qemu-io.c

[Qemu-devel] [PATCH 3/9] scsi-bus: remove duplicate table entries

2011-09-04 Thread Blue Swirl
Remove duplicate entries from SCSI command table, spotted by clang analyzer: /src/qemu/hw/scsi-bus.c:979:40: warning: initializer overrides prior initialization of this subobject [ ERASE_16 ] = "ERASE_16", /src/qemu/hw/scsi-bus.c:978:40: note: previous initialization is here

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 06:46 PM, Michael S. Tsirkin wrote: > > Why pointers? Regular fields require less upkeep. Good point. Why does PIIX use pointers? I just copied that ... It doesn't, at least not completely: struct PCII440FXState { PCIDevice dev; MemoryRegion *system_memory; Memor

[Qemu-devel] [PATCH 4/9] hid: fix misassignment

2011-09-04 Thread Blue Swirl
The code does not have any effect as is, fix it. Spotted by clang analyzer: /src/qemu/hw/hid.c:99:13: warning: Value stored to 'x1' is never read x1 = 1; Signed-off-by: Blue Swirl --- hw/hid.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/hid.c b/hw/hi

[Qemu-devel] [PATCH 5/9] kvm: remove unnecessary assignments

2011-09-04 Thread Blue Swirl
Avoid these warnings from clang analyzer: /src/qemu/target-i386/kvm.c:772:5: warning: Value stored to 'cwd' is never read cwd = swd = twd = 0; /src/qemu/target-i386/kvm.c:772:11: warning: Although the value stored to 'swd' is used in the enclosing expression, the value is never actually read fr

[Qemu-devel] [PATCH 6/9] cpu-exec: remove unnecessary assignment

2011-09-04 Thread Blue Swirl
Avoid this warning from clang analyzer: /src/qemu/cpu-exec.c:97:5: warning: Value stored to 'phys_page2' is never read phys_page2 = -1; Adjust the scope of the variable while at it. Signed-off-by: Blue Swirl --- cpu-exec.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff

[Qemu-devel] [PATCH 7/9] openpic: avoid a warning from clang analyzer

2011-09-04 Thread Blue Swirl
Avoid this warning by clang analyzer by defining a default case: /src/qemu/hw/openpic.c:477:5: warning: Undefined or garbage value returned to caller return retval; Signed-off-by: Blue Swirl --- hw/openpic.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/openpic.

[Qemu-devel] [PATCH 8/9] lsi53c895a: avoid a warning from clang analyzer

2011-09-04 Thread Blue Swirl
Avoid this warning from clang analyzer by adjusting the scope of the variable: /src/qemu/hw/lsi53c895a.c:895:5: warning: Value stored to 'id' is never read id = (current_tag >> 8) & 0xf; Signed-off-by: Blue Swirl --- hw/lsi53c895a.c | 14 -- 1 files changed, 8 insertions(+), 6

[Qemu-devel] [PATCH 9/9] Sparc64: remove useless variable

2011-09-04 Thread Blue Swirl
Remove a useless variable, spotted by clang analyzer: /src/qemu/target-sparc/op_helper.c:3904:18: warning: unused variable 'tmp' [-Wunused-variable] target_ulong tmp = val; The error message is actually incorrect since the variable is used. Signed-off-by: Blue Swirl --- target-sparc/op_helpe

Re: [Qemu-devel] [PATCH v2] rbd: fix leak in qemu_rbd_open failure paths

2011-09-04 Thread Sage Weil
On Sun, 4 Sep 2011, Stefan Hajnoczi wrote: > On Sat, Sep 3, 2011 at 11:04 PM, Sage Weil wrote: > > +failed_shutdown: > >     rados_shutdown(s->cluster); > > +    qemu_free(s->snap); > > Sorry for being a pain here. This patch is against an old qemu.git > tree. All memory allocation is now using

[Qemu-devel] [PATCH v3] rbd: fix leak in qemu_rbd_open failure paths

2011-09-04 Thread Sage Weil
Fix leak of s->snap in failure path. Simplify error paths for the whole function. Reported-by: Stefan Hajnoczi Signed-off-by: Sage Weil --- block/rbd.c | 28 +--- 1 files changed, 13 insertions(+), 15 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 2763092.

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 06:46:46PM +0300, Avi Kivity wrote: > On 09/04/2011 06:45 PM, Michael S. Tsirkin wrote: > >On Sun, Sep 04, 2011 at 06:37:08PM +0300, Avi Kivity wrote: > >> On 09/04/2011 06:24 PM, Michael S. Tsirkin wrote: > >> >> > >> >> Of course it doesn't ignore it. See the 440fx i

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 06:49:34PM +0300, Avi Kivity wrote: > On 09/04/2011 06:46 PM, Michael S. Tsirkin wrote: > >> > >> Why pointers? Regular fields require less upkeep. > > > >Good point. Why does PIIX use pointers? I just copied that ... > > > > It doesn't, at least not completely: > > > s

Re: [Qemu-devel] [PATCH 8/9] lsi53c895a: avoid a warning from clang analyzer

2011-09-04 Thread Avi Kivity
On 09/04/2011 06:53 PM, Blue Swirl wrote: Avoid this warning from clang analyzer by adjusting the scope of the variable: /src/qemu/hw/lsi53c895a.c:895:5: warning: Value stored to 'id' is never read id = (current_tag>> 8)& 0xf; Signed-off-by: Blue Swirl --- hw/lsi53c895a.c | 14 +++

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Avi Kivity
On 09/04/2011 07:19 PM, Michael S. Tsirkin wrote: > But isn't it needed? Otherwise why don't vga accesses > alias with a virtio device at 0xc3c0? It really depends on the device I think. It's probably the bus. ISA may not decode A10-15, but if the pci/isa bridge does, then it doesn't mat

Re: [Qemu-devel] [PATCH V8 07/14] Implementation of the libtpms-based backend

2011-09-04 Thread Michael S. Tsirkin
On Thu, Sep 01, 2011 at 09:24:26PM -0400, Stefan Berger wrote: > In patch 6 I am adding a skeleton backend driver that I am > transforming into the libtpms-based backend in patch 7. I didn't > name the file tpm_skeleton.c but already tpm_builtin.c and all > functions already start with the prefix t

Re: [Qemu-devel] [PATCH 8/9] lsi53c895a: avoid a warning from clang analyzer

2011-09-04 Thread Blue Swirl
On Sun, Sep 4, 2011 at 4:20 PM, Avi Kivity wrote: > On 09/04/2011 06:53 PM, Blue Swirl wrote: >> >> Avoid this warning from clang analyzer by adjusting the scope >> of the variable: >> /src/qemu/hw/lsi53c895a.c:895:5: warning: Value stored to 'id' is never >> read >>     id = (current_tag>>  8)&  

Re: [Qemu-devel] [PATCH V8 01/14] Support for TPM command line options

2011-09-04 Thread Michael S. Tsirkin
On Thu, Sep 01, 2011 at 09:01:32PM -0400, Stefan Berger wrote: > On 09/01/2011 01:14 PM, Michael S. Tsirkin wrote: > >On Wed, Aug 31, 2011 at 10:35:52AM -0400, Stefan Berger wrote: > >>This patch adds support for TPM command line options. > >>The command line supported here (considering the libtpms

[Qemu-devel] [PATCH] configure: Avoid duplicate flags when calling compile_prog

2011-09-04 Thread Stefan Weil
This patch removes redundant shell code and cleans it a little bit. Shell macro compile_prog takes two arguments: local_cflags and local ldflags. $QEMU_CFLAGS is added automatically to the cflags, so there is no need to pass it as an argument. It is also unnecessary to pass -Werror twice. $flag

Re: [Qemu-devel] [PATCH V8 14/14] Allow to provide inital TPM state

2011-09-04 Thread Michael S. Tsirkin
On Thu, Sep 01, 2011 at 11:00:56PM -0400, Stefan Berger wrote: > >Do we really have to hand-craft file reading? > >How large is TPMPROP_TPM_MAX_NV_SPACE? > >If not too large, we can just allocate that > >and do a single fread call? > Yes, I could do that, too. > >Or, we rely on glib now - can we us

Re: [Qemu-devel] [PATCH V8 13/14] Add a TPM backend null driver implementation

2011-09-04 Thread Michael S. Tsirkin
On Thu, Sep 01, 2011 at 10:41:04PM -0400, Stefan Berger wrote: > On 09/01/2011 01:40 PM, Michael S. Tsirkin wrote: > >On Wed, Aug 31, 2011 at 10:36:04AM -0400, Stefan Berger wrote: > >>This patch adds a TPM null driver implementation acting as a backend for > >>the TIS hardware emulation. The NULL

Re: [Qemu-devel] [PATCH V8 01/14] Support for TPM command line options

2011-09-04 Thread Michael S. Tsirkin
On Thu, Sep 01, 2011 at 09:01:32PM -0400, Stefan Berger wrote: > >>Monitor support for 'info tpm' has been added. It for example prints the > >>following: > >> > >>TPM devices: > >> builtin: model=tpm-tis,id=tpm0 > >This mixes frontend and backend properties. > > > There's currently only one fron

Re: [Qemu-devel] [PATCH V8 10/14] Encrypt state blobs using AES CBC encryption

2011-09-04 Thread Michael S. Tsirkin
On Thu, Sep 01, 2011 at 10:23:51PM -0400, Stefan Berger wrote: > >>Checks are added that test > >>- whether encryption is supported follwing the revision of the directory > >> structure (rev>= 2) > >You never generate rev 1 code, right? > I did this in the previous patch that implemented rev 1 th

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Sun, Sep 04, 2011 at 07:22:54PM +0300, Avi Kivity wrote: > On 09/04/2011 07:19 PM, Michael S. Tsirkin wrote: > >> But isn't it needed? Otherwise why don't vga accesses > >> alias with a virtio device at 0xc3c0? > > > >It really depends on the device I think. > > > > It's probably the bus. I

Re: [Qemu-devel] [PATCH 8/9] lsi53c895a: avoid a warning from clang analyzer

2011-09-04 Thread Peter Maydell
On 4 September 2011 17:20, Avi Kivity wrote: > Why not keep id declared in the outer scope?  This extra indentation is > annoying. Personally I find that in a 125 line long function, declaring a variable at function scope when it's actually used only in a very small section of the code makes for

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-04 Thread Michael S. Tsirkin
On Mon, Jul 04, 2011 at 12:43:58PM +0300, Michael S. Tsirkin wrote: > This adds support for a standard pci to pci bridge, > enabling support for more than 32 PCI devices in the system. > To use, specify the device id as a 'bus' option. > Example: > -device pci-bridge,id=bridge1 \ > -net

Re: [Qemu-devel] emulated ARM performance vs real processor ?

2011-09-04 Thread Antti P Miettinen
Julien Heyman writes: > Hi, > > I was wondering if anyone had some data regarding the relative performance of > any given ARM board emulated in QEMU versus the real thing. Yes, I do know > this depends a lot on the host PC running qemu, but some ballpark/example > figures would help. Say, I emulat

[Qemu-devel] [PATCH] pci: implement bridge filtering

2011-09-04 Thread Michael S. Tsirkin
Support bridge filtering on top of the memory API as suggested by Avi Kivity: Create a memory region for the bridge's address space. This region is not directly added to system_memory or its descendants. Devices under the bridge see this region as its pci_address_space(). The region is as large

Re: [Qemu-devel] [PATCH v4 01/32] target-xtensa: add target stubs

2011-09-04 Thread Blue Swirl
On Thu, Sep 1, 2011 at 8:45 PM, Max Filippov wrote: > Signed-off-by: Max Filippov > --- >  Makefile.target           |    2 + >  arch_init.c               |    2 + >  arch_init.h               |    1 + >  cpu-exec.c                |    2 + >  elf.h                     |    2 + >  hw/xtensa_pic.c

Re: [Qemu-devel] [PATCH v4 06/32] target-xtensa: add sample board

2011-09-04 Thread Blue Swirl
On Thu, Sep 1, 2011 at 8:45 PM, Max Filippov wrote: > Sample board and sample CPU core are used for debug and may be used for > development of custom SoC emulators. > > This board has two fixed size memory regions for DTCM and ITCM and > variable length SRAM region. > > Signed-off-by: Max Filippov

Re: [Qemu-devel] [PATCH v4 09/32] target-xtensa: add special and user registers

2011-09-04 Thread Blue Swirl
On Thu, Sep 1, 2011 at 8:45 PM, Max Filippov wrote: > Special Registers hold the majority of the state added to the processor > by the options. See ISA, 5.3 for details. > > User Registers hold state added in support of designer's TIE and in some > cases of options that Tensilica provides. See ISA

Re: [Qemu-devel] [PATCH v3] rbd: fix leak in qemu_rbd_open failure paths

2011-09-04 Thread Stefan Hajnoczi
On Sun, Sep 4, 2011 at 5:19 PM, Sage Weil wrote: > Fix leak of s->snap in failure path.  Simplify error paths for the whole > function. > > Reported-by: Stefan Hajnoczi > Signed-off-by: Sage Weil > --- >  block/rbd.c |   28 +--- >  1 files changed, 13 insertions(+), 15 de

Re: [Qemu-devel] [PATCH v4 17/32] target-xtensa: implement exceptions

2011-09-04 Thread Blue Swirl
On Thu, Sep 1, 2011 at 8:45 PM, Max Filippov wrote: > - mark privileged opcodes with ring check; > - make debug exception on exception handler entry. > > Signed-off-by: Max Filippov > --- >  cpu-exec.c                |    6 +++ >  target-xtensa/cpu.h       |   67 >  t

Re: [Qemu-devel] [PATCH v4 19/32] target-xtensa: implement windowed registers

2011-09-04 Thread Blue Swirl
On Thu, Sep 1, 2011 at 8:45 PM, Max Filippov wrote: > See ISA, 4.7.1 for details. > > Physical registers and currently visible window are separate fields in > CPUEnv. Only current window is accessible to TCG. On operations that > change window base helpers copy current window to and from physical

Re: [Qemu-devel] [PATCH v4 22/32] target-xtensa: implement unaligned exception option

2011-09-04 Thread Blue Swirl
On Thu, Sep 1, 2011 at 8:45 PM, Max Filippov wrote: > See ISA, 4.4.4 for details. > > Correct (aligned as per ISA) address for unaligned access is generated > in case this option is not enabled. > > Signed-off-by: Max Filippov > --- >  target-xtensa/helper.c    |    4 ++- >  target-xtensa/op_help

  1   2   >