Re: [Qemu-devel] [PATCH 1/5] tests/acceptance: Add test that runs NetBSD installer on PRep/40p

2019-07-05 Thread Kamil Rytarowski
On 05.07.2019 20:00, Philippe Mathieu-Daudé wrote: > Hi Kamil, > > On 6/27/19 11:47 PM, Kamil Rytarowski wrote: >> On 27.06.2019 13:01, Philippe Mathieu-Daudé wrote: >>> +bios_url = ('ftp://ftp.boulder.ibm.com/rs6000/firmware/' >>> +'7020-40p/P12H0456.IMG') >>> +

Re: [Qemu-devel] [PATCH v3 5/6] monitor: adding info tb and tbs to monitor

2019-07-05 Thread Markus Armbruster
Cc: Marc-André, who has patches that might be useful here. Alex Bennée writes: > Markus Armbruster writes: > >> vandersonmr writes: >> > > > I'll leave Vanderson to address your other comments. > >> >> Debugging commands are kind of borderline. Debugging is commonly a >> human activity, wher

Re: [Qemu-devel] [PULL 00/12] Misc bugfixes for QEMU hard freeze

2019-07-05 Thread Eric Blake
On 7/5/19 11:32 PM, Eric Blake wrote: > On 7/5/19 2:50 PM, Paolo Bonzini wrote: >> The following changes since commit 68d7ff0cff0c4905802104843cf0100543b47314: >> >> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into >> staging (2019-06-21 13:32:10 +0100) >> >> are available i

Re: [Qemu-devel] [PULL 11/12] hw/i386: Fix linker error when ISAPC is disabled

2019-07-05 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: > >> From: Julio Montes >> >> v2: include config-devices.h to use CONFIG_IDE_ISA >> >> Message-Id: <20190705143554.10295-2-julio.mon...@intel.com> >> Signed-off-by: Paolo Bonzini > > You lost Julio's S-o-B due to his ill-advised '---' line. Al

Re: [Qemu-devel] [PULL 00/12] Misc bugfixes for QEMU hard freeze

2019-07-05 Thread Eric Blake
On 7/5/19 2:50 PM, Paolo Bonzini wrote: > The following changes since commit 68d7ff0cff0c4905802104843cf0100543b47314: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2019-06-21 13:32:10 +0100) > > are available in the git repository at: > > > git://git

Re: [Qemu-devel] [PULL 11/12] hw/i386: Fix linker error when ISAPC is disabled

2019-07-05 Thread Markus Armbruster
Paolo Bonzini writes: > From: Julio Montes > > v2: include config-devices.h to use CONFIG_IDE_ISA > > Message-Id: <20190705143554.10295-2-julio.mon...@intel.com> > Signed-off-by: Paolo Bonzini You lost Julio's S-o-B due to his ill-advised '---' line. Also the part of his commit message that s

Re: [Qemu-devel] [PATCH v2 1/2] Makefile: generate header file with the list of devices enabled

2019-07-05 Thread Markus Armbruster
Advice for your *next* patch submission (this one's already queued): 1. Use a cover letter for submitting multiple patches together. Julio Montes writes: > v2: generate config-devices.h which contains the list of devices enabled > --- > config-devices.h is an auto-generated header file that wil

[Qemu-devel] [RFC v2 1/2] hw/pvrdma: make DSR mapping idempotent in load_dsr()

2019-07-05 Thread Sukrit Bhatnagar
Map to DSR only when there is no mapping done already i.e., when dev->dsr_info.dsr is NULL. This allows the rest of mappings and ring inits to be done by calling load_dsr() when DSR has already been mapped to, somewhere else. Move free_dsr() out of load_dsr() and call it before the latter as and w

[Qemu-devel] [RFC v2 2/2] hw/pvrdma: add live migration support

2019-07-05 Thread Sukrit Bhatnagar
Use VMStateDescription for migrating device state. Currently, 'vmstate_pvrdma' describes the PCI and MSIX state for pvrdma and 'vmstate_pvrdma_dsr_dma' describes a temporary state containing some values obtained only after mapping to dsr in the source. Since the dsr will not be available on dest un

[Qemu-devel] [RFC v2 0/2] Add live migration support in the PVRDMA device

2019-07-05 Thread Sukrit Bhatnagar
Changes in v2: * Modify load_dsr() such that dsr mapping is not performed if dsr value is non-NULL. Also move free_dsr() out of load_dsr() and call it right before if needed. These two changes will allow us to call load_dsr() even when we have already done dsr mapping and would like to go on

Re: [Qemu-devel] [PATCH v2 01/18] qapi/block-core: Introduce BackupCommon

2019-07-05 Thread Markus Armbruster
John Snow writes: > On 7/5/19 10:14 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> drive-backup and blockdev-backup have an awful lot of things in common >>> that are the same. Let's fix that. >>> >>> I don't deduplicate 'target', because the semantics actually did change >>> between

Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment

2019-07-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 7/5/19 3:19 PM, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >>> On 7/5/19 10:07 AM, Stefan Hajnoczi wrote: On Thu, Jul 04, 2019 at 11:28:37AM +0100, Daniel P. Berrangé wrote: > On Thu, Jul 04, 2019 at 11:24:57AM +0100, Stefan Hajnoczi w

Re: [Qemu-devel] [PATCH v22 00/22] Add RX archtecture support

2019-07-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190705083141.106254-1-ys...@users.sourceforge.jp/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v22 00/22] Add RX archtecture support Message-id: 20190705083141

