Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 02:43 PM, Jan Kiszka wrote: On 2011-07-20 10:13, Avi Kivity wrote: > On 07/19/2011 08:30 PM, Jan Kiszka wrote: >>> Rebasing is already not so fun for me with 78 patches and counting. >>> Let's drop yours and focus of getting mine in shape, since it's a superset. >> >> The pat

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 02:20 PM, Jan Kiszka wrote: On 2011-07-20 10:13, Avi Kivity wrote: > On 07/19/2011 08:30 PM, Jan Kiszka wrote: >>> Rebasing is already not so fun for me with 78 patches and counting. >>> Let's drop yours and focus of getting mine in shape, since it's a superset. >> >> The pat

Re: [Qemu-devel] [PATCH] xen: fix xen-mapcache build on non-Xen capable targets

2011-07-20 Thread Stefano Stabellini
On Wed, 20 Jul 2011, Avi Kivity wrote: > Signed-off-by: Avi Kivity Alex sent another patch few days ago to do the same thing: http://marc.info/?l=qemu-devel&m=131099500331906&w=2 it hasn't been merged yet but it is in Alex's xen-next branch.

Re: [Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-20 Thread Jan Kiszka
On 2011-07-20 14:00, Isaku Yamahata wrote: > Hi. This clean up looks good basically. Oops, forgot to cc you. Sorry. > But when conventional pci device is accessed via MMCONFIG area, > addr &= addr_mask doesn't work as expected. > The config area of [256, 4K) of conventional pci should have no eff

Re: [Qemu-devel] [PATCH 0/3] MIPS64 user mode emulation in QEMU with Cavium specific instruction support

2011-07-20 Thread riku voipio
Hi, On 07/12/2011 02:09 PM, Khansa Butt wrote: We have developed Mips64 user mode emulation. In addition we implemented Cavium specific instruction along with octeon CPU definition. We need your support to make our contribution public ally available via making it open source. I tried to resolve

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Cleber Rosa
On 07/19/2011 12:14 PM, Anthony Liguori wrote: On 07/19/2011 09:30 AM, Jes Sorensen wrote: On 07/19/11 16:24, Eric Blake wrote: [adding the libvir-list] On 07/19/2011 08:09 AM, Jes Sorensen wrote: Urgh, libvirt parsing image files is really unfortunate, it really doesn't give me warm fuzzy fee

Re: [Qemu-devel] [PATCH 2/9] vmstate: complain about devices without vmstate

2011-07-20 Thread Peter Maydell
On 20 July 2011 11:09, Gerd Hoffmann wrote: > --- a/hw/qdev.c > +++ b/hw/qdev.c > @@ -283,7 +283,12 @@ int qdev_init(DeviceState *dev) >         qdev_free(dev); >         return rc; >     } > -    if (dev->info->vmsd) { > +    if (dev->info->vmsd == NULL) { > +        /* TODO: fixup qemu source co

Re: [Qemu-devel] [PATCH 2/9] vmstate: complain about devices without vmstate

2011-07-20 Thread Gerd Hoffmann
On 07/20/11 14:40, Peter Maydell wrote: On 20 July 2011 11:09, Gerd Hoffmann wrote: --- a/hw/qdev.c +++ b/hw/qdev.c @@ -283,7 +283,12 @@ int qdev_init(DeviceState *dev) qdev_free(dev); return rc; } -if (dev->info->vmsd) { +if (dev->info->vmsd == NULL) { +/

Re: [Qemu-devel] [PATCH] Remove debugging messages.

2011-07-20 Thread Anthony Liguori
On 07/20/2011 03:50 AM, Richard W.M. Jones wrote: On Tue, Jul 19, 2011 at 04:56:24PM -0500, Anthony Liguori wrote: Can't libguestfs just ignore the messages? It does, but they get printed to stderr which confuses users and has caused several bug reports in the past. We'll probably have to red

Re: [Qemu-devel] [RFC PATCH 0/5] Coroutines cleanup

2011-07-20 Thread Kevin Wolf
Am 20.07.2011 09:56, schrieb Frediano Ziglio: > These patches mostly cleanup some AIO code using coroutines. > These patches apply to Kevin's repository, branch coroutine-block. > Mostly they use stack instead of allocated AIO structure. I think your changes generally make sense as an example of h

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Jes Sorensen
On 07/20/11 12:01, Kevin Wolf wrote: >> > Right, we're stuck with the two horros of NFS and selinux, so we need >> > something that gets around the problem. In a sane world we would simply >> > say 'no NFS, no selinux', but as you say that will never happen. >> > >> > My suggestion of a callback m

[Qemu-devel] [PATCH] removed unused function

2011-07-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block.c | 13 - block.h |2 -- 2 files changed, 0 insertions(+), 15 deletions(-) diff --git a/block.c b/block.c index 24a25d5..b879d2f 100644 --- a/block.c +++ b/block.c @@ -1108,19 +1108,6 @@ int bdrv_pwrite_sync(BlockDriverState *bs, int64_

Re: [Qemu-devel] [RFC PATCH 5/5] qemu_aio_get used to clear all allocated buffer

2011-07-20 Thread Frediano Ziglio
2011/7/20 Kevin Wolf : > Am 20.07.2011 09:57, schrieb Frediano Ziglio: >> Signed-off-by: Frediano Ziglio >> --- >>  block/qcow.c |    2 +- >>  1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/block/qcow.c b/block/qcow.c >> index 007fb57..8fd1ee5 100644 >> --- a/block/qcow.c >> +

Re: [Qemu-devel] [PATCH 1/2] spice: add sanity check for spice ports

2011-07-20 Thread Alon Levy
On Wed, Jul 20, 2011 at 12:25:37PM +0200, Gerd Hoffmann wrote: > Make sure at least one port (port=.. or tls-port=...) > is specified. Also apply range checks to the port numbers. > > Signed-off-by: Gerd Hoffmann ACK. > --- > ui/spice-core.c | 11 ++- > 1 files changed, 10 insertion

Re: [Qemu-devel] [RFC PATCH 5/5] qemu_aio_get used to clear all allocated buffer

2011-07-20 Thread Kevin Wolf
Am 20.07.2011 09:57, schrieb Frediano Ziglio: > Signed-off-by: Frediano Ziglio > --- > block/qcow.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/block/qcow.c b/block/qcow.c > index 007fb57..8fd1ee5 100644 > --- a/block/qcow.c > +++ b/block/qcow.c > @@ -499,7 +49

[Qemu-devel] [PATCH] usb-ehci: trace: rename "next" to "nxt".

2011-07-20 Thread Gerd Hoffmann
"next" is reserved in systemtap thus using this as a trace parameter name causes trouble when trying to trace with systemtap. Signed-off-by: Gerd Hoffmann --- trace-events |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/trace-events b/trace-events index ad11b09..077

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Kevin Wolf
Am 20.07.2011 15:25, schrieb Jes Sorensen: > On 07/20/11 12:01, Kevin Wolf wrote: Right, we're stuck with the two horros of NFS and selinux, so we need something that gets around the problem. In a sane world we would simply say 'no NFS, no selinux', but as you say that will never hap

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Jan Kiszka
On 2011-07-20 13:57, Avi Kivity wrote: > On 07/20/2011 02:43 PM, Jan Kiszka wrote: >> On 2011-07-20 10:13, Avi Kivity wrote: >>> On 07/19/2011 08:30 PM, Jan Kiszka wrote: > Rebasing is already not so fun for me with 78 patches and counting. > Let's drop yours and focus of getting mine

[Qemu-devel] [RFC PATCH 5/5] qcow: small optimization initializing QCowAIOCB

2011-07-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 007fb57..8fd1ee5 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -499,7 +499,6 @@ static QCowAIOCB *qcow_aio_setup(BlockDriverState *bs,

Re: [Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-20 Thread Jan Kiszka
On 2011-07-20 14:15, Jan Kiszka wrote: > On 2011-07-20 14:00, Isaku Yamahata wrote: >> Hi. This clean up looks good basically. > > Oops, forgot to cc you. Sorry. > >> But when conventional pci device is accessed via MMCONFIG area, >> addr &= addr_mask doesn't work as expected. >> The config area

Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API

2011-07-20 Thread Jan Kiszka
On 2011-07-17 13:13, Avi Kivity wrote: > Convert all vga memory to the memory API. Note we need to fall back to > get_system_memory(), since the various buses don't pass the vga window > as a memory region. > > Signed-off-by: Avi Kivity > --- > hw/cirrus_vga.c | 345 >

[Qemu-devel] [Bug 813546] [NEW] option to disable PS/2 mouse

2011-07-20 Thread Michal Suchanek
Public bug reported: Adds an option to disable the PS/2 mouse. This is useful to work around bugs in PS/2 drivers in some system or testing system without a PS/2 mouse present. ** Affects: qemu Importance: Undecided Status: New -- You received this bug notification because you ar

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 04:57 PM, Jan Kiszka wrote: Something around dirty logging is still seriously borken: when I boot with standard or cirrus vga, the screen is not properly updated in logged modes. I don't see this here, will retest. I bet the reason is lacking semantics of cpu_register_physical_

[Qemu-devel] [Bug 813546] Re: option to disable PS/2 mouse

2011-07-20 Thread Michal Suchanek
** Attachment added: "patch against kvm 0.14" https://bugs.launchpad.net/bugs/813546/+attachment/2220915/+files/nops2.patch -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/813546 Title: option to

[Qemu-devel] [RFC PATCH 0/5] qcow: coroutines cleanup

2011-07-20 Thread Frediano Ziglio
These patches mostly cleanup some AIO code using coroutines. These patches apply to Kevin's repository, branch coroutine-block. Mostly they use stack instead of allocated AIO structure. Frediano Ziglio (5): qcow: allocate QCowAIOCB structure using stack qcow: QCowAIOCB field cleanup qcow: mo

Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 05:05 PM, Jan Kiszka wrote: On 2011-07-17 13:13, Avi Kivity wrote: > Convert all vga memory to the memory API. Note we need to fall back to > get_system_memory(), since the various buses don't pass the vga window > as a memory region. > > > if (limit> 0) { > -/*

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Anthony Liguori
On 07/20/2011 08:50 AM, Cleber Rosa wrote: Just as a reminder: with DAC, if a guest is compromised and somehow escalates to QEMU, it could disable its isolation (ie, by setting their own image files world readable). I guess we shouldn't try to fix the DAC model, but fix what's preventing us from

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 05:37 PM, Michael S. Tsirkin wrote: > > If you do a memory_region_set_log() immediately after > memory_region_init_ram(), then as soon as the framebuffer is added > to the memory hierarchy, it will have logging enabled (or any > aliases of the framebuffer). Still, I think we sh

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Eric Blake
On 07/20/2011 07:25 AM, Jes Sorensen wrote: I think if libvirt wants qemu to use an fd instead of a file name, it shouldn't pass a file name but an fd in the first place. Which means that the two that we need are support for an fd: protocol (patches on the list, need review), and a way for libvir

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Anthony Liguori
On 07/20/2011 03:10 AM, Avi Kivity wrote: On 07/19/2011 11:51 PM, Anthony Liguori wrote: On 07/19/2011 11:10 AM, Avi Kivity wrote: On 07/19/2011 07:05 PM, Avi Kivity wrote: On 07/19/2011 05:50 PM, Anthony Liguori wrote: There's bits I don't like about the interface Which bits are these?

[Qemu-devel] [RFC PATCH 1/5] qcow: allocate QCowAIOCB structure using stack

2011-07-20 Thread Frediano Ziglio
instead of calling qemi_aio_get use stack Signed-off-by: Frediano Ziglio --- block/qcow.c | 52 block/qcow2.c | 38 +++--- 2 files changed, 27 insertions(+), 63 deletions(-) diff --git a/block/qcow.c b/blo

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Michael S. Tsirkin
On Wed, Jul 20, 2011 at 05:32:54PM +0300, Avi Kivity wrote: > On 07/20/2011 04:57 PM, Jan Kiszka wrote: > >Something around dirty logging is still seriously borken: when I boot > >with standard or cirrus vga, the screen is not properly updated in > >logged modes. > > > > I don't see this here, wil

Re: [Qemu-devel] [PATCHv2] target-arm: support for ARM1176JZF-s cores

2011-07-20 Thread Peter Maydell
On 19 July 2011 13:32, Jamie Iles wrote: > Add support for v6K ARM1176JZF-S.  This core includes the VA<->PA > translation capability and security extensions. > +static uint32_t arm1176_cp15_c0_c1[8] = > +{ 0x111, 0x11, 0x33, 0x01130003, 0x01130003, 0x10030302, 0x01222100, 0 }; This seems to be

[Qemu-devel] [RFC PATCH 4/5] avoid dandling pointers

2011-07-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 8ccd7d7..007fb57 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -616,6 +616,7 @@ static int qcow_co_readv(BlockDriverState *bs, int64_t se

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Anthony Liguori
On 07/19/2011 11:47 AM, Daniel P. Berrange wrote: This would be possible if QEMU to provide a libblockformat.so library which allowed apps to extract metadata from file formats using a stable API. I'm in 100% agreement that we need to provide the equivalent of a libblockformat.so down the road

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Jan Kiszka
On 2011-07-20 16:37, Michael S. Tsirkin wrote: > On Wed, Jul 20, 2011 at 05:32:54PM +0300, Avi Kivity wrote: >> On 07/20/2011 04:57 PM, Jan Kiszka wrote: >>> Something around dirty logging is still seriously borken: when I boot >>> with standard or cirrus vga, the screen is not properly updated in

Re: [Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-20 Thread Michael S. Tsirkin
On Tue, Jul 19, 2011 at 11:39:02PM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > Introduce pci_config_read/write helpers to split up config space > accesses that are not length-aligned. This particularly avoids that each > and every device needs to check for config space overruns. Also move the

[Qemu-devel] [RFC PATCH 2/5] qcow: QCowAIOCB field cleanup

2011-07-20 Thread Frediano Ziglio
remove unused field from this structure and put some of them in qcow_aio_read_cb and qcow_aio_write_cb Signed-off-by: Frediano Ziglio --- block/qcow.c | 133 +++--- 1 files changed, 62 insertions(+), 71 deletions(-) diff --git a/block/qcow.c

[Qemu-devel] [RFC PATCH 3/5] qcow: move some blocks of code to avoid useless variable initialization

2011-07-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- block/qcow.c | 53 ++--- 1 files changed, 26 insertions(+), 27 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index cd1f9e3..8ccd7d7 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -520,35 +520,18 @@ sta

[Qemu-devel] [PATCH 12/55] ide: Fix ATA command READ to set ATAPI signature for CD-ROM

2011-07-20 Thread Markus Armbruster
Must set the ATAPI device signature, see ACS-2 7.36.6 Outputs for PACKET feature set devices. Signed-off-by: Markus Armbruster --- hw/ide/core.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index fa50692..f96ebf2 100644 --- a/hw/ide/co

[Qemu-devel] [PATCH 32/55] ide/atapi: Don't fail eject when tray is already open

2011-07-20 Thread Markus Armbruster
MMC-5 6.40.2.6 specifies that START STOP UNIT succeeds when the drive already has the requested state. cmd_start_stop_unit() fails when asked to eject while the tray is open and locked. Fix that. Signed-off-by: Markus Armbruster --- hw/ide/atapi.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [Qemu-devel] External COW format for raw images

2011-07-20 Thread Marcelo Tosatti
On Wed, Jul 20, 2011 at 09:35:05AM +0100, Stefan Hajnoczi wrote: > 2011/7/19 Anthony Liguori : > > On 07/19/2011 04:25 AM, Robert Wang wrote: > >> As you known, raw image is very popular,but the raw image format does > >> NOT support Copy-On-Write,a raw image file can NOT be used as a copy > >> des

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Jan Kiszka
On 2011-07-20 16:54, Avi Kivity wrote: > On 07/20/2011 05:37 PM, Michael S. Tsirkin wrote: >>> >>> If you do a memory_region_set_log() immediately after >>> memory_region_init_ram(), then as soon as the framebuffer is added >>> to the memory hierarchy, it will have logging enabled (or any >>> a

[Qemu-devel] [PATCH 23/55] block: Show whether the guest ejected the medium in info block

2011-07-20 Thread Markus Armbruster
Need to ask the device, so this requires new BlockDevOps member is_medium_ejected(). Signed-off-by: Markus Armbruster --- block.c | 18 -- block.h |6 ++ hw/ide/core.c |6 ++ hw/scsi-disk.c | 10 ++ qmp-commands.hx |1 + 5 files

Re: [Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-20 Thread Michael S. Tsirkin
On Wed, Jul 20, 2011 at 04:36:51PM +0200, Jan Kiszka wrote: > > A 4 byte access at address 255 would wrap around to 0 with this, > > while previously we ignored high bits on write and returned > > 0 on read. > > The question is rather what the spec or real hw demand from us. Do you > have any insi

[Qemu-devel] [PATCH 10/55] ide: Update command code definitions as per ACS-2 Table B.2

2011-07-20 Thread Markus Armbruster
Drop WIN_SRST, it has same value as WIN_DEVICE_RESET. CFA_IDLEIMMEDIATE isn't specific to CFATA. ACS-2 shows it as a defined command in ATA-1, -2 and -3. Rename to WIN_IDLEIMMEDIATE2. Turn unused macros into comments. Mark vendor specific, retired, obsolete. Signed-off-by: Markus Armbruster

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 06:58 PM, Jan Kiszka wrote: On 2011-07-20 16:54, Avi Kivity wrote: > On 07/20/2011 05:37 PM, Michael S. Tsirkin wrote: >>> >>> If you do a memory_region_set_log() immediately after >>> memory_region_init_ram(), then as soon as the framebuffer is added >>> to the memory hierar

Re: [Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-20 Thread Jan Kiszka
On 2011-07-20 16:22, Michael S. Tsirkin wrote: > On Tue, Jul 19, 2011 at 11:39:02PM +0200, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Introduce pci_config_read/write helpers to split up config space >> accesses that are not length-aligned. This particularly avoids that each >> and every device ne

[Qemu-devel] [PATCH 03/55] block: Attach non-qdev devices as well

2011-07-20 Thread Markus Armbruster
For now, this just protects against programming errors like having the same drive back multiple non-qdev devices, or untimely bdrv_delete(). Later commits will add other interesting uses. While there, rename BlockDriverState member peer to dev, bdrv_attach() to bdrv_attach_dev(), bdrv_detach() to

Re: [Qemu-devel] [PATCHv2] target-arm: support for ARM1176JZF-s cores

2011-07-20 Thread Jamie Iles
On Wed, Jul 20, 2011 at 04:59:29PM +0100, Peter Maydell wrote: > On 20 July 2011 16:36, Jamie Iles wrote: > > On Wed, Jul 20, 2011 at 03:35:19PM +0100, Peter Maydell wrote: > >> On 19 July 2011 13:32, Jamie Iles wrote: > >> > Add support for v6K ARM1176JZF-S.  This core includes the VA<->PA > >>

Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API

2011-07-20 Thread Jan Kiszka
On 2011-07-20 16:40, Avi Kivity wrote: > On 07/20/2011 05:05 PM, Jan Kiszka wrote: >> On 2011-07-17 13:13, Avi Kivity wrote: >>> Convert all vga memory to the memory API. Note we need to fall back to >>> get_system_memory(), since the various buses don't pass the vga window >>> as a memory regi

Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 05:52 PM, Jan Kiszka wrote: > > Hmm, I guess you could just mark the entire range dirty after removing it. Maybe. So the problem is that the dirty bitmap is lost when we unregister a region with the KVM kernel? Yes. What I'd like is an atomic API to replace the entire memory m

[Qemu-devel] [PATCH 18/55] scsi-disk: Reject CD-specific SCSI commands to disks

2011-07-20 Thread Markus Armbruster
Use a table to declare which drive kinds accept each command. Limit READ_CAPACITY, READ_TOC, GET_CONFIGURATION to SCSI_CD, as per SPC-4. It would be nice to have handler functions in the table, like commit e1a064f9 did for ATAPI. Left for another day. Signed-off-by: Markus Armbruster --- hw/s

Re: [Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-20 Thread Michael S. Tsirkin
On Thu, Jul 21, 2011 at 01:17:02AM +0900, Isaku Yamahata wrote: > On Wed, Jul 20, 2011 at 04:27:08PM +0200, Jan Kiszka wrote: > > On 2011-07-20 14:15, Jan Kiszka wrote: > > > On 2011-07-20 14:00, Isaku Yamahata wrote: > > >> Hi. This clean up looks good basically. > > > > > > Oops, forgot to cc yo

Re: [Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-20 Thread Isaku Yamahata
On Wed, Jul 20, 2011 at 04:27:08PM +0200, Jan Kiszka wrote: > On 2011-07-20 14:15, Jan Kiszka wrote: > > On 2011-07-20 14:00, Isaku Yamahata wrote: > >> Hi. This clean up looks good basically. > > > > Oops, forgot to cc you. Sorry. > > > >> But when conventional pci device is accessed via MMCONFI

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 07:13 PM, Jan Kiszka wrote: > >> BTW, what's broken is legacy VGA mem dirty logging. Was simply dropped >> during the conversion, and now I'm missing some links between vga core >> and its users to reestablish it generically. > > You mean logging of 0xa-0xc? That's prob

[Qemu-devel] [PATCH 20/55] scsi-disk: Track tray open/close state

2011-07-20 Thread Markus Armbruster
We already track it in BlockDriverState since commit 4be9762a. As discussed in that commit's message, we should track it in the device device models instead, because it's device state. Signed-off-by: Markus Armbruster --- hw/scsi-disk.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-

Re: [Qemu-devel] [PATCH 0/6] Xen patch queue 2011-07-20

2011-07-20 Thread Alexander Graf
On 19.07.2011, at 04:53, Alexander Graf wrote: > Hi Anthony, > > This is my current patch queue for Xen stuff that fixes even more regressions > introduced by recent Xen patches. I hope this time we're regression-free. Again, this is obviously a [PULL] mail :). I really need to improve on check

Re: [Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-20 Thread Jan Kiszka
On 2011-07-20 18:17, Isaku Yamahata wrote: > On Wed, Jul 20, 2011 at 04:27:08PM +0200, Jan Kiszka wrote: >> On 2011-07-20 14:15, Jan Kiszka wrote: >>> On 2011-07-20 14:00, Isaku Yamahata wrote: Hi. This clean up looks good basically. >>> >>> Oops, forgot to cc you. Sorry. >>> But when con

[Qemu-devel] [PATCH 38/55] scsi-disk: Preserve tray state on migration

2011-07-20 Thread Markus Armbruster
Breaks migration of qdevs "scsi-cd" and legacy "scsi-disk" to older versions. We normally use subsections to avoid that. Not possible here, because we don't have a section to begin with. Too bad. Signed-off-by: Markus Armbruster --- hw/scsi-disk.c | 35 +++ 1

[Qemu-devel] [PATCH 01/55] blockdev: Make eject fail for non-removable drives even with -f

2011-07-20 Thread Markus Armbruster
Ejecting hard disk platters can only end in tears. If you need to revoke access to an image, use drive_del, not eject -f. Signed-off-by: Markus Armbruster --- blockdev.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/blockdev.c b/blockdev.c index a97a8

[Qemu-devel] [PATCH 27/55] scsi-disk: Switch from BlockDriverState's locked to own tray_locked

2011-07-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/scsi-disk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index a220426..aac63b6 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -676,7 +676,7 @@ static int mode_sense_page(SCSIRequest *req, i

[Qemu-devel] [PATCH 41/55] fdc: Make media change detection more robust

2011-07-20 Thread Markus Armbruster
fdctrl_change_cb() gets called on a virtual media change via monitor. It would be nice if host device block drivers called it on physical media change, but they don't. bdrv_media_changed() lets you poll for media change, but it returns "don't know" except with block driver "host_floppy". FDrive m

[Qemu-devel] [PATCH 00/55] Block layer cleanup & fixes

2011-07-20 Thread Markus Armbruster
This patch series looks bigger than it is. All the patches are small and hopefully easy to review. Objectives: * Push BlockDriverState members locked, tray_open, media_changed into device models, where they belong. * BlockDriverState member removable is a confusing mess, replace it. * Improv

[Qemu-devel] [PATCH 34/55] scsi-disk: Fix START_STOP to fail when it can't eject

2011-07-20 Thread Markus Armbruster
Don't fail when tray is already open. Signed-off-by: Markus Armbruster --- hw/scsi-bus.c | 10 ++ hw/scsi-disk.c | 15 +++ hw/scsi.h |4 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index ad6a730..169a022 100

[Qemu-devel] [PATCH 42/55] block: Clean up bdrv_flush_all()

2011-07-20 Thread Markus Armbruster
Change (!bdrv_is_removable(bs) || bdrv_is_inserted(bs)) to just bdrv_is_inserted(). Rationale: The value of bdrv_is_removable(bs) matters only when bdrv_is_inserted(bs) is false. bdrv_is_inserted(bs) is true when bs is open (bs->drv != NULL) and not an empty host drive (CD-ROM or

[Qemu-devel] [PATCH 08/55] block: Make BlockDriver method bdrv_eject() return void

2011-07-20 Thread Markus Armbruster
Callees always return 0, except for FreeBSD's cdrom_eject(), which returns -ENOTSUP when the device is in a terminally wedged state. The only caller is bdrv_eject(), and it maps -ENOTSUP to 0 since commit 4be9762a. Signed-off-by: Markus Armbruster --- block.c | 17 -

[Qemu-devel] [PATCH 15/55] ide/atapi: Clean up misleading name in cmd_start_stop_unit()

2011-07-20 Thread Markus Armbruster
"eject" is misleading; it means "eject" when start is clear, but "load" when start is set. Rename to loej, because that's how MMC-5 calls it, in section 6.40. Signed-off-by: Markus Armbruster --- hw/ide/atapi.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i

Re: [Qemu-devel] [PATCHv2] target-arm: support for ARM1176JZF-s cores

2011-07-20 Thread Peter Maydell
On 20 July 2011 16:36, Jamie Iles wrote: > On Wed, Jul 20, 2011 at 03:35:19PM +0100, Peter Maydell wrote: >> On 19 July 2011 13:32, Jamie Iles wrote: >> > Add support for v6K ARM1176JZF-S.  This core includes the VA<->PA >> > translation capability and security extensions. >> >> > +static uint32_

[Qemu-devel] [PATCH 45/55] block: Clean up remaining users of "removable"

2011-07-20 Thread Markus Armbruster
BlockDriverState member removable is a confused mess. It is true when an ide-cd, scsi-cd or floppy qdev is attached, or when the BlockDriverState was created with -drive if={floppy,sd} or -drive if={ide,scsi,xen,none},media=cdrom ("created removable"), except when an ide-hd, scsi-hd, scsi-generic

[Qemu-devel] [PATCH 09/55] block: Don't let locked flag prevent medium load

2011-07-20 Thread Markus Armbruster
Commit aea2a33c made bdrv_eject() obey the locked flag. Correct for medium eject (eject_flag set), incorrect for medium load (eject_flag clear). See MMC-5 Table 341 "Actions for Lock/Unlock/Eject". Signed-off-by: Markus Armbruster --- block.c |2 +- 1 files changed, 1 insertions(+), 1 dele

[Qemu-devel] [PATCH 31/55] ide: Provide IDEDeviceInfo method exit()

2011-07-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/ide/internal.h |1 + hw/ide/qdev.c | 12 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/hw/ide/internal.h b/hw/ide/internal.h index 12f80de..df8887a 100644 --- a/hw/ide/internal.h +++ b/hw/ide/internal.h @@ -527,6 +5

[Qemu-devel] [PATCH 55/55] ide/atapi scsi-disk: Make monitor eject -f, then change work

2011-07-20 Thread Markus Armbruster
change fails while the tray is locked by the guest. eject -f forces it open and removes any media. Unfortunately, the tray closes again instantly. Since the lock remains as it is, there is no way to insert another medium unless the guest voluntarily unlocks. Fix by leaving the tray open after m

[Qemu-devel] [PATCH 21/55] block: Revert entanglement of bdrv_is_inserted() with tray status

2011-07-20 Thread Markus Armbruster
Commit 4be9762a changed bdrv_is_inserted() to fail when the tray is open. Unfortunately, there are two different kinds of users, with conflicting needs. 1. Device models using bdrv_eject(), currently ide-cd and scsi-cd. They expect bdrv_is_inserted() to reflect the tray status. Commit 4be9762a m

[Qemu-devel] [PATCH 33/55] ide/atapi: Avoid physical/virtual tray state mismatch

2011-07-20 Thread Markus Armbruster
When ide-cd is backed by a physical drive, we want the physical tray match the virtual one. To that end, we call bdrv_eject() on guest's load/eject, and bdrv_lock_medium() on guest's prevent/allow removal. But we don't set the initial state on device model init. Fix that. While there, also unloc

[Qemu-devel] [PATCH 29/55] block: Drop medium lock tracking, ask device models instead

2011-07-20 Thread Markus Armbruster
Requires new BlockDevOps member is_medium_locked(). Implement for IDE and SCSI CD-ROMs. Signed-off-by: Markus Armbruster --- block.c| 16 +--- block.h|7 ++- block_int.h|1 - blockdev.c |2 +- hw/ide/core.c |6 ++ hw/scsi-disk.c |

[Qemu-devel] [PATCH 04/55] block: Generalize change_cb() to BlockDevOps

2011-07-20 Thread Markus Armbruster
So we can more easily add device model callbacks. Signed-off-by: Markus Armbruster --- block.c | 43 +-- block.h |9 ++--- block_int.h |5 ++--- hw/ide/core.c |6 +- hw/sd.c |6 +- hw/virtio-blk.c

Re: [Qemu-devel] [PATCH] xen: fix xen-mapcache build on non-Xen capable targets

2011-07-20 Thread Stefan Weil
Am 20.07.2011 13:01, schrieb Stefano Stabellini: On Wed, 20 Jul 2011, Avi Kivity wrote: Signed-off-by: Avi Kivity Alex sent another patch few days ago to do the same thing: http://marc.info/?l=qemu-devel&m=131099500331906&w=2 it hasn't been merged yet but it is in Alex's xen-next branch.

[Qemu-devel] [PATCH 14/55] ide: Reject ATA commands specific to drive kinds

2011-07-20 Thread Markus Armbruster
ACS-2 Table B.2 explicitly prohibits ATAPI devices from implementing WIN_RECAL, WIN_READ_EXT, WIN_READDMA_EXT, WIN_READ_NATIVE_MAX, WIN_MULTREAD_EXT, WIN_WRITE, WIN_WRITE_ONCE, WIN_WRITE_EXT, WIN_WRITEDMA_EXT, WIN_MULTWRITE_EXT, WIN_WRITE_VERIFY, WIN_VERIFY, WIN_VERIFY_ONCE, WIN_VERIFY_EXT, WIN_SPE

Re: [Qemu-devel] [PATCH] xen: fix xen-mapcache build on non-Xen capable targets

2011-07-20 Thread Alexander Graf
On 20.07.2011, at 18:31, Stefan Weil wrote: > Am 20.07.2011 13:01, schrieb Stefano Stabellini: >> On Wed, 20 Jul 2011, Avi Kivity wrote: >>> Signed-off-by: Avi Kivity >> >> Alex sent another patch few days ago to do the same thing: >> >> http://marc.info/?l=qemu-devel&m=131099500331906&w=2 >>

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Michael S. Tsirkin
On Wed, Jul 20, 2011 at 05:54:26PM +0300, Avi Kivity wrote: > On 07/20/2011 05:37 PM, Michael S. Tsirkin wrote: > >> > >> If you do a memory_region_set_log() immediately after > >> memory_region_init_ram(), then as soon as the framebuffer is added > >> to the memory hierarchy, it will have loggi

[Qemu-devel] [PATCH 36/55] ide: Give vmstate structs internal linkage where possible

2011-07-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/ide/core.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 1c84b68..709645e 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2057,7 +2057,7 @@ static bool ide_error_needed(void *opaque) }

[Qemu-devel] [PATCH 06/55] block/raw-win32: Drop disabled code for removable host devices

2011-07-20 Thread Markus Armbruster
It's been disabled since the start (commit 19cb3738, Aug 2006), and has been untouched except for spelling fixes and such. I don't feel like dragging it along any further. Signed-off-by: Markus Armbruster --- block/raw-win32.c | 35 --- 1 files changed, 0 inser

[Qemu-devel] [PATCH 11/55] ide: Clean up case label indentation in ide_exec_cmd()

2011-07-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/ide/core.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 88ee768..fa50692 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -954,7 +954,7 @@ void ide_exec_cmd(IDEBus *bus, uint32_t v

Re: [Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-20 Thread Michael S. Tsirkin
On Wed, Jul 20, 2011 at 06:18:43PM +0200, Jan Kiszka wrote: > On 2011-07-20 18:17, Isaku Yamahata wrote: > > On Wed, Jul 20, 2011 at 04:27:08PM +0200, Jan Kiszka wrote: > >> On 2011-07-20 14:15, Jan Kiszka wrote: > >>> On 2011-07-20 14:00, Isaku Yamahata wrote: > Hi. This clean up looks good b

[Qemu-devel] [PATCH 30/55] block: Rename bdrv_set_locked() to bdrv_lock_medium()

2011-07-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- block.c |8 block.h |2 +- block/raw-posix.c |8 block/raw.c |6 +++--- block_int.h |2 +- hw/ide/atapi.c|2 +- hw/scsi-disk.c|2 +- trace-events |2 +- 8 files cha

[Qemu-devel] [PATCH 16/55] ide/atapi: Track tray open/close state

2011-07-20 Thread Markus Armbruster
We already track it in BlockDriverState since commit 4be9762a. As discussed in that commit's message, we should track it in the device device models instead, because it's device state. Signed-off-by: Markus Armbruster --- hw/ide/atapi.c|4 hw/ide/internal.h |1 + 2 files change

[Qemu-devel] [PATCH 19/55] scsi-disk: Factor out scsi_disk_emulate_start_stop()

2011-07-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/scsi-disk.c | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index c4643d0..544ecef 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -817,6 +817,18 @@ static int scsi_disk_emulate_

Re: [Qemu-devel] qemu FreeBSD/sparc64 host - a bit of debugging

2011-07-20 Thread Blue Swirl
On Mon, Jul 18, 2011 at 9:22 PM, Juergen Lock wrote: > Hi! > >  I'm the FreeBSD qemu port maintainer and don't have a sparc64 box > myself, but Jashank Jeremy (Cc'd) now was so kind to test qemu 0.14.1 > on a FreeBSD/sparc64 box booting a FreeBSD 8/i386 install iso using > i386-softmmu and we foun

[Qemu-devel] [PATCH 43/55] savevm: Include writable devices with removable media

2011-07-20 Thread Markus Armbruster
savevm and loadvm silently ignore block devices with removable media, such as floppies and SD cards. Rolling back a VM to a previous checkpoint will *not* roll back writes to block devices with removable media. Moreover, bdrv_is_removable() is a confused mess, and wrong in at least one case: it c

[Qemu-devel] [PATCH 02/55] block: Reset device model callbacks on detach

2011-07-20 Thread Markus Armbruster
BlockDriverState members change_cb and change_opaque are initially null. The device model may set them, with bdrv_set_change_cb(). If the device model gets detached (hot unplug), they're left dangling. Only safe because device hot unplug automatically destroys the BlockDriverState. But that's a

[Qemu-devel] [RFC v5 26/86] cirrus: simplify mmio BAR access functions

2011-07-20 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 78 +- 1 files changed, 8 insertions(+), 70 deletions(-) diff --git a/hw/cirrus_vga.c b/hw

[Qemu-devel] [PATCH 46/55] block: Drop BlockDriverState member removable

2011-07-20 Thread Markus Armbruster
It's a confused mess (see previous commit). No users remain. Signed-off-by: Markus Armbruster --- block.c |8 block.h |1 - block_int.h |1 - blockdev.c|5 - hw/fdc.c |1 - hw/ide/core.c |1 - hw/scsi-disk.c

[Qemu-devel] [PATCH 05/55] block: Split change_cb() into change_media_cb(), resize_cb()

2011-07-20 Thread Markus Armbruster
Multiplexing callbacks complicates matters needlessly. Signed-off-by: Markus Armbruster --- block.c | 23 +++ block.h | 12 +++- block_int.h |3 --- hw/ide/core.c |8 ++-- hw/sd.c |8 ++-- hw/virtio-blk.c |8 ++

[Qemu-devel] [PATCH 54/55] block: New change_media_cb() parameter load

2011-07-20 Thread Markus Armbruster
To let device models distinguish between eject and load. Signed-off-by: Markus Armbruster --- block.c| 12 ++-- block.h|3 ++- hw/fdc.c |2 +- hw/ide/core.c |2 +- hw/scsi-disk.c |2 +- hw/sd.c|2 +- 6 files changed, 12 insertions(+),

[Qemu-devel] [RFC v5 04/86] memory: merge adjacent segments of a single memory region

2011-07-20 Thread Avi Kivity
Simple implementations of memory routers, for example the Cirrus VGA memory banks or the 440FX PAM registers can generate adjacent memory regions which are contiguous. Detect these and merge them; this saves kvm memory slots and shortens lookup times. Signed-off-by: Avi Kivity --- memory.c |

[Qemu-devel] [PATCH 28/55] block: Leave enforcing tray lock to device models

2011-07-20 Thread Markus Armbruster
The device model knows best when to accept the guest's eject command. No need to detour through the block layer. bdrv_eject() can't fail anymore. Make it void. Signed-off-by: Markus Armbruster --- block.c|7 +-- block.h|2 +- hw/ide/atapi.c | 29 +-

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 05:31 PM, Anthony Liguori wrote: The VGA device doesn't know *if* it is mapped. It can be obstructed by the chipset and by SMM. Other chipsets we emulate may support multiple VGA cards. The i440fx can support multiple VGA cards just fine. Legacy region accesses are always routed

Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 05:45 PM, Jan Kiszka wrote: On 2011-07-20 16:40, Avi Kivity wrote: > On 07/20/2011 05:05 PM, Jan Kiszka wrote: >> On 2011-07-17 13:13, Avi Kivity wrote: >>> Convert all vga memory to the memory API. Note we need to fall back to >>> get_system_memory(), since the various buses

[Qemu-devel] [PATCH 26/55] scsi-disk: Track tray locked state

2011-07-20 Thread Markus Armbruster
We already track it in BlockDriverState. Just like tray open/close state, we should track it in the device models instead, because it's device state. Signed-off-by: Markus Armbruster --- hw/scsi-disk.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/scsi-disk.c b/hw

<    1   2   3   4   >