Re: [Qemu-devel] [PATCH 1/3] nbd: Only try to send flush/discard commands if connected to the NBD server

2012-10-25 Thread Kevin Wolf
Am 24.10.2012 16:32, schrieb Jamie Lokier: Kevin Wolf wrote: Am 24.10.2012 14:16, schrieb Nicholas Thomas: On Tue, 2012-10-23 at 16:02 +0100, Jamie Lokier wrote: Since the I/O _order_ before, and sometimes after, flush, is important for data integrity, this needs to be maintained when I/Os

Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up

2012-10-25 Thread Evgeny Voevodin
Here are the results of tests before and after this patch series was applied: * EEMBC CoreMark (before - after) - Guest: Exynos4210 ARMv7, Linux (Custom buildroot image) - Host: Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz, 4GB RAM, Linux - Results: 1148.105626 - 1161.440186 (+1.16%) * nbench

[Qemu-devel] [Bug 1071149] [NEW] target-mips: special3 instruction dinsm translation error

2012-10-25 Thread Nikita Kanunnikov
Public bug reported: Function decode_opc() in translate.c calls function gen_bitops(), which has such prototype: /* special3 bitfield operations */ static void gen_bitops (DisasContext *ctx, uint32_t opc, int rt, int rs, int lsb, int msb) The code for DINSM instruction

Re: [Qemu-devel] [PATCH 15/22] usb: Add packet combining functions

2012-10-25 Thread Gerd Hoffmann
On 10/24/12 18:14, Hans de Goede wrote: +/* + * Process / cancel combined packets, called from + * usb_ep_combine_input_packets() / usb_combined_packet_cancel(). + * Only called for devices which call these functions themselves. + */ +int

Re: [Qemu-devel] usb: input-pipelining + speedups v3

2012-10-25 Thread Gerd Hoffmann
On 10/24/12 18:13, Hans de Goede wrote: This is the final version of the input pipelining patchset, please add these patches to your tree for Anthony. Changes since the v2 rfc: - Move the settnig of the int_req flag for xhci, as you requested - Add ehci: Retry to fill the queue while

Re: [Qemu-devel] uhci: Cleanups, fixes and improvements

2012-10-25 Thread Gerd Hoffmann
On 10/24/12 18:31, Hans de Goede wrote: Here is a patchset with assorted uhci cleanups / fixes / improvments, please add these to your tree for Anthony. Regards, Hans Patch added to usb patch queue. thanks, Gerd

Re: [Qemu-devel] [RESEND PATCH v6 0/3] tcg: enhance code generation quality for qemu_ld/st IRs

2012-10-25 Thread Yeongkyoon Lee
On 2012년 10월 20일 16:05, Yeongkyoon Lee wrote: Let me resend this patch, because it looks ignored except for the comment from Richard Henderson for which I've replied. Here is the 6th version of the series optimizing TCG qemu_ld/st code generation. v6: - Remove an extra argument of return

[Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Alexandre DERUMIER
Hello, I'm looking to use qemu-img convert to write to iscsi block device (iscsi://..) As iscsi doesn't have .bdrv_create, qemu-img convert hang on /* Create the new image */ ret = bdrv_create(drv, out_filename, param); if (ret 0) { if (ret == -ENOTSUP) {

Re: [Qemu-devel] [PATCH 4/4] Warning messages on net devices hotplug

2012-10-25 Thread Paolo Bonzini
Il 24/10/2012 19:30, Corey Bryant ha scritto: On 10/24/2012 11:45 AM, Paolo Bonzini wrote: Il 24/10/2012 17:39, Corey Bryant ha scritto: On 10/24/2012 11:21 AM, Paolo Bonzini wrote: Il 24/10/2012 16:18, Corey Bryant ha scritto: On 10/18/2012 11:15 AM, Paolo Bonzini wrote: Il

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Paolo Bonzini
Il 25/10/2012 09:25, Alexandre DERUMIER ha scritto: What is the best way to get it working ? 1)add a .bdrv_create in block/iscsi.c ? (like host_device block driver, only open/close the device and check if size if big enough) if (fstat(fd, stat_buf) 0) ret = -errno;

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Kevin Wolf
Am 25.10.2012 09:25, schrieb Alexandre DERUMIER: Hello, I'm looking to use qemu-img convert to write to iscsi block device (iscsi://..) As iscsi doesn't have .bdrv_create, qemu-img convert hang on [...] What is the best way to get it working ? 1)add a .bdrv_create in

Re: [Qemu-devel] [PATCH 15/32] net: reorganize headers

2012-10-25 Thread Stefan Hajnoczi
On Wed, Oct 24, 2012 at 02:58:45PM +0200, Paolo Bonzini wrote: +struct virtio_net_hdr +{ +#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset +#define VIRTIO_NET_HDR_F_DATA_VALID2 // Csum is valid +uint8_t flags; +#define VIRTIO_NET_HDR_GSO_NONE

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Paolo Bonzini
Il 25/10/2012 09:46, Kevin Wolf ha scritto: 1)add a .bdrv_create in block/iscsi.c ? (like host_device block driver, only open/close the device and check if size if big enough) Yes, this is the right way. Could it be a default implementation of .bdrv_create (i.e. something you'd do in

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-25 Thread liu ping fan
On Thu, Oct 25, 2012 at 1:16 AM, Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com wrote: Hi, On Wed, Oct 24, 2012 at 12:15:17PM +0200, Stefan Hajnoczi wrote: On Wed, Oct 24, 2012 at 10:06 AM, liu ping fan qemul...@gmail.com wrote: On Tue, Oct 23, 2012 at 8:25 PM, Stefan Hajnoczi

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Kevin Wolf
Am 25.10.2012 09:52, schrieb Paolo Bonzini: Il 25/10/2012 09:46, Kevin Wolf ha scritto: 1)add a .bdrv_create in block/iscsi.c ? (like host_device block driver, only open/close the device and check if size if big enough) Yes, this is the right way. Could it be a default implementation of

[Qemu-devel] slow xbzrle

2012-10-25 Thread Stefan Priebe - Profihost AG
Hello list, i'm using 1.2 stable and wanted to use xbzrle but xbzrle is extremely slow. While trying to transfer a simple VM with 4GB memory through a 10GBe nic while running a MySQL (with NO LOAD) it takes up to 10 - 15 minutes. Remaining is often jumping or just lowering pretty slow. Is

[Qemu-devel] [Bug 1071149] Re: target-mips: special3 instruction dinsm translation error

2012-10-25 Thread Aurelien Jarno
That's why in gen_bitops() does later: case OPC_DINSM: if (lsb msb) goto fail; mask = ((msb - lsb + 1 + 32 64) ? ((1ULL (msb - lsb + 1 + 32)) - 1) : ~0ULL) lsb; ... case OPC_DINSU: if (lsb msb) goto fail; mask = ((1ULL (msb

[Qemu-devel] [PATCH 1/2] hw/xtensa_lx60: don't prematurely explode QEMUMachineInitArgs

2012-10-25 Thread Max Filippov
Don't explode QEMUMachineInitArgs before passing it to lx_init. Signed-off-by: Max Filippov jcmvb...@gmail.com --- hw/xtensa_lx60.c | 25 ++--- 1 files changed, 6 insertions(+), 19 deletions(-) diff --git a/hw/xtensa_lx60.c b/hw/xtensa_lx60.c index 5dd2e08..b4d3b8e 100644

[Qemu-devel] [PATCH 0/2] xtensa boards: don't prematurely explode QEMUMachineInitArgs

2012-10-25 Thread Max Filippov
Max Filippov (2): hw/xtensa_lx60: don't prematurely explode QEMUMachineInitArgs hw/xtensa_sim: get rid of intermediate xtensa_sim_init hw/xtensa_lx60.c | 25 ++--- hw/xtensa_sim.c | 27 --- 2 files changed, 14 insertions(+), 38 deletions(-)

[Qemu-devel] [PATCH 2/2] hw/xtensa_sim: get rid of intermediate xtensa_sim_init

2012-10-25 Thread Max Filippov
Remove xtensa_sim_init that only explodes machine init args, rename sim_init to xtensa_sim_init. Signed-off-by: Max Filippov jcmvb...@gmail.com --- hw/xtensa_sim.c | 27 --- 1 files changed, 8 insertions(+), 19 deletions(-) diff --git a/hw/xtensa_sim.c

Re: [Qemu-devel] [patch v4 13/16] e1000: add busy flag to anti broken device state

2012-10-25 Thread Avi Kivity
On 10/24/2012 08:36 AM, liu ping fan wrote: On Tue, Oct 23, 2012 at 5:37 PM, Avi Kivity a...@redhat.com wrote: On 10/23/2012 11:32 AM, liu ping fan wrote: On Tue, Oct 23, 2012 at 5:07 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-10-23 07:52, liu ping fan wrote: On Mon, Oct 22, 2012 at

Re: [Qemu-devel] [patch v4 07/16] memory: make mmio dispatch able to be out of biglock

2012-10-25 Thread Avi Kivity
On 10/24/2012 08:56 AM, liu ping fan wrote: Oh, here is a bug, need unref. As to unbalanced refcount, it will be adopted for virtio-blk listener (not implement in this patchset) It is like cpu_physical_memory_map/unmap, the map will hold the unbalanced ref, and unmap release it. Those APIs

Re: [Qemu-devel] [patch v4 13/16] e1000: add busy flag to anti broken device state

2012-10-25 Thread Peter Maydell
On 23 October 2012 10:37, Avi Kivity a...@redhat.com wrote: On 10/23/2012 11:32 AM, liu ping fan wrote: On Tue, Oct 23, 2012 at 5:07 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-10-23 07:52, liu ping fan wrote: On Mon, Oct 22, 2012 at 6:40 PM, Avi Kivity a...@redhat.com wrote: On

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-25 Thread Avi Kivity
On 10/24/2012 09:17 AM, Jan Kiszka wrote: This is ugly for many reasons. First of all, it is racy as the register content may change while dropping the device lock, no? Then you would raise or clear an IRQ spuriously. Device state's intact is protected by busy flag, and will not broken

Re: [Qemu-devel] [patch v4 13/16] e1000: add busy flag to anti broken device state

2012-10-25 Thread Avi Kivity
On 10/25/2012 11:00 AM, Peter Maydell wrote: On 23 October 2012 10:37, Avi Kivity a...@redhat.com wrote: On 10/23/2012 11:32 AM, liu ping fan wrote: On Tue, Oct 23, 2012 at 5:07 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-10-23 07:52, liu ping fan wrote: On Mon, Oct 22, 2012 at 6:40

[Qemu-devel] [PATCH v2 0/5] Qemu: implement readonly memory

2012-10-25 Thread Xiao Guangrong
This patch set make the readonly memory in qemu really readonly by using readonly memory slots feature in kvm to make qemu-kvm safer. Memory regions with readonly property would be plug into kvm as readonly memory slots. Below module can test this feature: static int rom_tester_probe(struct

[Qemu-devel] [PATCH v2 1/5] KVM: define KVM_CAP_READONLY_MEM unconditionally

2012-10-25 Thread Xiao Guangrong
let it not depend on __KVM_HAVE_READONLY_MEM to make it friendly to userspace Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c |2 ++ include/linux/kvm.h |2 -- virt/kvm/kvm_main.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff

[Qemu-devel] [PATCH v2 4/5] Qemu: implement readonly memory

2012-10-25 Thread Xiao Guangrong
As readonly memory is support in kvm, this patch supports this feature in qemu, mainly pluging the memory region with KVM_MEM_READONLY flag to kvm Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- kvm-all.c | 24 +--- 1 files changed, 17 insertions(+), 7

[Qemu-devel] [PATCH v2 3/5] Qemu: do not mark bios readonly

2012-10-25 Thread Xiao Guangrong
In isapc, no i440x device exists in guest that means seabios can not make 0xc to 0x100 writable It works fine in current code since the guest can happily write readonly memory. In order to support readonly slot in Qemu, we do not make the bios readonly anymore Signed-off-by: Xiao

[Qemu-devel] [PATCH v2 5/5] Qemu: mark pci rom readonly

2012-10-25 Thread Xiao Guangrong
Since it is ROM which is really readonly in the system Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- hw/pci.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 2ca6ff6..2a287bb 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1803,6

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-25 Thread Jan Kiszka
On 2012-10-25 11:01, Avi Kivity wrote: On 10/24/2012 09:17 AM, Jan Kiszka wrote: This is ugly for many reasons. First of all, it is racy as the register content may change while dropping the device lock, no? Then you would raise or clear an IRQ spuriously. Device state's intact is protected

Re: [Qemu-devel] slow xbzrle

2012-10-25 Thread Orit Wasserman
On 10/25/2012 10:12 AM, Stefan Priebe - Profihost AG wrote: Hello list, i'm using 1.2 stable and wanted to use xbzrle but xbzrle is extremely slow. While trying to transfer a simple VM with 4GB memory through a 10GBe nic while running a MySQL (with NO LOAD) it takes up to 10 - 15 minutes.

Re: [Qemu-devel] [PATCH v1 4/8] usb/ehci: Add usb-ehci-sysbus

2012-10-25 Thread Peter Maydell
On 25 October 2012 10:47, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: +static int usb_ehci_sysbus_initfn(SysBusDevice *dev) +{ +EHCIItfState *i = FROM_SYSBUS(EHCIItfState, dev); +EHCIState *s = i-ehci; + +s-dma = g_new(DMAContext, 1); +dma_context_init(s-dma,

[Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Crosthwaite
Just put RAM regions in the unimplemented spaces in the MMIO region. These regions have undefined behaviour, but this at least stops QEMU from segfaulting when the guest bangs on these registers (and sucessfully fakes reading and writing the registers with no side effects). Signed-off-by: Peter

[Qemu-devel] [PATCH v1 7/8] usb/ehci: Debug mode compile fixes

2012-10-25 Thread Peter Crosthwaite
A few debug messages in EHCI must have missed out on updates during incremental developments. Fixed. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- hw/usb/hcd-ehci.c | 21 ++--- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 1/2] hw/xtensa_lx60: don't prematurely explode QEMUMachineInitArgs

2012-10-25 Thread Peter Maydell
On 25 October 2012 09:47, Max Filippov jcmvb...@gmail.com wrote: @@ -272,37 +273,23 @@ static void lx_init(const LxBoardDesc *board, static void xtensa_lx60_init(QEMUMachineInitArgs *args) { ram_addr_t ram_size = args-ram_size; -const char *cpu_model = args-cpu_model; -const

[Qemu-devel] [Bug 1071149] Re: target-mips: special3 instruction dinsm translation error

2012-10-25 Thread Aurelien Jarno
Indeed the (lsb msb) case is wrong and should be removed. I'll post a patch about that later this week. ** Changed in: qemu Status: Invalid = Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [PATCH v1 4/8] usb/ehci: Add usb-ehci-sysbus

2012-10-25 Thread Peter Crosthwaite
Add QOM device definition for sysbus attached EHCI. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- hw/usb/hcd-ehci.c | 53 - 1 files changed, 52 insertions(+), 1 deletions(-) diff --git a/hw/usb/hcd-ehci.c

[Qemu-devel] [PATCH v1 2/8] usb/ehci: Abstract away PCI DMA API

2012-10-25 Thread Peter Crosthwaite
Pull the DMAContext for the PCI DMA out at device init time and put it into the device state. Use dma_memory_read/write() instead of pci specific versions. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- hw/usb/hcd-ehci.c | 13 - 1 files changed, 8 insertions(+),

[Qemu-devel] [PATCH v1 6/8] usb/ehci: Guard definition of EHCI_DEBUG

2012-10-25 Thread Peter Crosthwaite
Guard against re-definition of EHCI_DEBUG. Allows for turning on of debug info from configure (using --qemu-extra-cflags=-DEHCI_DEBUG=1) rather than source code hacking. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- hw/usb/hcd-ehci.c |2 ++ 1 files changed, 2

[Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers

2012-10-25 Thread Peter Crosthwaite
Add the two usb controllers in Zynq. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- hw/xilinx_zynq.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index c55dafb..ed6934f 100644 ---

[Qemu-devel] [PATCH v1 3/8] usb/ehci: seperate out PCIisms

2012-10-25 Thread Peter Crosthwaite
Seperate the PCI stuff from the EHCI components. Extracted the PCIDevice out into a new wrapper struct to make EHCIState non-PCI-specific. Seperated tho non PCI init component out into a seperate common init function. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com ---

[Qemu-devel] [PATCH v1 1/8] usb/ehci: parameterise the register region offsets

2012-10-25 Thread Peter Crosthwaite
The capabilities register and operational register offsets can vary from one EHCI implementation to the next. Parameterise accordingly. Signed-off-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- hw/usb/hcd-ehci.c | 68 - 1 files

[Qemu-devel] [PATCH v1 0/8] Sysbus EHCI + Zynq USB.

2012-10-25 Thread Peter Crosthwaite
Added Sysbus variant of EHCI and attached it to Xilinx Zynq. Apparently the EHCI stuff is going to useful for Tegra too. (Andreas?) See http://lists.gnu.org/archive/html/qemu-devel/2012-06/msg04100.html thread for the inital RFC discussion on this development. Regession tested using i386

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-25 Thread Peter Crosthwaite
On Oct 24, 2012 3:27 AM, Peter Maydell peter.mayd...@linaro.org wrote: Define a new global dma_context_memory which is a DMAContext corresponding to the global address_space_memory AddressSpace. This can be used by sysbus peripherals like sysbus-ohci which need to do DMA. In particular, use

Re: [Qemu-devel] slow xbzrle

2012-10-25 Thread Stefan Priebe - Profihost AG
Am 25.10.2012 11:44, schrieb Orit Wasserman: Is this known or is something wrong? My guess this workload migrates fine without XBZRLE so it is not the speed or downtime :). it could be that the cache size is too small resulting with a lot of cache misses which means XBZRLE makes things worse

[Qemu-devel] [PATCH] pci: avoid destroying bridge address space windows in a transaction

2012-10-25 Thread Avi Kivity
Calling memory_region_destroy() in a transaction is illegal (and aborts), as until the transaction is committed, the region remains live. Fix by moving destruction until after the transaction commits. This requires having an extra set of regions, so the new and old regions can coexist.

[Qemu-devel] [PATCH v2 2/5] Qemu: update header files

2012-10-25 Thread Xiao Guangrong
Sync the header files by using scripts/update-linux-headers.sh Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- linux-headers/asm-powerpc/kvm.h | 59 ++ linux-headers/asm-powerpc/kvm_para.h |7 ++-- linux-headers/asm-x86/kvm.h

Re: [Qemu-devel] [PATCH v2 2/5] Qemu: update header files

2012-10-25 Thread Peter Maydell
On 25 October 2012 10:21, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: Sync the header files by using scripts/update-linux-headers.sh I think it would be good if this kind of patch included in the commit message the kernel tree/branch and commit hash that the sync was with. thanks --

Re: [Qemu-devel] [PATCH 1/2] hw/xtensa_lx60: don't prematurely explode QEMUMachineInitArgs

2012-10-25 Thread Max Filippov
On Thu, Oct 25, 2012 at 2:04 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 25 October 2012 09:47, Max Filippov jcmvb...@gmail.com wrote: @@ -272,37 +273,23 @@ static void lx_init(const LxBoardDesc *board, static void xtensa_lx60_init(QEMUMachineInitArgs *args) { ram_addr_t

[Qemu-devel] [PATCH v2 2/2] hw/xtensa_sim: get rid of intermediate xtensa_sim_init

2012-10-25 Thread Max Filippov
Remove xtensa_sim_init that only explodes machine init args, rename sim_init to xtensa_sim_init. Signed-off-by: Max Filippov jcmvb...@gmail.com --- hw/xtensa_sim.c | 27 --- 1 files changed, 8 insertions(+), 19 deletions(-) diff --git a/hw/xtensa_sim.c

[Qemu-devel] [PATCH v2 1/2] hw/xtensa_lx60: don't prematurely explode QEMUMachineInitArgs

2012-10-25 Thread Max Filippov
Don't explode QEMUMachineInitArgs before passing it to lx_init. Signed-off-by: Max Filippov jcmvb...@gmail.com --- hw/xtensa_lx60.c | 30 +++--- 1 files changed, 7 insertions(+), 23 deletions(-) diff --git a/hw/xtensa_lx60.c b/hw/xtensa_lx60.c index 5dd2e08..4c42edc

[Qemu-devel] [PATCH v2 0/2] xtensa boards: don't prematurely explode QEMUMachineInitArgs

2012-10-25 Thread Max Filippov
Changes v1 - v2: - remove ram_size in xtensa_lx60 as well Max Filippov (2): hw/xtensa_lx60: don't prematurely explode QEMUMachineInitArgs hw/xtensa_sim: get rid of intermediate xtensa_sim_init hw/xtensa_lx60.c | 30 +++--- hw/xtensa_sim.c | 27

Re: [Qemu-devel] slow xbzrle

2012-10-25 Thread Orit Wasserman
On 10/25/2012 12:35 PM, Stefan Priebe - Profihost AG wrote: Am 25.10.2012 11:44, schrieb Orit Wasserman: Is this known or is something wrong? My guess this workload migrates fine without XBZRLE so it is not the speed or downtime :). it could be that the cache size is too small resulting with

Re: [Qemu-devel] [PATCH v1 1/8] usb/ehci: parameterise the register region offsets

2012-10-25 Thread Gerd Hoffmann
On 10/25/12 11:47, Peter Crosthwaite wrote: The capabilities register and operational register offsets can vary from one EHCI implementation to the next. Parameterise accordingly. static Property ehci_properties[] = { DEFINE_PROP_UINT32(maxframes, EHCIState, maxframes, 128), +

Re: [Qemu-devel] [PATCH v1 3/8] usb/ehci: seperate out PCIisms

2012-10-25 Thread Gerd Hoffmann
+typedef struct EHCIItfState { +PCIDevice pcidev; +struct EHCIState ehci; +} EHCIItfState; EHCIPCIState ? static const VMStateDescription vmstate_ehci = { .name= ehci, -.version_id = 2, -.minimum_version_id = 1, +.version_id = 3, +

Re: [Qemu-devel] [PATCH v1 4/8] usb/ehci: Add usb-ehci-sysbus

2012-10-25 Thread Gerd Hoffmann
typedef struct EHCIItfState { -PCIDevice pcidev; +/* FIXME: Figure out a better way to share one Property[] array between two + * QOM types with different parents + */ +union { +PCIDevice pcidev; +SysBusDevice busdev; +}; Ah, I see where this

Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers

2012-10-25 Thread Gerd Hoffmann
+static inline void zynq_init_usb(uint32_t base_addr, qemu_irq irq) +{ +DeviceState *dev = qdev_create(NULL, ehci-sysbus); I'd suggest to have a ehci-sysbus-zynq device instead which sets capsbase opregbase in -init() ... +qdev_prop_set_uint16(dev, capabase, 0x100); +

Re: [Qemu-devel] [PATCH v2 1/5] KVM: define KVM_CAP_READONLY_MEM unconditionally

2012-10-25 Thread Jan Kiszka
On 2012-10-25 11:21, Xiao Guangrong wrote: let it not depend on __KVM_HAVE_READONLY_MEM to make it friendly to userspace Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c |2 ++ include/linux/kvm.h |2 -- virt/kvm/kvm_main.c |2 +- 3

Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers

2012-10-25 Thread Peter Maydell
On 25 October 2012 13:12, Gerd Hoffmann kra...@redhat.com wrote: +static inline void zynq_init_usb(uint32_t base_addr, qemu_irq irq) +{ +DeviceState *dev = qdev_create(NULL, ehci-sysbus); I'd suggest to have a ehci-sysbus-zynq device instead which sets capsbase opregbase in -init() ...

Re: [Qemu-devel] slow xbzrle

2012-10-25 Thread Stefan Priebe - Profihost AG
Am 25.10.2012 13:39, schrieb Orit Wasserman: On 10/25/2012 12:35 PM, Stefan Priebe - Profihost AG wrote: Am 25.10.2012 11:44, schrieb Orit Wasserman: Is this known or is something wrong? My guess this workload migrates fine without XBZRLE so it is not the speed or downtime :). it could be

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Gerd Hoffmann
On 10/25/12 11:47, Peter Crosthwaite wrote: Just put RAM regions in the unimplemented spaces in the MMIO region. These regions have undefined behaviour, but this at least stops QEMU from segfaulting when the guest bangs on these registers (and sucessfully fakes reading and writing the

[Qemu-devel] [PATCH] hw/qxl: vaildate surface-data

2012-10-25 Thread Alon Levy
Signed-off-by: Alon Levy al...@redhat.com --- hw/qxl.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/qxl.c b/hw/qxl.c index 1b47ed3..620b476 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -453,6 +453,16 @@ static int qxl_track_command(PCIQXLDevice *qxl, struct QXLCommandExt *ext)

Re: [Qemu-devel] [PATCH v1 4/8] usb/ehci: Add usb-ehci-sysbus

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 10:10 PM, Gerd Hoffmann kra...@redhat.com wrote: typedef struct EHCIItfState { -PCIDevice pcidev; +/* FIXME: Figure out a better way to share one Property[] array between two + * QOM types with different parents + */ +union { +PCIDevice

Re: [Qemu-devel] [PATCH v1 3/8] usb/ehci: seperate out PCIisms

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 10:08 PM, Gerd Hoffmann kra...@redhat.com wrote: +typedef struct EHCIItfState { +PCIDevice pcidev; +struct EHCIState ehci; +} EHCIItfState; EHCIPCIState ? static const VMStateDescription vmstate_ehci = { .name= ehci, -.version_id = 2, -

[Qemu-devel] [PATCH 16/36] uhci: No need to handle async completion of isoc packets

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com No devices ever return async for isoc endpoints and the core already enforces this. Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/hcd-uhci.c | 29 +++-- 1 files

[Qemu-devel] [PATCH 17/36] uhci: cleanup: Add an unlink call to uhci_async_cancel()

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com All callers of uhci_async_cancel() call uhci_async_unlink() first, so lets move the unlink call to uhci_async_cancel() Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/hcd-uhci.c |4 +--- 1

[Qemu-devel] [PATCH 11/36] usb: Add USB_RET_ADD_TO_QUEUE packet result code

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com This can be used by usb-device code which wishes to process an entire endpoint queue at once, to do this the usb-device code returns USB_RET_ADD_TO_QUEUE from its handle_data class method and defines a flush_ep_queue class method to call when the hcd is

[Qemu-devel] [PATCH 12/36] usb: Move clearing of queue on halt to the core

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com hcds which queue up more then one packet at once (uhci, ehci and xhci), must clear the queue after an error which has caused the queue to halt. Currently this is handled as a special case inside the hcd code, this patch instead adds an

[Qemu-devel] [PATCH 21/36] uhci: Rename UHCIAsync-td to UHCIAsync-td_addr

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com We use the name td both to refer to a UHCI_TD read from guest memory as well as to refer to the guest address where a td is stored, switch over to always use td_addr in the second case for consistency. Signed-off-by: Hans de Goede hdego...@redhat.com

[Qemu-devel] [PATCH 26/36] uhci: Verify queue has not been changed by guest

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com According to the spec a guest can unlink a qh, and then as soon as frindex has changed by 1 since the unlink, assume it is idle and re-use it. However for various reasons, we cannot simply consider a qh as unlinked if we've not seen it for 1 frame. This

[Qemu-devel] [PATCH 14/36] usb: Add an int_req flag to USBPacket

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb.h |3 ++- hw/usb/core.c |3 ++- hw/usb/hcd-ehci.c |6 -- hw/usb/hcd-musb.c |2 +- hw/usb/hcd-ohci.c |7 +--

[Qemu-devel] [PATCH 22/36] uhci: Add uhci_read_td() helper function

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/hcd-uhci.c | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index

[Qemu-devel] [PATCH 30/36] uhci: Retry to fill the queue while waiting for td completion

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com If the guest is using multiple transfers to try and keep the usb bus busy / used at maximum efficiency, currently we would see / do the following: 1) submit transfer 1 to the device 2) submit transfer 2 to the device 3) report transfer 1 completion to

Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 10:16 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 25 October 2012 13:12, Gerd Hoffmann kra...@redhat.com wrote: +static inline void zynq_init_usb(uint32_t base_addr, qemu_irq irq) +{ +DeviceState *dev = qdev_create(NULL, ehci-sysbus); I'd suggest to have

[Qemu-devel] [PATCH 03/12] hw/pl080: Use LOG_GUEST_ERROR and LOG_UNIMP

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR and LOG_UNIMP in preference to hw_error(). Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/pl080.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/pl080.c b/hw/pl080.c index 6abe528..26150af 100644 --- a/hw/pl080.c +++

[Qemu-devel] [PATCH 08/12] hw/arm_timer: Use LOG_GUEST_ERROR and LOG_UNIMP

2012-10-25 Thread Peter Maydell
Use LOG_GUEST_ERROR to report guest accesses to bad register offsets, and LOG_UNIMP for access to the unimplemented test registers. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/arm_timer.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH V4 03/10] qemu-option: qemu_opt_set_bool(): fix code duplication

2012-10-25 Thread Dong Xu Wang
It will set opt-str in qemu_opt_set_bool, without opt-str, there will be some potential bugs. These are uses of opt-str, and what happens when it isn't set: * qemu_opt_get(): returns NULL, which means not set. Bug can bite when value isn't the default value. * qemu_opt_parse(): passes NULL

Re: [Qemu-devel] [PATCH v1 3/8] usb/ehci: seperate out PCIisms

2012-10-25 Thread Gerd Hoffmann
Hi, ... then you don't need to fiddle with the versions as the vmstate wire format doesn't change then. Does that work considering you have turned one layer of VMSD into two? Can it equivocate machines saved with the old all-in-one vmsd with this new one that is structured in two

[Qemu-devel] [PATCH V4 07/10] add def_value and use it in qemu_opts_print.

2012-10-25 Thread Dong Xu Wang
qemu_opts_print has no user now, so I re-write it and use it in qemu-img.c. qemu_opts_print will be used while using qemu-img create, it will produce the same output as previous code. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- qemu-option.c | 41

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann kra...@redhat.com wrote: On 10/25/12 11:47, Peter Crosthwaite wrote: Just put RAM regions in the unimplemented spaces in the MMIO region. These regions have undefined behaviour, but this at least stops QEMU from segfaulting when the guest bangs

Re: [Qemu-devel] [PATCH V4 04/10] introduce qemu_opts_create_nofail function

2012-10-25 Thread Peter Maydell
On 25 October 2012 13:57, Dong Xu Wang wdon...@linux.vnet.ibm.com wrote: While id is NULL, qemu_opts_create can not fail, so ignore errors is fine. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- qemu-option.c |5 + qemu-option.h |1 + 2 files changed, 6

[Qemu-devel] [PATCH 09/36] xhci: Add a xhci_ep_nuke_one_xfer helper function

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com Signed-off-by: Hans de Goede hdego...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/hcd-xhci.c | 49 ++--- 1 files changed, 30 insertions(+), 19 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:03, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann kra...@redhat.com wrote: On 10/25/12 11:47, Peter Crosthwaite wrote: Just put RAM regions in the unimplemented spaces in the MMIO region. These regions have undefined

Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers

2012-10-25 Thread Gerd Hoffmann
On 10/25/12 14:56, Peter Crosthwaite wrote: On Thu, Oct 25, 2012 at 10:16 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 25 October 2012 13:12, Gerd Hoffmann kra...@redhat.com wrote: +static inline void zynq_init_usb(uint32_t base_addr, qemu_irq irq) +{ +DeviceState *dev =

Re: [Qemu-devel] slow xbzrle

2012-10-25 Thread Orit Wasserman
On 10/25/2012 02:18 PM, Stefan Priebe - Profihost AG wrote: Am 25.10.2012 13:39, schrieb Orit Wasserman: On 10/25/2012 12:35 PM, Stefan Priebe - Profihost AG wrote: Am 25.10.2012 11:44, schrieb Orit Wasserman: Is this known or is something wrong? My guess this workload migrates fine without

Re: [Qemu-devel] [PATCH v1 4/8] usb/ehci: Add usb-ehci-sysbus

2012-10-25 Thread Avi Kivity
On 10/25/2012 11:55 AM, Peter Maydell wrote: On 25 October 2012 10:47, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: +static int usb_ehci_sysbus_initfn(SysBusDevice *dev) +{ +EHCIItfState *i = FROM_SYSBUS(EHCIItfState, dev); +EHCIState *s = i-ehci; + +s-dma =

[Qemu-devel] [PATCH V4 02/10] qemu-option: qemu_opts_validate(): fix duplicated code

2012-10-25 Thread Dong Xu Wang
Use opts_accepts_any() and find_desc_by_name(). Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- qemu-option.c | 14 +++--- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/qemu-option.c b/qemu-option.c

Re: [Qemu-devel] [PATCH v1 3/8] usb/ehci: seperate out PCIisms

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 10:57 PM, Gerd Hoffmann kra...@redhat.com wrote: Hi, ... then you don't need to fiddle with the versions as the vmstate wire format doesn't change then. Does that work considering you have turned one layer of VMSD into two? Can it equivocate machines saved with

Re: [Qemu-devel] [PATCH 03/12] hw/pl080: Use LOG_GUEST_ERROR and LOG_UNIMP

2012-10-25 Thread malc
On Thu, 25 Oct 2012, Peter Maydell wrote: Use LOG_GUEST_ERROR and LOG_UNIMP in preference to hw_error(). It's weird that printing something + abort is replaced by just printing a message and the commit message doesn't really reflect the fact. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Avi Kivity
On 10/25/2012 03:03 PM, Peter Crosthwaite wrote: On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann kra...@redhat.com wrote: On 10/25/12 11:47, Peter Crosthwaite wrote: Just put RAM regions in the unimplemented spaces in the MMIO region. These regions have undefined behaviour, but this at least

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Avi Kivity
On 10/25/2012 03:12 PM, Peter Maydell wrote: (2) what should the memory system do for accesses where there is no memory region? This is really system specific as it depends what the bus fabric does. For ARM the usual thing would be to generate a decode error response which will result in

Re: [Qemu-devel] [PATCH 26/27] pc: create separate init function for pc-1.3

2012-10-25 Thread Eduardo Habkost
On Wed, Oct 24, 2012 at 08:12:36PM +0200, Michael S. Tsirkin wrote: On Wed, Oct 24, 2012 at 03:50:00PM -0200, Eduardo Habkost wrote: This: - Renames the init function for pc-1.2 and lower to pc_init_pci_v1_2; - Creates a pc_init_pci_v1_3 function for pc-1.3. Right now both functions

Re: [Qemu-devel] [PATCH 03/12] hw/pl080: Use LOG_GUEST_ERROR and LOG_UNIMP

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:19, malc av1...@comtv.ru wrote: On Thu, 25 Oct 2012, Peter Maydell wrote: Use LOG_GUEST_ERROR and LOG_UNIMP in preference to hw_error(). It's weird that printing something + abort is replaced by just printing a message and the commit message doesn't really reflect the

Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers

2012-10-25 Thread Peter Crosthwaite
On Thu, Oct 25, 2012 at 11:14 PM, Gerd Hoffmann kra...@redhat.com wrote: On 10/25/12 14:56, Peter Crosthwaite wrote: On Thu, Oct 25, 2012 at 10:16 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 25 October 2012 13:12, Gerd Hoffmann kra...@redhat.com wrote: +static inline void

[Qemu-devel] [PATCH 05/36] ehci: Improve latency of interrupt delivery and async schedule scanning

2012-10-25 Thread Gerd Hoffmann
From: Hans de Goede hdego...@redhat.com While doing various performance tests of reading from USB mass storage devices I noticed the following:: 1) When an async handled packet completes, we don't immediately report an interrupt to the guest, instead we wait for the frame-timer to run and

Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions

2012-10-25 Thread Peter Maydell
On 25 October 2012 14:21, Avi Kivity a...@redhat.com wrote: On 10/25/2012 03:12 PM, Peter Maydell wrote: (2) what should the memory system do for accesses where there is no memory region? This is really system specific as it depends what the bus fabric does. For ARM the usual thing would be

Re: [Qemu-devel] [patch v4 12/16] e1000: apply fine lock on e1000

2012-10-25 Thread Jan Kiszka
On 2012-10-24 09:29, liu ping fan wrote: On Tue, Oct 23, 2012 at 5:04 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-10-22 11:23, Liu Ping Fan wrote: Use local lock to protect e1000. When calling the system function, dropping the fine lock before acquiring the big lock. This will

[Qemu-devel] [PATCH V14 0/6] add-cow file format

2012-10-25 Thread Dong Xu Wang
It will introduce a new file format: add-cow. The add-cow file format makes it possible to perform copy-on-write on top of a raw disk image. When we know that no backing file clusters remain visible (e.g. we have streamed the entire image and copied all data from the backing file), then it is

[Qemu-devel] [PATCH V14 1/6] docs: document for add-cow file format

2012-10-25 Thread Dong Xu Wang
Document for add-cow format, the usage and spec of add-cow are introduced. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- docs/specs/add-cow.txt | 151 1 files changed, 151 insertions(+), 0 deletions(-) create mode 100644

  1   2   3   >