[PATCH v25 08/22] target/rx: Disassemble rx_index_addr into a string

2019-09-26 Thread Yoshinori Sato
From: Richard Henderson We were eliding all zero indexes. It is only ld==0 that does not have an index in the instruction. This also allows us to avoid breaking the final print into multiple pieces. Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-1

[PATCH v25 07/22] target/rx: RX disassembler

2019-09-26 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-5-ys...@users.sourceforge.jp> Signed-off-by: Richard Henderson --- include/disas/dis-asm.h |5 + target/rx/disas.c | 1480 +

[PATCH v25 06/22] target/rx: CPU definition

2019-09-26 Thread Yoshinori Sato
v21 changes Add cpu-param.h Remove CPU_COMMON rx_load_image move to rx-virt. remove rx_load_image Signed-off-by: Yoshinori Sato Message-Id: <20190616142836.10614-4-ys...@users.sourceforge.jp> Reviewed-by: Richard Henderson Message-Id: <20190607091116.49044-4-ys...@users.sourceforge.jp> Signed-o

[PATCH v25 11/22] target/rx: Emit all disassembly in one prt()

2019-09-26 Thread Yoshinori Sato
From: Richard Henderson Many of the multi-part prints have been eliminated by previous patches. Eliminate the rest of them. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-22-ys...@users.sourceforge.jp> Tested-by

[PATCH v25 05/22] target/rx: TCG helper

