Re: [Qemu-devel] [RFC v2 4/5] timer: associate three timerlists with AioContext

2013-07-28 Thread Paolo Bonzini
Il 29/07/2013 05:16, Liu Ping Fan ha scritto: > Currently, timers run on iothread inside QBL, this limits the usage > of timers in some case, e.g. virtio-blk-dataplane. In order to run > timers on private thread based on different clocksource, we arm each > AioContext with three timer lists in acco

Re: [Qemu-devel] [RFC v2 3/5] timer: make qemu_clock_enable sync between disable and timer's cb

2013-07-28 Thread Paolo Bonzini
Il 29/07/2013 05:16, Liu Ping Fan ha scritto: > After disabling the QemuClock, we should make sure that no QemuTimers > are still in flight. To implement that, the caller of disabling will > wait until the last user's exit. > > Note, the callers of qemu_clock_enable() should be sync by themselves,

Re: [Qemu-devel] [RFC v2 1/5] timer: protect timers_state with lock

2013-07-28 Thread Paolo Bonzini
Il 29/07/2013 05:16, Liu Ping Fan ha scritto: > In kvm mode, vm_clock may be read on AioContexts outside BQL(next > patch). This will make timers_state --the foundation of vm_clock > exposed to race condition. Using private lock to protect it. > Note in tcg mode, vm_clock still read inside BQL, so

Re: [Qemu-devel] [PATCH v5] spapr-vscsi: add task management

2013-07-28 Thread Alexey Kardashevskiy
On 07/29/2013 04:08 PM, Paolo Bonzini wrote: > Il 29/07/2013 06:49, Alexey Kardashevskiy ha scritto: >> At the moment the guest kernel issues two types of task management >> requests to the hypervisor - task about and lun reset. This adds >> handling for these tasks. As spapr-vscsi starts calling s

Re: [Qemu-devel] [Qemu-trivial] [PATCH] target-mips: Remove assignment to a variable which is never used

2013-07-28 Thread Michael Tokarev
On 29.07.2013 02:37, Aurelien Jarno wrote: On Thu, Jul 25, 2013 at 10:10:31PM +0200, Stefan Weil wrote: This assignment causes a compiler warning for compilations with the compiler option -Wunused-but-set-variable (which is included with -Wextra). Removing it allows using -Wextra for QEMU code

Re: [Qemu-devel] [PATCH v5] spapr-vscsi: add task management

2013-07-28 Thread Paolo Bonzini
Il 29/07/2013 06:49, Alexey Kardashevskiy ha scritto: > At the moment the guest kernel issues two types of task management > requests to the hypervisor - task about and lun reset. This adds > handling for these tasks. As spapr-vscsi starts calling scsi_req_cancel(), > free_request callback was impl

Re: [Qemu-devel] [PATCH] mips_malta: fix copy of the 0x1fc00000

2013-07-28 Thread Andreas Färber
Am 29.07.2013 07:08, schrieb Aurelien Jarno: > Copy the whole 0x1fe00 region into 0x1fc0, independently of the > loaded BIOS size. This fix the MIPS make check tests. > > Reported-by: Andreas Färber > Cc: Paul Burton > Cc: Leon Alrae > Signed-off-by: Aurelien Jarno Tested-by: Andreas

[Qemu-devel] [PATCH] mips_malta: fix copy of the 0x1fc00000

2013-07-28 Thread Aurelien Jarno
Copy the whole 0x1fe00 region into 0x1fc0, independently of the loaded BIOS size. This fix the MIPS make check tests. Reported-by: Andreas Färber Cc: Paul Burton Cc: Leon Alrae Signed-off-by: Aurelien Jarno --- hw/mips/mips_malta.c |4 ++-- 1 file changed, 2 insertions(+), 2 delet

[Qemu-devel] [PATCH v5] spapr-vscsi: add task management

2013-07-28 Thread Alexey Kardashevskiy
At the moment the guest kernel issues two types of task management requests to the hypervisor - task about and lun reset. This adds handling for these tasks. As spapr-vscsi starts calling scsi_req_cancel(), free_request callback was implemented. As virtio-vscsi, spapr-vscsi does not handle CLEAR_A

[Qemu-devel] [PATCH] spapr-vscsi: fix SOLNT bit in SRP_RSP

2013-07-28 Thread Alexey Kardashevskiy
The driver calculates SOLNT bit from UCSOLNT and SCSOLNT bits from the request. The iu pointer has a type of srp_iu* which points to a union, so cmd and rsp overlap. As the vscsi_send_rsp function calls memset(iu, 0, sizeof(rsp)), it clears first 36 bytes of both cmd and rsp so cmd.sol_not is alwa

Re: [Qemu-devel] [PATCH 2/6] mips_malta: correct reading MIPS revision at 0x1fc00010

2013-07-28 Thread Andreas Färber
Am 14.06.2013 09:30, schrieb Leon Alrae: > From: Paul Burton > > Rather than modifying the BIOS code at its original location, copy it > for the 0x1fc0 region & modify the copy. This means the original > ROM code is correctly readable at 0x1e10 whilst the MIPS revision > is readable at 0x

Re: [Qemu-devel] [RFC for-next 2/2] cpu: Move VMSTATE_CPU() into TYPE_CPU VMStateDescription

2013-07-28 Thread Jia Liu
On Mon, Jul 29, 2013 at 10:03 AM, Andreas Färber wrote: > Assign DeviceClass::vmsd for common CPUState and drop VMSTATE_CPU() from > AlphaCPU and OpenRISCCPU. > > Since we have two types of CPUs, those that register their state through > CPUClass::vmsd or CPU_SAVE_VERSION and those that register i

[Qemu-devel] [RFC PATCH 4/4] hmp: add -s switch to nbd_server_add

2013-07-28 Thread Fam Zheng
The switch is equivalent to "snapshot=on" option in QMP nbd-server-add. Signed-off-by: Fam Zheng --- hmp-commands.hx | 4 ++-- hmp.c | 8 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 8c6b91a..2cbd717 100644 --- a/hmp-co