Re: [Qemu-devel] [PATCH 6/7] target/i386: add VMX features

2019-07-05 Thread Paolo Bonzini
On 06/07/19 00:33, Eduardo Habkost wrote: > Oh, that's the info I was missing. I always expected > kvm_arch_get_supported_*() to be subject to change (depending on > KVM and hardware capabilities), and not be part of guest ABI. For most bits that's true. Just not for these ones, because they are

Re: [Qemu-devel] [RFC PATCH-for-4.1 v4 3/3] hw/ssi/xilinx_spips: Avoid out-of-bound access to lqspi_buf[]

2019-07-05 Thread Francisco Iglesias
Hi Philippe, On [2019 Jul 05] Fri 22:25:00, Philippe Mathieu-Daudé wrote: > Both lqspi_read() and lqspi_load_cache() expect a 32-bit > aligned address. > > Set MemoryRegionOps.impl values to force 32-bit accesses, > this way we are sure we do not access the lqspi_buf[] array > out of bound. The

Re: [Qemu-devel] [PATCH 6/7] target/i386: add VMX features

2019-07-05 Thread Eduardo Habkost
On Sat, Jul 06, 2019 at 12:42:22AM +0200, Paolo Bonzini wrote: > On 06/07/19 00:33, Eduardo Habkost wrote: > > Oh, that's the info I was missing. I always expected > > kvm_arch_get_supported_*() to be subject to change (depending on > > KVM and hardware capabilities), and not be part of guest ABI.

[Qemu-devel] [PULL v6 36/42] i386: Replace -noTSX, -IBRS, -IBPB CPU models with aliases

2019-07-05 Thread Eduardo Habkost
The old CPU models will be just aliases for specific versions of the original CPU models. Signed-off-by: Eduardo Habkost Message-Id: <20190628002844.24894-7-ehabk...@redhat.com> Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 601 ++---

[Qemu-devel] [PULL v6 40/42] numa: Make deprecation warnings conditional on !qtest_enabled()

2019-07-05 Thread Eduardo Habkost
This will help us avoid spurious warnings during "make check". Note that this will silence the warnings generated by tests/numa-test, but not the ones generated by tests/bios-tables-test. We still need to change tests/bios-tables-test to use "-numa ...,memdev=" to silence these warnings. Signed-

[Qemu-devel] [PULL v6 34/42] i386: Register versioned CPU models

2019-07-05 Thread Eduardo Habkost
Add support for registration of multiple versions of CPU models. The existing CPU models will be registered with a "-v1" suffix. The -noTSX, -IBRS, and -IBPB CPU model variants will become versions of the original models in a separate patch, so make sure we register no versions for them. Signed-

[Qemu-devel] [PULL v6 39/42] i386: Add Cascadelake-Server-v2 CPU model

2019-07-05 Thread Eduardo Habkost
Add new version of Cascadelake-Server CPU model, setting stepping=5 and enabling the IA32_ARCH_CAPABILITIES MSR with some flags. The new feature will introduce a new host software requirement, breaking our CPU model runnability promises. This means we can't enable the new CPU model version by def

Re: [Qemu-devel] [PATCH 6/7] target/i386: add VMX features

