[PATCH v2] configure: Let SLOF be initialized by ./scripts/git-submodule.sh

2020-06-14 Thread Philippe Mathieu-Daudé
The git-submodule.sh script is called by make and initialize the submodules listed in the GIT_SUBMODULES variable generated by ./configure. Add SLOF when we build the ppc64-softmmu target for the pSeries machines (which use SLOF). This fixes: $ ( cd ${SRC_DIR} ; git submodule update --init roms

Re: [PATCH v4 5/6] i386: Hyper-V VMBus ACPI DSDT entry

2020-06-14 Thread Maciej S. Szmigiero
On 15.06.2020 04:40, Jon Doron wrote: > On 14/06/2020, Maciej S. Szmigiero wrote: >> Hi Jon, >> >> On 14.06.2020 16:11, Jon Doron wrote: >>> On 28/05/2020, Jon Doron wrote: On 28/05/2020, Igor Mammedov wrote: > On Thu, 28 May 2020 08:26:42 +0300 > Jon Doron wrote: > >> On 22/0

Re: [PATCH for-5.1 V4 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-14 Thread Aleksandar Markovic
пон, 15. јун 2020. у 08:29 Huacai Chen је написао/ла: > > Hi, Aleksandar, > > On Mon, Jun 15, 2020 at 2:04 PM Aleksandar Markovic > wrote: > > > > пон, 15. јун 2020. у 07:36 Huacai Chen је написао/ла: > > > > > > Hi, Aleksandar, > > > > > > On Mon, Jun 15, 2020 at 12:50 PM Aleksandar Markovic >

Re: [PATCH v3 2/4] error: auto propagated local_err

2020-06-14 Thread Greg Kurz
On Sat, 13 Jun 2020 17:12:59 +1000 David Gibson wrote: > On Thu, Jun 11, 2020 at 03:40:18PM +0200, Greg Kurz wrote: > > From: Vladimir Sementsov-Ogievskiy > > > > Introduce a new ERRP_AUTO_PROPAGATE macro, to be used at start of > > functions with an errp OUT parameter. > > > > It has three go

Re: [PATCH v10 1/9] error: auto propagated local_err

2020-06-14 Thread Greg Kurz
On Mon, 15 Jun 2020 07:21:03 +0200 Markus Armbruster wrote: > Greg Kurz writes: > > > On Tue, 17 Mar 2020 18:16:17 +0300 > > Vladimir Sementsov-Ogievskiy wrote: > > > >> Introduce a new ERRP_AUTO_PROPAGATE macro, to be used at start of > >> functions with an errp OUT parameter. > >> > >> It h

Re: [PATCH] .travis.yml: Use travis_retry() in case of network issues

2020-06-14 Thread Philippe Mathieu-Daudé
On 6/15/20 7:12 AM, Thomas Huth wrote: > On 14/06/2020 11.48, Mark Cave-Ayland wrote: >> On 13/06/2020 14:06, Philippe Mathieu-Daudé wrote: >> >>> Use travis_retry() when cloning SLOF (see 31c8cc4f94e) in the >>> s390x container job, to avoid build failures: >>> >>> $ ( cd ${SRC_DIR} ; git submod

Re: [PATCH for-5.1 V4 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-14 Thread Huacai Chen
Hi, Aleksandar, On Mon, Jun 15, 2020 at 2:04 PM Aleksandar Markovic wrote: > > пон, 15. јун 2020. у 07:36 Huacai Chen је написао/ла: > > > > Hi, Aleksandar, > > > > On Mon, Jun 15, 2020 at 12:50 PM Aleksandar Markovic > > wrote: > > > > > > пон, 15. јун 2020. у 02:55 Huacai Chen је > > > напи

Re: [PATCH v2] hmp: Make json format optional for qom-set

2020-06-14 Thread Markus Armbruster
David Hildenbrand writes: > Commit 7d2ef6dcc1cf ("hmp: Simplify qom-set") switched to the json > parser, making it possible to specify complex types. However, with this > change it is no longer possible to specify proper sizes (e.g., 2G, 128M), > turning the interface harder to use for properties

Re: [PATCH v8 5/5] crypto/tls-cipher-suites: Produce fw_cfg consumable blob

2020-06-14 Thread Laszlo Ersek
On 06/09/20 19:07, Philippe Mathieu-Daudé wrote: > Since our format is consumable by the fw_cfg device, > we can implement the FW_CFG_DATA_GENERATOR interface. > > Acked-by: Laszlo Ersek > Signed-off-by: Philippe Mathieu-Daudé > --- > v8: Add example in qemu-options.hx > --- > crypto/tls-cipher

Re: [PATCH v3 09/24] macio: Fix to realize "mos6522-cuda" and "mos6522-pmu" devices

2020-06-14 Thread Philippe Mathieu-Daudé
On 6/15/20 7:26 AM, Markus Armbruster wrote: > Peter, forgot to cc: you. May I have your blessings for this version? This file is maintained by Mark: ./scripts/get_maintainer.pl -f hw/misc/macio/cuda.c Mark Cave-Ayland (odd fixer:Old World (g3beige)) David Gibson (reviewer:Old World (g3beige))

Re: [PATCH v8 4/5] crypto: Add tls-cipher-suites object

2020-06-14 Thread Laszlo Ersek
On 06/09/20 19:07, Philippe Mathieu-Daudé wrote: > On the host OS, various aspects of TLS operation are configurable. > In particular it is possible for the sysadmin to control the TLS > cipher/protocol algorithms that applications are permitted to use. > > * Any given crypto library has a built-i

Re: [PATCH] hw/xen_pt: Don't grant opregion permissions

2020-06-14 Thread Philippe Mathieu-Daudé
Hi Grzegorz, On 6/15/20 1:21 AM, Grzegorz Uriasz wrote: > With the upstreaming of linux based stubdomains to xen, qemu can't > assume it runs inside dom0 - permission assignment must be moved to > libxl running in dom0. This xen patch: > https://lists.xenproject.org/archives/html/xen-devel/2020-06

Re: [PATCH for-5.1 V4 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-14 Thread Aleksandar Markovic
пон, 15. јун 2020. у 07:36 Huacai Chen је написао/ла: > > Hi, Aleksandar, > > On Mon, Jun 15, 2020 at 12:50 PM Aleksandar Markovic > wrote: > > > > пон, 15. јун 2020. у 02:55 Huacai Chen је написао/ла: > > > > > > Hi, Aleksandar, > > > > > > On Sun, Jun 14, 2020 at 3:51 PM Aleksandar Markovic >

Re: [RFC PATCH 2/5] hw/misc/led: Add LED_STATUS_CHANGED QAPI event

2020-06-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Eric, > > On 6/9/20 4:29 PM, Eric Blake wrote: >> On 6/9/20 7:34 AM, Philippe Mathieu-Daudé wrote: >>> Allow LED devices to emit STATUS_CHANGED events on a QMP chardev. >>> >>> QMP event examples: >>> >>> { >>> "timestamp": { >>> "seconds": 159170

Re: [PATCH for-5.1 V4 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-14 Thread Aleksandar Markovic
пон, 15. јун 2020. у 07:36 Huacai Chen је написао/ла: > > Hi, Aleksandar, > > On Mon, Jun 15, 2020 at 12:50 PM Aleksandar Markovic > wrote: > > > > пон, 15. јун 2020. у 02:55 Huacai Chen је написао/ла: > > > > > > Hi, Aleksandar, > > > > > > On Sun, Jun 14, 2020 at 3:51 PM Aleksandar Markovic >

Re: [PATCH v8 3/5] softmmu/vl: Allow -fw_cfg 'gen_id' option to use the 'etc/' namespace

2020-06-14 Thread Laszlo Ersek
On 06/09/20 19:07, Philippe Mathieu-Daudé wrote: > Names of user-provided fw_cfg items are supposed to start > with "opt/". However FW_CFG_DATA_GENERATOR items are generated > by QEMU, so allow the "etc/" namespace in this specific case. > > Reviewed-by: Laszlo Ersek > Signed-off-by: Philippe Mat

RE: [PATCH 2/2] migration/colo/net: fix typo in the COLO Proxy module

2020-06-14 Thread Zhang, Chen
> -Original Message- > From: Like Xu > Sent: Sunday, June 14, 2020 4:45 PM > To: qemu-devel@nongnu.org > Cc: Like Xu ; Zhang, Chen ; > Li Zhijian > Subject: [PATCH 2/2] migration/colo/net: fix typo in the COLO Proxy module > > Cc: Zhang Chen > Cc: Li Zhijian > Signed-off-by: Like Xu

Re: [PATCH v8 2/5] softmmu/vl: Let -fw_cfg option take a 'gen_id' argument

2020-06-14 Thread Laszlo Ersek
On 06/09/20 19:07, Philippe Mathieu-Daudé wrote: > The 'gen_id' argument refers to a QOM object able to produce > data consumable by the fw_cfg device. The producer object must > implement the FW_CFG_DATA_GENERATOR interface. > > Signed-off-by: Philippe Mathieu-Daudé > --- > v8: addressed Laszlo'

Re: [PATCH v8 1/5] hw/nvram/fw_cfg: Add the FW_CFG_DATA_GENERATOR interface

2020-06-14 Thread Laszlo Ersek
On 06/09/20 19:07, Philippe Mathieu-Daudé wrote: > The FW_CFG_DATA_GENERATOR allows any object to produce > blob of data consumable by the fw_cfg device. > > Reviewed-by: Laszlo Ersek > Signed-off-by: Philippe Mathieu-Daudé > --- > v8: addressed Laszlo's comments > - fixed copy/paste typos > - c

Re: [PATCH] replay: notify the main loop when there are no instructions

2020-06-14 Thread Pavel Dovgalyuk
On 01.06.2020 17:01, Paolo Bonzini wrote: On 01/06/20 12:35, Pavel Dovgalyuk wrote: ping On 22.05.2020 09:47, Pavel Dovgalyuk wrote: When QEMU is executed in console mode without any external event sources, main loop may sleep for a very long time. But in case of replay there is another even

Re: [PATCH for-5.1 V4 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-14 Thread Huacai Chen
Hi, Aleksandar, On Mon, Jun 15, 2020 at 12:50 PM Aleksandar Markovic wrote: > > пон, 15. јун 2020. у 02:55 Huacai Chen је написао/ла: > > > > Hi, Aleksandar, > > > > On Sun, Jun 14, 2020 at 3:51 PM Aleksandar Markovic > > wrote: > > > > > > Hi, Huacai, this is another round of comments, that sh

Re: [PATCH v3 09/24] macio: Fix to realize "mos6522-cuda" and "mos6522-pmu" devices

2020-06-14 Thread Markus Armbruster
Peter, forgot to cc: you. May I have your blessings for this version? Markus Armbruster writes: > cuda_init() creates a "mos6522-cuda" device, but it's never realized. > Affects machines mac99 with via=cuda (default) and g3beige. > > pmu_init() creates a "mos6522-pmu" device, but it's never rea

Re: [PATCH v10 1/9] error: auto propagated local_err

2020-06-14 Thread Markus Armbruster
Greg Kurz writes: > On Tue, 17 Mar 2020 18:16:17 +0300 > Vladimir Sementsov-Ogievskiy wrote: > >> Introduce a new ERRP_AUTO_PROPAGATE macro, to be used at start of >> functions with an errp OUT parameter. >> >> It has three goals: >> >> 1. Fix issue with error_fatal and error_prepend/error_app

Re: [PATCH v2] Makefile: Remove generated files when doing 'distclean' (and 'clean')

2020-06-14 Thread Thomas Huth
On 13/06/2020 18.28, Aleksandar Markovic wrote: > On Tue, Oct 8, 2019 at 2:41 PM Peter Maydell wrote: >> >> On Tue, 8 Oct 2019 at 13:37, Thomas Huth wrote: >>> >>> On 08/10/2019 14.18, Aleksandar Markovic wrote: If I remember well, QAPI-related c files are generated while doing 'make'.

Re: [PATCH] .travis.yml: Use travis_retry() in case of network issues

2020-06-14 Thread Thomas Huth
On 14/06/2020 11.48, Mark Cave-Ayland wrote: > On 13/06/2020 14:06, Philippe Mathieu-Daudé wrote: > >> Use travis_retry() when cloning SLOF (see 31c8cc4f94e) in the >> s390x container job, to avoid build failures: >> >> $ ( cd ${SRC_DIR} ; git submodule update --init roms/SLOF ) >> Submodule '

Re: [PATCH for-5.1 V4 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-14 Thread Aleksandar Markovic
пон, 15. јун 2020. у 02:55 Huacai Chen је написао/ла: > > Hi, Aleksandar, > > On Sun, Jun 14, 2020 at 3:51 PM Aleksandar Markovic > wrote: > > > > Hi, Huacai, this is another round of comments, that should be addressed in > > v5. > > > > уто, 2. јун 2020. у 04:40 Huacai Chen је написао/ла: > >

Re: [PATCH for-5.1 V4 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-14 Thread Aleksandar Markovic
пон, 15. јун 2020. у 02:55 Huacai Chen је написао/ла: > > Hi, Aleksandar, > > On Sun, Jun 14, 2020 at 3:51 PM Aleksandar Markovic > wrote: > > > > Hi, Huacai, this is another round of comments, that should be addressed in > > v5. > > > > уто, 2. јун 2020. у 04:40 Huacai Chen је написао/ла: > >

RE: [PATCH 1/2] migration/colo: fix typo in the COLO Framework module

2020-06-14 Thread Zhang, Chen
It looks normal to me. Thanks Zhang Chen > -Original Message- > From: Qemu-devel bounces+chen.zhang=intel@nongnu.org> On Behalf Of Zhanghailiang > Sent: Monday, June 15, 2020 11:06 AM > To: Like Xu ; qemu-devel@nongnu.org > Subject: RE: [PATCH 1/2] migration/colo: fix typo in the COL

Re: [PATCH] migration: Count new_dirty instead of real_dirty

2020-06-14 Thread zhukeqian
Hi Paolo and Jian Zhou, Do you have any suggestion on this patch? Thanks, Keqian On 2020/6/1 12:02, Keqian Zhu wrote: > DIRTY_LOG_INITIALLY_ALL_SET feature is on the queue. This fixs the > dirty rate calculation for this feature. After introducing this > feature, real_dirty_pages is equal to tot

RE: [PATCH 1/2] migration/colo: fix typo in the COLO Framework module

2020-06-14 Thread Zhanghailiang
I have checked this patch in mail archive, it has no problem, It seems that my email setup has some problem. It didn't show the right newline In this patch. > -Original Message- > From: Like Xu [mailto:like...@linux.intel.com] > Sent: Monday, June 15, 2020 10:24 AM > To: Zhanghailiang ;

Re: [PATCH v4 5/6] i386: Hyper-V VMBus ACPI DSDT entry

2020-06-14 Thread Jon Doron
On 14/06/2020, Maciej S. Szmigiero wrote: Hi Jon, On 14.06.2020 16:11, Jon Doron wrote: On 28/05/2020, Jon Doron wrote: On 28/05/2020, Igor Mammedov wrote: On Thu, 28 May 2020 08:26:42 +0300 Jon Doron wrote: On 22/05/2020, Igor Mammedow wrote: On Thu, 21 May 2020 18:02:07 +0200 Paolo Bonz

Re: [PATCH 1/2] migration/colo: fix typo in the COLO Framework module

2020-06-14 Thread Like Xu
On 2020/6/15 9:36, Zhanghailiang wrote: Hi Like, Please check this patch, It seems that you didn't use git format-patch command to generate this patch, It is in wrong format. I rebase the patch on the top commit of 7d3660e79830a069f1848bb4fa1cdf8f666424fb, and hope it helps you. Thanks, Ha

RE: [PATCH 1/2] migration/colo: fix typo in the COLO Framework module

2020-06-14 Thread Zhanghailiang
Hi Like, Please check this patch, It seems that you didn't use git format-patch command to generate this patch, It is in wrong format. Thanks, Hailiang > -Original Message- > From: Like Xu [mailto:like...@linux.intel.com] > Sent: Sunday, June 14, 2020 4:45 PM > To: qemu-devel@nongnu.org

Re: [PATCH for-5.1 V4 3/4] hw/mips: Add Loongson-3 machine support (with KVM)

2020-06-14 Thread Huacai Chen
Hi, Aleksandar, On Sun, Jun 14, 2020 at 3:51 PM Aleksandar Markovic wrote: > > Hi, Huacai, this is another round of comments, that should be addressed in v5. > > уто, 2. јун 2020. у 04:40 Huacai Chen је написао/ла: > > > > Add Loongson-3 based machine support, it use i8259 as the interrupt > > c

Re: [PATCH for-5.1 V4 1/4] hw/mips: Implement the kvm_type() hook in MachineClass

2020-06-14 Thread Huacai Chen
Hi, Aleksandar, On Sun, Jun 14, 2020 at 4:07 PM Aleksandar Markovic wrote: > > > > уто, 2. јун 2020. у 04:38 Huacai Chen је написао/ла: > > > > MIPS has two types of KVM: TE & VZ, and TE is the default type. Now we > > can't create a VZ guest in QEMU because it lacks the kvm_type() hook in > > M

[PATCH] hw/xen_pt: Don't grant opregion permissions

2020-06-14 Thread Grzegorz Uriasz
With the upstreaming of linux based stubdomains to xen, qemu can't assume it runs inside dom0 - permission assignment must be moved to libxl running in dom0. This xen patch: https://lists.xenproject.org/archives/html/xen-devel/2020-06/msg00973.html implements granting the required permissions to th

Re: [PATCH] target/mips: Fix PageMask with variable page size

2020-06-14 Thread Aleksandar Markovic
недеља, 14. јун 2020., Jiaxun Yang је написао/ла: > Our current code assumed the target page size is always 4k > when handling PageMask and VPN2, however, variable page size > was just added to mips target and that's nolonger true. > > So we refined this piece of code to handle any target page si

Re: [PATCH v4 5/6] i386: Hyper-V VMBus ACPI DSDT entry

2020-06-14 Thread Maciej S. Szmigiero
Hi Jon, On 14.06.2020 16:11, Jon Doron wrote: > On 28/05/2020, Jon Doron wrote: >> On 28/05/2020, Igor Mammedov wrote: >>> On Thu, 28 May 2020 08:26:42 +0300 >>> Jon Doron wrote: >>> On 22/05/2020, Igor Mammedow wrote: > On Thu, 21 May 2020 18:02:07 +0200 > Paolo Bonzini wrote:

Re: [PATCH v9 0/5] vhost-user block device backend implementation

2020-06-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200614183907.514282-1-coiby...@gmail.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash exp

Re: [PATCH v9 0/5] vhost-user block device backend implementation

2020-06-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200614183907.514282-1-coiby...@gmail.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ==

Re: [PATCH v8 3/4] vhost-user block device backend server

2020-06-14 Thread Coiby Xu
On Thu, Jun 11, 2020 at 04:24:52PM +0100, Stefan Hajnoczi wrote: On Fri, Jun 05, 2020 at 07:35:37AM +0800, Coiby Xu wrote: +static void coroutine_fn vu_block_virtio_process_req(void *opaque) +{ +struct req_data *data = opaque; +VuServer *server = data->server; +VuVirtq *vq = data->vq

Re: [PATCH v8 0/4] vhost-user block device backend implementation

2020-06-14 Thread Coiby Xu
Hi Stefano Garzarella, On Thu, Jun 11, 2020 at 02:37:03PM +0200, Stefano Garzarella wrote: Hi Coiby Xu, On Fri, Jun 05, 2020 at 07:35:34AM +0800, Coiby Xu wrote: v8 - re-try connecting to socket server to fix asan error - fix license naming issue v7 - fix docker-test-debug@fedora errors by

Re: [PATCH v8 2/4] generic vhost user server

2020-06-14 Thread Coiby Xu
On Thu, Jun 11, 2020 at 02:14:49PM +0100, Stefan Hajnoczi wrote: On Fri, Jun 05, 2020 at 07:35:36AM +0800, Coiby Xu wrote: +static bool coroutine_fn +vu_message_read(VuDev *vu_dev, int conn_fd, VhostUserMsg *vmsg) +{ +struct iovec iov = { +.iov_base = (char *)vmsg, +.iov_len

[PATCH v9 5/5] new qTest case to test the vhost-user-blk-server

2020-06-14 Thread Coiby Xu
This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Since vhost-user server can only server one client one time, two instances of qemu-storage-daemon are launched for the hotplug test. In order to not block scripts/tap-driver.pl, vhost-user-blk-server w

[PATCH v9 1/5] Allow vu_message_read to be replaced

2020-06-14 Thread Coiby Xu
Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. Signed-off-by: Coiby Xu --- contrib/libvhost-user/libvhost-user-glib.c | 2 +- contrib/libvhost-user/libvhost-user.c | 11 ++- contrib

[PATCH v9 4/5] vhost-user block device backend server

2020-06-14 Thread Coiby Xu
By making use of libvhost-user, block device drive can be shared to the connected vhost-user client. Only one client can connect to the server one time. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Signed-off-by: Coiby Xu --- block/Makefile

[PATCH v9 0/5] vhost-user block device backend implementation

2020-06-14 Thread Coiby Xu
v9 - move logical block size check function to a utility function - fix issues regarding license, coding style, memory deallocation, etc. v8 - re-try connecting to socket server to fix asan error - fix license naming issue v7 - fix docker-test-debug@fedora errors by freeing malloced memory

[PATCH v9 2/5] generic vhost user server

2020-06-14 Thread Coiby Xu
Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Signed-off-by: Coiby Xu --- util/Makefile.objs | 1 + util/vhost-user-server.c | 400 +++ util/vhost-user-server.h | 61 ++ 3 files chang

[PATCH v9 3/5] move logical block size check function to a common utility function

2020-06-14 Thread Coiby Xu
Move logical block size check function in hw/core/qdev-properties.c:set_blocksize() to util/block-helpers.c Signed-off-by: Coiby Xu --- hw/core/qdev-properties.c | 18 +++ util/Makefile.objs| 1 + util/block-helpers.c | 46 +++ util/

[PATCH v4 3/9] grackle: Set revision in PCI config to match hardware

2020-06-14 Thread BALATON Zoltan
Signed-off-by: BALATON Zoltan --- hw/pci-host/grackle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c index 4b3af0c704..48d11f13ab 100644 --- a/hw/pci-host/grackle.c +++ b/hw/pci-host/grackle.c @@ -130,7 +130,7 @@ static void gra

[PATCH v4 8/9] WIP RFC macio/cuda: Attempt to add i2c support

2020-06-14 Thread BALATON Zoltan
This is a non-working RFC patch attempt to implement i2c bus in CUDA needed for firmware to access SPD data of installed RAM. The skeleton is there but actual operation fails because I don't know how this is supposed to work and the i2c bus state becomes invalid quickly. Also sending back results m

[PATCH v4 2/9] mac_newworld: Allow loading binary ROM image

2020-06-14 Thread BALATON Zoltan
Fall back to load binary ROM image if loading ELF fails. This also moves PROM_BASE and PROM_SIZE defines to board as these are matching the ROM size and address on this board. Signed-off-by: BALATON Zoltan --- Notes: Unlike mac_oldworld where the openbios-ppc image loads at end of ROM reg

[PATCH v4 4/9] mac_oldworld: Rename ppc_heathrow_reset to ppc_heathrow_cpu_reset

2020-06-14 Thread BALATON Zoltan
This function resets a CPU not the whole machine so reflect that in its name. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/ppc/mac_oldworld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 3

[PATCH v4 5/9] mac_oldworld: Map macio to expected address at reset

2020-06-14 Thread BALATON Zoltan
Add a reset function that maps macio to the address expected by the firmware of the board at startup. Signed-off-by: BALATON Zoltan --- hw/ppc/mac.h | 12 hw/ppc/mac_oldworld.c | 17 +++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/hw/ppc/ma

[PATCH v4 0/9] Mac Old World ROM experiment

2020-06-14 Thread BALATON Zoltan
Last version with some changes according to review and adding more patches. The patch adding i2c support to CUDA is not yet working, only included here as RFC and show direction but any help fixing it is welcome as I've run out of free time for this. I think with i2c support fixed (and maybe adding

[PATCH v4 9/9] mac_oldworld: Add SPD data to cover RAM

2020-06-14 Thread BALATON Zoltan
OpenBIOS gets RAM size via fw_cfg but rhe original board firmware detects RAM using SPD data so generate and add SDP eeproms to cover as much RAM as possible to describe with SPD (this may be less than the actual ram_size due to SDRAM size constraints). Signed-off-by: BALATON Zoltan --- hw/ppc/m

[PATCH v4 1/9] mac_oldworld: Allow loading binary ROM image

2020-06-14 Thread BALATON Zoltan
The beige G3 Power Macintosh has a 4MB firmware ROM. Fix the size of the rom region and fall back to loading a binary image with -bios if loading ELF image failed. This allows testing emulation with a ROM image from real hardware as well as using an ELF OpenBIOS image. Signed-off-by: BALATON Zolta

[PATCH v4 6/9] mac_oldworld: Add machine ID register

2020-06-14 Thread BALATON Zoltan
The G3 beige machine has a machine ID register that is accessed by the firmware to deternine the board config. Add basic emulation of it. Signed-off-by: BALATON Zoltan --- v4: Move MermoryRegion to MachineState, use constants hw/ppc/mac.h | 1 + hw/ppc/mac_oldworld.c | 24

[PATCH v4 7/9] macio: Add dummy screamer register area

2020-06-14 Thread BALATON Zoltan
The only thing this returns is an idle status so the firmware continues, otherwise just ignores and logs access for debugging. This is a stop gap until proper implementation of this device lands. Signed-off-by: BALATON Zoltan --- This could be reverted as the first patch of a series adding real i

Re: [PATCH 21/22] adb: use adb_device prefix for ADB device trace events

2020-06-14 Thread Philippe Mathieu-Daudé
On 6/14/20 4:28 PM, Mark Cave-Ayland wrote: > This is to allow us to distinguish between ADB device events and ADB > bus events separately. > > Signed-off-by: Mark Cave-Ayland > --- > hw/input/adb-kbd.c| 12 ++-- > hw/input/adb-mouse.c | 12 ++-- > hw/input/trace-events | 20

Re: [PATCH 22/22] adb: add ADB bus trace events

2020-06-14 Thread Philippe Mathieu-Daudé
Hi Mark, On 6/14/20 4:28 PM, Mark Cave-Ayland wrote: > Signed-off-by: Mark Cave-Ayland > --- > hw/input/adb.c| 23 ++- > hw/input/trace-events | 7 +++ > 2 files changed, 29 insertions(+), 1 deletion(-) > > diff --git a/hw/input/adb.c b/hw/input/adb.c > index fe

Re: [PATCH 18/22] mac_via: move VIA1 portB write logic into mos6522_q800_via1_write()

2020-06-14 Thread Philippe Mathieu-Daudé
On 6/14/20 4:28 PM, Mark Cave-Ayland wrote: > Currently the logic is split between the mos6522 portB_write() callback and > the memory region used to capture the VIA1 MMIO accesses. Move everything > into the latter mos6522_q800_via1_write() function to keep all the logic in > one place to make it

Re: [PATCH 05/22] pmu: honour autopoll_rate_ms when rearming the ADB autopoll timer

2020-06-14 Thread Philippe Mathieu-Daudé
On 6/14/20 4:28 PM, Mark Cave-Ayland wrote: > Don't use a fixed value but instead use the default value from the ADB bus > state. > > Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé > --- > hw/misc/macio/pmu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >

Re: [PATCH 03/22] cuda: convert ADB autopoll timer from ns to ms

2020-06-14 Thread Philippe Mathieu-Daudé
On 6/14/20 4:28 PM, Mark Cave-Ayland wrote: > This is in preparation for consolidating all of the ADB autopoll management > in one place. > > Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé > --- > hw/misc/macio/cuda.c | 15 --- > 1 file changed, 8 insertions(+

Re: [PATCH 01/22] adb: coding style update to fix checkpatch errors

2020-06-14 Thread Philippe Mathieu-Daudé
On 6/14/20 4:28 PM, Mark Cave-Ayland wrote: > This will help ensure that style guidelines are being maintained during > subsequent changes. > > Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé > --- > hw/input/adb.c | 9 + > 1 file changed, 5 insertions(+), 4 deleti

Re: [PATCH v4 5/6] i386: Hyper-V VMBus ACPI DSDT entry

2020-06-14 Thread Jon Doron
On 14/06/2020, Jon Doron wrote: On 28/05/2020, Jon Doron wrote: On 28/05/2020, Igor Mammedov wrote: On Thu, 28 May 2020 08:26:42 +0300 Jon Doron wrote: On 22/05/2020, Igor Mammedow wrote: On Thu, 21 May 2020 18:02:07 +0200 Paolo Bonzini wrote: On 13/05/20 17:34, Igor Mammedov wrote: I'd

Re: [PATCH v2 1/5] mac_oldworld: Allow loading binary ROM image

2020-06-14 Thread BALATON Zoltan
On Sun, 14 Jun 2020, Mark Cave-Ayland wrote: On 13/06/2020 14:36, BALATON Zoltan wrote: The G3 beige machine has a 4MB firmware ROM. Fix the size of the rom region and allow loading a binary image with -bios. This makes it possible to test emulation with a ROM image from real hardware. Signed-

[PATCH 22/22] adb: add ADB bus trace events

2020-06-14 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/input/adb.c| 23 ++- hw/input/trace-events | 7 +++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/hw/input/adb.c b/hw/input/adb.c index fe0f6c7ef3..4976f52c36 100644 --- a/hw/input/adb.c +++ b/hw/input/adb.c

[PATCH 20/22] adb: only call autopoll callbacks when autopoll is not blocked

2020-06-14 Thread Mark Cave-Ayland
Handle this at the ADB bus level so that individual implementations do not need to handle this themselves. Finally add an assert() into adb_request() to prevent developers from accidentally making an explicit ADB request without blocking autopoll. Signed-off-by: Mark Cave-Ayland --- hw/input/a

[PATCH 18/22] mac_via: move VIA1 portB write logic into mos6522_q800_via1_write()

2020-06-14 Thread Mark Cave-Ayland
Currently the logic is split between the mos6522 portB_write() callback and the memory region used to capture the VIA1 MMIO accesses. Move everything into the latter mos6522_q800_via1_write() function to keep all the logic in one place to make it easier to follow. Signed-off-by: Mark Cave-Ayland

[PATCH 19/22] mac_via: rework ADB state machine to be compatible with both MacOS and Linux

2020-06-14 Thread Mark Cave-Ayland
The existing ADB state machine is designed to work with Linux which has a different interpretation of the state machine detailed in "Guide to the Macintosh Family Hardware". In particular the current Linux implementation includes an extra change to IDLE state when switching the VIA between send a

[PATCH 17/22] pmu: add adb_autopoll_block() and adb_autopoll_unblock() functions

2020-06-14 Thread Mark Cave-Ayland
Ensure that the PMU buffer is protected from autopoll requests overwriting its contents whilst existing PMU requests are in progress. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/pmu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c index e22

[PATCH 16/22] cuda: add adb_autopoll_block() and adb_autopoll_unblock() functions

2020-06-14 Thread Mark Cave-Ayland
Ensure that the CUDA buffer is protected from autopoll requests overwriting its contents whilst existing CUDA requests are in progress. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c in

[PATCH 10/22] mac_via: convert to use ADBBusState internal autopoll variables

2020-06-14 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/misc/mac_via.c | 22 ++ include/hw/misc/mac_via.h | 1 - 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index e05623d730..669fdca4c4 100644 --- a/hw/misc/mac_via.c +++ b/hw/

[PATCH 15/22] adb: add autopoll_blocked variable to block autopoll

2020-06-14 Thread Mark Cave-Ayland
Whilst autopoll is enabled it is necessary to prevent the ADB buffer contents from being overwritten until the host has read back the response in its entirety. Add adb_autopoll_block() and adb_autopoll_unblock() functions in preparation for ensuring that the ADB buffer contents are protected for e

[PATCH 09/22] pmu: convert to use ADBBusState internal autopoll variables

2020-06-14 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/pmu.c | 39 ++--- include/hw/misc/macio/pmu.h | 3 --- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c index edb061e417..e2291cc9f6 100644 --- a/hw

[PATCH 13/22] adb: add status field for holding information about the last ADB request

2020-06-14 Thread Mark Cave-Ayland
Currently only 2 bits are defined: one to indicate if the request timed out (no reply) and another to indicate whether the request was the result of an autopoll operation. Signed-off-by: Mark Cave-Ayland --- hw/input/adb.c | 14 +++--- include/hw/input/adb.h | 4 2 files ch

[PATCH 05/22] pmu: honour autopoll_rate_ms when rearming the ADB autopoll timer

2020-06-14 Thread Mark Cave-Ayland
Don't use a fixed value but instead use the default value from the ADB bus state. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c index 3af4ef1a04..edb061e417 100644 --- a/hw

[PATCH 21/22] adb: use adb_device prefix for ADB device trace events

2020-06-14 Thread Mark Cave-Ayland
This is to allow us to distinguish between ADB device events and ADB bus events separately. Signed-off-by: Mark Cave-Ayland --- hw/input/adb-kbd.c| 12 ++-- hw/input/adb-mouse.c | 12 ++-- hw/input/trace-events | 20 ++-- 3 files changed, 22 insertions(+), 22

[PATCH 12/22] adb: keep track of devices with pending data

2020-06-14 Thread Mark Cave-Ayland
Add a new pending variable to ADBBusState which is a bitmask indicating which ADB devices have data to send. Update the bitmask every time that an ADB request is executed. Signed-off-by: Mark Cave-Ayland --- hw/input/adb.c | 16 +++- include/hw/input/adb.h | 1 + 2 files cha

[PATCH 07/22] adb: create autopoll variables directly within ADBBusState

2020-06-14 Thread Mark Cave-Ayland
Rather than each ADB implementation requiring its own functions to manage autopoll state, timers, and autopoll masks prepare to move this information directly into ADBBusState. Add external functions within adb.h to allow each ADB implementation to manage the new autopoll variables. Signed-off-by

[PATCH 04/22] pmu: fix duplicate autopoll mask variable

2020-06-14 Thread Mark Cave-Ayland
It seems that during the initial work to introduce the via-pmu ADB support a duplicate autopoll mask variable was accidentally left in place. Remove the duplicate autopoll_mask variable and switch everything over to use adb_poll_mask instead. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/pm

[PATCH 14/22] adb: use adb_request() only for explicit requests

2020-06-14 Thread Mark Cave-Ayland
Currently adb_request() is called both for explicit ADB requests and internal autopoll requests via adb_poll(). Move the current functionality into do_adb_request() to be used internally and add a simple adb_request() wrapper for explicit requests. Signed-off-by: Mark Cave-Ayland --- hw/input/a

[PATCH 11/22] adb: introduce new ADBDeviceHasData method to ADBDeviceClass

2020-06-14 Thread Mark Cave-Ayland
This is required later to allow devices to assert a service request (SRQ) signal to indicate that it has data to send, without having to consume it. Signed-off-by: Mark Cave-Ayland --- hw/input/adb-kbd.c | 8 hw/input/adb-mouse.c | 9 + include/hw/input/adb.h | 3 +++ 3 fi

[PATCH 03/22] cuda: convert ADB autopoll timer from ns to ms

2020-06-14 Thread Mark Cave-Ayland
This is in preparation for consolidating all of the ADB autopoll management in one place. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index e0cc0aac5d..a40

[PATCH 02/22] adb: fix adb-mouse read length and revert disable-reg3-direct-writes workaround

2020-06-14 Thread Mark Cave-Ayland
Commit 84051eb400 "adb: add property to disable direct reg 3 writes" introduced a workaround for spurious writes to ADB register 3 when MacOS 9 enables autopoll on the mouse device. Further analysis shows that the problem is that only a partial request is sent, and since the len parameter is ignore

[PATCH 06/22] adb: introduce realize/unrealize and VMStateDescription for ADB bus

2020-06-14 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/input/adb.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/input/adb.c b/hw/input/adb.c index d85278a7b7..21a9b3aa96 100644 --- a/hw/input/adb.c +++ b/hw/input/adb.c @@ -89,10 +89,42 @@ int adb_poll(ADBBusState *s, u

[PATCH 00/22] ADB: fix autopoll issues and rework mac_via state machine

2020-06-14 Thread Mark Cave-Ayland
This patchset is something I have been chipping away at for a while since spending some time over the Christmas holidays trying to boot the MacOS toolbox ROM on the new q800 machine. Initially I discovered that there were some problems when the MacOS ROM was enumerating ADB devices due to multiple

[PATCH 08/22] cuda: convert to use ADBBusState internal autopoll variables

2020-06-14 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c | 56 +++- include/hw/misc/macio/cuda.h | 4 --- 2 files changed, 23 insertions(+), 37 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index a407f2abc8..716866ea34 100644 --- a

[PATCH 01/22] adb: coding style update to fix checkpatch errors

2020-06-14 Thread Mark Cave-Ayland
This will help ensure that style guidelines are being maintained during subsequent changes. Signed-off-by: Mark Cave-Ayland --- hw/input/adb.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/input/adb.c b/hw/input/adb.c index b1ac4a3852..bf1bc30d19 100644 --- a/hw

Re: [PATCH v2 5/5] mac_oldworld: Map macio to expected address at reset

2020-06-14 Thread BALATON Zoltan
On Sun, 14 Jun 2020, Mark Cave-Ayland wrote: On 13/06/2020 14:36, BALATON Zoltan wrote: Add a reset function that maps macio to the address expected by the firmware of the board at startup. Signed-off-by: BALATON Zoltan --- hw/ppc/mac.h | 12 hw/ppc/mac_oldworld.c | 17

Re: [PATCH v2 4/5] mac_oldworld: Rename ppc_heathrow_reset reset to ppc_heathrow_cpu_reset

2020-06-14 Thread BALATON Zoltan
On Sun, 14 Jun 2020, Mark Cave-Ayland wrote: On 13/06/2020 14:36, BALATON Zoltan wrote: This function resets a CPU not the whole machine so reflect that in its name. Signed-off-by: BALATON Zoltan --- hw/ppc/mac_oldworld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v4 5/6] i386: Hyper-V VMBus ACPI DSDT entry

2020-06-14 Thread Jon Doron
On 28/05/2020, Jon Doron wrote: On 28/05/2020, Igor Mammedov wrote: On Thu, 28 May 2020 08:26:42 +0300 Jon Doron wrote: On 22/05/2020, Igor Mammedow wrote: On Thu, 21 May 2020 18:02:07 +0200 Paolo Bonzini wrote: On 13/05/20 17:34, Igor Mammedov wrote: > I'd rather avoid using random IRQ n

Re: [PATCH v3] mac_oldworld: Add machine ID register

2020-06-14 Thread BALATON Zoltan
On Sun, 14 Jun 2020, Mark Cave-Ayland wrote: On 13/06/2020 18:57, BALATON Zoltan wrote: The G3 beige machine has a machine ID register that is accessed by the firmware to deternine the board config. Add basic emulation of it. Signed-off-by: BALATON Zoltan --- v3: add empty write function in c

Re: [PATCH v2 3/5] grackle: Set revision in PCI config to match hardware

2020-06-14 Thread BALATON Zoltan
On Sun, 14 Jun 2020, Mark Cave-Ayland wrote: On 13/06/2020 14:36, BALATON Zoltan wrote: Signed-off-by: BALATON Zoltan --- hw/pci-host/grackle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c index 4b3af0c704..48d11f13ab 100644

Re: [PATCH RFC 00/22] Support of Virtual CPU Hotplug for ARMv8 Arch

2020-06-14 Thread Marc Zyngier
Hi Salil, On 2020-06-13 22:36, Salil Mehta wrote: This patch-set introduces the virtual cpu hotplug support for ARMv8 architecture in QEMU. Idea is to be able to hotplug and hot-unplug the vcpus while guest VM is running and no reboot is required. This does *not* makes any assumption of the ph

Re: [PATCH v3] mac_oldworld: Add machine ID register

2020-06-14 Thread Mark Cave-Ayland
On 13/06/2020 18:57, BALATON Zoltan wrote: > The G3 beige machine has a machine ID register that is accessed by the > firmware to deternine the board config. Add basic emulation of it. > > Signed-off-by: BALATON Zoltan > --- > v3: add empty write function in case anything tries to write reg > >

Re: [PATCH v2 5/5] mac_oldworld: Map macio to expected address at reset

2020-06-14 Thread Mark Cave-Ayland
On 13/06/2020 14:36, BALATON Zoltan wrote: > Add a reset function that maps macio to the address expected by the > firmware of the board at startup. > > Signed-off-by: BALATON Zoltan > --- > hw/ppc/mac.h | 12 > hw/ppc/mac_oldworld.c | 17 +++-- > 2 files chang

Re: [PATCH v2 4/5] mac_oldworld: Rename ppc_heathrow_reset reset to ppc_heathrow_cpu_reset

2020-06-14 Thread Mark Cave-Ayland
On 13/06/2020 14:36, BALATON Zoltan wrote: > This function resets a CPU not the whole machine so reflect that in > its name. > > Signed-off-by: BALATON Zoltan > --- > hw/ppc/mac_oldworld.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/ppc/mac_oldworld.c b/hw/p

Re: [PATCH v2 3/5] grackle: Set revision in PCI config to match hardware

2020-06-14 Thread Mark Cave-Ayland
On 13/06/2020 14:36, BALATON Zoltan wrote: > Signed-off-by: BALATON Zoltan > --- > hw/pci-host/grackle.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c > index 4b3af0c704..48d11f13ab 100644 > --- a/hw/pci-host/grackle.c > +

  1   2   >