[Qemu-devel] [RFC PATCH 1/4] block/backup: delete target after completion callback

2013-07-28 Thread Fam Zheng
Move bdrv_delete(target) one line down to give block job caller a chance to handle target on completion before deleting it. Signed-off-by: Fam Zheng --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/backup.c b/block/backup.c index 6ae8a05..d80341c 10064

[Qemu-devel] [RFC PATCH 3/4] qmp: Add "snapshot=" option to nbd-server-add

2013-07-28 Thread Fam Zheng
With drive-backup block job, we can have a point-in-time snapshot of a device. With snapshot=on, a backup block job is started on the device to do CoW to a temporary image and this image is exported to nbd. The image is deleted after nbd server stops. Signed-off-by: Fam Zheng --- blockdev-nbd.c

[Qemu-devel] [RFC PATCH 2/4] nbd: call drive_put_ref() only if dinfo exists

2013-07-28 Thread Fam Zheng
Signed-off-by: Fam Zheng --- blockdev-nbd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blockdev-nbd.c b/blockdev-nbd.c index 95f10c8..c75df19 100644 --- a/blockdev-nbd.c +++ b/blockdev-nbd.c @@ -72,7 +72,10 @@ static void nbd_close_notifier(Notifier *n, void *data) s

[Qemu-devel] [RFC PATCH 0/4] hmp/qmp: add snapshot option to nbd export

2013-07-28 Thread Fam Zheng
This implements another way of doing image fleecing: (HMP) nbd_server_add -s drive0 or (QMP) nbd-server-add device=drive0 snapshot=on It is one convenient command that starts drive-backup job on device for doing COW to a newly created temporary image, we don't need manually creating image,

Re: [Qemu-devel] [PATCH qom-next for-1.6 17/20] pxa2xx_timer: QOM cast cleanup

2013-07-28 Thread Andreas Färber
Am 27.07.2013 15:37, schrieb Andreas Färber: > Signed-off-by: Andreas Färber > --- > hw/timer/pxa2xx_timer.c | 38 +++--- > 1 file changed, 27 insertions(+), 11 deletions(-) > > diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c > index 4d28719..ff63fa

Re: [Qemu-devel] [PATCH qom-cpu for-1.6] cpu: Fix VMSTATE_CPU() semantics

2013-07-28 Thread Jia Liu
On Mon, Jul 29, 2013 at 10:20 AM, Andreas Färber wrote: > Commit 1a1562f5ea3da17d45d3829e35b5f49da9ec2db5 prepared a VMSTATE_CPU() > macro for device-style VMStateDescription registration, but missed to > adapt cpu_exec_init(), so that the "cpu_common" VMStateDescription was > still registered for

[Qemu-devel] [RFC v2 5/5] timer: run timers on aio_poll

2013-07-28 Thread Liu Ping Fan
Stop call timers in main loop and let each mini event-loop run its own timers. Signed-off-by: Liu Ping Fan --- aio-posix.c | 2 ++ include/qemu/timer.h | 4 ++-- main-loop.c | 2 -- qemu-timer.c | 15 ++- 4 files changed, 14 insertions(+), 9 deletions(-)

[Qemu-devel] [RFC v2 4/5] timer: associate three timerlists with AioContext

2013-07-28 Thread Liu Ping Fan
Currently, timers run on iothread inside QBL, this limits the usage of timers in some case, e.g. virtio-blk-dataplane. In order to run timers on private thread based on different clocksource, we arm each AioContext with three timer lists in according to three clocksource (QemuClock). A little late

[Qemu-devel] [RFC v2 2/5] timer: pick out timer list info from QemuClock

2013-07-28 Thread Liu Ping Fan
In qemu-wide, we will have three clocksource, they are present by rt_clock/vm_clock/host_clock. On the other hand, we want to run timers on the different backend threads by binding AioContext with its own three timer lists. So clean up the QemuClock struct to use it as the clock source. Signed-off

[Qemu-devel] [RFC v2 3/5] timer: make qemu_clock_enable sync between disable and timer's cb

2013-07-28 Thread Liu Ping Fan
After disabling the QemuClock, we should make sure that no QemuTimers are still in flight. To implement that, the caller of disabling will wait until the last user's exit. Note, the callers of qemu_clock_enable() should be sync by themselves, not protected by this patch. Signed-off-by: Liu Ping F

[Qemu-devel] [RFC v2 1/5] timer: protect timers_state with lock

2013-07-28 Thread Liu Ping Fan
In kvm mode, vm_clock may be read on AioContexts outside BQL(next patch). This will make timers_state --the foundation of vm_clock exposed to race condition. Using private lock to protect it. Note in tcg mode, vm_clock still read inside BQL, so icount is left without change. Lock rule: private loc

[Qemu-devel] [RFC v2 0/5] arm AioContext with its own timer stuff

2013-07-28 Thread Liu Ping Fan
summary of the model: Three qemu-wide clock source allowed in system. And each AioContext has three corresponding timer list to run timer against clocksource. rfcv2: drop patches about alarm-timer(if timeout of poll will not satisfy, will come back to it) fix qemu_clock_enable sync proble

[Qemu-devel] [PATCH qom-cpu for-1.6] cpu: Fix VMSTATE_CPU() semantics

2013-07-28 Thread Andreas Färber
Commit 1a1562f5ea3da17d45d3829e35b5f49da9ec2db5 prepared a VMSTATE_CPU() macro for device-style VMStateDescription registration, but missed to adapt cpu_exec_init(), so that the "cpu_common" VMStateDescription was still registered for AlphaCPU (fe31e7374299c0c6172ce618b29bf2fecbd881c7) and OpenRISC

[Qemu-devel] How to add a IRQ to QEMU

2013-07-28 Thread andysycr...@gmail.com
Hi, all I want to add a pci device just like pci-serial to QEMU, there are some qeustion while add a IRQ. In the init() function, pci->dev.config[PCI_INTERRUPT_PIN] = 0x01; s->irq = pci->dev.irq[0]; In the write() function qemu_irq_raise(s->irq); if (val & 0xff) == 0x99) qemu_irq_low(s->irq); W