2019-09-26 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato Message-Id: <20190616142836.10614-3-ys...@users.sourceforge.jp> Reviewed-by: Richard Henderson Message-Id: <20190607091116.49044-3-ys...@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson [PMD: Removed tlb_fill, extracted from

Re: [PATCH 20/20] spapr: Eliminate SpaprIrq::init hook

2019-09-26 Thread Greg Kurz
On Fri, 27 Sep 2019 15:51:04 +1000 David Gibson wrote: > On Thu, Sep 26, 2019 at 05:35:39PM +0200, Greg Kurz wrote: > > On Thu, 26 Sep 2019 09:05:56 +0200 > > Cédric Le Goater wrote: > > > > > >>> +if (spapr->irq->xive) { > > > >>> +uint32_t nr_servers = spapr_max_server_number(spap

[PATCH v25 18/22] hw/rx: Honor -accel qtest

2019-09-26 Thread Yoshinori Sato
From: Richard Henderson Issue an error if no kernel, no bios, and not qtest'ing. Fixes make check-qtest-rx: test/qom-test. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-16-ys...@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Signe

Re: [PATCH v4 4/9] target/arm/cpu64: max cpu: Introduce sve properties

2019-09-26 Thread Andrew Jones
On Thu, Sep 26, 2019 at 12:07:54PM -0700, Richard Henderson wrote: > On 9/24/19 4:31 AM, Andrew Jones wrote: > > +static uint32_t sve_zcr_get_valid_len(ARMCPU *cpu, uint32_t start_len) > > +{ > > +uint32_t start_vq = (start_len & 0xf) + 1; > > + > > +return arm_cpu_vq_map_next_smaller(cpu,

[PATCH v25 20/22] Add rx-softmmu

2019-09-26 Thread Yoshinori Sato
Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-17-ys...@users.sourceforge.jp> Signed-off-by: Richard Henderson pick ed65c02993 target/rx: Add RX to SysEmuTarget pick 01372568ae tests: Add rx to machine-none-t

[PATCH v25 21/22] BootLinuxConsoleTest: Test the RX-Virt machine

2019-09-26 Thread Yoshinori Sato
From: Philippe Mathieu-Daudé Add two tests for the rx-virt machine, based on the recommended test setup from Yoshinori Sato: https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg03586.html - U-Boot prompt - Linux kernel with Sash shell These are very quick tests: $ avocado run -t arch:rx

[PATCH v25 03/22] hw/registerfields.h: Add 8bit and 16bit register macros

2019-09-26 Thread Yoshinori Sato
From: Philippe Mathieu-Daudé Some RX peripheral using 8bit and 16bit registers. Added 8bit and 16bit APIs. Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-11-ys...@users.sourceforge.jp> Tested-by: Philippe Math

[PATCH v25 04/22] target/rx: TCG translation

2019-09-26 Thread Yoshinori Sato
This part only supported RXv1 instructions. Instruction manual. https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01us0032ej0120_rxsm.pdf Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-2-ys...@users

[PATCH v25 12/22] target/rx: Collect all bytes during disassembly

2019-09-26 Thread Yoshinori Sato
From: Richard Henderson Collected, to be used in the next patch. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-23-ys...@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson

[PATCH v25 02/22] qemu/bitops.h: Add extract8 and extract16

2019-09-26 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-10-ys...@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/qemu/bitops.h | 38 +

[PATCH v25 00/22] Add RX archtecture support

2019-09-26 Thread Yoshinori Sato
Hello. This patch series is added Renesas RX target emulation. Changes for v24. Add note for qapi/machine.json. Added Acked-by for 6/22. git rebase master. Changes for v23. Follow master changes. Changes for v22. Added some include. Changes for v21. rebase latest master. Remove unneeded hmp_inf

[PATCH v25 13/22] target/rx: Dump bytes for each insn during disassembly

2019-09-26 Thread Yoshinori Sato
From: Richard Henderson There are so many different forms of each RX instruction that it will be very useful to be able to look at the bytes to see on which path a bug may lie. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id: <201906070

[PATCH v25 01/22] MAINTAINERS: Add RX

2019-09-26 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-18-ys...@users.sourceforge.jp> Signed-off-by: Richard Henderson --- MAINTAINERS | 19 +++ 1 file changed, 19 insertions(+) diff --git a/MAINTAINER

[PATCH v25 15/22] hw/timer: RX62N internal timer modules

2019-09-26 Thread Yoshinori Sato
renesas_tmr: 8bit timer modules. renesas_cmt: 16bit compare match timer modules. This part use many renesas's CPU. Hardware manual. https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf Signed-off-by: Yoshinori Sato Reviewed-by: Alex Bennée Reviewed-by: Philip

Re: [PATCH V2] intel_iommu: TM field should not be in reserved bits

2019-09-26 Thread Peter Xu
On Fri, Sep 27, 2019 at 12:58:38PM +0800, qi1.zh...@intel.com wrote: > From: "Zhang, Qi" > > When dt is supported, TM field should not be Reserved(0). > > Refer to VT-d Spec 9.8 > > Signed-off-by: Zhang, Qi > Signed-off-by: Qi, Yadong > --- > hw/i386/intel_iommu.c | 12 ++--

[PATCH v25 10/22] target/rx: Use prt_ldmi for XCHG_mr disassembly

2019-09-26 Thread Yoshinori Sato
From: Richard Henderson Note that the ld == 3 case handled by prt_ldmi is decoded as XCHG_rr and cannot appear here. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-21-ys...@users.sourceforge.jp> Tested-by: Philip

[PATCH v25 16/22] hw/char: RX62N serial communication interface (SCI)

2019-09-26 Thread Yoshinori Sato
This module supported only non FIFO type. Hardware manual. https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf Signed-off-by: Yoshinori Sato Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-8-ys...@users.sourcef

[PATCH v2 30/33] spapr, xics, xive: Move SpaprIrq::post_load hook to backends

2019-09-26 Thread David Gibson
The remaining logic in the post_load hook really belongs to the interrupt controller backends, and just needs to be called on the active controller (after the active controller is set to the right thing based on the incoming migration in the generic spapr_irq_post_load() logic). Signed-off-by: Dav

[PATCH v25 09/22] target/rx: Replace operand with prt_ldmi in disassembler

2019-09-26 Thread Yoshinori Sato
From: Richard Henderson This has consistency with prt_ri(). It loads all data before beginning output. It uses exactly one call to prt() to emit the full instruction. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49

[Bug 1777777] Re: arm9 clock pending (SP804)

2019-09-26 Thread RTOS Pharos
Thank you for checking this issue. I looked at the ptimer code, like you said. Just one question: isn't this used by other hw as well? Maybe this problem is more general... I also tried (basically) the same example on a aarch64 (raspberry pi3), and I don't find any problems there. Maybe could be

[PATCH v2 31/33] spapr: Remove SpaprIrq::nr_msis

2019-09-26 Thread David Gibson
The nr_msis value we use here has to line up with whether we're using legacy or modern irq allocation. Therefore it's safer to derive it based on legacy_irq_allocation rather than having SpaprIrq contain a canned value. Signed-off-by: David Gibson --- hw/ppc/spapr.c | 5 ++--- hw/

[PATCH v25 22/22] qapi/machine.json: Add RX cpu.

2019-09-26 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato --- qapi/machine.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index ca26779f1a..4409c113c2 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -21,6 +21,7 @@ #is true even for "qemu-sy

Re: [PATCH 20/20] spapr: Eliminate SpaprIrq::init hook

2019-09-26 Thread David Gibson
On Thu, Sep 26, 2019 at 05:35:39PM +0200, Greg Kurz wrote: > On Thu, 26 Sep 2019 09:05:56 +0200 > Cédric Le Goater wrote: > > > >>> +if (spapr->irq->xive) { > > >>> +uint32_t nr_servers = spapr_max_server_number(spapr); > > >>> +DeviceState *dev; > > >>> +int i; > > >>

[PATCH v2 28/33] spapr: Remove SpaprIrq::init_kvm hook

2019-09-26 Thread David Gibson
This hook is a bit odd. The only caller is spapr_irq_init_kvm(), but it explicitly takes an SpaprIrq *, so it's never really called through the current SpaprIrq. Essentially this is just a way of passing through a function pointer so that spapr_irq_init_kvm() can handle some configuration and err

[PATCH v25 19/22] hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core

2019-09-26 Thread Yoshinori Sato
From: Philippe Mathieu-Daudé While the VIRT machine can use different microcontrollers, the RX62N microcontroller is tied to the RX62N CPU core. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Yoshinori Sato --- hw/rx/rx-virt.c | 8 1 file changed, 8 insertions(+) diff --git a/

[PATCH v2 32/33] spapr: Move SpaprIrq::nr_xirqs to SpaprMachineClass

2019-09-26 Thread David Gibson
For the benefit of peripheral device allocation, the number of available irqs really wants to be the same on a given machine type version, regardless of what irq backends we are using. That's the case now, but only because we make sure the different SpaprIrq instances have the same value except fo

[PATCH v2 19/33] spapr: Eliminate SpaprIrq::init hook

2019-09-26 Thread David Gibson
This method is used to set up the interrupt backends for the current configuration. However, this means some confusing redirection between the "dual" mode init and the init hooks for xics only and xive only modes. Since we now have simple flags indicating whether XICS and/or XIVE are supported, i

[PATCH v2 29/33] spapr, xics, xive: Move SpaprIrq::reset hook logic into activate/deactivate

2019-09-26 Thread David Gibson
It turns out that all the logic in the SpaprIrq::reset hooks (and some in the SpaprIrq::post_load hooks) isn't really related to resetting the irq backend (that's handled by the backends' own reset routines). Rather its about getting the backend ready to be the active interrupt controller or stopp

[PATCH v2 26/33] spapr, xics, xive: Move dt_populate from SpaprIrq to SpaprInterruptController

2019-09-26 Thread David Gibson
This method depends only on the active irq controller. Now that we've formalized the notion of active controller we can dispatch directly through that, rather than dispatching via SpaprIrq with the dual version having to do a second conditional dispatch. Signed-off-by: David Gibson --- hw/intc/

[PATCH v2 17/33] xive: Improve irq claim/free path

2019-09-26 Thread David Gibson
spapr_xive_irq_claim() returns a bool to indicate if it succeeded. But most of the callers and one callee use int return values and/or an Error * with more information instead. In any case, ints are a more common idiom for success/failure states than bools (one never knows what sense they'll be in

[PATCH v2 22/33] spapr, xics, xive: Move irq claim and free from SpaprIrq to SpaprInterruptController

2019-09-26 Thread David Gibson
These methods, like cpu_intc_create, really belong to the interrupt controller, but need to be called on all possible intcs. Like cpu_intc_create, therefore, make them methods on the intc and always call it for all existing intcs. Signed-off-by: David Gibson --- hw/intc/spapr_xive.c| 7

[PATCH v2 25/33] spapr, xics, xive: Move print_info from SpaprIrq to SpaprInterruptController

2019-09-26 Thread David Gibson
This method depends only on the active irq controller. Now that we've formalized the notion of active controller we can dispatch directly through that, rather than dispatching via SpaprIrq with the dual version having to do a second conditional dispatch. Signed-off-by: David Gibson --- hw/intc/

[PATCH v2 13/33] spapr: Eliminate SpaprIrq:get_nodename method

2019-09-26 Thread David Gibson
This method is used to determine the name of the irq backend's node in the device tree, so that we can find its phandle (after SLOF may have modified it from the phandle we initially gave it). But, in the two cases the only difference between the node name is the presence of a unit address. Searc

[PATCH v2 27/33] spapr, xics, xive: Match signatures for XICS and XIVE KVM connect routines

2019-09-26 Thread David Gibson
Both XICS and XIVE have routines to connect and disconnect KVM with similar but not identical signatures. This adjusts them to match exactly, which will be useful for further cleanups later. While we're at it, remove error reporting from the disconnect path. In the XICS case this wasn't used at

[PATCH v2 33/33] spapr: Remove last pieces of SpaprIrq

2019-09-26 Thread David Gibson
The only thing remaining in this structure are the flags to allow either XICS or XIVE to be present. These actually make more sense as spapr capabilities - that way they can take advantage of the existing infrastructure to sanity check capability states across migration and so forth. Signed-off-b

[PATCH v2 18/33] spapr: Use less cryptic representation of which irq backends are supported

2019-09-26 Thread David Gibson
SpaprIrq::ov5 stores the value for a particular byte in PAPR option vector 5 which indicates whether XICS, XIVE or both interrupt controllers are available. As usual for PAPR, the encoding is kind of overly complicated and confusing (though to be fair there are some backwards compat things it has

[PATCH v2 24/33] spapr, xics, xive: Move set_irq from SpaprIrq to SpaprInterruptController

2019-09-26 Thread David Gibson
This method depends only on the active irq controller. Now that we've formalized the notion of active controller we can dispatch directly through that, rather than dispatching via SpaprIrq with the dual version having to do a second conditional dispatch. Signed-off-by: David Gibson --- hw/intc/

[PATCH v2 10/33] spapr: Eliminate nr_irqs parameter to SpaprIrq::init

2019-09-26 Thread David Gibson
The only reason this parameter was needed was to work around the inconsistent meaning of nr_irqs between xics and xive. Now that we've fixed that, we can consistently use the number directly in the SpaprIrq configuration. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater --- hw/ppc/spa

[PATCH v2 21/33] spapr, xics, xive: Move cpu_intc_create from SpaprIrq to SpaprInterruptController

2019-09-26 Thread David Gibson
This method essentially represents code which belongs to the interrupt controller, but needs to be called on all possible intcs, rather than just the currently active one. The "dual" version therefore calls into the xics and xive versions confusingly. Handle this more directly, by making it inste

[PATCH v2 06/33] xics: Create sPAPR specific ICS subtype

2019-09-26 Thread David Gibson
We create a subtype of TYPE_ICS specifically for sPAPR. For now all this does is move the setup of the PAPR specific hcalls and RTAS calls to the realize() function for this, rather than requiring the PAPR code to explicitly call xics_spapr_init(). In future it will have some more function. Sign

[PATCH v2 23/33] spapr: Formalize notion of active interrupt controller

2019-09-26 Thread David Gibson
spapr now has the mechanism of constructing both XICS and XIVE instances of the SpaprInterruptController interface. However, only one of the interrupt controllers will actually be active at any given time, depending on feature negotiation with the guest. This is handled in the current code via sp

[PATCH v2 09/33] spapr: Clarify and fix handling of nr_irqs

2019-09-26 Thread David Gibson
Both the XICS and XIVE interrupt backends have a "nr-irqs" property, but it means slightly different things. For XICS (or, strictly, the ICS) it indicates the number of "real" external IRQs. Those start at XICS_IRQ_BASE (0x1000) and don't include the special IPI vector. For XIVE, however, it inc

[PATCH v2 20/33] spapr, xics, xive: Introduce SpaprInterruptController QOM interface

2019-09-26 Thread David Gibson
The SpaprIrq structure is used to represent ths spapr machine's irq backend. Except that it kind of conflates two concepts: one is the backend proper - a specific interrupt controller that we might or might not be using, the other is the irq configuration which covers the layout of irq space and w

[PATCH v2 08/33] spapr: Replace spapr_vio_qirq() helper with spapr_vio_irq_pulse() helper

2019-09-26 Thread David Gibson
Every caller of spapr_vio_qirq() immediately calls qemu_irq_pulse() with the result, so we might as well just fold that into the helper. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé --- hw/char/spapr_vty.c| 3 +--

[PATCH v2 11/33] spapr: Fix indexing of XICS irqs

2019-09-26 Thread David Gibson
spapr global irq numbers are different from the source numbers on the ICS when using XICS - they're offset by XICS_IRQ_BASE (0x1000). But spapr_irq_set_irq_xics() was passing through the global irq number to the ICS code unmodified. We only got away with this because of a counteracting bug - we w

[PATCH v2 16/33] spapr, xics, xive: Better use of assert()s on irq claim/free paths

2019-09-26 Thread David Gibson
The irq claim and free paths for both XICS and XIVE check for some validity conditions. Some of these represent genuine runtime failures, however others - particularly checking that the basic irq number is in a sane range - could only fail in the case of bugs in the callin code. Therefore use asse

[PATCH v2 15/33] spapr: Handle freeing of multiple irqs in frontend only

2019-09-26 Thread David Gibson
spapr_irq_free() can be used to free multiple irqs at once. That's useful for its callers, but there's no need to make the individual backend hooks handle this. We can loop across the irqs in spapr_irq_free() itself and have the hooks just do one at time. Signed-off-by: David Gibson Reviewed-by:

[PATCH v2 05/33] xics: Merge TYPE_ICS_BASE and TYPE_ICS_SIMPLE classes

2019-09-26 Thread David Gibson
TYPE_ICS_SIMPLE is the only subtype of TYPE_ICS_BASE that's ever instantiated. The existence of different classes is mostly a hang over from when we (misguidedly) had separate subtypes for the KVM and non-KVM version of the device. There could be some call for an abstract base type for ICS varian

[PATCH v2 04/33] xics: Eliminate reset hook

2019-09-26 Thread David Gibson
Currently TYPE_XICS_BASE and TYPE_XICS_SIMPLE have their own reset methods, using the standard technique for having the subtype call the supertype's methods before doing its own thing. But TYPE_XICS_SIMPLE is the only subtype of TYPE_XICS_BASE ever instantiated, so there's no point having the spli

[PATCH v2 00/33] spapr: IRQ subsystem cleanup

2019-09-26 Thread David Gibson
This is a substantial rework to clean up the handling of IRQs in spapr. It includes some cleanups to both the XICS and XIVE interrupt controller backends, as well as more to the common spapr irq handling infrastructure. Changes since v1: * Lots of extra patches * Many minor adjustments based on

[PATCH v2 14/33] spapr: Remove unhelpful tracepoints from spapr_irq_free_xics()

2019-09-26 Thread David Gibson
These traces contain some useless information (the always-0 source#) and have no equivalents for XIVE mode. For now just remove them, and we can put back something more sensible if and when we need it. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Reviewed-by

[PATCH v2 07/33] spapr: Fold spapr_phb_lsi_qirq() into its single caller

2019-09-26 Thread David Gibson
No point having a two-line helper that's used exactly once, and not likely to be used anywhere else in future. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé --- hw/ppc/spapr_pci.c | 3 ++- include/hw/pci-host/spap

[PATCH v2 02/33] xics: Eliminate 'reject', 'resend' and 'eoi' class hooks

2019-09-26 Thread David Gibson
Currently ics_reject(), ics_resend() and ics_eoi() indirect through class methods. But there's only one implementation of each method, the one in TYPE_ICS_SIMPLE. TYPE_ICS_BASE has no implementation, but it's never instantiated, and has no other subtypes. So clean up by eliminating the method an

[PATCH v2 01/33] xics: Minor fixes for XICSFabric interface

2019-09-26 Thread David Gibson
Interface instances should never be directly dereferenced. So, the common practice is to make them incomplete types to make sure no-one does that. XICSFrabric, however, had a dummy type which is less safe. We were also using OBJECT_CHECK() where we should have been using INTERFACE_CHECK(). Signe

[PATCH v2 12/33] spapr: Simplify spapr_qirq() handling

2019-09-26 Thread David Gibson
Currently spapr_qirq(), whic is used to find the qemu_irq for an spapr global irq number, redirects through the SpaprIrq::qirq method. But the array of qemu_irqs is allocated in the PAPR layer, not the backends, and so the method implementations all return the same thing, just differing in the pre

[PATCH v2 03/33] xics: Rename misleading ics_simple_*() functions

2019-09-26 Thread David Gibson
There are a number of ics_simple_*() functions that aren't actually specific to TYPE_XICS_SIMPLE at all, and are equally valid on TYPE_XICS_BASE. Rename them to ics_*() accordingly. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz --- hw/intc/trace-events | 6

[PATCH V2] intel_iommu: TM field should not be in reserved bits

2019-09-26 Thread qi1 . zhang
From: "Zhang, Qi" When dt is supported, TM field should not be Reserved(0). Refer to VT-d Spec 9.8 Signed-off-by: Zhang, Qi Signed-off-by: Qi, Yadong --- hw/i386/intel_iommu.c | 12 ++-- hw/i386/intel_iommu_internal.h | 25 +++-- 2 files changed, 25 inser

Re: [PATCH v2 01/20] target/mips: Clean up helper.c

2019-09-26 Thread Aleksandar Markovic
25.09.2019. 17.53, "Philippe Mathieu-Daudé" је написао/ла: > > On 9/25/19 2:45 PM, Aleksandar Markovic wrote: > > From: Aleksandar Markovic > > > > Mostly fix errors and warnings reported by 'checkpatch.pl -f'. > > > > Signed-off-by: Aleksandar Markovic > > --- > > target/mips/helper.c | 132 ++

Re: [PATCH v1 1/1] target/riscv: Print CPU and privledge in disas

2019-09-26 Thread Bin Meng
On Fri, Sep 27, 2019 at 8:55 AM Alistair Francis wrote: typo "privledge" in the commit title > > Signed-off-by: Alistair Francis > --- > target/riscv/translate.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/target/riscv/translate.c b/target/riscv/translate.c > index adeddb85

Re: [PATCH 17/20] spapr: Remove unused return value in claim path

2019-09-26 Thread David Gibson
On Thu, Sep 26, 2019 at 10:36:02AM +0200, Greg Kurz wrote: > On Wed, 25 Sep 2019 16:45:31 +1000 > David Gibson wrote: > > > spapr_irq_claim() and the hooks it is based on return an integer error code > > as well as taking an Error ** parameter. But none of the callers check the > > integer, so w

[PATCH qemu] spapr-pci: Stop providing assigned-addresses

2019-09-26 Thread Alexey Kardashevskiy
QEMU does not allocate PCI resources (BARs) in any case - coldplug devices are configured by the firmware and hotplug devices rely on the guest system to do the assignment via the PCI rescan mechanism. Also in order to create non empty "assigned-addresses", the device has to be enabled (i.e. PCI_CO

[Bug 1845580] [NEW] issue with QEMU on Raspberry Pi failing to access CDROM

2019-09-26 Thread Chris Schneider
Public bug reported: I am trying to access the CDROM (iso) from QEMU using FreeDOS and I get an error when doing a directory for: i can boot from the iso but if i exit to access the files from the CDROM ISO i get the attached error. I believe there is an issue with the QEMU for the Raspberry Pi.

Re: [PATCH v3] qga: add command guest-get-devices for reporting VirtIO devices

2019-09-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/919bbd6e0557d2fe2d9c17de394cc0b4c6fa4426.1569445204.git.tgole...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 919bbd6e0557d2fe2d9c17de394cc0b4c6fa4426.1569445204.git

Re: Is kexec supported in QEMU for ARM64 (qemu-system-aarch64) with arm-trusted-firmware, optee, and u-boot.

2019-09-26 Thread Lakshmi Ramasubramanian
On 9/26/19 8:17 AM, Lakshmi Ramasubramanian wrote: The following commit for ARM Trusted Firmware for QEMU virt ARMv8-A is almost 3 years old https://salsa.debian.org/debian/atf-allwinner/commit/b6b671c4ac4bd5595306863225bb3bece1e6135c Current limitations: * Only cold boot is supported * No buil

[PATCH v2 6/7] riscv/virt: Add the PFlash CFI01 device

2019-09-26 Thread Alistair Francis
Add the CFI01 PFlash to the RISC-V virt board. This is the same PFlash from the ARM Virt board and the implementation is based on the ARM Virt board. This allows users to specify flash files from the command line. Signed-off-by: Alistair Francis --- hw/riscv/Kconfig| 1 + hw/riscv/virt.

[PATCH v2 7/7] riscv/virt: Jump to pflash if specified

2019-09-26 Thread Alistair Francis
If the user supplied pflash to QEMU then change the reset code to jump to the pflash base address instead of the DRAM base address. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- hw/riscv/virt.c | 11 ++- 1 file changed, 10 insertions(+),

[PATCH v2 4/7] riscv/sifive_u: Add the start-in-flash property

2019-09-26 Thread Alistair Francis
Add a property that when set to true QEMU will jump from the ROM code to the start of flash memory instead of DRAM which is the default behaviour. Signed-off-by: Alistair Francis --- hw/riscv/sifive_u.c | 27 +++ include/hw/riscv/sifive_u.h | 2 ++ 2 files change

[PATCH v1 1/1] target/riscv: Print CPU and privledge in disas

2019-09-26 Thread Alistair Francis
Signed-off-by: Alistair Francis --- target/riscv/translate.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index adeddb85f6..537af0003e 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -810,7 +810,14 @@ static

[PATCH v2 1/7] riscv/sifive_u: Add L2-LIM cache memory

2019-09-26 Thread Alistair Francis
On reset only a single L2 cache way is enabled, the others are exposed as memory that can be used by early boot firmware. This L2 region is generally disabled using the WayEnable register at a later stage in the boot process. To allow firmware to target QEMU and the HiFive Unleashed let's add the L

[PATCH v2 3/7] riscv/sifive_u: Manually define the machine

2019-09-26 Thread Alistair Francis
Instead of using the DEFINE_MACHINE() macro to define the machine let's do it manually. This allows us to specify machine properties. This patch is no functional change. Signed-off-by: Alistair Francis --- hw/riscv/sifive_u.c | 44 ++--- include/hw/riscv/

[PATCH v2 2/7] riscv/sifive_u: Add QSPI memory region

2019-09-26 Thread Alistair Francis
The HiFive Unleashed uses is25wp256 SPI NOR flash. There is currently no model of this in QEMU, so to allow boot firmware developers to use QEMU to target the Unleashed let's add a chunk of memory to represent the QSPI0 memory mapped flash. This can be targeted using QEMU's -device loader command l

[PATCH v2 0/7] RISC-V: Add more machine memory

2019-09-26 Thread Alistair Francis
This series aims to improve the use of QEMU for developing boot code. It does a few things: - sifive_u machine: - Adds a chunk of memory in the Flash area. This allows boot loaders to use this memory. I can't find details on the QSPI flash used on the real board, so this is the best be

[PATCH v2 5/7] riscv/virt: Manually define the machine

2019-09-26 Thread Alistair Francis
Instead of using the DEFINE_MACHINE() macro to define the machine let's do it manually. This allows us to use the machine object to create RISCVVirtState. This is required to add children and aliases to the machine. This patch is no functional change. Signed-off-by: Alistair Francis --- hw/risc

Re: [PATCH] i386: Re-add "pconfig" CPUID flag name

2019-09-26 Thread Eduardo Habkost
(CCing libvir-list) On Thu, Sep 26, 2019 at 11:58:30PM +0200, Paolo Bonzini wrote: > Is this really needed? QEMU's value of pconfig=on vs. off should be > provided by QMP CPU model queries, if a property is not available then > Libvirt should not try to set it to off. > Libvirt can easily work a

Re: [PATCH v2 0/7] target/ppc: DFP fixes and improvements

2019-09-26 Thread David Gibson
On Thu, Sep 26, 2019 at 07:57:54PM +0100, Mark Cave-Ayland wrote: > This patchset fixes the DFP issue reported at > https://bugs.launchpad.net/qemu/+bug/1841990 > caused by the change in FP register storage in commit ef96e3ae96 "target/ppc: > move FP and VMX registers into aligned vsr register arr

Re: [PATCH v4 4/9] target/arm/cpu64: max cpu: Introduce sve properties

2019-09-26 Thread Alex Bennée
Richard Henderson writes: > On 9/24/19 4:31 AM, Andrew Jones wrote: > >> +#if __SIZEOF_LONG__ == 8 >> +#define BIT(n) (1UL << (n)) >> +#else >> +#define BIT(n) (1ULL << (n)) >> +#endif > > There's no reason not to always use 1ULL is there? Also we already have this helper in bitops.h so shoul

Re: [Qemu-devel] [PATCH v4 00/10] qcow2-bitmaps: rewrite reopening logic

2019-09-26 Thread John Snow
On 8/7/19 10:12 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > Bitmaps reopening is buggy, reopening-rw just not working at all and > reopening-ro may lead to producing broken incremental > backup if we do temporary snapshot in a meantime. > > v4: Drop complicated solution around reopen

Re: [Qemu-devel] [PATCH v4 10/10] qcow2-bitmap: move bitmap reopen-rw code to qcow2_reopen_commit

2019-09-26 Thread John Snow
On 8/7/19 10:12 AM, Vladimir Sementsov-Ogievskiy wrote: > The only reason I can imagine for this strange code at the very-end of > bdrv_reopen_commit is the fact that bs->read_only updated after > calling drv->bdrv_reopen_commit in bdrv_reopen_commit. And in the same > time, prior to previous co

Re: [Qemu-devel] [PATCH v4 09/10] block/qcow2-bitmap: fix and improve qcow2_reopen_bitmaps_rw

2019-09-26 Thread John Snow
On 8/7/19 10:12 AM, Vladimir Sementsov-Ogievskiy wrote: > - Correct check for write access to file child, and in correct place > (only if we want to write). > - Support reopen rw -> rw (which will be used in following commit), > for example, !bdrv_dirty_bitmap_readonly() is not a corruption

Re: [PATCH v4 02/10] block: reverse order for reopen commits

2019-09-26 Thread John Snow
On 9/24/19 6:12 AM, Max Reitz wrote: > On 07.08.19 16:12, Vladimir Sementsov-Ogievskiy wrote: >> It's needed to fix reopening qcow2 with bitmaps to RW. Currently it >> can't work, as qcow2 needs write access to file child, to mark bitmaps >> in-image with IN_USE flag. But usually children goes a

Re: [Qemu-devel] [PATCH v4 08/10] iotests: add test 260 to check bitmap life after snapshot + commit

2019-09-26 Thread John Snow
On 8/7/19 10:12 AM, Vladimir Sementsov-Ogievskiy wrote: > Two testcases with persistent bitmaps are not added here, as there are > bugs to be fixed soon. > > Signed-off-by: Vladimir Sementsov-Ogievskiy OK: Reviewed-by: John Snow there may or may not be conflicts on test setup, depending on

Re: [Qemu-devel] [PATCH v4 04/10] iotests.py: add event_wait_log and events_wait_log helpers

2019-09-26 Thread John Snow
On 8/7/19 10:12 AM, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py > index ce74177ab1..4a

Re: [Qemu-devel] [PATCH v4 03/10] iotests: add test-case to 165 to test reopening qcow2 bitmaps to RW

2019-09-26 Thread John Snow
On 8/7/19 10:12 AM, Vladimir Sementsov-Ogievskiy wrote: > Reopening bitmaps to RW was broken prior to previous commit. Check that > it works now. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/165 | 46 -- > tests/qemu-iotest

Re: [PATCH] i386: Re-add "pconfig" CPUID flag name

2019-09-26 Thread Paolo Bonzini
Is this really needed? QEMU's value of pconfig=on vs. off should be provided by QMP CPU model queries, if a property is not available then Libvirt should not try to set it to off. Paolo Il gio 26 set 2019, 23:23 Eduardo Habkost ha scritto: > QEMU 3.1.0 was shipped with the "pconfig" CPU propert

Re: [Qemu-devel] [PATCH 4/4] block/dirty-bitmap: refactor bdrv_dirty_bitmap_next

2019-09-26 Thread John Snow
On 9/26/19 3:28 PM, Eric Blake wrote: > On 9/26/19 1:54 PM, John Snow wrote: >> >> >> On 9/16/19 10:19 AM, Vladimir Sementsov-Ogievskiy wrote: >>> bdrv_dirty_bitmap_next is always used in same pattern. So, split it >>> into _next and _first, instead of combining two functions into one and >>> ad

Re: [PATCH v8 01/13] vfio: KABI for migration interface

2019-09-26 Thread Alex Williamson
On Thu, 26 Sep 2019 03:07:08 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, September 26, 2019 3:06 AM > [...] > > > > > The second point is about write-protection: > > > > > > > > > > > There is another value of recording GPA in V

Re: [PATCH] i386: Re-add "pconfig" CPUID flag name

2019-09-26 Thread Eduardo Habkost
On Thu, Sep 26, 2019 at 06:23:26PM -0300, Eduardo Habkost wrote: > QEMU 3.1.0 was shipped with the "pconfig" CPU property available, > added by commit 5131dc433df5 ("i386: Add CPUID bit for PCONFIG"). > > Then the feature was removed in QEMU 4.0.0 (and 3.1.1), by commit > 712f807e1965 ("Revert 'i3

[PATCH] i386: Re-add "pconfig" CPUID flag name

2019-09-26 Thread Eduardo Habkost
QEMU 3.1.0 was shipped with the "pconfig" CPU property available, added by commit 5131dc433df5 ("i386: Add CPUID bit for PCONFIG"). Then the feature was removed in QEMU 4.0.0 (and 3.1.1), by commit 712f807e1965 ("Revert 'i386: Add CPUID bit for PCONFIG'"). In theory this would be OK, but we do ha

[PATCH] target/ppc: use Vsr macros in BCD helpers

2019-09-26 Thread Mark Cave-Ayland
This allows us to remove more endian-specific defines from int_helper.c. Signed-off-by: Mark Cave-Ayland --- target/ppc/int_helper.c | 72 ++--- 1 file changed, 25 insertions(+), 47 deletions(-) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c i

Re: [PATCH 00/19] hw/arm/raspi: Improve Raspberry Pi 2/3 reliability

2019-09-26 Thread BALATON Zoltan
On Thu, 26 Sep 2019, Philippe Mathieu-Daudé wrote: and got it almost working (boots Linux kernel to userland, sadly I'm still having timeout issues with the eMMC block). [...] $ make aarch64-softmmu/all check-venv $ ./tests/venv/bin/avocado --show=app,console run -t machine:raspi2 -t machine:r

Re: [PATCH v5 0/2] target/i386: cpu.h macros clean up

2019-09-26 Thread Eduardo Habkost
On Thu, Sep 26, 2019 at 10:10:53AM +0800, Tao Xu wrote: > Add some comments, clean up comments over 80 chars per line. There > is an extra line in comment of CPUID_8000_0008_EBX_WBNOINVD, remove > the extra enter and spaces. > > Drop the duplicated definition of cpuid AVX512_VBMI macro and rename

Re: [Qemu-devel] [PATCH 4/4] block/dirty-bitmap: refactor bdrv_dirty_bitmap_next

2019-09-26 Thread Eric Blake
On 9/26/19 1:54 PM, John Snow wrote: On 9/16/19 10:19 AM, Vladimir Sementsov-Ogievskiy wrote: bdrv_dirty_bitmap_next is always used in same pattern. So, split it into _next and _first, instead of combining two functions into one and add FOR_EACH_DIRTY_BITMAP macro. Signed-off-by: Vladimir Sem

Re: [PATCH v3 0/3] proper locking on bitmap add/remove paths

2019-09-26 Thread John Snow
On 9/20/19 4:25 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > We need to lock qcow2 mutex on accessing in-image metadata, especially > on updating this metadata. Let's implement it. > > v3: > 01: add John's r-b > 02: - fix bdrv_remove_persistent_dirty_bitmap return value > - drop e

Re: [SeaBIOS] [PATCH v7 7/8] bootdevice: FW_CFG interface for LCHS values

2019-09-26 Thread Philippe Mathieu-Daudé
On 9/26/19 9:09 PM, Philippe Mathieu-Daudé wrote: > On 9/26/19 8:26 PM, John Snow wrote: >> On 9/26/19 5:57 AM, Philippe Mathieu-Daudé wrote: >>> Hi Sam, >>> >>> On 9/25/19 1:06 PM, Sam Eiderman wrote: From: Sam Eiderman Using fw_cfg, supply logical CHS values directly from QEMU to

Re: [RFC PATCH] configure: deprecate 32 bit build hosts

2019-09-26 Thread Alex Bennée
Alistair Francis writes: > On Thu, Sep 26, 2019 at 8:41 AM Alex Bennée wrote: >> >> >> Thomas Huth writes: >> >> > On 26/09/2019 15.46, Christian Borntraeger wrote: >> >> >> >> >> >> On 26.09.19 14:58, Daniel P. Berrangé wrote: >> >>> On Thu, Sep 26, 2019 at 08:50:36AM +0100, Peter Maydell wr

Re: [PATCH v4 4/9] target/arm/cpu64: max cpu: Introduce sve properties

2019-09-26 Thread Richard Henderson
On 9/24/19 4:31 AM, Andrew Jones wrote: > +static uint32_t sve_zcr_get_valid_len(ARMCPU *cpu, uint32_t start_len) > +{ > +uint32_t start_vq = (start_len & 0xf) + 1; > + > +return arm_cpu_vq_map_next_smaller(cpu, start_vq + 1) - 1; > +} > + > /* > * Given that SVE is enabled, return the v

  1   2   3   4   >