Re: [Qemu-devel] [Qemu-arm] [PATCH] hw/intc/arm_gic: Drop GIC_BASE_IRQ macro

2018-08-25 Thread Philippe Mathieu-Daudé
Le ven. 24 août 2018 13:18, Peter Maydell a écrit : > The GIC_BASE_IRQ macro is a leftover from when we shared code > between the GICv2 and the v7M NVIC. Since the NVIC is now > split off, GIC_BASE_IRQ is always 0, and we can just delete it. > > Signed-off-by: Peter Maydell > Reviewed-by: Phili

Re: [Qemu-devel] [PATCH v4 3/3] arm: Add BBC micro:bit machine

2018-08-25 Thread Joel Stanley
On Thu, 16 Aug 2018 at 07:12, Peter Maydell wrote: > > +static void microbit_machine_init(MachineClass *mc) > > +{ > > +mc->desc = "BBC micro:bit"; > > +mc->init = microbit_init; > > +mc->max_cpus = 1; > > +} > > +DEFINE_MACHINE("microbit", microbit_machine_init); > > Your subclass of

Re: [Qemu-devel] [PATCH v5 2/3] arm: Add Nordic Semiconductor nRF51 SoC

2018-08-25 Thread Joel Stanley
Hi Peter, On Thu, 16 Aug 2018 at 07:24, Peter Maydell wrote: > > +static Property nrf51_soc_properties[] = { > > +DEFINE_PROP_LINK("memory", NRF51State, board_memory, > > TYPE_MEMORY_REGION, > > + MemoryRegion *), > > +DEFINE_PROP_UINT32("sram-size", NRF51State, sram

Re: [Qemu-devel] [PATCH V4 4/4] target-i386: add i440fx 0xcf8 port as coalesced_pio

2018-08-25 Thread Liran Alon
> On 25 Aug 2018, at 15:19, Peng Hao wrote: > > diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c > index 0e60834..da73743 100644 > --- a/hw/pci-host/piix.c > +++ b/hw/pci-host/piix.c > @@ -327,6 +327,10 @@ static void i440fx_pcihost_realize(DeviceState *dev, > Error **errp) > > sysbu

Re: [Qemu-devel] [RFC v4 1/6] pci_expander_bridge: add type TYPE_PXB_PCIE_HOST

2018-08-25 Thread Marcel Apfelbaum
Hi Zihan, On 08/19/2018 04:51 AM, Zihan Yang wrote: Hi Marcel, Marcel Apfelbaum 于2018年8月18日周六 上午1:14写道: Hi Zihan, On 08/09/2018 09:33 AM, Zihan Yang wrote: The inner host bridge created by pxb-pcie is TYPE_PXB_PCI_HOST by default, change it to a new type TYPE_PXB_PCIE_HOST to better utilize

Re: [Qemu-devel] [RFC v4 3/6] i386/acpi-build: describe new pci domain in AML

2018-08-25 Thread Marcel Apfelbaum
On 08/19/2018 05:00 AM, Zihan Yang wrote: Marcel Apfelbaum 于2018年8月18日周六 上午1:49写道: On 08/09/2018 09:34 AM, Zihan Yang wrote: Describe new pci segments of host bridges in AML as new pci devices, with _SEG and _BBN to let them be in DSDT. Besides, bus_nr indicates the bus number of pxb-pci

Re: [Qemu-devel] [PATCH 09/20] target/arm: Handle SVE vector length changes in system mode

2018-08-25 Thread Richard Henderson
On 08/17/2018 09:22 AM, Peter Maydell wrote: >> +/* >> + * When FP is enabled, but SVE is disabled, the effective len is 0. >> + * ??? How should sve_exception_el interact with AArch32 state? >> + * That isn't included in the CheckSVEEnabled pseudocode, so is the >> + * host ker

Re: [Qemu-devel] [PATCH v3 2/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl

2018-08-25 Thread Eduardo Habkost
On Thu, Aug 23, 2018 at 10:23:53PM +0200, Paolo Bonzini wrote: > On 23/08/2018 19:36, Eduardo Habkost wrote: > >> Right, but if KVM_CAP_GET_MSR_FEATURES is not available I guess you can > >> assume the MSRs to be zero for everything except "-cpu host". > > Yes, that would be simplest way to impleme

Re: [Qemu-devel] [PATCH 4/7] target/mips: Add MXU instruction D16MUL

2018-08-25 Thread Richard Henderson
On 08/24/2018 12:44 PM, Craig Janeczek via Qemu-devel wrote: > +gen_load_mxu_gpr(t1, opcode->D16MUL.xrb); > +tcg_gen_ext16s_tl(t0, t1); > +tcg_gen_shri_tl(t1, t1, 16); > +tcg_gen_ext16s_tl(t1, t1); tcg_gen_sextract_tl(t0, t1, 0, 16); tcg_gen_sextract_tl(t1, t1,

Re: [Qemu-devel] [PATCH 3/7] target/mips: Add MXU instruction S8LDD

2018-08-25 Thread Richard Henderson
On 08/24/2018 12:44 PM, Craig Janeczek via Qemu-devel wrote: > +case OPC_MXU_S8LDD: > +gen_load_gpr(t0, opcode->S8LDD.rb); > +tcg_gen_movi_tl(t1, opcode->S8LDD.s8); > +tcg_gen_ext8s_tl(t1, t1); > +tcg_gen_add_tl(t0, t0, t1); This is gen_load_gpr(t0, rb); tc

Re: [Qemu-devel] [PATCH 2/7] target/mips: Add MXU instructions S32I2M and S32M2I

2018-08-25 Thread Richard Henderson
On 08/24/2018 12:44 PM, Craig Janeczek via Qemu-devel wrote: > Adds support for emulating the S32I2M and S32M2I MXU instructions. > > Signed-off-by: Craig Janeczek > --- > target/mips/translate.c | 55 + > 1 file changed, 55 insertions(+) > > diff --git a

Re: [Qemu-devel] [PATCH] slirp: Implement RFC2132 TFTP server name

2018-08-25 Thread Samuel Thibault
Hello, Fam Zheng, le ven. 24 août 2018 21:53:12 +0800, a ecrit: >const char *vnameserver, const char *vnameserver6, >const char *smb_export, const char *vsmbserver, >const char **dnssearch, const char *vdomainname,

Re: [Qemu-devel] [PATCH 1/7] target/mips: Add MXU register support

2018-08-25 Thread Richard Henderson
On 08/24/2018 12:44 PM, Craig Janeczek via Qemu-devel wrote: > +/* MXU General purpose registers moves. */ > +static inline void gen_load_mxu_gpr (TCGv t, int reg) > +{ > +if (reg == 0) > +tcg_gen_movi_tl(t, 0); > +else > +tcg_gen_mov_tl(t, mxu_gpr[reg-1]); > +} > + > +stati

Re: [Qemu-devel] [PATCH] spapr: fix leak of rev array

2018-08-25 Thread Richard Henderson
On 08/24/2018 01:31 PM, Emilio G. Cota wrote: > Introduced in 04d595b300 ("spapr: do not use CPU_FOREACH_REVERSE", > 2018-08-23) > > Fixes: CID1395181 > Reported-by: Peter Maydell > Signed-off-by: Emilio G. Cota > --- > hw/ppc/spapr.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Richar

Re: [Qemu-devel] [PATCH 2/3] hw/nvram/fw_cfg: Use memberwise copy of MemoryRegionOps struct

2018-08-25 Thread Richard Henderson
On 08/24/2018 10:04 AM, Peter Maydell wrote: > We've now removed the 'old_mmio' member from MemoryRegionOps, > so we can perform the copy as a simple struct copy rather > than having to do it via a memberwise copy. > > Signed-off-by: Peter Maydell > --- > hw/nvram/fw_cfg.c | 7 +-- > 1 file

Re: [Qemu-devel] [PATCH 1/3] memory: Remove old_mmio accessors

2018-08-25 Thread Richard Henderson
On 08/24/2018 10:04 AM, Peter Maydell wrote: > Now that all the users of old_mmio MemoryRegion accessors > have been converted, we can remove the core code support. > > Signed-off-by: Peter Maydell > --- > docs/devel/memory.txt | 2 -- > include/exec/memory.h | 5 > memory.c

[Qemu-devel] [Bug 1788665] Re: Low 2D graphics performance with Windows 10 (1803) VGA passthrough VM using "Spectre" protection

2018-08-25 Thread Heiko Sieger
For comparison, here the Linux/host cat /proc/cpuinfo (partial): processor : 11 vendor_id : GenuineIntel cpu family : 6 model : 45 model name : Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz stepping: 7 microcode : 0x714 cpu MHz : 4200.015 cache size

[Qemu-devel] [Bug 1788665] Re: Low 2D graphics performance with Windows 10 (1803) VGA passthrough VM using "Spectre" protection

2018-08-25 Thread Heiko Sieger
Daniel Berrange: ...Essentially if your guest kernel shows "pti ssbd ibrs ibpb stibp" features as present, then thanks to your "-cpu host" usage, the guest should see them too. 1. I changed my qemu start script and added +vmx: -cpu host,kvm=off,hv_vendor_id=1234567890ab,hv_vapic,hv_time,hv_relaxe

Re: [Qemu-devel] [PATCH 5/7] block/mirror: utilize job_exit shim

2018-08-25 Thread Max Reitz
On 2018-08-25 17:02, Max Reitz wrote: > On 2018-08-23 00:05, John Snow wrote: >> >> >> On 08/22/2018 08:15 AM, Max Reitz wrote: >>> On 2018-08-17 21:04, John Snow wrote: Change the manual deferment to mirror_exit into the implicit callback to job_exit and the mirror_exit callback. >>

Re: [Qemu-devel] [PATCH 5/7] block/mirror: utilize job_exit shim

2018-08-25 Thread Max Reitz
On 2018-08-23 00:05, John Snow wrote: > > > On 08/22/2018 08:15 AM, Max Reitz wrote: >> On 2018-08-17 21:04, John Snow wrote: >>> Change the manual deferment to mirror_exit into the implicit >>> callback to job_exit and the mirror_exit callback. >>> >>> This does change the order of some bdrv_unr

Re: [Qemu-devel] [PATCH 1/7] jobs: change start callback to run callback

2018-08-25 Thread Max Reitz
On 2018-08-25 15:33, Max Reitz wrote: [...] > Having a central Error object doesn't really make sense. Whenever the > block job wants to return an error, it should probably do so as "return" > values of methods (like .run()). Same for ret, of course. > > I understand that this is probably real

[Qemu-devel] [PATCH v3 6/9] tests: add a few qmp tests

2018-08-25 Thread Marc-André Lureau
test_object_add_without_props() tests a bug in qmp_object_add() we fixed in commit e64c75a975. Sadly, we don't have systematic object-add tests. This lone test can go into qmp-cmd-test for want of a better home. test_qom_set_without_value() is about a bug in infrastructure used by the QMP core,

[Qemu-devel] [PATCH v3 8/9] qga: process_event() simplification

2018-08-25 Thread Marc-André Lureau
Simplify the code around qmp_dispatch(): - rely on qmp_dispatch/check_obj() for message checking - have a single send_response() point - constify send_response() argument It changes a couple of error messages: * When @req isn't a dictionary, from Invalid JSON syntax to QMP input must be

[Qemu-devel] [PATCH v3 3/9] Revert "qmp: isolate responses into io thread"

2018-08-25 Thread Marc-André Lureau
This reverts commit abe3cd0ff7f774966da6842620806ab7576fe4f3. There is no need to add an additional queue to send the reply to the IOThread, because QMP response is thread safe, and chardev write path is thread safe. It will schedule the watcher in the associated IOThread. Signed-off-by: Marc-And

[Qemu-devel] [PATCH v3 9/9] qmp: common 'id' handling & make QGA conform to QMP spec

2018-08-25 Thread Marc-André Lureau
Let qmp_dispatch() copy the 'id' field. That way any qmp client will conform to the specification, including QGA. Furthermore, it simplifies the work for qemu monitor. CC: Michael Roth Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- monitor.c | 33

[Qemu-devel] [PATCH v3 5/9] json-lexer: make it safe to call destroy multiple times

2018-08-25 Thread Marc-André Lureau
We can easily avoid the burden of checking if the lexer was initialized prior to calling destroy by the caller, let's do it. This allows simplification in state tracking in the qmp-async RFC series, the patch "qmp: add QmpSession" can call qmp_session_destroy() multiple time, which in turns calls

[Qemu-devel] [PATCH v3 7/9] tests: add a qmp success-response test

2018-08-25 Thread Marc-André Lureau
Verify the usage of this schema feature and the API behaviour. This should be the only case where qmp_dispatch() returns NULL without error. Signed-off-by: Marc-André Lureau --- tests/test-qmp-cmds.c | 17 + tests/qapi-schema/qapi-schema-test.json | 2 ++ test

[Qemu-devel] [PATCH v3 4/9] monitor: no need to save need_resume

2018-08-25 Thread Marc-André Lureau
There is no need for per-command need_resume granularity, it should resume after running an non-oob command on oob-disabled monitor. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- monitor.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/mo

[Qemu-devel] [PATCH v3 1/9] monitor: consitify qmp_send_response() QDict argument

2018-08-25 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index 021c11b1bf..a1db4db487 100644 --- a/monitor.c +++ b/monitor.c @@ -503,9 +503,9 @@ int monitor_fprintf(FILE *stream, co

[Qemu-devel] [PATCH v3 2/9] qmp: constify qmp_is_oob()

2018-08-25 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- include/qapi/qmp/dispatch.h | 2 +- qapi/qmp-dispatch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h index 4e2e749faf..68a528a9aa 100644

[Qemu-devel] [PATCH v3 0/9] monitor: various code simplification and fixes

2018-08-25 Thread Marc-André Lureau
Hi, This series is a rebased subset of "[PATCH v3 00/38] RFC: monitor: add asynchronous command type". v3: - updated "tests: add a few qmp tests" to move tests to new files - comment update in "qmp: common 'id' handling & make QGA conform to QMP spec" - commit message updates, add r-b tags Marc-

[Qemu-devel] [PATCH] tcg: check for undefined labels

2018-08-25 Thread Roman Kapl
Currently, if a jump to a label that is not defined anywhere in the code is generated, QEMU will hapilly emit the code, but with effectively random jump target (no relocation done). At least check that there are no unprocessed relocations remaining when running a debug build and print a warning mes

Re: [Qemu-devel] [PATCH 1/7] jobs: change start callback to run callback

2018-08-25 Thread Max Reitz
On 2018-08-23 01:01, John Snow wrote: > > > On 08/22/2018 06:51 AM, Max Reitz wrote: >> On 2018-08-17 21:04, John Snow wrote: >>> Presently we codify the entry point for a job as the "start" callback, >>> but a more apt name would be "run" to clarify the idea that when this >>> function returns w

Re: [Qemu-devel] [PATCH 2/7] jobs: canonize Error object

2018-08-25 Thread Max Reitz
On 2018-08-23 00:50, John Snow wrote: > > > On 08/22/2018 06:59 AM, Max Reitz wrote: >> On 2018-08-21 02:10, John Snow wrote: >>> >>> >>> On 08/17/2018 03:04 PM, John Snow wrote: +error_setg_errno(&job->err, -job->ret, "job failed"); >>> >>> Kevin specifically asked for me to cha

Re: [Qemu-devel] [PATCH 4/7] block/commit: utilize job_exit shim

2018-08-25 Thread Max Reitz
On 2018-08-22 23:55, John Snow wrote: > > > On 08/22/2018 07:58 AM, Max Reitz wrote: >> On 2018-08-17 21:18, John Snow wrote: >>> >>> >>> On 08/17/2018 03:04 PM, John Snow wrote: Change the manual deferment to commit_complete into the implicit callback to job_exit, renaming commit_compl

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-25 Thread Max Reitz
On 2018-08-22 23:52, John Snow wrote: > > > On 08/22/2018 07:43 AM, Max Reitz wrote: >> On 2018-08-17 21:04, John Snow wrote: >>> All jobs do the same thing when they leave their running loop: >>> - Store the return code in a structure >>> - wait to receive this structure in the main thread >>> -

Re: [Qemu-devel] [PULL 0/4] seccomp branch queue

2018-08-25 Thread Peter Maydell
On 23 August 2018 at 15:52, Eduardo Otubo wrote: > The following changes since commit 3392fbee4e435658733bbe9aab23392660558b59: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-3.1-pull-request' into staging > (2018-08-23 12:28:17 +0100) > > are available in the Git repo

Re: [Qemu-devel] [PATCH 3/7] jobs: add exit shim

2018-08-25 Thread Max Reitz
On 2018-08-22 23:45, John Snow wrote: > > > On 08/22/2018 07:52 AM, Max Reitz wrote: >> On 2018-08-22 13:43, Max Reitz wrote: >> >> [...] >> >>> I'd like .main_loop_settle(). Or .main_loop_post_run(). I think it's >>> OK to have names that aren't as cool and tense as possible, when in >>> retur

Re: [Qemu-devel] [PULL 0/3] vfio: Fix coverity, postcopy, and error path issues

2018-08-25 Thread Peter Maydell
On 23 August 2018 at 19:27, Alex Williamson wrote: > The following changes since commit 3392fbee4e435658733bbe9aab23392660558b59: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-3.1-pull-request' into staging > (2018-08-23 12:28:17 +0100) > > are available in the Git re

Re: [Qemu-devel] [PULL 00/58] QObject patches for 2018-08-24

2018-08-25 Thread Peter Maydell
On 24 August 2018 at 20:31, Markus Armbruster wrote: > The following changes since commit 1dfb85a8755096beecf182a617493d539259cbea: > > Merge remote-tracking branch 'remotes/juanquintela/tags/check/20180822' > into staging (2018-08-24 14:46:31 +0100) > > are available in the Git repository at:

Re: [Qemu-devel] [PULL 00/45] MIPS queue August 2018 v6

2018-08-25 Thread Peter Maydell
On 24 August 2018 at 16:59, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > The following changes since commit 1dfb85a8755096beecf182a617493d539259cbea: > > Merge remote-tracking branch 'remotes/juanquintela/tags/check/20180822' > into staging (2018-08-24 14:46:31 +0100) > > are ava

Re: [Qemu-devel] [PULL 03/74] es1370: simplify MemoryRegionOps

2018-08-25 Thread Paolo Bonzini
On 24/08/2018 17:04, Peter Maydell wrote: > because these values aren't contiguous: > > #define ES1370_REG_DAC1_FRAMEADR0xc30 > #define ES1370_REG_DAC2_FRAMEADR0xc38 > #define ES1370_REG_ADC_FRAMEADR 0xd30 > > so you can't calculate the value of 'd' from the addr > this way. > > (Sim

[Qemu-devel] [PATCH] es1370: fix ADC_FRAMEADR and ADC_FRAMECNT

2018-08-25 Thread Paolo Bonzini
They are not consecutive with DAC1_FRAME* and DAC2_FRAME*. Fixes: 154c1d1f960c5147a3f8ef00907504112f271cd8 Signed-off-by: Paolo Bonzini --- hw/audio/es1370.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index dd75c9e8f5..4f9