Re: [Qemu-devel] vhost acceleration broken?

2013-07-28 Thread Anthony Liguori
On Sun, Jul 28, 2013 at 6:55 PM, Rusty Russell wrote: >> Or something vaguely understandable by a human? > > OK. It seems to me that each net device has a host side and a guest > side, which you can mix and match. So the commandline should reflect > that explicitly: > > qemu -hostdev net

[Qemu-devel] [PATCH] target-mips: fix mipsdsp_mul_q31_q31

2013-07-28 Thread Petar Jovanovic
From: Petar Jovanovic Multiplication of two fractional word elements is not correct when sign extension/promotion is needed. This change fixes it by adding correct casts from unsigned to signed values. In addition, the tests (dpaq_sa_l_w.c and dpsq_sa_l_w.c) have been extended to trigger the curr

[Qemu-devel] [RFC for-next 1/2] qdev: Construct VMStateDescription from type hierarchy

2013-07-28 Thread Andreas Färber
To avoid subclasses having to explicitly add their parent's state, such as VMSTATE_PCI_DEVICE(), automatically assemble a VMStateDescription on QOM realize. Use the most specific name and versions and prepend base types' fields and subsections respectively. TBD: Check if any types rely on subclass

Re: [Qemu-devel] [PATCH 0/4] export internal snapshot by qemu-nbd

2013-07-28 Thread Wenchao Xia
于 2013-7-26 16:20, Stefan Hajnoczi 写道: > On Fri, Jul 26, 2013 at 10:23:24AM +0800, Wenchao Xia wrote: >> 于 2013-7-25 16:06, Stefan Hajnoczi 写道: >>> On Thu, Jul 25, 2013 at 10:30:49AM +0800, Wenchao Xia wrote: Besides the argument, I think it helps to probe snapshot without qemu-img con

[Qemu-devel] [RFC for-next 2/2] cpu: Move VMSTATE_CPU() into TYPE_CPU VMStateDescription

2013-07-28 Thread Andreas Färber
Assign DeviceClass::vmsd for common CPUState and drop VMSTATE_CPU() from AlphaCPU and OpenRISCCPU. Since we have two types of CPUs, those that register their state through CPUClass::vmsd or CPU_SAVE_VERSION and those that register it through DeviceClass::vmsd, we must keep device code from registe

[Qemu-devel] [RFC for-next 0/2] QOM VMStateDescription remix

2013-07-28 Thread Andreas Färber
Hello, Based on a comment from mst, this mini-series proposes to change semantics of VMStateDescription registration to be more similar to those of static properties. Today, a device has one VMStateDescription, the last assignment to dc->vmsd wins. This means that a device must take care to inc

Re: [Qemu-devel] vhost acceleration broken?

2013-07-28 Thread Rusty Russell
Anthony Liguori writes: > "Michael S. Tsirkin" writes: > >> On Thu, Jul 25, 2013 at 04:56:05PM +0200, Andreas Färber wrote: >>> Am 25.07.2013 16:52, schrieb Michael S. Tsirkin: >>> > On Thu, Jul 25, 2013 at 08:28:00AM -0500, Anthony Liguori wrote: >>> >> We have a pretty awful legacy command line

Re: [Qemu-devel] [PATCH 3/4] qemu-nbd: add doc for internal snapshot export

2013-07-28 Thread Wenchao Xia
于 2013-7-26 16:11, Stefan Hajnoczi 写道: > On Wed, Jul 17, 2013 at 10:03:54PM +0800, Wenchao Xia wrote: >> Signed-off-by: Wenchao Xia >> --- >> qemu-nbd.c|2 ++ >> qemu-nbd.texi |3 +++ >> 2 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/qemu-nbd.c b/qemu-nbd.c >>

[Qemu-devel] [PATCH qom-next for-next v2 0/6] PCI VMState cleanups

2013-07-28 Thread Andreas Färber
Hello Michael and Gerd, As discussed, this series attempts to clean up PCIe devices fiddling with individual PCI VMStateFields. It is based on my qom-devices queue, containing changes to PCIe devices. v2 has been changed to use VMStateField::field_exists instead of subsections and unifies PCI and

[Qemu-devel] [PATCH qom-next for-next v2 4/6] pci: Unify vmstate_{pci, pcie}_device

2013-07-28 Thread Andreas Färber
The only difference so far is the size of the config space. It is always used through either VMSTATE_{PCI,PCIE}_DEVICE() or pci_device_save(), so the name change for PCIe shouldn't matter. Suggested-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- hw/pci-bridge/ioh3420.c|

[Qemu-devel] [PATCH RFC qom-next for-next v2 6/6] pci: Move VMSTATE_MSIX() into vmstate_pci_device

2013-07-28 Thread Andreas Färber
Use it conditional on msix_present() and drop msix_{save,load}() calls following pci_device_{save,load}(). This reorders the msix_save() and msix_unuse_all_vectors() calls for virtio-pci, but they seem independent of each other. Signed-off-by: Andreas Färber --- hw/misc/ivshmem.c | 7 ++--

[Qemu-devel] [PATCH qom-next for-next v2 2/6] pci: Simplify VMSTATE_PCIE_DEVICE() macro

2013-07-28 Thread Andreas Färber
Drop the arguments to avoid QOM refactorings causing more churn. Signed-off-by: Andreas Färber --- hw/pci-bridge/ioh3420.c| 2 +- hw/pci-bridge/xio3130_downstream.c | 2 +- hw/pci-bridge/xio3130_upstream.c | 2 +- hw/usb/hcd-xhci.c | 2 +- include/hw/pci/pcie.h

[Qemu-devel] [PATCH qom-next for-next v2 1/6] pci: Simplify VMSTATE_PCI_DEVICE() macro

2013-07-28 Thread Andreas Färber
Drop the arguments to avoid QOM refactorings causing more churn. Signed-off-by: Andreas Färber --- hw/acpi/piix4.c| 2 +- hw/audio/ac97.c| 2 +- hw/audio/es1370.c | 2 +- hw/audio/intel-hda.c | 2 +- hw/char/serial-pci.c | 4 ++--

