[Qemu-devel] [PATCH v3 0/5] KVM flash memory support

2013-05-06 Thread Jordan Justen
git://github.com/jljusten/qemu.git kvm-flash-v3 Utilize KVM_CAP_READONLY_MEM to support PC system flash emulation with KVM. v3: * Squash patch 2 & 3 based on Xiao's feedback that what I was calling a 'workaround' in patch 3 was actually what is required by the KVM READONLY memory support.

[Qemu-devel] [PATCH v3 2/5] kvm: support using KVM_MEM_READONLY flag for readonly regions

2013-05-06 Thread Jordan Justen
A slot that uses KVM_MEM_READONLY can be read from and code can execute from the region, but writes will trap. For regions that are readonly and also not writeable, we force the slot to be removed so reads or writes to the region will trap. (A memory region in this state is not executable within k

[Qemu-devel] [PATCH v3 1/5] kvm: add kvm_readonly_mem_enabled

2013-05-06 Thread Jordan Justen
Signed-off-by: Jordan Justen --- include/sysemu/kvm.h | 10 ++ kvm-all.c|6 ++ kvm-stub.c |1 + 3 files changed, 17 insertions(+) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 9735c1d..13c4b2e 100644 --- a/include/sysemu/kvm.h +++ b/in

[Qemu-devel] [PATCH v3 3/5] pflash_cfi01: memory region should be set to enable readonly mode

2013-05-06 Thread Jordan Justen
This causes any writes to the memory region to trap to the device handler. This is also important for KVM, because this allows the memory region to be set using KVM_MEM_READONLY, which allows the memory region to be read & executed. (Without this, KVM will not support executing from the memory reg

[Qemu-devel] [PATCH v3 5/5] pc_sysfw: change rom_only default to 0

2013-05-06 Thread Jordan Justen
Now KVM can support a flash memory. This feature depends on KVM_CAP_READONLY_MEM, which was introduced in Linux 3.7. Flash memory will only be enabled if a pflash device is created. (For example, by using the -pflash command line parameter.) Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c

[Qemu-devel] [PATCH v3 4/5] pc_sysfw: allow flash (-pflash) memory to be used with KVM

2013-05-06 Thread Jordan Justen
When pc-sysfw.rom_only != 0, flash memory will be usable with kvm. In order to enable flash memory mode, a pflash device must be created. (For example, by using the -pflash command line parameter.) Usage of a flash memory device with kvm requires the KVM READONLY memory capability, and kvm will ab

Re: [Qemu-devel] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI

2013-05-06 Thread Paolo Bonzini
Il 03/05/2013 03:38, David Gibson ha scritto: > This patch adds the necessary support for saving the state of the PAPR VIO > virtual SCSI device. This turns out to be trivial, because the generiC > SCSI code already quiesces the attached virtual SCSI bus. > > Signed-off-by: David Gibson > --- >

Re: [Qemu-devel] [PATCH 2/9] qom: add object_property_add_unnamed_child

2013-05-06 Thread Paolo Bonzini
Il 03/05/2013 18:03, Michael Roth ha scritto: > This interface allows us to add a child property without specifying a > name. Instead, a unique name is created and passed back after adding > the property. > > Signed-off-by: Michael Roth > --- > include/qom/object.h | 16 > qom

Re: [Qemu-devel] [PATCH 1/9] qom: add qom_init_completion

2013-05-06 Thread Paolo Bonzini
Il 03/05/2013 18:03, Michael Roth ha scritto: > This is similar in concept to "realize", though semantics are a > bit more open-ended: > > And object might in some cases need a number of properties to be > specified before it can be "used"/"started"/etc. This can't always > be done via an open-end

Re: [Qemu-devel] [PATCH 7/9] iohandler: associate with main event loop via a QSource

2013-05-06 Thread Paolo Bonzini
Il 03/05/2013 18:03, Michael Roth ha scritto: > This introduces a GlibQContext wrapper around the main GMainContext > event loop, and associates iohandlers with it via a QSource (which > GlibQContext creates a GSource from so that it can be driven via > GLib. A subsequent patch will drive the GlibQ

Re: [Qemu-devel] [PATCH 9/9] dataplane: use a QContext event loop in place of custom thread

2013-05-06 Thread Paolo Bonzini
Il 03/05/2013 18:03, Michael Roth ha scritto: > virtio-blk dataplane currently creates/manages it's own thread to > offload work to a separate event loop. > > This patch insteads allows us to specify a QContext-based event loop by > adding a "context" property for virtio-blk we can use like so: >

Re: [Qemu-devel] [RFC 0/9] QContext: QOM class to support multiple event loops

2013-05-06 Thread Paolo Bonzini
Il 03/05/2013 18:03, Michael Roth ha scritto: > These patches apply on top of qemu.git master, and can also be obtained from: > git://github.com/mdroth/qemu.git qcontext > > OVERVIEW > > This series introduces a set of QOM classes/interfaces for event > registration/handling: QContext and QSource

Re: [Qemu-devel] [PATCH prep for-1.5 v2] prep: Add ELF support for -bios

2013-05-06 Thread Fabien Chouteau
On 05/05/2013 09:00 PM, Andreas Färber wrote: > Am 05.05.2013 20:40, schrieb Alexander Graf: >> >> >> Am 05.05.2013 um 19:45 schrieb Andreas Färber : >> >>> This prepares for switching from OpenHack'Ware to OpenBIOS. >>> >>> While touching the error handling code, switch from aborting hw_error() >>

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 04/05/2013 12:42, Jan Kiszka ha scritto: > On 2013-05-04 11:47, Paolo Bonzini wrote: >> Il 03/05/2013 10:04, Jan Kiszka ha scritto: >>> We can't change the semantics of opaque as long as old_mmio / >>> old_portio are around. But we need a flag anywa

[Qemu-devel] [PATCH] qmp: fix handling of cmd with Equals in qmp-shell

2013-05-06 Thread Zhangleiqiang
qmp: fix handling of cmd with equal mark in qmp-shell qmp-shell splits the argument and value of input command by equal mark("="). But there are commands whose values include equal mark themselves, and the json built by qmp-shell will not correct. For example, w

[Qemu-devel] [PATCH] qmp: fix handling of cmd with Equals in qmp-shell

2013-05-06 Thread Zhangleiqiang
qmp: fix handling of cmd with equal mark in qmp-shell qmp-shell splits the argument and value of input command by equal mark("="). But there are commands whose values include equal mark themselves, and the json built by qmp-shell will not correct. For example,

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Jan Kiszka
On 2013-05-06 10:07, Paolo Bonzini wrote: > Il 04/05/2013 12:42, Jan Kiszka ha scritto: >> On 2013-05-04 11:47, Paolo Bonzini wrote: >>> Il 03/05/2013 10:04, Jan Kiszka ha scritto: We can't change the semantics of opaque as long as old_mmio / old_portio are around. But we need a flag anyw

[Qemu-devel] [PATCH v2 0/1] uhci: Use an intermediate buffer for usb packet data

2013-05-06 Thread Hans de Goede
Hi, Due to various unfortunate reasons we cannot reliable detect a guest cancelling a packet as soon as it happens, instead we detect cancels with some delay. When packets are handled async, and we directly pass the guest memory for the packet to the usb-device as iovec, this means that the usb-d

[Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data

2013-05-06 Thread Hans de Goede
Due to various unfortunate reasons we cannot reliable detect a guest cancelling a packet as soon as it happens, instead we detect cancels with some delay. When packets are handled async, and we directly pass the guest memory for the packet to the usb-device as iovec, this means that the usb-device

Re: [Qemu-devel] [PATCH v2 1/4] Add i.MX FEC Ethernet driver

2013-05-06 Thread Michael S. Tsirkin
On Sun, May 05, 2013 at 11:00:24PM +0100, Peter Maydell wrote: > On 5 May 2013 22:15, Michael S. Tsirkin wrote: > > On Sun, May 05, 2013 at 07:01:34PM +0100, Peter Maydell wrote: > >> Sorry, you can't say this until we've sorted out the mess > >> that is new-style networking options in a machine w

Re: [Qemu-devel] [PATCH v2 1/4] Add i.MX FEC Ethernet driver

2013-05-06 Thread Peter Maydell
[cc'd Anthony since this has drifted into a more general topic] On 6 May 2013 09:51, Michael S. Tsirkin wrote: > On Sun, May 05, 2013 at 11:00:24PM +0100, Peter Maydell wrote: >> On 5 May 2013 22:15, Michael S. Tsirkin wrote: >> > On Sun, May 05, 2013 at 07:01:34PM +0100, Peter Maydell wrote: >>

Re: [Qemu-devel] [PATCH v2 1/4] Add i.MX FEC Ethernet driver

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 10:08:42AM +0100, Peter Maydell wrote: > [cc'd Anthony since this has drifted into a more general topic] > > On 6 May 2013 09:51, Michael S. Tsirkin wrote: > > On Sun, May 05, 2013 at 11:00:24PM +0100, Peter Maydell wrote: > >> On 5 May 2013 22:15, Michael S. Tsirkin wrot

Re: [Qemu-devel] [PATCH] [KVM] Needless to update msi route when only msi-x entry "control" section changed

2013-05-06 Thread Michael S. Tsirkin
On Mon, May 06, 2013 at 02:52:37AM +, Zhanghaoyu (A) wrote: > >> With regard to old version linux guest(e.g., rhel-5.5), in ISR processing, > >> mask and unmask msi-x vector every time, which result in VMEXIT, then QEMU > >> will invoke kvm_irqchip_update_msi_route() to ask KVM hypervisor to

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 10:40, Jan Kiszka ha scritto: >> >> [*] The "subscriber link" mechanism allows an LWN.net >> subscriber to generate a special URL for a >> subscription-only article. That URL can then be given to >> others, who will be able to access the article re

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Jan Kiszka
On 2013-05-06 12:27, Paolo Bonzini wrote: > Il 06/05/2013 10:40, Jan Kiszka ha scritto: > >>> >>> [*] The "subscriber link" mechanism allows an LWN.net >>> subscriber to generate a special URL for a >>> subscription-only article. That URL can then be given to >>> ot

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 12:56, Jan Kiszka ha scritto: >> The problem is that even if I/O for a region is supposed to happen >> within the BQL, lookup can happen outside the BQL. Lookup will use the >> region even if it is just to discard it: >> >>VCPU thread (under BQL) device threa

Re: [Qemu-devel] [PATCH] prep: Fix software reset

2013-05-06 Thread Julio Guerra
2013/5/6 Andreas Färber : > > Thanks, applied this bit to prep-up: > http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/prep-up > Ok. I just saw Hervé's work on system I/O and your short discussion. So should I just wait for a soft-reset-method agreement and solution now ? -- Julio Guerra

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Jan Kiszka
On 2013-05-06 12:58, Paolo Bonzini wrote: > Il 06/05/2013 12:56, Jan Kiszka ha scritto: >>> The problem is that even if I/O for a region is supposed to happen >>> within the BQL, lookup can happen outside the BQL. Lookup will use the >>> region even if it is just to discard it: >>> >>>

Re: [Qemu-devel] [PATCH v7 5/7] memory: make mmio dispatch able to be out of biglock

2013-05-06 Thread Paolo Bonzini
Il 25/11/2012 03:03, Liu Ping Fan ha scritto: > @@ -3550,12 +3668,11 @@ void *address_space_map(AddressSpace *as, > target_phys_addr_t *plen, > bool is_write) > { > -AddressSpaceDispatch *d = as->dispatch; > target_phys_addr_t len = *plen;

Re: [Qemu-devel] [PATCH v7 5/7] memory: make mmio dispatch able to be out of biglock

2013-05-06 Thread Jan Kiszka
On 2013-05-06 13:21, Paolo Bonzini wrote: > Il 25/11/2012 03:03, Liu Ping Fan ha scritto: >> @@ -3550,12 +3668,11 @@ void *address_space_map(AddressSpace *as, >> target_phys_addr_t *plen, >> bool is_write) >> { >> -AddressSpaceDispatch *d = as-

Re: [Qemu-devel] [PATCH v7 5/7] memory: make mmio dispatch able to be out of biglock

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 13:25, Jan Kiszka ha scritto: > On 2013-05-06 13:21, Paolo Bonzini wrote: >> Il 25/11/2012 03:03, Liu Ping Fan ha scritto: >>> @@ -3550,12 +3668,11 @@ void *address_space_map(AddressSpace *as, >>> target_phys_addr_t *plen, >>> bool is_

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 13:11, Jan Kiszka ha scritto: > On 2013-05-06 12:58, Paolo Bonzini wrote: >> Il 06/05/2013 12:56, Jan Kiszka ha scritto: The problem is that even if I/O for a region is supposed to happen within the BQL, lookup can happen outside the BQL. Lookup will use the region eve

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Jan Kiszka
On 2013-05-06 13:28, Paolo Bonzini wrote: > Il 06/05/2013 13:11, Jan Kiszka ha scritto: >> On 2013-05-06 12:58, Paolo Bonzini wrote: >>> Il 06/05/2013 12:56, Jan Kiszka ha scritto: > The problem is that even if I/O for a region is supposed to happen > within the BQL, lookup can happen outsi

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 13:39, Jan Kiszka ha scritto: > On 2013-05-06 13:28, Paolo Bonzini wrote: >> Il 06/05/2013 13:11, Jan Kiszka ha scritto: >>> On 2013-05-06 12:58, Paolo Bonzini wrote: Il 06/05/2013 12:56, Jan Kiszka ha scritto: >> The problem is that even if I/O for a region is supposed to ha

Re: [Qemu-devel] [uq/master PATCH] kvmvapic: add ioport read accessor

2013-05-06 Thread Gleb Natapov
On Sun, May 05, 2013 at 05:51:49PM -0300, Marcelo Tosatti wrote: > > Necessary since memory region accessor assumes read and write > methods are registered. Otherwise reading I/O port 0x7e segfaults. > > https://bugzilla.redhat.com/show_bug.cgi?id=954306 > > Signed-off-by: Marcelo Tosatti > Ap

Re: [Qemu-devel] [PATCH V13 2/6] avoid duplication of default value in QemuOpts

2013-05-06 Thread Markus Armbruster
Dong Xu Wang writes: > According Markus's comments, his patch will move the default value entirely > to QemuOptDesc. > > When getting the value of an option that hasn't been set, and > QemuOptDesc has a default value, return that. Else, behave as > before. > > Example: qemu_opt_get_number(opts,

Re: [Qemu-devel] [PATCH v2 1/4] Add i.MX FEC Ethernet driver

2013-05-06 Thread Peter Maydell
On 6 May 2013 10:24, Michael S. Tsirkin wrote: > On Mon, May 06, 2013 at 10:08:42AM +0100, Peter Maydell wrote: >> On 6 May 2013 09:51, Michael S. Tsirkin wrote: >> > On Sun, May 05, 2013 at 11:00:24PM +0100, Peter Maydell wrote: >> >> On 5 May 2013 22:15, Michael S. Tsirkin wrote: >> >> > On Su

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Jan Kiszka
On 2013-05-06 13:47, Paolo Bonzini wrote: > Il 06/05/2013 13:39, Jan Kiszka ha scritto: >> On 2013-05-06 13:28, Paolo Bonzini wrote: >>> Il 06/05/2013 13:11, Jan Kiszka ha scritto: On 2013-05-06 12:58, Paolo Bonzini wrote: > Il 06/05/2013 12:56, Jan Kiszka ha scritto: >>> The problem i

Re: [Qemu-devel] [PATCH V13 1/6] add def_value_str in QemuOptDesc struct and rewrite qemu_opts_print

2013-05-06 Thread Markus Armbruster
Dong Xu Wang writes: > qemu_opts_print has no user now, so can re-write the function safely. > > qemu_opts_print will be used while using "qemu-img create", it will > produce the same output as previous code. > > The behavior of this function has changed: > > 1. Print every possible option, wheth

Re: [Qemu-devel] [PATCH V13 4/6] create some QemuOpts functons

2013-05-06 Thread Markus Armbruster
Dong Xu Wang writes: > These functions will be used in next commit. qemu_opt_get_(*)_del functions > are used to make sure we have the same behaviors as before: after get an > option value, options++. I don't understand the last sentence. > Signed-off-by: Dong Xu Wang > --- > include/qemu/opt

Re: [Qemu-devel] [PATCH V13 0/6] replace QEMUOptionParameter with QemuOpts parser

2013-05-06 Thread Markus Armbruster
Dong Xu Wang writes: > These patches will replace QEMUOptionParameter with QemuOpts. Change logs > please go to each patch's commit message. I reviewed 1-4/6 for now. I'm sorry it has taken me so long. Let's discuss my findings before I continue with 5/6, because that one's *big*.

[Qemu-devel] [PATCH 0/1] [PULL] qemu-kvm.git uq/master queue

2013-05-06 Thread Gleb Natapov
Anthony please pull if it is not too later for 1.5. The following changes since commit 467b34689d277fa56c09ad07ca0f08d7d7539f6d: Update OpenBIOS images (2013-05-05 09:53:22 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master for you t

[Qemu-devel] [PATCH 1/1] kvmvapic: add ioport read accessor

2013-05-06 Thread Gleb Natapov
From: Marcelo Tosatti Necessary since memory region accessor assumes read and write methods are registered. Otherwise reading I/O port 0x7e segfaults. https://bugzilla.redhat.com/show_bug.cgi?id=954306 Signed-off-by: Marcelo Tosatti Reviewed-by: Jan Kiszka Signed-off-by: Gleb Natapov --- hw

[Qemu-devel] [PATCH v3 0/5] proposal to make hostmem listener RAM unplug safe

2013-05-06 Thread Liu Ping Fan
Open issue: As to [PATCH v3 2/5] hostmem: AddressSpace has its own map and maintained by RCU prepared style, Paolo may want to use memory_region_find() to re-implement hostmem. It is still under discussion v2->v3: 1.Drop the memory region's ref in virtio-blk. Now all the reference are kep

[Qemu-devel] [PATCH v3 1/5] hostmem: make hostmem single, not per Vring related

2013-05-06 Thread Liu Ping Fan
From: Liu Ping Fan The hwaddr and hva mapping relation is system wide, no need to be created for each Vring Signed-off-by: Liu Ping Fan --- exec.c|2 ++ hw/virtio/dataplane/hostmem.c | 33 +++-- hw/virtio/dataplane/vring

[Qemu-devel] [PATCH v3 4/5] hostmem: hostmem listener pin RAM-Device by refcnt

2013-05-06 Thread Liu Ping Fan
From: Liu Ping Fan With ref()/unref() interface of MemoryRegion, we can pin RAM-Device when using its memory, and release it when done. Signed-off-by: Liu Ping Fan --- hw/virtio/dataplane/hostmem.c | 24 +++- hw/virtio/dataplane/vring.c |8

[Qemu-devel] [PATCH v3 2/5] hostmem: AddressSpace has its own map and maintained by RCU prepared style

2013-05-06 Thread Liu Ping Fan
From: Liu Ping Fan Each address space will have a map between its hwaddr and hva, this is expressed as the struct AddrSpaceMem. Currently only address space of system memory's map is used by virtio device, and the map is stored in AddrSpaceMem *system_mem. The map is maintained by RCU prepared s

[Qemu-devel] [PATCH v3 3/5] memory: add ref/unref interface for MemroyRegionOps

2013-05-06 Thread Liu Ping Fan
From: Liu Ping Fan This pair of interface are optinal, except for those device which is used outside the biglock's protection for hot unplug. Currently, HostMem used by virtio-blk dataplane is outside biglock, so the RAM device should implement this. Signed-off-by: Liu Ping Fan --- include/exe

[Qemu-devel] [PATCH v3 5/5] Vring: use hostmem's RAM safe api

2013-05-06 Thread Liu Ping Fan
From: Liu Ping Fan Before mm-ops done, we should gurantee the validaion of regions which is used by Vring self and the chunck pointed by vring desc. We acheive this goal by inc refcnt of RAM-Device. When finished, we dec this cnt through the interface of MemoryRegion. We keep the MemoryRegion's

Re: [Qemu-devel] QEMU aarch64 TCG target - testing question about x86-64

2013-05-06 Thread Claudio Fontana
On 14.03.2013 17:16, Peter Maydell wrote: > On 14 March 2013 15:57, Claudio Fontana wrote: >> I am currently working on an aarch64 tcg target implementation, >> based on the available gdb patches contributed by ARM and the results >> of the linaro toolchain. > > Doing a target implementation base

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 14:06, Jan Kiszka ha scritto: > On 2013-05-06 13:47, Paolo Bonzini wrote: >> Il 06/05/2013 13:39, Jan Kiszka ha scritto: >>> On 2013-05-06 13:28, Paolo Bonzini wrote: Il 06/05/2013 13:11, Jan Kiszka ha scritto: > On 2013-05-06 12:58, Paolo Bonzini wrote: >> Il 06/05/2013

Re: [Qemu-devel] [PATCH 7/7] block: dump to monitor for bdrv_snapshot_dump() and bdrv_image_info_dump()

2013-05-06 Thread Luiz Capitulino
On Mon, 06 May 2013 10:09:43 +0800 Wenchao Xia wrote: > 于 2013-5-3 10:51, Wenchao Xia 写道: > > 于 2013-5-2 20:02, Luiz Capitulino 写道: > >> On Thu, 02 May 2013 10:05:08 +0800 > >> Wenchao Xia wrote: > >> > >>> 于 2013-4-30 3:05, Luiz Capitulino 写道: > On Fri, 26 Apr 2013 16:46:57 +0200 > St

Re: [Qemu-devel] QEMU aarch64 TCG target - testing question about x86-64

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 14:56, Claudio Fontana ha scritto: > On 14.03.2013 17:16, Peter Maydell wrote: >> On 14 March 2013 15:57, Claudio Fontana wrote: >>> I am currently working on an aarch64 tcg target implementation, >>> based on the available gdb patches contributed by ARM and the results >>> of the li

Re: [Qemu-devel] QEMU aarch64 TCG target - testing question about x86-64

2013-05-06 Thread Peter Maydell
On 6 May 2013 13:56, Claudio Fontana wrote: > On 14.03.2013 17:16, Peter Maydell wrote: >> On 14 March 2013 15:57, Claudio Fontana wrote: >>> I am currently working on an aarch64 tcg target implementation, >>> based on the available gdb patches contributed by ARM and the results >>> of the linaro

[Qemu-devel] [PATCH] Add 'maxqdepth' as an option to tty character devices.

2013-05-06 Thread John Baboval
From: "John V. Baboval" This parameter will cause writes to tty backed chardevs to return -EAGAIN if the backing tty has buffered more than the specified number of characters. When data is sent, the TIOCOUTQ ioctl is invoked to determine the current TTY output buffer depth. Background: Some dev

Re: [Qemu-devel] [PATCH] Add 'maxqdepth' as an option to tty character devices.

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 15:43, John Baboval ha scritto: > From: "John V. Baboval" > > This parameter will cause writes to tty backed chardevs to return > -EAGAIN if the backing tty has buffered more than the specified > number of characters. When data is sent, the TIOCOUTQ ioctl is invoked > to determine t

[Qemu-devel] [PATCH] ahci: Don't allow creating slave drives

2013-05-06 Thread Kevin Wolf
An IDE bus provided by AHCI can only take a single IDE drive. If you add a drive as slave, qemu used to accept the command line but the device wouldn't be actually usable. Catch the situation instead and error out. Signed-off-by: Kevin Wolf --- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2013-05-06 Thread Jan Kiszka
On 2013-05-06 15:09, Paolo Bonzini wrote: > Il 06/05/2013 14:06, Jan Kiszka ha scritto: >> On 2013-05-06 13:47, Paolo Bonzini wrote: >>> Il 06/05/2013 13:39, Jan Kiszka ha scritto: On 2013-05-06 13:28, Paolo Bonzini wrote: > Il 06/05/2013 13:11, Jan Kiszka ha scritto: >> On 2013-05-06

[Qemu-devel] [RFC PATCH 0/8] MemoryRegion and FlatView refcounting, replace hostmem with memory_region_find

2013-05-06 Thread Paolo Bonzini
Hi, this is an alternative approach to refactoring of dataplane's HostMem code. Here, I take Ping Fan's idea of RCU-style updating of the region list and apply it to the AddressSpace's FlatView. With this change, dataplane can simply use memory_region_find instead of hostmem. This is a somewhat

[Qemu-devel] [RFC PATCH 6/8] memory: use a new FlatView pointer on every topology update

2013-05-06 Thread Paolo Bonzini
This is the first step towards converting as->current_map to RCU-style updates, where the FlatView updates run concurrently with uses of an old FlatView. Signed-off-by: Paolo Bonzini --- memory.c | 34 ++ 1 files changed, 18 insertions(+), 16 deletions(-) diff

[Qemu-devel] [RFC PATCH 2/8] exec: check MRU in qemu_ram_addr_from_host

2013-05-06 Thread Paolo Bonzini
This function is not used outside the iothread mutex, so it can use ram_list.mru_block. Signed-off-by: Paolo Bonzini --- exec.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index 9f324bb..8e46228 100644 --- a/exec.c +++ b/exec.c @@ -1404,18

[Qemu-devel] [RFC][PATCH 02/15] applesmc: replace register_ioport*

2013-05-06 Thread Jan Kiszka
Convert over to memory regions to obsolete register_ioport*. Signed-off-by: Jan Kiszka --- hw/misc/applesmc.c | 48 1 files changed, 36 insertions(+), 12 deletions(-) diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c index 78904a8..af24be1 1

[Qemu-devel] [RFC PATCH 3/8] memory: return MemoryRegion from qemu_ram_addr_from_host

2013-05-06 Thread Paolo Bonzini
It will be needed in the next patch. The common parts of qemu_get_ram_ptr and qemu_ram_addr_from_host are moved to a new function qemu_get_ram_block. Signed-off-by: Paolo Bonzini --- exec.c| 35 +-- include/exec/cpu-common.h |2 +- targe

[Qemu-devel] [RFC][PATCH 10/15] memory: Rework sub-page handling

2013-05-06 Thread Jan Kiszka
Simplify the sub-page handling by implementing it directly in the dispatcher instead of using a redirection memory region. We extend the phys_sections entries to optionally hold a pointer to the sub-section table that used to reside in the subpage_t structure. IOW, we add one optional dispatch leve

[Qemu-devel] [RFC][PATCH 00/15] Refactor portio dispatching

2013-05-06 Thread Jan Kiszka
This series converts the remaining users of register_ioport* to portio lists, simplifies the handling of subpages and adds support for unaligned memory region accesses. Then it replaces the current portio dispatcher with the existing one for MMIO and removes several lines of code. This also allows

[Qemu-devel] [RFC][PATCH 07/15] Privatize register_ioport_read/write

2013-05-06 Thread Jan Kiszka
No more users outside of ioport.c. Signed-off-by: Jan Kiszka --- include/exec/ioport.h |4 ioport.c |8 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/exec/ioport.h b/include/exec/ioport.h index fc28350..4953892 100644 --- a/include/exec

[Qemu-devel] [RFC][PATCH 06/15] vt82c686: replace register_ioport*

2013-05-06 Thread Jan Kiszka
Convert over to memory regions to obsolete register_ioport*. Signed-off-by: Jan Kiszka --- hw/isa/vt82c686.c | 40 ++-- 1 files changed, 26 insertions(+), 14 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 5261927..c0d9919 100644 --- a

[Qemu-devel] [RFC][PATCH 15/15] ioport: Move IOPortRead/WriteFunc typedefs to memory.h

2013-05-06 Thread Jan Kiszka
Move the function types required for MemoryRegionPortio to memory.h. This allows to let ioport.h depend on memory.h, which is more consistent instead than the other way around. Signed-off-by: Jan Kiszka --- include/exec/ioport.h |8 +--- include/exec/memory.h |4 +++- 2 files changed

[Qemu-devel] [RFC PATCH 7/8] memory: add reference counting to FlatView

2013-05-06 Thread Paolo Bonzini
With this change, a FlatView can be used even after a concurrent update has replaced it. Because we do not have RCU, we use a mutex to protect the small critical sections that read/write the as->current_map pointer. Accesses to the FlatView can be done outside the mutex. If a MemoryRegion will b

[Qemu-devel] [RFC][PATCH 01/15] adlib: replace register_ioport*

2013-05-06 Thread Jan Kiszka
Convert over to memory regions to obsolete register_ioport*. CC: malc Signed-off-by: Jan Kiszka --- hw/audio/adlib.c | 20 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c index fc20857..9a27c01 100644 --- a/hw/audio/adli

[Qemu-devel] [RFC][PATCH 14/15] ioport: Remove unused old dispatching services

2013-05-06 Thread Jan Kiszka
Remove unused ioport_register and isa_unassign_ioport along with everything that only those services used. Signed-off-by: Jan Kiszka --- include/exec/ioport.h |5 - include/exec/iorange.h | 31 -- include/exec/memory.h |9 -- ioport.c | 238

[Qemu-devel] [RFC][PATCH 05/15] prep: replace register_ioport*

2013-05-06 Thread Jan Kiszka
Convert over to memory regions to obsolete register_ioport*. Signed-off-by: Jan Kiszka --- hw/ppc/prep.c | 23 +++ 1 files changed, 15 insertions(+), 8 deletions(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 59c7da3..671dc26 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/pr

[Qemu-devel] [RFC][PATCH 11/15] memory: Allow unaligned address_space_rw

2013-05-06 Thread Jan Kiszka
This will be needed for some corner cases with para-virtual the I/O ports. Signed-off-by: Jan Kiszka --- exec.c | 33 ++--- 1 files changed, 18 insertions(+), 15 deletions(-) diff --git a/exec.c b/exec.c index 3ee1f3f..9c582b1 100644 --- a/exec.c +++ b/exec.c @@ -1

[Qemu-devel] [RFC][PATCH 09/15] memory: Introduce address_space_lookup_region

2013-05-06 Thread Jan Kiszka
This new service so far only replaces phys_page_find as public API. In a follow-up step, it will return the effective memory region for the specified address, i.e. after resolving what are currently sub-pages. Moreover, it will also once encapsulate locking and reference counting when we introduce

[Qemu-devel] [RFC][PATCH 13/15] ioport: Switch dispatching to memory core layer

2013-05-06 Thread Jan Kiszka
The current ioport dispatcher is a complex beast, mostly due to the need to deal with old portio interface users. But we can overcome it without converting all portio users by embedding the required base address of a MemoryRegionPortio access into that data structure. That removes the need to have

Re: [Qemu-devel] [RFC][PATCH 09/15] memory: Introduce address_space_lookup_region

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 16:26, Jan Kiszka ha scritto: > This new service so far only replaces phys_page_find as public API. In a > follow-up step, it will return the effective memory region for the > specified address, i.e. after resolving what are currently sub-pages. > Moreover, it will also once encapsula

Re: [Qemu-devel] [RFC][PATCH 12/15] vmware-vga: Accept unaligned I/O accesses

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 16:26, Jan Kiszka ha scritto: > Before switching to the memory core dispatcher, we need to make sure > that this pv-device will continue to receive unaligned portio accesses. > > Signed-off-by: Jan Kiszka > --- > hw/display/vmware_vga.c |4 > 1 files changed, 4 insertions(

Re: [Qemu-devel] [RFC][PATCH 05/15] prep: replace register_ioport*

2013-05-06 Thread Andreas Färber
Am 06.05.2013 16:26, schrieb Jan Kiszka: > Convert over to memory regions to obsolete register_ioport*. > > Signed-off-by: Jan Kiszka > --- > hw/ppc/prep.c | 23 +++ > 1 files changed, 15 insertions(+), 8 deletions(-) As a heads-up, for PReP we've been preparing to move th

Re: [Qemu-devel] [RFC][PATCH 12/15] vmware-vga: Accept unaligned I/O accesses

2013-05-06 Thread Jan Kiszka
On 2013-05-06 16:40, Paolo Bonzini wrote: > Il 06/05/2013 16:26, Jan Kiszka ha scritto: >> Before switching to the memory core dispatcher, we need to make sure >> that this pv-device will continue to receive unaligned portio accesses. >> >> Signed-off-by: Jan Kiszka >> --- >> hw/display/vmware_vg

Re: [Qemu-devel] [RFC][PATCH 00/15] Refactor portio dispatching

2013-05-06 Thread Andreas Färber
Am 06.05.2013 16:26, schrieb Jan Kiszka: > This series converts the remaining users of register_ioport* to portio > lists, Why does it need to be lists? Is there anything wrong with using isa_register_ioport() as done in Hervé's previous ioport cleanup series? (Hope you were aware of those ppc-cen

Re: [Qemu-devel] [RFC][PATCH 09/15] memory: Introduce address_space_lookup_region

2013-05-06 Thread Jan Kiszka
On 2013-05-06 16:39, Paolo Bonzini wrote: > Il 06/05/2013 16:26, Jan Kiszka ha scritto: >> This new service so far only replaces phys_page_find as public API. In a >> follow-up step, it will return the effective memory region for the >> specified address, i.e. after resolving what are currently sub

Re: [Qemu-devel] [RFC][PATCH 00/15] Refactor portio dispatching

2013-05-06 Thread Jan Kiszka
On 2013-05-06 16:50, Andreas Färber wrote: > Am 06.05.2013 16:26, schrieb Jan Kiszka: >> This series converts the remaining users of register_ioport* to portio >> lists, > > Why does it need to be lists? Is there anything wrong with using > isa_register_ioport() as done in Hervé's previous ioport

Re: [Qemu-devel] [RFC][PATCH 08/15] isa: implement isa_is_ioport_assigned via memory_region_find

2013-05-06 Thread Andreas Färber
Am 06.05.2013 16:26, schrieb Jan Kiszka: > Move isa_is_ioport_assigned to the ISA core and implement it via a > memory region lookup. As all IO ports are now directly or indirectly > registered via the memory API, this becomes possible and will finally > allow us to drop the ioport tables. > > Sig

Re: [Qemu-devel] [RFC][PATCH 09/15] memory: Introduce address_space_lookup_region

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 16:51, Jan Kiszka ha scritto: > On 2013-05-06 16:39, Paolo Bonzini wrote: >> Il 06/05/2013 16:26, Jan Kiszka ha scritto: >>> This new service so far only replaces phys_page_find as public API. In a >>> follow-up step, it will return the effective memory region for the >>> specified ad

Re: [Qemu-devel] [RFC][PATCH 11/15] memory: Allow unaligned address_space_rw

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 16:26, Jan Kiszka ha scritto: > This will be needed for some corner cases with para-virtual the I/O > ports. > > Signed-off-by: Jan Kiszka > --- > exec.c | 33 ++--- > 1 files changed, 18 insertions(+), 15 deletions(-) > > diff --git a/exec.c b/exec.c

Re: [Qemu-devel] [PATCH] Add 'maxqdepth' as an option to tty character devices.

2013-05-06 Thread Eric Blake
On 05/06/2013 07:43 AM, John Baboval wrote: > From: "John V. Baboval" > > This parameter will cause writes to tty backed chardevs to return > -EAGAIN if the backing tty has buffered more than the specified > number of characters. When data is sent, the TIOCOUTQ ioctl is invoked > to determine the

Re: [Qemu-devel] [RFC][PATCH 11/15] memory: Allow unaligned address_space_rw

2013-05-06 Thread Jan Kiszka
On 2013-05-06 16:55, Paolo Bonzini wrote: > Il 06/05/2013 16:26, Jan Kiszka ha scritto: >> This will be needed for some corner cases with para-virtual the I/O >> ports. >> >> Signed-off-by: Jan Kiszka >> --- >> exec.c | 33 ++--- >> 1 files changed, 18 insertions(+),

Re: [Qemu-devel] [RFC][PATCH 08/15] isa: implement isa_is_ioport_assigned via memory_region_find

2013-05-06 Thread Jan Kiszka
On 2013-05-06 16:55, Andreas Färber wrote: > Am 06.05.2013 16:26, schrieb Jan Kiszka: >> Move isa_is_ioport_assigned to the ISA core and implement it via a >> memory region lookup. As all IO ports are now directly or indirectly >> registered via the memory API, this becomes possible and will finall

[Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix

2013-05-06 Thread Michael S. Tsirkin
mask notifiers are never called without msix, so devices with backend masking like vhost don't work. Call mask notifiers explicitly at startup/cleanup to make it work. Signed-off-by: Michael S. Tsirkin Tested-by: Alexander Graf --- hw/virtio/virtio-pci.c | 4 1 file changed, 4 insertions(

Re: [Qemu-devel] [RFC][PATCH 11/15] memory: Allow unaligned address_space_rw

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 16:58, Jan Kiszka ha scritto: > On 2013-05-06 16:55, Paolo Bonzini wrote: >> Il 06/05/2013 16:26, Jan Kiszka ha scritto: >>> This will be needed for some corner cases with para-virtual the I/O >>> ports. >>> >>> Signed-off-by: Jan Kiszka >>> --- >>> exec.c | 33 ++-

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/7] pci: add MPC105 PCI host bridge emulation

2013-05-06 Thread Alexander Graf
On 05/03/2013 07:57 AM, Hervé Poussineau wrote: Alexander Graf a écrit : Am 02.05.2013 um 22:08 schrieb Hervé Poussineau : Non-contiguous I/O is not implemented. There is also somewhere a bug in the memory controller, which means that some real firmwares may not detect the correct amount of

[Qemu-devel] [RFC PATCH 4/8] memory: ref/unref memory across address_space_map/unmap

2013-05-06 Thread Paolo Bonzini
The iothread mutex might be released between map and unmap, so the mapped region might disappear. Signed-off-by: Paolo Bonzini --- exec.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/exec.c b/exec.c index 54b57fc..54ed203 100644 --- a/exec.c +++ b/exec.c @

Re: [Qemu-devel] [RFC][PATCH 08/15] isa: implement isa_is_ioport_assigned via memory_region_find

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 17:02, Jan Kiszka ha scritto: > On 2013-05-06 16:59, Paolo Bonzini wrote: >> Il 06/05/2013 16:55, Andreas Färber ha scritto: >>> Am 06.05.2013 16:26, schrieb Jan Kiszka: Move isa_is_ioport_assigned to the ISA core and implement it via a memory region lookup. As all IO ports

Re: [Qemu-devel] [RFC][PATCH 08/15] isa: implement isa_is_ioport_assigned via memory_region_find

2013-05-06 Thread Jan Kiszka
On 2013-05-06 16:59, Paolo Bonzini wrote: > Il 06/05/2013 16:55, Andreas Färber ha scritto: >> Am 06.05.2013 16:26, schrieb Jan Kiszka: >>> Move isa_is_ioport_assigned to the ISA core and implement it via a >>> memory region lookup. As all IO ports are now directly or indirectly >>> registered via

[Qemu-devel] [RFC PATCH 5/8] memory: access FlatView from a local variable

2013-05-06 Thread Paolo Bonzini
We will soon require accesses to as->current_map to be placed under a lock (with reference counting so as to keep the critical section small). To simplify this change, always fetch as->current_map into a local variable and access it through that variable. Signed-off-by: Paolo Bonzini --- memory

Re: [Qemu-devel] [RFC 0/9] QContext: QOM class to support multiple event loops

2013-05-06 Thread Anthony Liguori
Paolo Bonzini writes: > Il 03/05/2013 18:03, Michael Roth ha scritto: >> These patches apply on top of qemu.git master, and can also be obtained from: >> git://github.com/mdroth/qemu.git qcontext >> >> OVERVIEW >> >> This series introduces a set of QOM classes/interfaces for event >> registrati

[Qemu-devel] [RFC][PATCH 04/15] i82374: replace register_ioport*

2013-05-06 Thread Jan Kiszka
Convert over to memory regions to obsolete register_ioport*. Signed-off-by: Jan Kiszka --- hw/dma/i82374.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index f3d1924..3cc9aab 100644 --- a/hw/dma/i82374.c +++ b/hw/dma/

[Qemu-devel] [PATCH 3/9] PPC: e500: initialize GPRs as per epapr

2013-05-06 Thread Alexander Graf
From: Bharat Bhushan ePAPR defines the initial values of cpu registers. This patch initialize the GPRs as per ePAPR specification. This resolves the issue of guest reboot/reset (guest hang on reboot). Signed-off-by: Bharat Bhushan [agraf: add whitespace line] Signed-off-by: Alexander Graf ---

[Qemu-devel] [PATCH 8/9] PPC: e500: correct params->ram_size with ram_size

2013-05-06 Thread Alexander Graf
From: Tiejun Chen We should sync params->ram_size after we fixup memory size on a alignment boundary. Otherwise Guest would exceed the actual memory region. Signed-off-by: Tiejun Chen Signed-off-by: Alexander Graf --- hw/ppc/e500.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) d

[Qemu-devel] [PATCH 6/9] target-ppc: Fix invalid SPR read/write warnings

2013-05-06 Thread Alexander Graf
From: Anton Blanchard Invalid and privileged SPR warnings currently print the wrong address. While fixing that, also make it clear that we are printing both the decimal and hexadecimal SPR number. Before: Trying to read invalid spr 896 380 at 0714 After: Trying to read invalid

  1   2   3   >