2019-07-05 Thread Eduardo Habkost
On Sat, Jul 06, 2019 at 12:12:49AM +0200, Paolo Bonzini wrote: > On 05/07/19 23:22, Eduardo Habkost wrote: > >> +switch (index) { > >> +case MSR_IA32_VMX_TRUE_PINBASED_CTLS: > >> +default1 = 0x0016; > >> +break; > >> +case MSR_IA32_VMX_TRUE_PROCBASED_CTLS: > >> +

[Qemu-devel] [PULL v6 30/42] i386: Introduce SnowRidge CPU model

2019-07-05 Thread Eduardo Habkost
From: Paul Lai SnowRidge CPU supports Accelerator Infrastrcture Architecture (MOVDIRI, MOVDIR64B), CLDEMOTE and SPLIT_LOCK_DISABLE. MOVDIRI, MOVDIR64B, and CLDEMOTE are found via CPUID. The availability of SPLIT_LOCK_DISABLE is check via msr access References can be found in either: https://so

Re: [Qemu-devel] [PATCH-for-4.1 v4 1/3] hw/ssi/xilinx_spips: Convert lqspi_read() to read_with_attrs

2019-07-05 Thread Francisco Iglesias
On [2019 Jul 05] Fri 22:24:58, Philippe Mathieu-Daudé wrote: > In the next commit we will implement the write_with_attrs() > handler. To avoid using different APIs, convert the read() > handler first. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias > --- > v4: Do not

[Qemu-devel] [PULL v6 28/42] vl.c: Add -smp, dies=* command line support and update doc

2019-07-05 Thread Eduardo Habkost
From: Like Xu For PC target, users could configure the number of dies per one package via command line with this patch, such as "-smp dies=2,cores=4". The parsing rules of new cpu-topology model obey the same restrictions/logic as the legacy socket/core/thread model especially on missing values

[Qemu-devel] [PULL v6 42/42] tests: use -numa memdev option in tests instead of legacy 'mem' option

2019-07-05 Thread Eduardo Habkost
From: Igor Mammedov it will test preferred memdev option more extensively and remove undesired deprecation warnings during 'make check' Signed-off-by: Igor Mammedov Message-Id: <20190702140745.27767-3-imamm...@redhat.com> [ehabkost: remove numa-test.c changes] Signed-off-by: Eduardo Habkost --

[Qemu-devel] [PULL v6 29/42] qmp: Add deprecation information to query-machines

2019-07-05 Thread Eduardo Habkost
Export machine type deprecation status through the query-machines QMP command. With this, libvirt and management software will be able to show this information to users and/or suggest changes to VM configuration to avoid deprecated machines. Signed-off-by: Eduardo Habkost Message-Id: <2019060823

[Qemu-devel] [PULL v6 37/42] i386: Make unversioned CPU models be aliases

2019-07-05 Thread Eduardo Habkost
This will make unversioned CPU models behavior depend on the machine type: * "pc-*-4.0" and older will not report them as aliases. This is done to keep compatibility with older QEMU versions after management software starts translating aliases. * "pc-*-4.1" will translate unversioned CPU mode

[Qemu-devel] [PULL v6 21/42] i386: Don't print warning if phys-bits was set automatically

2019-07-05 Thread Eduardo Habkost
If cpu->host_phys_bits_limit is set, QEMU will make cpu->phys_bits be lower than host_phys_bits on some cases. This triggers a warning that was supposed to be printed only if phys-bits was explicitly set in the command-line. Reorder the code so the value of cpu->phys_bits is validated before the

[Qemu-devel] [PULL v6 20/42] deprecate -mem-path fallback to anonymous RAM

2019-07-05 Thread Eduardo Habkost
From: Igor Mammedov Fallback might affect guest or worse whole host performance or functionality if backing file were used to share guest RAM with another process. Patch deprecates fallback so that we could remove it in future and ensure that QEMU will provide expected behavior and fail if it ca

[Qemu-devel] [PULL v6 38/42] docs: Deprecate CPU model runnability guarantees

2019-07-05 Thread Eduardo Habkost
Document that CPU model runnability guarantees won't apply to unversioned CPU models anymore. Signed-off-by: Eduardo Habkost Message-Id: <20190628002844.24894-9-ehabk...@redhat.com> Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- qemu-deprecated.texi | 19 +++

[Qemu-devel] [PULL v6 41/42] numa: allow memory-less nodes when using memdev as backend

2019-07-05 Thread Eduardo Habkost
From: Igor Mammedov QEMU fails to start if memory-less node is present when memdev is used qemu-system-x86_64 -object memory-backend-ram,id=ram0,size=128M \ -numa node -numa node,memdev=ram0 with error: "memdev option must be specified for either all or no nodes" which w

[Qemu-devel] [PULL v6 19/42] hppa: Delete unused hppa_cpu_list() function

2019-07-05 Thread Eduardo Habkost
hppa_cpu_list() is dead code and is never called. Delete it. Cc: Richard Henderson Reviewed-by: Igor Mammedov Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Eduardo Habkost Message-Id: <20190517191332.23400-1-ehabk...@redhat.com> Acked-by: Richard Hender

[Qemu-devel] [PULL v6 35/42] i386: Define -IBRS, -noTSX, -IBRS versions of CPU models

2019-07-05 Thread Eduardo Habkost
Add versions of CPU models that are equivalent to their -IBRS, -noTSX and -IBRS variants. The separate variants will eventually be removed and become aliases for these CPU versions. Signed-off-by: Eduardo Habkost Message-Id: <20190628002844.24894-6-ehabk...@redhat.com> Reviewed-by: Daniel P. Ber

[Qemu-devel] [PULL v6 15/42] pc: fix possible NULL pointer dereference in pc_machine_get_device_memory_region_size()

2019-07-05 Thread Eduardo Habkost
From: Igor Mammedov QEMU will crash when device-memory-region-size property is read if ms->device_memory wasn't initialized yet. Crash can be reproduced with: $QEMU -preconfig -qmp unix:qmp_socket,server,nowait & ./scripts/qmp/qom-get -s qmp_socket /machine.device-memory-region-size Instead

[Qemu-devel] [PULL v6 18/42] numa: deprecate implict memory distribution between nodes

2019-07-05 Thread Eduardo Habkost
From: Igor Mammedov Implicit RAM distribution between nodes has exactly the same issues as: "numa: deprecate 'mem' parameter of '-numa node' option" only with QEMU being the user that's 'adding' 'mem' parameter. Deprecate it, to get it out of the way so that we could consolidate guest RAM allo

Re: [Qemu-devel] [PATCH 1/7] target/i386: handle filtered_features in a new function mark_unavailable_features

2019-07-05 Thread Eduardo Habkost
On Sat, Jul 06, 2019 at 12:07:29AM +0200, Paolo Bonzini wrote: > On 05/07/19 23:44, Eduardo Habkost wrote: > > On Fri, Jul 05, 2019 at 11:32:07PM +0200, Paolo Bonzini wrote: > >> On 05/07/19 22:37, Eduardo Habkost wrote: > >>> Filtering and reporting is separate because > >>> x86_cpu_filter_feature

[Qemu-devel] [PULL v6 33/42] i386: Get model-id from CPU object on "-cpu help"

2019-07-05 Thread Eduardo Habkost
When introducing versioned CPU models, the string at X86CPUDefinition::model_id might not be the model-id we'll really use. Instantiate a CPU object and check the model-id property on "-cpu help" Signed-off-by: Eduardo Habkost Message-Id: <20190628002844.24894-4-ehabk...@redhat.com> Reviewed-by:

[Qemu-devel] [PULL v6 10/42] vl.c: Replace smp global variables with smp machine properties

2019-07-05 Thread Eduardo Habkost
From: Like Xu The global smp variables in vl.c are completely replaced with machine properties. Form this commit, the smp_cpus/smp_cores/smp_threads/max_cpus are deprecated and only machine properties within MachineState are fully applied and enabled. Signed-off-by: Like Xu Reviewed-by: Alist

[Qemu-devel] [PULL v6 17/42] numa: deprecate 'mem' parameter of '-numa node' option

2019-07-05 Thread Eduardo Habkost
From: Igor Mammedov The parameter allows to configure fake NUMA topology where guest VM simulates NUMA topology but not actually getting performance benefits from it. The same or better results could be achieved using 'memdev' parameter. Beside of unpredictable performance, '-numa node.mem' optio

[Qemu-devel] [PULL v6 32/42] i386: Add x-force-features option for testing

2019-07-05 Thread Eduardo Habkost
Add a new option that can be used to disable feature flag filtering. This will allow CPU model compatibility test cases to work without host hardware dependencies. Signed-off-by: Eduardo Habkost Message-Id: <20190628002844.24894-3-ehabk...@redhat.com> Reviewed-by: Daniel P. Berrangé Signed-off-

[Qemu-devel] [PULL v6 31/42] qmp: Add "alias-of" field to query-cpu-definitions

2019-07-05 Thread Eduardo Habkost
Management software will be expected to resolve CPU model name aliases using the new field. Signed-off-by: Eduardo Habkost Message-Id: <20190628002844.24894-2-ehabk...@redhat.com> Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- qapi/machine-target.json | 9 - 1 file

[Qemu-devel] [PULL v6 12/42] hw/i386: Adjust nr_dies with configured smp_dies for PCMachine

2019-07-05 Thread Eduardo Habkost
From: Like Xu To support multiple dies configuration on PCMachine, the best place to set CPUX86State->nr_dies with requested PCMachineState->smp_dies is in pc_new_cpu() and pc_cpu_pre_plug(). Refactoring pc_new_cpu() is applied and redundant parameter "const char *typename" would be removed. Sug

[Qemu-devel] [PULL v6 25/42] i386: Remove unused host_cpudef variable

2019-07-05 Thread Eduardo Habkost
The variable is completely unused, probably a leftover from previous code clean up. Signed-off-by: Eduardo Habkost Message-Id: <20190625050008.12789-3-ehabk...@redhat.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 6 -- 1 file changed, 6 del

[Qemu-devel] [PULL v6 16/42] machine: show if CLI option '-numa node, mem' is supported in QAPI schema

2019-07-05 Thread Eduardo Habkost
From: Igor Mammedov Legacy '-numa node,mem' option has a number of issues and mgmt often defaults to it. Unfortunately it's no possible to replace it with an alternative '-numa memdev' without breaking migration compatibility. What's possible though is to deprecate it, keeping option working with

[Qemu-devel] [PULL v6 27/42] machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse()

2019-07-05 Thread Eduardo Habkost
From: Like Xu To make smp_parse() more flexible and expansive, a smp_parse function pointer is added to MachineClass that machine types could override. The generic smp_parse() code in vl.c is moved to hw/core/machine.c, and become the default implementation of MachineClass::smp_parse. A PC-speci

[Qemu-devel] [PULL v6 09/42] hw: Replace global smp variables with MachineState for all remaining archs

2019-07-05 Thread Eduardo Habkost
From: Like Xu The global smp variables in alpha/hppa/mips/openrisc/sparc*/xtensa codes are replaced with smp properties from MachineState. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR replace it on the spot if it's only used

[Qemu-devel] [PULL v6 23/42] i386: make 'hv-spinlocks' a regular uint32 property

2019-07-05 Thread Eduardo Habkost
From: Roman Kagan X86CPU.hv-spinlocks is a uint32 property that has a special setter validating the value to be no less than 0xFFF and no bigger than UINT_MAX. The latter check is redundant; as for the former, there appears to be no reason to prohibit the user from setting it to a lower value.

[Qemu-devel] [PULL v6 03/42] general: Replace global smp variables with smp machine properties

2019-07-05 Thread Eduardo Habkost
From: Like Xu Basically, the context could get the MachineState reference via call chains or unrecommended qdev_get_machine() in !CONFIG_USER_ONLY mode. A local variable of the same name would be introduced in the declaration phase out of less effort OR replace it on the spot if it's only used o

[Qemu-devel] [PULL v6 14/42] i386: Update new x86_apicid parsing rules with die_offset support

2019-07-05 Thread Eduardo Habkost
From: Like Xu In new sockets/dies/cores/threads model, the apicid of logical cpu could imply die level info of guest cpu topology thus x86_apicid_from_cpu_idx() need to be refactored with #dies value, so does apicid_*_offset(). To keep semantic compatibility, the legacy pkg_offset which helps to

[Qemu-devel] [PULL v6 26/42] target/i386: Add CPUID.1F generation support for multi-dies PCMachine

2019-07-05 Thread Eduardo Habkost
From: Like Xu The CPUID.1F as Intel V2 Extended Topology Enumeration Leaf would be exposed if guests want to emulate multiple software-visible die within each package. Per Intel's SDM, the 0x1f is a superset of 0xb, thus they can be generated by almost same code as 0xb except die_offset setting.

[Qemu-devel] [PULL v6 24/42] x86/cpu: use FeatureWordArray to define filtered_features

2019-07-05 Thread Eduardo Habkost
From: Wei Yang Use the same definition as features/user_features in CPUX86State. Signed-off-by: Wei Yang Message-Id: <20190620023746.9869-1-richardw.y...@linux.intel.com> Signed-off-by: Eduardo Habkost --- target/i386/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t

[Qemu-devel] [PULL v6 22/42] i386: Fix signedness of hyperv_spinlock_attempts

2019-07-05 Thread Eduardo Habkost
The current default value for hv-spinlocks is 0x (meaning "never retry"). However, the value is stored as a signed integer, making the getter of the hv-spinlocks QOM property return -1 instead of 0x. Fix this by changing the type of X86CPU::hyperv_spinlock_attempts to uint32_t. T

[Qemu-devel] [PULL v6 05/42] hw/riscv: Replace global smp variables with machine smp properties

2019-07-05 Thread Eduardo Habkost
From: Like Xu The global smp variables in riscv are replaced with smp machine properties. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR replace it on the spot if it's only used once. No semantic changes. Signed-off-by: Like

[Qemu-devel] [PULL v6 08/42] hw/arm: Replace global smp variables with machine smp properties

2019-07-05 Thread Eduardo Habkost
From: Like Xu The global smp variables in arm are replaced with smp machine properties. The init_cpus() and *_create_rpu() are refactored to pass MachineState. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR replace it on the s

[Qemu-devel] [PULL v6 13/42] i386/cpu: Consolidate die-id validity in smp context

2019-07-05 Thread Eduardo Habkost
From: Like Xu The field die_id (default as 0) and has_die_id are introduced to X86CPU. Following the legacy smp check rules, the die_id validity is added to the same contexts as leagcy smp variables such as hmp_hotpluggable_cpus(), machine_set_cpu_numa_node(), cpu_slot_to_string() and pc_cpu_pre_

[Qemu-devel] [PULL v6 07/42] hw/i386: Replace global smp variables with machine smp properties

2019-07-05 Thread Eduardo Habkost
From: Like Xu The global smp variables in i386 are replaced with smp machine properties. To avoid calling qdev_get_machine() as much as possible, some related funtions for acpi data generations are refactored. No semantic changes. A local variable of the same name would be introduced in the decl

[Qemu-devel] [PULL v6 02/42] machine: Refactor smp-related call chains to pass MachineState

2019-07-05 Thread Eduardo Habkost
From: Like Xu To get rid of the global smp_* variables we're currently using, it's recommended to pass MachineState in the list of incoming parameters for functions that use global smp variables, thus some redundant parameters are dropped. It's applied for legacy smbios_*(), *_machine_reset(), ho

[Qemu-devel] [PULL v6 04/42] hw/ppc: Replace global smp variables with machine smp properties

2019-07-05 Thread Eduardo Habkost
From: Like Xu The global smp variables in ppc are replaced with smp machine properties. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR replace it on the spot if it's only used once. No semantic changes. Signed-off-by: Like Xu

[Qemu-devel] [PULL v6 11/42] i386: Add die-level cpu topology to x86CPU on PCMachine

2019-07-05 Thread Eduardo Habkost
From: Like Xu The die-level as the first PC-specific cpu topology is added to the leagcy cpu topology model, which has one die per package implicitly and only the numbers of sockets/cores/threads are configurable. In the new model with die-level support, the total number of logical processors (i

[Qemu-devel] [PULL v6 00/42] Machine and x86 queue, 2019-07-05

2019-07-05 Thread Eduardo Habkost
Changes v5 -> v6: * Rebase and solve conflicts with other pull requests (for the 4th time) * Included Cascadelake-Server-v2 update Changes v4 -> v5: * Rebase and solve conflicts with commit 374f63f6810a ("Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2019-07-02-v2' into stagin

[Qemu-devel] [PULL v6 06/42] hw/s390x: Replace global smp variables with machine smp properties

2019-07-05 Thread Eduardo Habkost
From: Like Xu The global smp variables in s390x are replaced with smp machine properties. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR replace it on the spot if it's only used once. No semantic changes. Signed-off-by: Like

[Qemu-devel] [PULL v6 01/42] hw/boards: Add struct CpuTopology to MachineState

2019-07-05 Thread Eduardo Habkost
From: Like Xu The cpu topology property CpuTopology is added to the MachineState and its members are initialized with the leagcy global smp variables. >From this commit, the code in the system emulation mode is supposed to use cpu topology variables from MachineState instead of the global ones d

Re: [Qemu-devel] [PATCH 6/7] target/i386: add VMX features

2019-07-05 Thread Paolo Bonzini
On 05/07/19 23:22, Eduardo Habkost wrote: >> +switch (index) { >> +case MSR_IA32_VMX_TRUE_PINBASED_CTLS: >> +default1 = 0x0016; >> +break; >> +case MSR_IA32_VMX_TRUE_PROCBASED_CTLS: >> +default1 = 0x0401e172; >> +break; >> +case MSR_IA32_VMX_TRUE_

Re: [Qemu-devel] [PATCH 1/7] target/i386: handle filtered_features in a new function mark_unavailable_features

2019-07-05 Thread Paolo Bonzini
On 05/07/19 23:44, Eduardo Habkost wrote: > On Fri, Jul 05, 2019 at 11:32:07PM +0200, Paolo Bonzini wrote: >> On 05/07/19 22:37, Eduardo Habkost wrote: >>> Filtering and reporting is separate because >>> x86_cpu_filter_features() is also called from a QMP command >>> handler that is not supposed to

Re: [Qemu-devel] [PATCH 2/7] target/i386: introduce generic feature dependency mechanism

2019-07-05 Thread Paolo Bonzini
On 05/07/19 23:41, Eduardo Habkost wrote: +for (i = 0; i < ARRAY_SIZE(feature_dependencies); i++) { +FeatureDep *d = &feature_dependencies[i]; +if ((env->user_features[d->from] & d->from_flag) && +!(env->features[d->from] & d->from_flag)) { >>> Wh

Re: [Qemu-devel] [PATCH 1/7] target/i386: handle filtered_features in a new function mark_unavailable_features

2019-07-05 Thread Eduardo Habkost
On Fri, Jul 05, 2019 at 11:32:07PM +0200, Paolo Bonzini wrote: > On 05/07/19 22:37, Eduardo Habkost wrote: > > Filtering and reporting is separate because > > x86_cpu_filter_features() is also called from a QMP command > > handler that is not supposed to generate any warnings on stderr > > (query-c

Re: [Qemu-devel] [PATCH 2/7] target/i386: introduce generic feature dependency mechanism

2019-07-05 Thread Eduardo Habkost
On Fri, Jul 05, 2019 at 11:12:11PM +0200, Paolo Bonzini wrote: > On 05/07/19 22:52, Eduardo Habkost wrote: > >> +typedef struct FeatureDep { > >> +uint16_t from, to; > > > > Why uint16_t and not FeatureWord? > > Ok. > > >> +uint64_t from_flag, to_flags; > > > > There are other parts of

Re: [Qemu-devel] [PATCH 1/7] target/i386: handle filtered_features in a new function mark_unavailable_features

2019-07-05 Thread Paolo Bonzini
On 05/07/19 22:37, Eduardo Habkost wrote: > Filtering and reporting is separate because > x86_cpu_filter_features() is also called from a QMP command > handler that is not supposed to generate any warnings on stderr > (query-cpu-model-expansion). But that one should not set check_cpuid or enforce_

Re: [Qemu-devel] [PULL 4/4] Makefile: Reuse all's recursion machinery for clean and install

2019-07-05 Thread Christian Borntraeger
This seems to break "make clean" and "make distclean" in the source directory if there was never a configure. qemu]$ make clean LD recurse-clean.mo cc: fatal error: no input files compilation terminated. make: *** [rules.mak:118: recurse-clean.mo] Error 1 On 02.07.19 13:34, Markus Armbr

Re: [Qemu-devel] [PATCH 6/7] target/i386: add VMX features

2019-07-05 Thread Eduardo Habkost
On Tue, Jul 02, 2019 at 05:01:20PM +0200, Paolo Bonzini wrote: > Add code to convert the VMX feature words back into MSR values, > allowing the user to enable/disable VMX features as they wish. The same > infrastructure enables support for limiting VMX features in named > CPU models. > > Signed-o

[Qemu-devel] [PATCH 3/4] target/i386: kvm: Save nested-state only in case vCPU have set VMXON region

2019-07-05 Thread Liran Alon
Having (nested_state->hdr.vmx.vmxon_pa != -1ull) signals that vCPU have set at some point in time a VMXON region. Note that even though when vCPU enters SMM mode it temporarily exit VMX operation, KVM still reports (vmxon_pa != -1ull). Therefore, this field can be used as a reliable indicator on w

[Qemu-devel] [PATCH 1/4] target/i386: kvm: Init nested-state for VMX when vCPU expose VMX

2019-07-05 Thread Liran Alon
Reviewed-by: Joao Martins Signed-off-by: Liran Alon --- target/i386/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index e4b4f5756a34..b57f873ec9e8 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -1714,7 +1714,7 @@ int kv

Re: [Qemu-devel] [PATCH 2/7] target/i386: introduce generic feature dependency mechanism

2019-07-05 Thread Paolo Bonzini
On 05/07/19 22:52, Eduardo Habkost wrote: >> +typedef struct FeatureDep { >> +uint16_t from, to; > > Why uint16_t and not FeatureWord? Ok. >> +uint64_t from_flag, to_flags; > > There are other parts of the code that take a > FeatureWord/uint32_t pair (which will become uint64_t). I'd w

[Qemu-devel] [PATCH 2/4] target/i386: kvm: Init nested-state for vCPU exposed with SVM

2019-07-05 Thread Liran Alon
Reviewed-by: Joao Martins Signed-off-by: Liran Alon --- target/i386/cpu.h | 5 + target/i386/kvm.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 93345792f4cb..cdb0e43676a9 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1867,6 +

[Qemu-devel] [PATCH 4/4] target/i386: kvm: Demand nested migration kernel capabilities only when vCPU may have enabled VMX

2019-07-05 Thread Liran Alon
Previous to this change, a vCPU exposed with VMX running on a kernel without KVM_CAP_NESTED_STATE or KVM_CAP_EXCEPTION_PAYLOAD resulted in adding a migration blocker. This was because when code was written it was thought there is no way to reliabely know if a vCPU is utilising VMX or not at runt

[Qemu-devel] [PATCH-for-4.1 v4 0/3] hw/ssi/xilinx_spips: Avoid NULL pointer deference

2019-07-05 Thread Philippe Mathieu-Daudé
v1: https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg01238.html v2: https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg01586.html v3: https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg01657.html v4 - address Francisco comments from v3 - RFC avoid out-of-bound Philippe Mathieu-

[Qemu-devel] [RFC PATCH-for-4.1 v4 3/3] hw/ssi/xilinx_spips: Avoid out-of-bound access to lqspi_buf[]

2019-07-05 Thread Philippe Mathieu-Daudé
Both lqspi_read() and lqspi_load_cache() expect a 32-bit aligned address. Set MemoryRegionOps.impl values to force 32-bit accesses, this way we are sure we do not access the lqspi_buf[] array out of bound. Signed-off-by: Philippe Mathieu-Daudé --- Late friday patch... hw/ssi/xilinx_spips.c | 4

[Qemu-devel] [PATCH 0/4] target/i386: kvm: Various nested-state fixes

2019-07-05 Thread Liran Alon
Hi, This series is just a bunch of small fixes to recent QEMU nested-state migration support. 1st and 2nd patch can be considered as trivial refactoring patches. 3rd patch fixes a bug of requiring to save VMX nested-state when it is not needed. 4rd patch removes migration blocker when vCPU is e

Re: [Qemu-devel] [PATCH v2 RFC] qemu-nbd: Permit TLS with Unix sockets

2019-07-05 Thread Eric Blake
On 7/5/19 4:31 AM, Max Reitz wrote: > On 04.07.19 00:47, Eric Blake wrote: >> Although you generally won't use encryption with a Unix socket (after >> all, everything is local, so why waste the CPU power), there are >> situations in testsuites where Unix sockets are much nicer than TCP >> sockets.

[Qemu-devel] [PATCH-for-4.1 v4 2/3] hw/ssi/xilinx_spips: Avoid AXI writes to the LQSPI linear memory

2019-07-05 Thread Philippe Mathieu-Daudé
Lei Sun found while auditing the code that a CPU write would trigger a NULL pointer dereference. >From UG1085 datasheet [*] AXI writes in this region are ignored and generates an AXI Slave Error (SLVERR). Fix by implementing the write_with_attrs() handler. Return MEMTX_ERROR when the region is ac

Re: [Qemu-devel] [PULL 00/12] Misc bugfixes for QEMU hard freeze

2019-07-05 Thread Paolo Bonzini
On 05/07/19 21:50, Paolo Bonzini wrote: > The following changes since commit 68d7ff0cff0c4905802104843cf0100543b47314: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2019-06-21 13:32:10 +0100) > > are available in the git repository at: > > > git://git

[Qemu-devel] [PULL 08/12] minikconf: do not include variables from MINIKCONF_ARGS in config-all-devices.mak

2019-07-05 Thread Paolo Bonzini
When minikconf writes config-devices.mak, it includes all variables including those from MINIKCONF_ARGS. This causes values from config-host.mak to "stick" to the ones used in generating config-devices.mak, because config-devices.mak is included after config-host.mak. Avoid this by omitting assi

[Qemu-devel] [PULL 03/12] i386/kvm: Fix build with -m32

2019-07-05 Thread Paolo Bonzini
From: Max Reitz find_next_bit() takes a pointer of type "const unsigned long *", but the first argument passed here is a "uint64_t *". These types are incompatible when compiling qemu with -m32. Just use ctz64() instead. Fixes: c686193072a47032d83cb4e131dc49ae30f9e5d Signed-off-by: Max Reitz

[Qemu-devel] [PULL 10/12] Makefile: generate header file with the list of devices enabled

2019-07-05 Thread Paolo Bonzini
From: Julio Montes v2: generate config-devices.h which contains the list of devices enabled Message-Id: <20190705143554.10295-1-julio.mon...@intel.com> Signed-off-by: Paolo Bonzini Signed-off-by: Julio Montes --- Makefile.target | 4 scripts/create_config | 2 ++ 2 files changed, 6

[Qemu-devel] [PULL 06/12] ioapic: clear irq_eoi when updating the ioapic redirect table entry

2019-07-05 Thread Paolo Bonzini
From: Li Qiang irq_eoi is used to count the number of irq injected during eoi broadcast. It should be set to 0 when updating the ioapic's redirect table entry. Suggested-by: Peter Xu Signed-off-by: Li Qiang Reviewed-by: Peter Xu Message-Id: <20190624151635.22494-1-liq...@163.com> Signed-off-b

[Qemu-devel] [PULL 11/12] hw/i386: Fix linker error when ISAPC is disabled

2019-07-05 Thread Paolo Bonzini
From: Julio Montes v2: include config-devices.h to use CONFIG_IDE_ISA Message-Id: <20190705143554.10295-2-julio.mon...@intel.com> Signed-off-by: Paolo Bonzini Signed-off-by: Julio Montes --- hw/i386/pc_piix.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/

Re: [Qemu-devel] [PATCH 2/7] target/i386: introduce generic feature dependency mechanism

2019-07-05 Thread Eduardo Habkost
On Tue, Jul 02, 2019 at 05:01:16PM +0200, Paolo Bonzini wrote: > Sometimes a CPU feature does not make sense unless another is > present. In the case of VMX features, KVM does not even allow > setting the VMX controls to some invalid combinations. > > Therefore, this patch adds a generic mechanis

[Qemu-devel] [PULL 00/12] Misc bugfixes for QEMU hard freeze

2019-07-05 Thread Paolo Bonzini
The following changes since commit 39d1b92b810793e02558e05efa23059f67520bc9: Merge remote-tracking branch 'remotes/bkoppelmann2/tags/pull-tricore-20190625' into staging (2019-07-01 13:47:21 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream

[Qemu-devel] [PULL 04/12] intel_iommu: Fix incorrect "end" for vtd_address_space_unmap

2019-07-05 Thread Paolo Bonzini
From: Yan Zhao IOMMUNotifier is with inclusive ranges, so we should check against (VTD_ADDRESS_SIZE(s->aw_bits) - 1). Signed-off-by: Yan Zhao [peterx: split from another bigger patch] Reviewed-by: Eric Auger Signed-off-by: Peter Xu Message-Id: <20190624091811.30412-2-pet...@redhat.com> Signed

[Qemu-devel] [PATCH v3 1/2] Makefile: generate header file with the list of devices enabled

2019-07-05 Thread Paolo Bonzini
From: Julio Montes v2: generate config-devices.h which contains the list of devices enabled Message-Id: <20190705143554.10295-1-julio.mon...@intel.com> Signed-off-by: Paolo Bonzini Signed-off-by: Julio Montes --- Makefile.target | 4 scripts/create_config | 2 ++ 2 files changed, 6

[Qemu-devel] [PULL 05/12] intel_iommu: Fix unexpected unmaps during global unmap

2019-07-05 Thread Paolo Bonzini
From: Peter Xu This is an replacement work of Yan Zhao's patch: https://www.mail-archive.com/qemu-devel@nongnu.org/msg625340.html vtd_address_space_unmap() will do proper page mask alignment to make sure each IOTLB message will have correct masks for notification messages (2^N-1), but sometimes

[Qemu-devel] [PATCH-for-4.1 v4 1/3] hw/ssi/xilinx_spips: Convert lqspi_read() to read_with_attrs

2019-07-05 Thread Philippe Mathieu-Daudé
In the next commit we will implement the write_with_attrs() handler. To avoid using different APIs, convert the read() handler first. Signed-off-by: Philippe Mathieu-Daudé --- v4: Do not ignore lqspi_read() return value (Francisco) --- hw/ssi/xilinx_spips.c | 23 +++ 1 file c

[Qemu-devel] [PATCH v3 2/2] hw/i386: Fix linker error when ISAPC is disabled

2019-07-05 Thread Paolo Bonzini
From: Julio Montes v2: include config-devices.h to use CONFIG_IDE_ISA Message-Id: <20190705143554.10295-2-julio.mon...@intel.com> Signed-off-by: Paolo Bonzini Signed-off-by: Julio Montes --- hw/i386/pc_piix.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/

Re: [Qemu-devel] [PATCH 1/7] target/i386: handle filtered_features in a new function mark_unavailable_features

2019-07-05 Thread Eduardo Habkost
On Tue, Jul 02, 2019 at 05:01:15PM +0200, Paolo Bonzini wrote: > The next patch will add a different reason for filtering features, unrelated > to host feature support. Extract a new function that takes care of disabling > the features and reporting them. > > Signed-off-by: Paolo Bonzini > --- >

[Qemu-devel] [PATCH v3 0/2] hw/i386: Fix linker error when ISAPC is disabled

2019-07-05 Thread Paolo Bonzini
v3 fixes the issue pointed out by Patchew and Philippe. Julio Montes (2): Makefile: generate header file with the list of devices enabled hw/i386: Fix linker error when ISAPC is disabled Makefile.target | 4 hw/i386/pc_piix.c | 12 +--- scripts/create_config | 2 ++

[Qemu-devel] [PATCH v3 18/18] block/backup: loosen restriction on readonly bitmaps

2019-07-05 Thread John Snow
With the "never" sync policy, we actually can utilize readonly bitmaps now. Loosen the check at the QMP level, and tighten it based on provided arguments down at the job creation level instead. Reviewed-by: Max Reitz Signed-off-by: John Snow --- block/backup.c | 6 ++ blockdev.c | 2 +-

[Qemu-devel] [PULL 12/12] ioapic: use irq number instead of vector in ioapic_eoi_broadcast

2019-07-05 Thread Paolo Bonzini
From: Li Qiang When emulating irqchip in qemu, such as following command: x86_64-softmmu/qemu-system-x86_64 -m 1024 -smp 4 -hda /home/test/test.img -machine kernel-irqchip=off --enable-kvm -vnc :0 -device edu -monitor stdio We will get a crash with following asan output: (qemu) /home/test/qemu

[Qemu-devel] [PATCH v3 17/18] iotests: add test 257 for bitmap-mode backups

2019-07-05 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/257 | 409 +++ tests/qemu-iotests/257.out | 2199 tests/qemu-iotests/group |1 + 3 files changed, 2609 insertions(+) create mode 100755 tests/qemu-iotests/257 create mode 100644 tests/qemu-iotest

[Qemu-devel] [PULL 07/12] target/i386: fix feature check in hyperv-stub.c

2019-07-05 Thread Paolo Bonzini
From: Alex Bennée Commit 2d384d7c8 broken the build when built with: configure --without-default-devices --disable-user The reason was the conversion of cpu->hyperv_synic to cpu->hyperv_synic_kvm_only although the rest of the patch introduces a feature checking mechanism. So I've fixed the KV

[Qemu-devel] [PULL 09/12] target/i386: kvm: Fix when nested state is needed for migration

2019-07-05 Thread Paolo Bonzini
From: Liran Alon When vCPU is in VMX operation and enters SMM mode, it temporarily exits VMX operation but KVM maintained nested-state still stores the VMXON region physical address, i.e. even when the vCPU is in SMM mode then (nested_state->hdr.vmx.vmxon_pa != -1ull). Therefore, there is no nee

  1   2   3   4   >