[Qemu-devel] [PATCH qom-next for-next v2 5/6] pci: Move vmstate_pcie_aer_log into vmstate_pci_device

2013-07-28 Thread Andreas Färber
Make it conditional on PCIe and allocation of the AER log. Signed-off-by: Andreas Färber --- hw/pci-bridge/ioh3420.c| 2 -- hw/pci-bridge/xio3130_downstream.c | 2 -- hw/pci-bridge/xio3130_upstream.c | 2 -- hw/pci/pci.c | 9 + hw/pci/pcie_aer.c

[Qemu-devel] [PATCH qom-next for-next v2 3/6] vmstate: Introduce VMSTATE_BUFFER_UNSAFE_INFO_TEST()

2013-07-28 Thread Andreas Färber
To be used by PCIDevice. Signed-off-by: Andreas Färber --- include/migration/vmstate.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 1c31b5d..3590e1f 100644 --- a/include/migration/vmstate.h +++ b/include/

Re: [Qemu-devel] [PATCH qom-next for-1.6 06/14] imx_ccm: QOM cast cleanup

2013-07-28 Thread Peter Chubb
> "Andreas" == Andreas Färber writes: Andreas> Signed-off-by: Andreas Färber --- Acked-by: Peter Chubb -- Dr Peter Chubb peter.chubb AT nicta.com.au http://www.ssrg.nicta.com.au Software Systems Research Group/NICTA

Re: [Qemu-devel] [PATCH qom-next for-1.6 07/15] imx_avic: QOM cast cleanup

2013-07-28 Thread Peter Chubb
> "Andreas" == Andreas Färber writes: Andreas> Signed-off-by: Andreas Färber --- Acked-by: Peter Chubb -- Dr Peter Chubb peter.chubb AT nicta.com.au http://www.ssrg.nicta.com.au Software Systems Research Group/NICTA

Re: [Qemu-devel] qemu aborts with temp_save: Assertion `s->temps[temp].val_type == 2 || s->temps[temp].fixed_reg' failed

2013-07-28 Thread Max Filippov
On Mon, Jul 29, 2013 at 3:01 AM, Aurelien Jarno wrote: > On Thu, Jul 11, 2013 at 08:01:19AM +0400, Max Filippov wrote: >> On Thu, Jul 11, 2013 at 6:35 AM, Max Filippov wrote: >> > Hi Peter, >> > >> > I suddenly found qemu built with debug enabled aborting with an assertion >> > on one of xtensa

Re: [Qemu-devel] qemu aborts with temp_save: Assertion `s->temps[temp].val_type == 2 || s->temps[temp].fixed_reg' failed

2013-07-28 Thread Aurelien Jarno
On Thu, Jul 11, 2013 at 08:01:19AM +0400, Max Filippov wrote: > On Thu, Jul 11, 2013 at 6:35 AM, Max Filippov wrote: > > Hi Peter, > > > > I suddenly found qemu built with debug enabled aborting with an assertion > > on one of xtensa tests: > > > > qemu-system-xtensa -M sim -cpu dc232b -nographic

Re: [Qemu-devel] [PATCH] linux-user: correct argument number for sys_mremap and sys_splice

2013-07-28 Thread Aurelien Jarno
On Tue, Jul 23, 2013 at 07:00:10PM +0200, Petar Jovanovic wrote: > From: Petar Jovanovic > > sys_mremap missed 5th argument (new_address), which caused examples that > remap to a specific address to fail. > sys_splice missed 5th and 6th argument which caused different examples to > fail. > This c

Re: [Qemu-devel] [PATCH] target-mips: Remove assignment to a variable which is never used

2013-07-28 Thread Aurelien Jarno
On Thu, Jul 25, 2013 at 10:10:31PM +0200, Stefan Weil wrote: > This assignment causes a compiler warning for compilations with the compiler > option -Wunused-but-set-variable (which is included with -Wextra). > > Removing it allows using -Wextra for QEMU code without suppressing too many > extra w

Re: [Qemu-devel] [PATCH] hw/mips: align initrd to 64KB to avoid kernel error

2013-07-28 Thread Aurelien Jarno
On Thu, Jun 27, 2013 at 08:35:27AM +0100, Leon Alrae wrote: > From: James Hogan > > The Linux kernel can be configured to use 64KB pages, but it also > requires initrd to be page aligned. Therefore, to be safe, align the > initrd to 64KB using a new INITRD_PAGE_MASK rather than > TARGET_PAGE_MASK

Re: [Qemu-devel] [PATCH v2] target-mips: fix mipsdsp_trunc16_sat16_round

2013-07-28 Thread Aurelien Jarno
On Mon, Jul 01, 2013 at 01:54:47AM +0200, Petar Jovanovic wrote: > From: Petar Jovanovic > > This change corrects rounding and saturation of Q31 fractional value in > mipsdsp_trunc16_sat16_round(). Overflow detection was incorrect for the > corner case for PRECRQ_RS.PH, and this test case is also

Re: [Qemu-devel] [PATCH 0/6] mips_malta: fixes to support YAMON firmware

2013-07-28 Thread Aurelien Jarno
On Fri, Jun 14, 2013 at 08:30:42AM +0100, Leon Alrae wrote: > From: Paul Burton > > This patchset fixes some bugs with MIPS malta emulation allowing the YAMON > firmware to run. > > YAMON can be found at http://www.mips.com/products/system-software/yamon/ > > You can then boot to a YAMON prompt

[Qemu-devel] [PATCH] hw/usb/redirect.c: crash in QOM cleanup

2013-07-28 Thread Martin Cerveny
Hello. Qemu crashes during remote usb device removal. The associated chardev is destroyed "qemu_chr_delete()" in "usbredir_handle_destroy()" but pointer is not cleared. QOM cleanup is using pointer to previously freed memory. Example cmds: chardev-add socket,id=usbredirchardev1,port=4000,ho

[Qemu-devel] syscall _llseek does not work with file offset >= 2 GB

