Re: [Qemu-devel] [PATCH] sdhci: add quirk property for card insert interrupt status on Raspberry Pi

2015-12-31 Thread Peter Crosthwaite
On Thu, Dec 31, 2015 at 1:40 PM, Andrew Baumann wrote: > This quirk is a workaround for the following hardware behaviour, on > which UEFI (specifically, the bootloader for Windows on Pi2) depends: > > 1. at boot with an SD card present, the interrupt status/enable >registers are initially zero

Re: [Qemu-devel] [PATCH] sdhci: Revert "add optional quirk property to disable card insertion/removal interrupts"

2015-12-31 Thread Peter Crosthwaite
On Thu, Dec 31, 2015 at 1:10 PM, Andrew Baumann wrote: > This reverts commit 723697551a7e926abe7d3c7f2966012b8075143d. > > This change was poorly tested on my part. It squelched card insertion > interrupts on reset, but that was not necessary because sdhci_reset() > clears all the registers (via t

Re: [Qemu-devel] [RFC PATCH v0 0/9] Generic cpu-core device

2015-12-31 Thread Bharata B Rao
On Wed, Dec 16, 2015 at 04:46:37PM +0100, Andreas Färber wrote: > Am 10.12.2015 um 13:35 schrieb Igor Mammedov: > > wrt CLI can't we do something like this? > > > > -device some-cpu-model,socket=x[,core=y[,thread=z]] > > That's problematic and where my x86 remodeling got stuck. It works fine > (m

[Qemu-devel] [Bug 1530386] Re: command.com on win95 throws video mode out

2015-12-31 Thread John Comeau
verified that the problem does not exist on bochs version 2.6-5 Debian package. I first had to convert the image from qcow to raw: qemu-img convert -O raw c.img c_raw.img bxrc file: megs: 32 vga: extension=vbe romimage: file=$BXSHARE/BIOS-bochs-latest vgaromimage: file=$BXSHARE/VGABIOS-lgpl-lates

[Qemu-devel] [PATCH v3 7/7] raspi: add raspberry pi 2 machine

2015-12-31 Thread Andrew Baumann
bcm2835/Pi1 requires more peripherals, and will be added in a later patch series. Signed-off-by: Andrew Baumann --- Notes: v3: * fix board setup to remain Pi1 compatible * pass ram property hw/arm/Makefile.objs | 2 +- hw/arm/raspi.c | 180

[Qemu-devel] [PATCH v3 5/7] bcm2836_control: add bcm2836 ARM control logic

2015-12-31 Thread Andrew Baumann
This module is specific to the bcm2836 (Pi2). It implements the top level interrupt controller, and mailboxes used for inter-processor synchronisation. Signed-off-by: Andrew Baumann --- Notes: v3: * uint8 localirqs * style tweaks * add MR access size limits hw/intc/Makefile.

[Qemu-devel] [PATCH v3 6/7] bcm2836: add bcm2836 soc device

2015-12-31 Thread Andrew Baumann
This is the SoC for Raspberry Pi 2. Signed-off-by: Andrew Baumann --- The use of smp_cpus is dubious here. Ideally it should be passed as a property from the board, but I found that simply initialising (and not later realizing) an ARM cpu had unintended side-effects. Is it ok to defer the object_

[Qemu-devel] [PATCH v3 4/7] bcm2835_peripherals: add rollup device for bcm2835 peripherals

2015-12-31 Thread Andrew Baumann
This device maintains all the non-CPU peripherals on bcm2835 (Pi1) which are also present on bcm2836 (Pi2). It also implements the private address spaces used for DMA and mailboxes. Signed-off-by: Andrew Baumann --- Notes: v3: * clean up raspi_platform.h * s/_/-/ in type/property/c

[Qemu-devel] [PATCH v3 3/7] bcm2835_ic: add bcm2835 interrupt controller

2015-12-31 Thread Andrew Baumann
Signed-off-by: Andrew Baumann Reviewed-by: Peter Crosthwaite --- Notes: v3: * minor style tweaks * use extract32 in place of manual shift/masking v2 changes: * split inputs to named gpu_irq and arm_irq gpio inputs * use 64-bit gpu_irq and 8-bit arm_irq status rat

[Qemu-devel] [PATCH v3 1/7] bcm2835_mbox: add BCM2835 mailboxes

2015-12-31 Thread Andrew Baumann
This adds the system mailboxes which are used to communicate with a number of GPU peripherals on Pi/Pi2. Signed-off-by: Andrew Baumann --- Notes: v3: * #define register offsets * rename mbox_init -> mbox_reset * s/_/-/ in property and type names * avoid hw_error * mi

[Qemu-devel] [PATCH v3 2/7] bcm2835_property: add bcm2835 property channel

2015-12-31 Thread Andrew Baumann
This sits behind the mailbox interface, and implements request/response queries for system properties. The framebuffer-related properties will be added in a later patch. Signed-off-by: Andrew Baumann --- hw/misc/Makefile.objs | 1 + hw/misc/bcm2835_property.c | 277 +++

[Qemu-devel] [PATCH v3 0/7] Raspberry Pi 2 support

2015-12-31 Thread Andrew Baumann
This patch series adds initial support for Raspberry Pi 2 (bcm2836). It is heavily based on the original (out of tree) work of Gregory Estrade, Stefan Weil and others to support Raspberry Pi 1. Thanks are also due to Peter Crosthwaite for the code reviews and feedback. At the end of this series, i

[Qemu-devel] [PATCH] sdhci: add quirk property for card insert interrupt status on Raspberry Pi

2015-12-31 Thread Andrew Baumann
This quirk is a workaround for the following hardware behaviour, on which UEFI (specifically, the bootloader for Windows on Pi2) depends: 1. at boot with an SD card present, the interrupt status/enable registers are initially zero 2. upon enabling it in the interrupt enable register, the card i

[Qemu-devel] Possible reference leak in device_set_realized(...)

2015-12-31 Thread Ilya Lesokhin
Hi, I’m working on SRIOV support for VFIO and I’m suffering from a reference leak. I’m using Knut Omang’s patches for SRIOV[1]. When the VF’s are enabled I call pci_create(…) and then object_property_set_bool(OBJECT(&dev->qdev), true, "realized", &local_err); and when the VF’s are disabled I call

[Qemu-devel] [Bug 1530386] [NEW] command.com on win95 throws video mode out

2015-12-31 Thread John Comeau
Public bug reported: on a presumed-good copy of Windows 95 obtained from http://forum.xda- developers.com/showthread.php?t=1960870, the operating system boots successfully and shows up fine, but as soon as I double-click the MS-DOS icon, the window, while remaining the same size, goes to a differe

[Qemu-devel] [PATCH] sdhci: Revert "add optional quirk property to disable card insertion/removal interrupts"

2015-12-31 Thread Andrew Baumann
This reverts commit 723697551a7e926abe7d3c7f2966012b8075143d. This change was poorly tested on my part. It squelched card insertion interrupts on reset, but that was not necessary because sdhci_reset() clears all the registers (via the call to memset), so the subsequent sdhci_insert_eject_cb() cal

Re: [Qemu-devel] [PATCH v3 0/3] sdhci patches to enable Raspberry Pi

2015-12-31 Thread Andrew Baumann
> From: Stefan Hajnoczi [mailto:stefa...@gmail.com] > Sent: Tuesday, 22 December 2015 00:04 > On Mon, Dec 21, 2015 at 02:47:46PM -0800, Andrew Baumann wrote: > > This is a series of three tweaks needed to enable the generic sdhci > > controller to emulate Raspberry Pi (bcm2835/2836), and boot Linux

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-31 Thread Programmingkid
On Dec 31, 2015, at 1:56 PM, Mark Cave-Ayland wrote: > On 31/12/15 18:26, Programmingkid wrote: > >>> Yeah, I see that too. Given that you have the source to the Apple >>> RTL8139 driver at hand, can you try with a patched OpenBIOS using the >>> bus master patchset on the mailing list and also a

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-31 Thread Mark Cave-Ayland
On 31/12/15 18:26, Programmingkid wrote: >> Yeah, I see that too. Given that you have the source to the Apple >> RTL8139 driver at hand, can you try with a patched OpenBIOS using the >> bus master patchset on the mailing list and also add some debugging to >> your copy of >> http://www.opensource.

Re: [Qemu-devel] [PATCH v2 5/7] bcm2836_control: add bcm2836 ARM control logic

2015-12-31 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Wednesday, 30 December 2015 19:21 > On Wed, Dec 23, 2015 at 4:25 PM, Andrew Baumann > wrote: > > This module is specific to the bcm2836 (Pi2). It implements the top > > level interrupt controller, and mailboxes used for inter-pr

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-31 Thread Programmingkid
On Dec 31, 2015, at 8:23 AM, Mark Cave-Ayland wrote: > On 30/12/15 17:50, Programmingkid wrote: > >>> Okay. I've just posted a revised patchset to the OpenBIOS list which may >>> (or may not) help, so please test with that aswell to see if it makes a >>> difference. >> >> I have test your patch

Re: [Qemu-devel] [PATCH v2 4/7] bcm2835_peripherals: add rollup device for bcm2835 peripherals

2015-12-31 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Wednesday, 30 December 2015 18:54 > On Wed, Dec 23, 2015 at 4:25 PM, Andrew Baumann > wrote: > > This device maintains all the non-CPU peripherals on bcm2835 (Pi1) > > which are also present on bcm2836 (Pi2). It also implements

Re: [Qemu-devel] [PATCH v2 1/7] bcm2835_mbox: add BCM2835 mailboxes

2015-12-31 Thread Andrew Baumann
Hi Peter, > From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Wednesday, 30 December 2015 16:13 > On Wed, Dec 23, 2015 at 4:25 PM, Andrew Baumann > wrote: > > This adds the system mailboxes which are used to communicate with a > > number of GPU peripherals on Pi/Pi2. [...] > > -

[Qemu-devel] [PATCH] l2tpv3: fix cookie decoding

2015-12-31 Thread Alexis D...t
If a 32 bits l2tpv3 frame cookie MSB if set to 1, the cast to uint64_t cookie will spread 1 to the four most significant bytes. Then the condition (cookie != s->rx_cookie) becomes false. Signed-off-by: Alexis Dambricourt --- net/l2tpv3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-31 Thread Mark Cave-Ayland
On 30/12/15 17:50, Programmingkid wrote: >> Okay. I've just posted a revised patchset to the OpenBIOS list which may >> (or may not) help, so please test with that aswell to see if it makes a >> difference. > > I have test your patch set. First I disabled my change to the pci_dma_read() > functi

Re: [Qemu-devel] [PATCH v3] linux-user/mmap.c: Always zero MAP_ANONYMOUS memory in mmap_frag()

2015-12-31 Thread Chen Gang
On 12/30/15 09:14, Laurent Vivier wrote: > > Le 30/12/2015 02:10, cheng...@emindsoft.com.cn a écrit : >> From: Chen Gang >> >> When mapping MAP_ANONYMOUS memory fragments, still need notice about to >> set it zero, or it will cause issues. >> >> Signed-off-by: Chen Gang >> --- >> linux-user/mm

Re: [Qemu-devel] [PATCH v2 11/14] tcg: Implement indirect memory registers

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > That is, global_mem registers whose base is another global_mem > register, rather than a fixed register. > > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 95 > --- > tcg/tcg.h |

Re: [Qemu-devel] [PATVH v2] net: ne2000: fix bounds check in ioport operations

2015-12-31 Thread P J P
+-- On Thu, 31 Dec 2015, Jason Wang wrote --+ | Btw, looking at ne2000_mem_writew(), it has: | addr &= ~1; Yes, this seems to ensure that write starts at an even address. | at the beginning, so looks like we are really safe, Need only to care | about writel? Right, I've sent an updated patc

[Qemu-devel] [PATCH v3] net: ne2000: fix bounds check in ioport operations

2015-12-31 Thread P J P
From: Prasad J Pandit While doing ioport r/w operations, ne2000 device emulation suffers from OOB r/w errors. Update respective array bounds check to avoid OOB access. Reported-by: Ling Liu Signed-off-by: Prasad J Pandit --- hw/net/ne2000.c | 10 ++ 1 file changed, 6 insertions(+), 4

Re: [Qemu-devel] [PATCH v2 10/14] tcg: Introduce temp_load

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Unify all of the places that realize a temporary into a register. > > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 116 > -- > 1 file changed, 52 insertions(+), 64 deletions(-) >

Re: [Qemu-devel] [PATCH v2 09/14] tcg: Change temp_save argument to TCGTemp

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 16 +++- > 1 file changed, 7 insertions(+), 9 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net

Re: [Qemu-devel] [PATCH v2 08/14] tcg: Change temp_sync argument to TCGTemp

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 55 --- > 1 file changed, 28 insertions(+), 27 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096

Re: [Qemu-devel] [PATCH v2 07/14] tcg: Change temp_dead argument to TCGTemp

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 48 +++- > 1 file changed, 23 insertions(+), 25 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8

Re: [Qemu-devel] [PATCH v2 06/14] tcg: Change reg_to_temp to TCGTemp pointer

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 113 > ++ > tcg/tcg.h | 6 ++-- > 2 files changed, 57 insertions(+), 62 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarn

Re: [Qemu-devel] [PATCH v2 05/14] tcg: Remove tcg_get_arg_str_i32/64

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 10 -- > tcg/tcg.h | 5 - > 2 files changed, 15 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net

Re: [Qemu-devel] [PATCH v2 04/14] tcg: More use of TCGReg where appropriate

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 26 +++--- > tcg/tcg.h | 8 > 2 files changed, 19 insertions(+), 15 deletions(-) Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R

Re: [Qemu-devel] [PATCH v2 03/14] tcg: Tidy temporary allocation

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > In particular, make sure the memory is memset before use. > Continues the increased use of TCGTemp pointers instead of > integer indices where appropriate. > > Signed-off-by: Richard Henderson > --- > tcg/tcg.c | 123 >

Re: [Qemu-devel] [PATCH v2 02/14] tcg: Change ts->mem_reg to ts->mem_base

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Chain the temporaries together via pointers intstead of indices. > The mem_reg value is now mem_base->reg. This will be important later. > > This does require that the frame pointer have a global temporary > allocated for it. This is simple bar the

Re: [Qemu-devel] [PATCH 01/14] tcg: Change tcg_global_mem_new_* to take a TCGv_ptr

2015-12-31 Thread Aurelien Jarno
On 2015-12-31 11:26, Richard Henderson wrote: > Thus, use cpu_env as the parameter, not TCG_AREG0 directly. > Update all uses in the translators. > > Signed-off-by: Richard Henderson > --- > target-alpha/translate.c | 8 ++--- > target-arm/translate-a64.c| 6 ++-- > target-arm/transla

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-31 Thread Zhang Chen
On 12/31/2015 10:36 AM, Jason Wang wrote: On 12/22/2015 06:42 PM, Zhang Chen wrote: From: zhangchen Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and it's a plugin for qemu netfilter. the function keep Secondary VM connect normal to Prima

[Qemu-devel] [PATCH v2] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag()

2015-12-31 Thread chengang
From: Chen Gang mmap() size in mmap_frag() is qemu_host_page_size, but the outside calls page_set_flags() may be not with qemu_host_page_size. So after mmap(), call page_set_flags() in time. Also let addr increasing step be TARGET_PAGE_SIZE, just like another areas have done. Also remove useles

Re: [Qemu-devel] [PATCH] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag()

2015-12-31 Thread Chen Gang
Oh, sorry, for the coding style issues. Also the typo in the comments. I shall send patch v2, next. This fix patch can let the old ACDSee.exe, and the latest WinRAR.exe setup programs run successfully under real WinXP system dlls. Thanks. On 2015年12月31日 15:14, cheng...@emindsoft.com.cn wrote: >

Re: [Qemu-devel] [PATCH] linux-user/mmap.c: Support shared memory mapping in mmap_frag()

2015-12-31 Thread Chen Gang
Oh, sorry, please skip this patch (or discussion), I have send a new fix patch for the related issue, so let the old ACDSee.exe and the latest WinRAR.exe setup programs run successfully under real WinXP system dlls. The related root cause is not related with shared memory, so at least now, we can

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2015-12-31 Thread Li Zhijian
On 12/31/2015 10:36 AM, Jason Wang wrote: On 12/22/2015 06:42 PM, Zhang Chen wrote: From: zhangchen Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and it's a plugin for qemu netfilter. the function keep Secondary VM connect normal to Prim