Re: [Qemu-devel] [PATCH v2 0/6] proposal to make hostmem listener RAM unplug safe

2013-05-06 Thread Paolo Bonzini
Il 06/05/2013 03:42, liu ping fan ha scritto: On Sat, May 4, 2013 at 5:53 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 03/05/2013 04:45, Liu Ping Fan ha scritto: v1-v2: 1.split RCU prepared style update and monitor the RAM-Device refcnt into two patches (patch 2,4) 2.introduce

Re: [Qemu-devel] [PATCH v3 2/4] Add i.MX I2C controller emulator

2013-05-06 Thread Jean-Christophe DUBOIS
On 05/06/2013 04:19 AM, Peter Crosthwaite wrote: Hi JC, On Mon, May 6, 2013 at 12:28 AM, Jean-Christophe DUBOIS j...@tribudubois.net wrote: The slave mode is not implemented. Changes since v1: * use QOM cast * run checkpatch on code * added restrictin on MemoryRegionOps *

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

2013-05-06 Thread Jan Kiszka
On 2013-05-05 22:51, 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 mtosa...@redhat.com diff --git

[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

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

2013-05-06 Thread Jordan Justen
Signed-off-by: Jordan Justen jordan.l.jus...@intel.com --- 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 ---

[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

[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 jordan.l.jus...@intel.com

[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

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 mdr...@linux.vnet.ibm.com --- include/qom/object.h | 16

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-ended new()

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

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 andreas.faer...@web.de: This prepares for switching from OpenHack'Ware to OpenBIOS. While touching the error handling code, switch from aborting

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 anyway to

[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,

[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 anyway to

[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

[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

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 m...@redhat.com 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

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 m...@redhat.com wrote: On Sun, May 05, 2013 at 11:00:24PM +0100, Peter Maydell wrote: On 5 May 2013 22:15, Michael S. Tsirkin m...@redhat.com wrote: On Sun, May 05, 2013 at 07:01:34PM

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 m...@redhat.com wrote: On Sun, May 05, 2013 at 11:00:24PM +0100, Peter Maydell wrote: On 5 May 2013 22:15, Michael S.

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 update

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 regardless

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 others, who will be

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 thread

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

2013-05-06 Thread Julio Guerra
2013/5/6 Andreas Färber andreas.faer...@web.de: 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

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: VCPU thread

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-dispatch;

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_write) {

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 even if it is

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 outside the BQL.

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 happen within

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

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

2013-05-06 Thread Markus Armbruster
Dong Xu Wang wdon...@linux.vnet.ibm.com 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:

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 m...@redhat.com wrote: On Mon, May 06, 2013 at 10:08:42AM +0100, Peter Maydell wrote: On 6 May 2013 09:51, Michael S. Tsirkin m...@redhat.com wrote: On Sun, May 05, 2013 at 11:00:24PM +0100, Peter Maydell wrote: On 5 May 2013 22:15, Michael S. Tsirkin

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 is that even if I/O

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 wdon...@linux.vnet.ibm.com 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

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

2013-05-06 Thread Markus Armbruster
Dong Xu Wang wdon...@linux.vnet.ibm.com 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

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

2013-05-06 Thread Markus Armbruster
Dong Xu Wang wdon...@linux.vnet.ibm.com 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

[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

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

2013-05-06 Thread Gleb Natapov
From: Marcelo Tosatti mtosa...@redhat.com 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 mtosa...@redhat.com Reviewed-by: Jan

[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

[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 pingf...@linux.vnet.ibm.com The hwaddr and hva mapping relation is system wide, no need to be created for each Vring Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- exec.c|2 ++ hw/virtio/dataplane/hostmem.c | 33

[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 pingf...@linux.vnet.ibm.com 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 pingf...@linux.vnet.ibm.com --- hw/virtio/dataplane/hostmem.c | 24 +++-

[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 pingf...@linux.vnet.ibm.com 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

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

2013-05-06 Thread Liu Ping Fan
From: Liu Ping Fan pingf...@linux.vnet.ibm.com 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:

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

2013-05-06 Thread Liu Ping Fan
From: Liu Ping Fan pingf...@linux.vnet.ibm.com 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.

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 claudio.font...@huawei.com 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

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 12:56, Jan Kiszka ha

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 xiaw...@linux.vnet.ibm.com 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 xiaw...@linux.vnet.ibm.com wrote: 于 2013-4-30 3:05, Luiz Capitulino 写道: On Fri, 26

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 claudio.font...@huawei.com wrote: I am currently working on an aarch64 tcg target implementation, based on the available gdb patches contributed by ARM and the

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 claudio.font...@huawei.com wrote: On 14.03.2013 17:16, Peter Maydell wrote: On 14 March 2013 15:57, Claudio Fontana claudio.font...@huawei.com wrote: I am currently working on an aarch64 tcg target implementation, based on the available gdb patches

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

2013-05-06 Thread John Baboval
From: John V. Baboval john.babo...@virtualcomputer.com 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

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 john.babo...@virtualcomputer.com 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

[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 kw...@redhat.com --- hw/ide/ahci.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 12:58, Paolo Bonzini

[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

[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 pbonz...@redhat.com --- memory.c | 34 ++ 1 files changed, 18 insertions(+), 16

[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 pbonz...@redhat.com --- 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 +++

[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 jan.kis...@siemens.com --- hw/misc/applesmc.c | 48 1 files changed, 36 insertions(+), 12 deletions(-) diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c

[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 pbonz...@redhat.com --- exec.c| 35 +--

[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

[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 jan.kis...@siemens.com --- 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

[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 jan.kis...@siemens.com --- 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

[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 jan.kis...@siemens.com --- include/exec/ioport.h |8 +--- include/exec/memory.h |

[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

[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 av1...@comtv.ru Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- 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

[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 jan.kis...@siemens.com --- 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 jan.kis...@siemens.com --- 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 ---

[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 jan.kis...@siemens.com --- exec.c | 33 ++--- 1 files changed, 18 insertions(+), 15 deletions(-) diff --git a/exec.c b/exec.c index 3ee1f3f..9c582b1 100644 ---

[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 encapsulate

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 jan.kis...@siemens.com --- hw/display/vmware_vga.c |4 1 files

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 jan.kis...@siemens.com --- hw/ppc/prep.c | 23 +++ 1 files changed, 15 insertions(+), 8 deletions(-) As a heads-up, for PReP we've been

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 jan.kis...@siemens.com ---

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

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

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 cleanup

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.

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 address, i.e.

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 jan.kis...@siemens.com --- exec.c | 33 ++--- 1 files changed, 18 insertions(+), 15 deletions(-) diff --git

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 john.babo...@virtualcomputer.com 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

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 jan.kis...@siemens.com --- exec.c | 33 ++--- 1 files changed, 18

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 finally

[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 m...@redhat.com Tested-by: Alexander Graf ag...@suse.de --- hw/virtio/virtio-pci.c | 4

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 jan.kis...@siemens.com --- 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 hpous...@reactos.org: 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

[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 pbonz...@redhat.com --- exec.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/exec.c b/exec.c index 54b57fc..54ed203 100644 ---

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 are now

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 the memory

[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

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

2013-05-06 Thread Anthony Liguori
Paolo Bonzini pbonz...@redhat.com 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

[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 jan.kis...@siemens.com --- 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 ---

  1   2   3   >