2013-07-28 Thread Gilles Mouchard
Hello, In Linux user mode, system call _llseek returns EINVAL when offset_low >= 2 GB. Replacing __NR_llseek by __NR__llseek has solved the bug (note the missing underscore). diff -Naur qemu-1.5.2-orig/linux-user/ openrisc/syscall_nr.h qemu-1.5.2-new/linux-user/openrisc/syscall_nr.h --- qemu-1.5.

Re: [Qemu-devel] [PATCH qom-cpu v9] target-i386: Move hyperv_* static globals to X86CPU

2013-07-28 Thread Andreas Färber
Am 08.07.2013 14:40, schrieb Igor Mammedov: > On Mon, 8 Jul 2013 03:03:54 +0200 > Andreas Färber wrote: > >> From: Igor Mammedov >> >> - since hyperv_* helper functions are used only in target-i386/kvm.c >> move them there as static helpers >> >> Requested-by: Eduardo Habkost >> Signed-off-b

Re: [Qemu-devel] [qom-cpu PATCH 0/2] i386: disable PMU CPUID leaf by default

2013-07-28 Thread Andreas Färber
Am 26.07.2013 22:15, schrieb Andreas Färber: > Am 26.07.2013 22:09, schrieb Eduardo Habkost: >> Changes v1 -> v2: >> * compat property is now named "pmu" instead of "pmu-passthrough" >> >> Eduardo Habkost (2): >> i386: pass X86CPU object to cpu_x86_find_by_name() >> i386: disable PMU CPUID lea

Re: [Qemu-devel] [PATCH 6/6] pc: limit 64 bit hole to 2G by default

2013-07-28 Thread Michael S. Tsirkin
On Sun, Jul 28, 2013 at 07:33:27PM +0200, Igor Mammedov wrote: > On Sun, 28 Jul 2013 12:11:42 +0300 > "Michael S. Tsirkin" wrote: > > > On Sun, Jul 28, 2013 at 10:21:56AM +0200, Igor Mammedov wrote: > > > On Sun, 28 Jul 2013 10:57:12 +0300 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Sun,

Re: [Qemu-devel] [PATCH 6/6] pc: limit 64 bit hole to 2G by default

2013-07-28 Thread Michael S. Tsirkin
On Sun, Jul 28, 2013 at 07:40:32PM +0200, Igor Mammedov wrote: > On Sun, 28 Jul 2013 12:17:47 +0200 > Andreas Färber wrote: > > > Am 28.07.2013 11:11, schrieb Michael S. Tsirkin: > > > On Sun, Jul 28, 2013 at 10:21:56AM +0200, Igor Mammedov wrote: > > >> On Sun, 28 Jul 2013 10:57:12 +0300 > > >>

Re: [Qemu-devel] [RFC 0/3 v2] qdev: handle global properties after all instance_init calls

2013-07-28 Thread Andreas Färber
Am 10.07.2013 22:08, schrieb Eduardo Habkost: > Updated version of the series sent in October 2012. > > References: > http://article.gmane.org/gmane.comp.emulators.qemu/173753 > (old discussion) > http://article.gmane.org/gmane.comp.emulators.qemu/173782 > (previous version of this ser

[Qemu-devel] Jiajun, please add me to your LinkedIn network

2013-07-28 Thread Jagan Teki (U-Boot Custodian) via LinkedIn
LinkedIn Jagan Teki (U-Boot Custodian) requested to add you as a connection on LinkedIn: -- Jiajun, I'd like to add you to my professional network on LinkedIn. - Jagan Teki Accept invitation from Jagan Teki (U-Boot Custodian) htt

Re: [Qemu-devel] [PATCH 2/6] pc: add I440FX QOM cast macro

2013-07-28 Thread Igor Mammedov
On Sun, 28 Jul 2013 19:24:03 +0200 Andreas Färber wrote: > Am 28.07.2013 19:21, schrieb Igor Mammedov: > > On Sun, 28 Jul 2013 11:57:14 +0200 > > Andreas Färber wrote: > > > >> Am 28.07.2013 09:29, schrieb Igor Mammedov: > >>> Signed-off-by: Igor Mammedov > >>> --- > >>> hw/pci-host/piix.c |

Re: [Qemu-devel] [PATCH 6/6] pc: limit 64 bit hole to 2G by default

2013-07-28 Thread Igor Mammedov
On Sun, 28 Jul 2013 12:17:47 +0200 Andreas Färber wrote: > Am 28.07.2013 11:11, schrieb Michael S. Tsirkin: > > On Sun, Jul 28, 2013 at 10:21:56AM +0200, Igor Mammedov wrote: > >> On Sun, 28 Jul 2013 10:57:12 +0300 > >> "Michael S. Tsirkin" wrote: > >> > >>> On Sun, Jul 28, 2013 at 09:29:13AM +0

Re: [Qemu-devel] [PATCH 1/6] pc: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/ioapic.h

2013-07-28 Thread Andreas Färber
Am 28.07.2013 19:19, schrieb Igor Mammedov: > On Sun, 28 Jul 2013 11:54:46 +0200 > Andreas Färber wrote: > >> Am 28.07.2013 09:29, schrieb Igor Mammedov: >>> From: "Michael S. Tsirkin" >>> >>> Signed-off-by: Michael S. Tsirkin >>> Signed-off-by: Laszlo Ersek >> >> Missing Reviewed-bys from Ger

Re: [Qemu-devel] [PATCH 6/6] pc: limit 64 bit hole to 2G by default

2013-07-28 Thread Igor Mammedov
On Sun, 28 Jul 2013 12:13:17 +0300 "Michael S. Tsirkin" wrote: > On Sun, Jul 28, 2013 at 10:21:56AM +0200, Igor Mammedov wrote: > > On Sun, 28 Jul 2013 10:57:12 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Sun, Jul 28, 2013 at 09:29:13AM +0200, Igor Mammedov wrote: > > > > It turns out th

Re: [Qemu-devel] [PATCH 6/6] pc: limit 64 bit hole to 2G by default

2013-07-28 Thread Igor Mammedov
On Sun, 28 Jul 2013 12:11:42 +0300 "Michael S. Tsirkin" wrote: > On Sun, Jul 28, 2013 at 10:21:56AM +0200, Igor Mammedov wrote: > > On Sun, 28 Jul 2013 10:57:12 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Sun, Jul 28, 2013 at 09:29:13AM +0200, Igor Mammedov wrote: > > > > It turns out th

Re: [Qemu-devel] [PATCH 2/6] pc: add I440FX QOM cast macro

2013-07-28 Thread Andreas Färber
Am 28.07.2013 19:21, schrieb Igor Mammedov: > On Sun, 28 Jul 2013 11:57:14 +0200 > Andreas Färber wrote: > >> Am 28.07.2013 09:29, schrieb Igor Mammedov: >>> Signed-off-by: Igor Mammedov >>> --- >>> hw/pci-host/piix.c | 8 ++-- >>> 1 file changed, 6 insertions(+), 2 deletions(-) >>> >>> dif

Re: [Qemu-devel] [PATCH 2/6] pc: add I440FX QOM cast macro

2013-07-28 Thread Igor Mammedov
On Sun, 28 Jul 2013 11:57:14 +0200 Andreas Färber wrote: > Am 28.07.2013 09:29, schrieb Igor Mammedov: > > Signed-off-by: Igor Mammedov > > --- > > hw/pci-host/piix.c | 8 ++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c

Re: [Qemu-devel] [PATCH 1/6] pc: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/ioapic.h

2013-07-28 Thread Igor Mammedov
On Sun, 28 Jul 2013 11:54:46 +0200 Andreas Färber wrote: > Am 28.07.2013 09:29, schrieb Igor Mammedov: > > From: "Michael S. Tsirkin" > > > > Signed-off-by: Michael S. Tsirkin > > Signed-off-by: Laszlo Ersek > > Missing Reviewed-bys from Gerd and me. it changed file form apic.h to ioapic.h,

Re: [Qemu-devel] [PATCH] target-mips: fix branch in likely delay slot tcg assert

2013-07-28 Thread Aurelien Jarno
On Mon, Jun 24, 2013 at 05:45:39PM +0100, Yongbok Kim wrote: > From: James Hogan > > When a branch delay slot contains another branch instruction, the code > generated raises an exception, however since is_branch==1, > handle_delay_slot() doesn't get called immediately. This means > ctx->bstate i

Re: [Qemu-devel] [RFC PATCH] vga: Start supporting resolution not multiple of 16 correctly.

2013-07-28 Thread Frediano Ziglio
2013/7/23 Gerd Hoffmann > Hi, > > > Tested-by: Fabio Fantoni > > > > I tested it for a long time with spice on xen (because qxl will be fully > > working only after adding SSE support on hvm domUs). It works, I think > > it is good to add this and the respective vgabios patch on upstream. > >

Re: [Qemu-devel] [PATCH] target-mips: fix multiplication in mipsdsp_rndq15_mul_q15_q15

2013-07-28 Thread Aurelien Jarno
On Thu, May 23, 2013 at 07:37:53PM +0200, Petar Jovanovic wrote: > From: Petar Jovanovic > > Multiplication of Q15 fractional halfword vectors was incorrect in the > previous implementation of mipsdsp_rndq15_mul_q15_q15. It failed to take > element signs into account. This change fixes it, and it

Re: [Qemu-devel] [PATCH RFC for-1.6 qom-next 0/3] PCIe VMState cleanups for 1.6

2013-07-28 Thread Michael S. Tsirkin
On Sun, Jul 28, 2013 at 04:59:18PM +0200, Andreas Färber wrote: > Am 28.07.2013 16:08, schrieb Michael S. Tsirkin: > > On Sun, Jul 28, 2013 at 03:41:07AM +0200, Andreas Färber wrote: > >> Hello Michael and Gerd, > >> > >> As discussed, this series attempts to clean up PCIe devices fiddling with > >

Re: [Qemu-devel] VFIO and scheduled SR-IOV cards

2013-07-28 Thread Benoît Canet
> Confused. > You have one VF accessing BAR of another VF? > Why? The VFs are scheduled and the board have only one microcontroller responsible to give the read results for some memory mapped registers. So it could respond the value of the active VF when a bar of an inactive VF is read. I handed

Re: [Qemu-devel] [PATCH for-1.6] memory: add tracepoints for MMIO reads/writes

2013-07-28 Thread Andreas Färber
Am 28.07.2013 16:34, schrieb Peter Maydell: > On 28 July 2013 13:35, Paolo Bonzini wrote: >> This is quite handy to debug softmmu targets. >> >> Signed-off-by: Paolo Bonzini > > (not a nak, just a tangential thought) > It would be cute if you could just insert a "trace this access > and pass it

Re: [Qemu-devel] [PATCH RFC for-1.6 qom-next 0/3] PCIe VMState cleanups for 1.6

2013-07-28 Thread Andreas Färber
Am 28.07.2013 16:08, schrieb Michael S. Tsirkin: > On Sun, Jul 28, 2013 at 03:41:07AM +0200, Andreas Färber wrote: >> Hello Michael and Gerd, >> >> As discussed, this series attempts to clean up PCIe devices fiddling with >> individual PCIe VMState fields. It is based on my qom-next queue, containi

Re: [Qemu-devel] [PATCH for-1.6] memory: add tracepoints for MMIO reads/writes

2013-07-28 Thread Peter Maydell
On 28 July 2013 13:35, Paolo Bonzini wrote: > This is quite handy to debug softmmu targets. > > Signed-off-by: Paolo Bonzini (not a nak, just a tangential thought) It would be cute if you could just insert a "trace this access and pass it through" container MemoryRegion at an arbitrary point in

Re: [Qemu-devel] [PATCH RFC for-1.6 qom-next 0/3] PCIe VMState cleanups for 1.6

2013-07-28 Thread Andreas Färber
Am 28.07.2013 15:44, schrieb Andreas Färber: > Am 28.07.2013 03:41, schrieb Andreas Färber: >> Patch 1 assumes the following are equivalent: >> a) - Struct A >> - Field Aa >> ... >>- Field X >> ... >> b) - Struct A >> - Field Aa >> ... >> - Field X >> >> Patch 2 re

Re: [Qemu-devel] [PATCH v2 2/2] kvm: migrate vPMU state

2013-07-28 Thread Gleb Natapov
On Sun, Jul 28, 2013 at 04:07:37PM +0200, Paolo Bonzini wrote: > Il 28/07/2013 15:54, Gleb Natapov ha scritto: > > On Sun, Jul 28, 2013 at 03:51:25PM +0200, Paolo Bonzini wrote: > >> Il 28/07/2013 14:57, Gleb Natapov ha scritto: > @@ -1114,6 +1135,33 @@ static int kvm_put_msrs(X86CPU *cpu, int

Re: [Qemu-devel] [PATCH v2 2/2] kvm: migrate vPMU state

2013-07-28 Thread Paolo Bonzini
Il 28/07/2013 15:54, Gleb Natapov ha scritto: > On Sun, Jul 28, 2013 at 03:51:25PM +0200, Paolo Bonzini wrote: >> Il 28/07/2013 14:57, Gleb Natapov ha scritto: @@ -1114,6 +1135,33 @@ static int kvm_put_msrs(X86CPU *cpu, int level) kvm_msr_entry_set(&msrs[n++], MSR_KVM_STEAL_T

Re: [Qemu-devel] [PATCH RFC for-1.6 qom-next 0/3] PCIe VMState cleanups for 1.6

2013-07-28 Thread Michael S. Tsirkin
On Sun, Jul 28, 2013 at 03:41:07AM +0200, Andreas Färber wrote: > Hello Michael and Gerd, > > As discussed, this series attempts to clean up PCIe devices fiddling with > individual PCIe VMState fields. It is based on my qom-next queue, containing > type and field changes for PCIe devices. > > Pat

Re: [Qemu-devel] [PATCH v2 2/2] kvm: migrate vPMU state

2013-07-28 Thread Gleb Natapov
On Sun, Jul 28, 2013 at 03:51:25PM +0200, Paolo Bonzini wrote: > Il 28/07/2013 14:57, Gleb Natapov ha scritto: > >> @@ -1114,6 +1135,33 @@ static int kvm_put_msrs(X86CPU *cpu, int level) > >> kvm_msr_entry_set(&msrs[n++], MSR_KVM_STEAL_TIME, > >>env->ste

Re: [Qemu-devel] [PATCH v2 2/2] kvm: migrate vPMU state

2013-07-28 Thread Paolo Bonzini
Il 28/07/2013 14:57, Gleb Natapov ha scritto: >> @@ -1114,6 +1135,33 @@ static int kvm_put_msrs(X86CPU *cpu, int level) >> kvm_msr_entry_set(&msrs[n++], MSR_KVM_STEAL_TIME, >>env->steal_time_msr); >> } >> +if (has_msr_architectural_pmu)

Re: [Qemu-devel] [PATCH RFC for-1.6 qom-next 0/3] PCIe VMState cleanups for 1.6

2013-07-28 Thread Andreas Färber
Am 28.07.2013 03:41, schrieb Andreas Färber: > Patch 1 assumes the following are equivalent: > a) - Struct A > - Field Aa > ... >- Field X > ... > b) - Struct A > - Field Aa > ... > - Field X > > Patch 2 relies on XHCI not being released yet, thus no compatibiliy

Re: [Qemu-devel] [PATCH v2 0/2] kvm: migrate vPMU state

2013-07-28 Thread Gleb Natapov
On Sun, Jul 28, 2013 at 03:03:50PM +0200, Andreas Färber wrote: > Am 25.07.2013 17:05, schrieb Paolo Bonzini: > > Same code as v1, but with all tabs expunged from cpu.h. > > > > Paolo Bonzini (2): > > target-i386: remove tabs from target-i386/cpu.h > > kvm: migrate vPMU state > > > > target-

Re: [Qemu-devel] [PATCH v2 0/2] kvm: migrate vPMU state

2013-07-28 Thread Andreas Färber
Am 25.07.2013 17:05, schrieb Paolo Bonzini: > Same code as v1, but with all tabs expunged from cpu.h. > > Paolo Bonzini (2): > target-i386: remove tabs from target-i386/cpu.h > kvm: migrate vPMU state > > target-i386/cpu.h | 215 > -- > ta

Re: [Qemu-devel] [PATCH for-1.6] memory: add tracepoints for MMIO reads/writes

2013-07-28 Thread Andreas Färber
Am 28.07.2013 14:55, schrieb Paolo Bonzini: > Il 28/07/2013 14:45, Andreas Färber ha scritto: >> Am 28.07.2013 14:35, schrieb Paolo Bonzini: >>> diff --git a/trace-events b/trace-events >>> index 002df83..3e0dd74 100644 >>> --- a/trace-events >>> +++ b/trace-events >>> @@ -1165,6 +1165,10 @@ kvm_vm

Re: [Qemu-devel] [PATCH v2 2/2] kvm: migrate vPMU state

2013-07-28 Thread Gleb Natapov
On Thu, Jul 25, 2013 at 05:05:22PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > target-i386/cpu.h | 23 + > target-i386/kvm.c | 93 > --- > target-i386/machine.c | 44 > 3 files cha

[Qemu-devel] [PATCH for-1.6 v2] memory: add tracepoints for MMIO reads/writes

2013-07-28 Thread Paolo Bonzini
This is quite handy to debug softmmu targets. Reviewed-by: Andreas Faerber Signed-off-by: Paolo Bonzini --- memory.c | 5 + trace-events | 4 2 files changed, 9 insertions(+) diff --git a/memory.c b/memory.c index 1494e95..ac6f3c6 100644 --- a/memory.c +++ b/memory.c @@ -19,6 +19,

Re: [Qemu-devel] [PATCH RFC qom-next 4/4] pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types

2013-07-28 Thread Michael S. Tsirkin
On Sun, Jul 28, 2013 at 02:36:33PM +0200, Andreas Färber wrote: > Hi Anthony, > > Am 22.07.2013 22:29, schrieb Anthony Liguori: > > for consistency, I think having everything be relatively to > > *one* type for a Property list is pretty helpful. > > > > Expecting someone to know the type hierarch

Re: [Qemu-devel] [PATCH for-1.6] memory: add tracepoints for MMIO reads/writes

2013-07-28 Thread Paolo Bonzini
Il 28/07/2013 14:45, Andreas Färber ha scritto: > Am 28.07.2013 14:35, schrieb Paolo Bonzini: >> This is quite handy to debug softmmu targets. >> >> Signed-off-by: Paolo Bonzini >> --- >> memory.c | 5 + >> trace-events | 4 >> 2 files changed, 9 insertions(+) >> >> diff --git a/memo

Re: [Qemu-devel] [PATCH] target-or32: fix masking in openrisc_pic_cpu_handler()

2013-07-28 Thread Jia Liu
Hi Xi, On Tue, Jan 22, 2013 at 11:57 PM, Xi Wang wrote: > A correct mask should be `x & (1 << i)', rather than `x && (1 << i)'. > > Also, in C99 signed shift (1 << 31) is undefined behavior, since the > result exceeds INT_MAX; use 1U instead. > > Signed-off-by: Xi Wang > --- > hw/openrisc_pic.c

Re: [Qemu-devel] [PATCH 0/2] qemu-help: improve -device command line help

2013-07-28 Thread Michael S. Tsirkin
On Sun, Jul 28, 2013 at 12:14:52PM +0300, Marcel Apfelbaum wrote: > Running qemu with "-device ?" option returns ~145 lines. > It is hard to manage understanding the output. > > Theses patches aim to partially solve the problem by dividing the devices > into logical categories like "Network/Displa

Re: [Qemu-devel] [PATCH for-1.6] memory: add tracepoints for MMIO reads/writes

2013-07-28 Thread Andreas Färber
Am 28.07.2013 14:35, schrieb Paolo Bonzini: > This is quite handy to debug softmmu targets. > > Signed-off-by: Paolo Bonzini > --- > memory.c | 5 + > trace-events | 4 > 2 files changed, 9 insertions(+) > > diff --git a/memory.c b/memory.c > index 1494e95..ac6f3c6 100644 > --- a/m

Re: [Qemu-devel] [PATCH 1/2] qemu-help: Sort devices by logical functionality

2013-07-28 Thread Michael S. Tsirkin
On Sun, Jul 28, 2013 at 12:14:53PM +0300, Marcel Apfelbaum wrote: > Categorize devices that appear as output to "-device ?" command > by logical functionality. Sort the devices by logical categories > before showing them to user. > > The sort is done by functionality rather than alphabetical. > >

Re: [Qemu-devel] [PATCH RFC qom-next 4/4] pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types

2013-07-28 Thread Andreas Färber
Hi Anthony, Am 22.07.2013 22:29, schrieb Anthony Liguori: > for consistency, I think having everything be relatively to > *one* type for a Property list is pretty helpful. > > Expecting someone to know the type hierarchy by heart such that this > doesn't look like a bug is too much IMHO. I have

[Qemu-devel] [PATCH for-1.6] memory: add tracepoints for MMIO reads/writes

2013-07-28 Thread Paolo Bonzini
This is quite handy to debug softmmu targets. Signed-off-by: Paolo Bonzini --- memory.c | 5 + trace-events | 4 2 files changed, 9 insertions(+) diff --git a/memory.c b/memory.c index 1494e95..ac6f3c6 100644 --- a/memory.c +++ b/memory.c @@ -19,6 +19,7 @@ #include "qemu/bitops.h"

[Qemu-devel] [PATCH for-1.6] fw_cfg: the I/O port variant expects little-endian

2013-07-28 Thread Paolo Bonzini
The I/O port variant of fw_cfg is used by sparc64, which is a big-endian machine. Firmware swaps bytes before sending them to fw_cfg, so we need to unswap them in the device. This is only used on sparc64 and on (little-endian) x86, so it does not affect any other target. 32-bit Sparc and PPC all

Re: [Qemu-devel] [PATCH qom-cpu for-1.6] cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"

2013-07-28 Thread Jia Liu
On Sat, Jul 27, 2013 at 10:01 AM, Andreas Färber wrote: > Commit c643bed99 moved qemu_init_vcpu() calls to common CPUState code. > This causes x86 cpu-add to fail with "KVM: setting VAPIC address failed". > > The reason for the failure is that CPUClass::kvm_fd is not yet > initialized in the follo

Re: [Qemu-devel] [PATCH v3 11/14] piix: APIs for pc guest info

2013-07-28 Thread Michael S. Tsirkin
On Sun, Jul 28, 2013 at 01:08:13PM +0200, Andreas Färber wrote: > Am 28.07.2013 12:31, schrieb Andreas Färber: > > Am 28.07.2013 12:14, schrieb Michael S. Tsirkin: > >> On Sun, Jul 28, 2013 at 11:38:17AM +0200, Andreas Färber wrote: > >>> Am 28.07.2013 09:30, schrieb Michael S. Tsirkin: > On S

Re: [Qemu-devel] [PATCH qom-next v2 0/4] QOM'ification of pci-bridge types

2013-07-28 Thread Andreas Färber
Am 23.07.2013 00:36, schrieb Andreas Färber: > Andreas Färber (4): > pci-bridge: Turn PCIBridge into abstract QOM type > pci-bridge-dev: QOM parent field cleanup > pci-bridge/i82801b11: Rename parent field > pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types Thanks, applied to q

Re: [Qemu-devel] [PATCH qom-cpu for-1.6] cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"

2013-07-28 Thread Andreas Färber
Am 28.07.2013 08:13, schrieb Igor Mammedov: > On Sat, 27 Jul 2013 04:01:50 +0200 > Andreas Färber wrote: > >> Commit c643bed99 moved qemu_init_vcpu() calls to common CPUState code. >> This causes x86 cpu-add to fail with "KVM: setting VAPIC address failed". >> >> The reason for the failure is tha

  1   2   >