[Qemu-devel] [PATCH] pc: pcihp: avoid adding ACPI_PCIHP_PROP_BSEL twice

2016-08-03 Thread Igor Mammedov
gnore error returned by object_property_add_uint32_ptr() and abort QEMU since it's programming error which should be fixed instead of being ignored. Signed-off-by: Igor Mammedov Reported-by: Marc-André Lureau --- hw/acpi/pcihp.c | 10 -- hw/i386/acpi-build.c | 4 ++-- 2 files changed, 2 insertio

Re: [Qemu-devel] [PATCH] pc: pcihp: avoid adding ACPI_PCIHP_PROP_BSEL twice

2016-08-03 Thread Igor Mammedov
On Wed, 3 Aug 2016 11:17:11 +0300 Marcel Apfelbaum wrote: > On 08/03/2016 11:04 AM, Igor Mammedov wrote: > > PCI hotplug for bridges was introduced only since 2.0 however > > acpi_set_bsel()->object_property_add_uint32_ptr(bus, ACPI_PCIHP_PROP_BSEL) > > didn't ta

[Qemu-devel] [PATCH for-2.8 02/18] acpi: provide _PXM method for CPU devices if QEMU is started numa enabled

2016-08-05 Thread Igor Mammedov
numa node. Signed-off-by: Igor Mammedov Reviewed-by: Marcel Apfelbaum --- v3: - use numa_get_node_for_cpu() instead of duplicating lookup code - added comment in code blaming linux --- hw/acpi/cpu.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/acpi/cpu.c b/hw/acpi/

[Qemu-devel] [PATCH for-2.8 01/18] numa: reduce code duplication by adding helper numa_get_node_for_cpu()

2016-08-05 Thread Igor Mammedov
Replace repeated pattern for (i = 0; i < nb_numa_nodes; i++) { if (test_bit(idx, numa_info[i].node_cpu)) { ... break; with a helper function to lookup numa node index for cpu. Suggested-by: Michael S. Tsirkin Signed-off-by: Igor Mammedov Reviewed-by: Da

[Qemu-devel] [PATCH for-2.8 04/18] linux-headers: update to v4.8-rc1

2016-08-05 Thread Igor Mammedov
From: root Signed-off-by: Radim Krčmář --- linux-headers/linux/kvm.h | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index e60e21b..aa7f587 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kv

[Qemu-devel] [PATCH for-2.8 03/18] tests: acpi: extend cphp testcase with numa check

2016-08-05 Thread Igor Mammedov
so it would be possible to verify _PXM generation in DSDT and SRAT tables. Signed-off-by: Igor Mammedov Reviewed-by: Marcel Apfelbaum --- NOTE to maintainer: SRAT table is included in patch as it doesn't have any chance for conflicts compared to often changing DSDT following table blobs s

[Qemu-devel] [PATCH for-2.8 00/18] pc: q35: x2APIC support in kvm_apic mode

2016-08-05 Thread Igor Mammedov
WIP branch, that should be posted separately/on top of this But even without above kernel boots in x2APIC mode Igor Mammedov (17): numa: reduce code duplication by adding helper numa_get_node_for_cpu() acpi: provide _PXM method for CPU devices if QEMU is started numa enabled tests: acpi: e

[Qemu-devel] [PATCH for-2.8 07/18] acpi: cphp: support x2APIC entry in cpu._MAT

2016-08-05 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 902f5c9..5ac89fe 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -531,6 +531,11 @@ void build_cpus_aml(Aml *table, MachineState *machine

[Qemu-devel] [PATCH for-2.8 09/18] pc: leave max apic_id_limit only in legacy cpu hotplug code

2016-08-05 Thread Igor Mammedov
that's enough to make old code that depends on it to prevent QEMU starting with more than 255 CPUs. Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug.c | 7 ++- hw/i386/pc.c | 7 --- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/acpi/cpu_hotplug.c

[Qemu-devel] [PATCH for-2.8 05/18] pc: acpi: x2APIC support for MADT table

2016-08-05 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/acpi/acpi-defs.h | 18 +++ hw/i386/acpi-build.c| 78 +++-- 2 files changed, 72 insertions(+), 24 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h index 41c1d95

[Qemu-devel] [PATCH for-2.8 08/18] acpi: cphp: force switch to modern cpu hotplug if APIC ID > 254

2016-08-05 Thread Igor Mammedov
Switch to modern cpu hotplug at machine startup time if a cpu present at boot has apic-id in range unsupported by legacy cpu hotplug interface (i.e. > 254), to avoid killing QEMU from legacy cpu hotplug code with error: "acpi: invalid cpu id: #apic-id#" Signed-off-by: Igor Mamm

[Qemu-devel] [PATCH for-2.8 11/18] pc: apic_common: restore APIC ID to initial ID on reset

2016-08-05 Thread Igor Mammedov
APIC ID should be restored to initial APIC ID state after Reset and Power-On. Signed-off-by: Igor Mammedov --- hw/intc/apic_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index 125af9d..e246cf3 100644 --- a/hw/intc/apic_common.c +++ b

[Qemu-devel] [PATCH for-2.8 10/18] pc: apic_common: extend APIC ID property to 32bit

2016-08-05 Thread Igor Mammedov
ACPI ID is 32 bit wide on CPUs with x2APIC support. Extend 'id' property to support it. Signed-off-by: Igor Mammedov --- include/hw/i386/apic_internal.h | 3 ++- target-i386/cpu.h | 1 + hw/intc/apic_common.c | 40 +++- t

[Qemu-devel] [PATCH for-2.8 06/18] pc: acpi: x2APIC support for SRAT table

2016-08-05 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- rebase on top in 2.7 + updated cpu PXM patches --- include/hw/acpi/acpi-defs.h | 11 +++ hw/i386/acpi-build.c| 34 -- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h b

[Qemu-devel] [PATCH for-2.8 15/18] increase MAX_CPUMASK_BITS from 255 to 288

2016-08-05 Thread Igor Mammedov
so that it would be possible to increase maxcpus limit for x86 target. Keep spapr/virt_arm at limit they used to have 255. Signed-off-by: Igor Mammedov --- include/sysemu/sysemu.h | 2 +- hw/arm/virt.c | 2 +- hw/ppc/spapr.c | 2 +- 3 files changed, 3 insertions(+), 3

[Qemu-devel] [PATCH for-2.8 13/18] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode

2016-08-05 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/kvm_i386.h | 1 + hw/i386/kvm/apic.c | 13 +++-- target-i386/kvm.c | 14 ++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm_i386.h b/target-i386/kvm_i386.h index 42b00af..dad0dcf 100644

[Qemu-devel] [PATCH for-2.8 16/18] pc: add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs

2016-08-05 Thread Igor Mammedov
. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c2cd5bd..2b5581a 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1235,9 +1235,11 @@ void pc_machine_done(Notifier *notifier, void

[Qemu-devel] [PATCH for-2.8 12/18] pc: apic_common: reset APIC ID to initial ID when switching into x2APIC mode

2016-08-05 Thread Igor Mammedov
SDM: x2APIC State Transitions: State Changes From xAPIC Mode to x2APIC Mode " Any APIC ID value written to the memory-mapped local APIC ID register is not preserved " Signed-off-by: Igor Mammedov --- hw/intc/apic_common.c | 5 + 1 file changed, 5 insertions(+) diff --git

[Qemu-devel] [PATCH for-2.8 17/18] pc: add 2.8 machine

2016-08-05 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/compat.h | 2 ++ include/hw/i386/pc.h | 4 hw/i386/pc_piix.c| 16 hw/i386/pc_q35.c | 13 +++-- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/include/hw/compat.h b/include/hw/compat.h index

[Qemu-devel] [PATCH for-2.8 14/18] pc: clarify FW_CFG_MAX_CPUS usage comment

2016-08-05 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 1ca5323..c2cd5bd 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -744,17 +744,15 @@ static FWCfgState *bochs_bios_init

[Qemu-devel] [PATCH for-2.8 18/18] pc: q35: bump max_cpus to 288

2016-08-05 Thread Igor Mammedov
along with it for machine versions 2.6 and older keep it at 255 and also freeze that limit at 255 for pc_piix4 machine as it won't be getting more than 255 CPUs. Signed-off-by: Igor Mammedov --- v2: - make 288 cpus available only since q35-2.8 machine type --- hw/i386/pc.c | 2 +- hw

Re: [Qemu-devel] [PATCH] debugcon: Add -debugport option to allow changing debug console port number

2016-08-05 Thread Igor Mammedov
On Fri, 5 Aug 2016 18:19:39 +0800 Lv Zheng wrote: > Changing debugcon port to 0x402 allows the seabios AML table pre-defined > DBUG() control method to be able to dump the AML debugging information to > the re-directed debugging console. > > If the debug port number is configurable, users can f

Re: [Qemu-devel] [PATCH] spapr: Correctly set query_hotpluggable_cpus hook based on machine version

2016-08-08 Thread Igor Mammedov
On Fri, 5 Aug 2016 20:21:59 +0530 Bharata B Rao wrote: > On Fri, Aug 05, 2016 at 05:50:29PM +1000, David Gibson wrote: > > Prior to c8721d3 "spapr: Error out when CPU hotplug is attempted on older > > pseries machines", attempting to use query-hotpluggable-cpus on pseries-2.6 > > and earlier mach

Re: [Qemu-devel] [PATCH for-2.8 00/18] pc: q35: x2APIC support in kvm_apic mode

2016-08-08 Thread Igor Mammedov
On Mon, 8 Aug 2016 15:41:23 +0800 Chao Gao wrote: > HI, everyone. > > We have done some tests after merging this patch set into the lastest qemu > master. In kvm aspect, we use the lastest kvm linux-next branch. Here are > some problems we have met. > > 1. We can't boot up a 288 vcpus linux gue

Re: [Qemu-devel] [PATCH v2] ACPI: Enable AML DBUG() control method

2016-08-08 Thread Igor Mammedov
On Mon, 8 Aug 2016 15:26:59 +0800 Lv Zheng wrote: > This patch enables DBUG() control method, making it independent of seabios. > > DBUG() is defined in the default DSDT, and is used to dump the AML > debugging information to the debug port. Thus it can be used by the ACPI > open source communi

Re: [Qemu-devel] [PATCH] ACPI: Add -acpifadt to allow FADT revision changes

2016-08-08 Thread Igor Mammedov
On Mon, 8 Aug 2016 15:28:33 +0800 Lv Zheng wrote: > This patch allows FADT to be built with different revisions. When the revision > is greater than 1.0, 64-bit address fields may also be filled. > > Note that FADT revision 2 has never been defined by the ACPI specification. So > this patch onl

Re: [Qemu-devel] [PATCH for-2.8 16/18] pc: add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs

2016-08-08 Thread Igor Mammedov
On Sun, 7 Aug 2016 09:02:33 +0300 "Michael S. Tsirkin" wrote: > On Fri, Aug 05, 2016 at 11:46:15AM +0200, Igor Mammedov wrote: > > Currently firmware uses 1 byte at 0x5F offset in RTC CMOS > > to get number of CPUs present at boot. However 1 byte is > > not enou

Re: [Qemu-devel] [PATCH] docs: add cpu-hotplug.txt

2016-08-08 Thread Igor Mammedov
On Mon, 8 Aug 2016 10:28:02 +0800 Dou Liyang wrote: > This document describes how to use cpu hotplug in QEMU. > > Signed-off-by: Dou Liyang > --- > docs/cpu-hotplug.txt | 110 > +++ > 1 file changed, 110 insertions(+) > create mode 100644 docs/

Re: [Qemu-devel] [PATCH for-2.8 00/18] pc: q35: x2APIC support in kvm_apic mode

2016-08-09 Thread Igor Mammedov
On Tue, 9 Aug 2016 11:23:58 +0800 Chao Gao wrote: > On Mon, Aug 08, 2016 at 11:18:20AM +0200, Igor Mammedov wrote: > >On Mon, 8 Aug 2016 15:41:23 +0800 > >Chao Gao wrote: > > > >> HI, everyone. > >> > >> We have done some tests after merging

Re: [Qemu-devel] [PATCH for-2.8 00/18] pc: q35: x2APIC support in kvm_apic mode

2016-08-09 Thread Igor Mammedov
On Mon, 8 Aug 2016 16:57:14 +0800 Peter Xu wrote: > On Mon, Aug 08, 2016 at 03:41:23PM +0800, Chao Gao wrote: > > HI, everyone. > > > > We have done some tests after merging this patch set into the lastest qemu > > master. In kvm aspect, we use the lastest kvm linux-next branch. Here are > > som

Re: [Qemu-devel] [PATCH for-2.8 00/18] pc: q35: x2APIC support in kvm_apic mode

2016-08-10 Thread Igor Mammedov
On Tue, 9 Aug 2016 21:35:04 +0800 Peter Xu wrote: > On Tue, Aug 09, 2016 at 10:28:41AM +0200, Igor Mammedov wrote: > > On Mon, 8 Aug 2016 16:57:14 +0800 > > Peter Xu wrote: > > > > > On Mon, Aug 08, 2016 at 03:41:23PM +0800, Chao Gao wrote: > > > &

Re: [Qemu-devel] [PULL 14/15] tb hash: track translated blocks with qht

2016-08-10 Thread Igor Mammedov
On Fri, 10 Jun 2016 07:26:52 -0700 Richard Henderson wrote: This patch make SIGSEGVs QEMU when debugging KVM guest with gdb Steps to reproduce: Seabios: clone and build current master with defconfig plus CONFIG_RELOCATE_INIT=n on top of it QEMU: ./configure --enable-debug --target-lis

Re: [Qemu-devel] [PATCH v4 00/16] pc: add CPU hot-add/hot-remove with device_add/device_del

2016-08-10 Thread Igor Mammedov
On Wed, 10 Aug 2016 15:56:24 +0200 Eduardo Otubo wrote: > On Tue, Jul 19, 2016 at 12=59=36AM +0300, Michael S. Tsirkin wrote: > > On Thu, Jul 14, 2016 at 06:54:29PM +0200, Igor Mammedov wrote: > > > Changelog: > > > > So for pc and apic bits: > >

Re: [Qemu-devel] [PATCH] correctly handle resize of empty hash tree

2016-08-10 Thread Igor Mammedov
This fixes regression caused by commit 909eaac9bbc that I've reported today: "Re: [Qemu-devel] [PULL 14/15] tb hash: track translated blocks with qht" On Tue, 9 Aug 2016 15:05:36 -1000 "Brent W. Baccala" wrote: > Hi - > > This is a bug report that includes a patch. My understanding of your

Re: [Qemu-devel] [PATCH] qht: support resetting an uninitialized qht

2016-08-11 Thread Igor Mammedov
passing uninitialized qht's to qht_reset() and qht_reset_size(), > just like we do with qht_statistics_init(). > > Reported-by: Brent Baccala > Reported-by: Igor Mammedov > Signed-off-by: Emilio G. Cota > --- > include/qemu/qht.h | 7 +++ > tests/test-qht.c | 3

Re: [Qemu-devel] [PATCH] correctly handle resize of empty hash tree

2016-08-11 Thread Igor Mammedov
On Wed, 10 Aug 2016 17:19:48 +0200 Paolo Bonzini wrote: CCing original author, here is his varinat how to fix it https://www.mail-archive.com/qemu-devel@nongnu.org/msg391790.html > On 10/08/2016 03:05, Brent W. Baccala wrote: > > Hi - > > > > This is a bug report that includes a patch. My und

Re: [Qemu-devel] [PATCH for-2.8 00/18] pc: q35: x2APIC support in kvm_apic mode

2016-08-11 Thread Igor Mammedov
On Thu, 11 Aug 2016 13:10:57 +0800 Peter Xu wrote: > On Wed, Aug 10, 2016 at 10:51:51AM +0200, Igor Mammedov wrote: > > [...] > > > > > Upstream guest kernel 4.7.0+ (d52bd54db) crashes when booting with irq > > > > remapping on: > > > >

Re: [Qemu-devel] [PATCH v5 2/2] ACPI: Add -acpitable fadt= to allow FADT revision changes

2016-08-11 Thread Igor Mammedov
On Thu, 11 Aug 2016 17:36:45 +0800 Lv Zheng wrote: > This patch allows FADT to be built with different revisions. When the revision > is greater than 1.0, 64-bit address fields may also be filled. > > Note that FADT revision 2 has never been defined by the ACPI specification. So > this patch onl

Re: [Qemu-devel] [PATCH v5 1/2] ACPI: Cleanup -acpitable option code

2016-08-12 Thread Igor Mammedov
On Thu, 11 Aug 2016 17:36:38 +0800 Lv Zheng wrote: > In -acpitable options, at least/most one data/file sub-option is mandatory, > this patch cleans up the code to reflect this in a managed manner so that > the follow-up mandatory sub-options can be added to -acpitable. > > Signed-off-by: Lv Zhe

Re: [Qemu-devel] [PATCH v5 2/2] ACPI: Add -acpitable fadt= to allow FADT revision changes

2016-08-12 Thread Igor Mammedov
On Fri, 12 Aug 2016 00:47:04 + "Zheng, Lv" wrote: > Hi, Igor > > Thanks for the review. > > > From: Igor Mammedov [mailto:imamm...@redhat.com] > > Subject: Re: [PATCH v5 2/2] ACPI: Add -acpitable fadt= to allow FADT > > revision changes > >

Re: [Qemu-devel] [PATCH v2 0/8] nvdimm: hotplug support

2016-08-12 Thread Igor Mammedov
On Fri, 12 Aug 2016 09:35:12 +0100 Stefan Hajnoczi wrote: > On Fri, Aug 12, 2016 at 02:54:02PM +0800, Xiao Guangrong wrote: > > This patchset is against commit c597dc90fbcd6 (virtio-net: allow increasing > > rx queue siz) on pci branch of Michael's git tree and can be found at: > > https://

Re: [Qemu-devel] [PATCH 1/2] pc: fix regression introduced by adding 2.8 machine

2016-09-16 Thread Igor Mammedov
On Thu, 15 Sep 2016 18:18:46 +0300 "Michael S. Tsirkin" wrote: > On Thu, Sep 15, 2016 at 11:19:09AM -0300, Eduardo Habkost wrote: > > On Wed, Sep 14, 2016 at 12:01:49PM +0200, Igor Mammedov wrote: > > > commit (a4d3c834 pc: Add 2.8 machine) didn't amme

Re: [Qemu-devel] [PATCH 2/2] target-i386: turn off CPU.l3-cache only for 2.7 and older machine types

2016-09-16 Thread Igor Mammedov
On Thu, 15 Sep 2016 11:23:47 -0300 Eduardo Habkost wrote: > On Wed, Sep 14, 2016 at 12:01:50PM +0200, Igor Mammedov wrote: > > commit (14c985cff target-i386: present virtual L3 cache info for vcpus) > > misplaced compat property putting it in new 2.8 machine type > > which

[Qemu-devel] [PATCH v2 1/3] pc: clean up COMPAT macroses chaining

2016-09-19 Thread Igor Mammedov
Since commit bacc344c ("machine: add properties to compat_props incrementaly") there is no need to chain per machine type compat macroses. Clean up places where it was done anyway so it will be consistent and won't confuse contributors during addtion of new machine types. Sign

[Qemu-devel] [PATCH v2 0/3] pc: compat macroses fixes/cleanups

2016-09-19 Thread Igor Mammedov
Changes since v1: - drop 'pc: fix regression introduced by adding 2.8 machine' it's not needed - cleanup old style compat chaining - add missing HW_COMPAT_2_8 to PC_COMPAT_2_8 machine type ref to v1: https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg03140.html I

[Qemu-devel] [PATCH v2 2/3] target-i386: turn off CPU.l3-cache only for 2.7 and older machine types

2016-09-19 Thread Igor Mammedov
released 2.8 to have feature enabled by default. Signed-off-by: Igor Mammedov Reviewed-by: Marcel Apfelbaum --- include/hw/i386/pc.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index b0a61f3..29a6c9b 100644 --- a/include/hw

[Qemu-devel] [PATCH v2 3/3] add stub HW_COMPAT_2_8 to PC_COMPAT_2_8

2016-09-19 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/compat.h | 2 ++ include/hw/i386/pc.h | 1 + 2 files changed, 3 insertions(+) diff --git a/include/hw/compat.h b/include/hw/compat.h index a1d6694..ddbb2c4 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -1,6 +1,8 @@ #ifndef

Re: [Qemu-devel] [PATCH v2 2/3] target-i386: turn off CPU.l3-cache only for 2.7 and older machine types

2016-09-20 Thread Igor Mammedov
On Mon, 19 Sep 2016 13:58:48 -0300 Eduardo Habkost wrote: > On Mon, Sep 19, 2016 at 10:32:34AM +0200, Igor Mammedov wrote: > > commit (14c985cff target-i386: present virtual L3 cache info for vcpus) > > misplaced compat property putting it in new 2.8 machine type > > which

Re: [Qemu-devel] [PATCH v2 1/8] acpi nvdimm: fix wrong buffer size returned by DSM method

2016-09-20 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:03 +0800 Xiao Guangrong wrote: > Currently, 'RLEN' is the totally buffer size written by QEMU and it is > ACPI internally used only. The buffer size returned to guest should > not include 'RLEN' itself Do you see any errors in guest with this bug present? It would be nic

Re: [Qemu-devel] [PATCH v2 1/8] acpi nvdimm: fix wrong buffer size returned by DSM method

2016-09-20 Thread Igor Mammedov
On Tue, 20 Sep 2016 18:14:48 +0300 "Michael S. Tsirkin" wrote: > On Tue, Sep 20, 2016 at 04:07:57PM +0200, Igor Mammedov wrote: > > As sanity check I'd suggest to extract nvdimm ssdt in guest, decompile and > > compile it back. > > Currently I can't comp

Re: [Qemu-devel] [PATCH] monitor: fix crash for platforms without a CPU 0

2016-09-21 Thread Igor Mammedov
t; Longer term we want to allow CPU 0 unplug, this patch is an early step in > allowing this, by removing an assumption in the monitor code that CPU 0 > always exists. > > Signed-off-by: Cédric Le Goater > [dwg: Rewrote commit message to better explain background] > Signed-off-b

Re: [Qemu-devel] [PATCH v2 2/8] nvdimm acpi: prebuild nvdimm devices for available slots

2016-09-21 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:04 +0800 Xiao Guangrong wrote: > For each NVDIMM present or intended to be supported by platform, > platform firmware also exposes an ACPI Namespace Device under > the root device > > So it builds nvdimm devices for all slots to support vNVDIMM hotplug > > Signed-off-b

Re: [Qemu-devel] [PATCH v12 00/27] IOMMU: Enable interrupt remapping for Intel IOMMU

2016-09-22 Thread Igor Mammedov
On Thu, 14 Jul 2016 13:56:09 +0800 Peter Xu wrote: > This is v12 for Intel IR. Rebased to lastest master, with some tiny > tweaks from v11. Please check changelog below. Hi Peter, While testing current master 9b8595bc with merged IR remapping and default IDE disk as following: qemu-system-x86_

[Qemu-devel] [PATCH v2 06/14] pc: leave max apic_id_limit only in legacy cpu hotplug code

2016-09-22 Thread Igor Mammedov
that's enough to make old code that depends on it to prevent QEMU starting with more than 255 CPUs. Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug.c | 7 ++- hw/i386/pc.c | 7 --- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/acpi/cpu_hotplug.c

[Qemu-devel] [PATCH v2 02/14] pc: acpi: x2APIC support for MADT table

2016-09-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/acpi/acpi-defs.h | 18 +++ hw/i386/acpi-build.c| 78 +++-- 2 files changed, 72 insertions(+), 24 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h index 41c1d95

[Qemu-devel] [PATCH v2 03/14] pc: acpi: x2APIC support for SRAT table

2016-09-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- rebase on top in 2.7 + updated cpu PXM patches --- include/hw/acpi/acpi-defs.h | 11 +++ hw/i386/acpi-build.c| 34 -- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h b

[Qemu-devel] [PATCH v2 07/14] pc: apic_common: extend APIC ID property to 32bit

2016-09-22 Thread Igor Mammedov
ACPI ID is 32 bit wide on CPUs with x2APIC support. Extend 'id' property to support it. Signed-off-by: Igor Mammedov --- include/hw/i386/apic_internal.h | 3 ++- target-i386/cpu.h | 1 + hw/intc/apic_common.c | 40 +++- t

[Qemu-devel] [PATCH v2 11/14] pc: clarify FW_CFG_MAX_CPUS usage comment

2016-09-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f1c1013..f807932 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -746,17 +746,15 @@ static FWCfgState *bochs_bios_init

[Qemu-devel] [PATCH v2 12/14] increase MAX_CPUMASK_BITS from 255 to 288

2016-09-22 Thread Igor Mammedov
so that it would be possible to increase maxcpus limit for x86 target. Keep spapr/virt_arm at limit they used to have 255. Signed-off-by: Igor Mammedov --- include/sysemu/sysemu.h | 2 +- hw/arm/virt.c | 2 +- hw/ppc/spapr.c | 2 +- 3 files changed, 3 insertions(+), 3

[Qemu-devel] [PATCH v2 08/14] pc: apic_common: restore APIC ID to initial ID on reset

2016-09-22 Thread Igor Mammedov
APIC ID should be restored to initial APIC ID state after Reset and Power-On. Signed-off-by: Igor Mammedov --- hw/intc/apic_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index 125af9d..e246cf3 100644 --- a/hw/intc/apic_common.c +++ b

[Qemu-devel] [PATCH v2 05/14] acpi: cphp: force switch to modern cpu hotplug if APIC ID > 254

2016-09-22 Thread Igor Mammedov
Switch to modern cpu hotplug at machine startup time if a cpu present at boot has apic-id in range unsupported by legacy cpu hotplug interface (i.e. > 254), to avoid killing QEMU from legacy cpu hotplug code with error: "acpi: invalid cpu id: #apic-id#" Signed-off-by: Igor Mamm

[Qemu-devel] [PATCH v2 04/14] acpi: cphp: support x2APIC entry in cpu._MAT

2016-09-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index c13b65c..4bdb8f0 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -529,6 +529,11 @@ void build_cpus_aml(Aml *table, MachineState *machine

[Qemu-devel] [PATCH v2 01/14] numa: reduce code duplication by adding helper numa_get_node_for_cpu()

2016-09-22 Thread Igor Mammedov
Replace repeated pattern for (i = 0; i < nb_numa_nodes; i++) { if (test_bit(idx, numa_info[i].node_cpu)) { ... break; with a helper function to lookup numa node index for cpu. Suggested-by: Michael S. Tsirkin Signed-off-by: Igor Mammedov Reviewed-by: Da

[Qemu-devel] [PATCH v2 13/14] pc: add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs

2016-09-22 Thread Igor Mammedov
. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f807932..f90db33 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1237,9 +1237,11 @@ void pc_machine_done(Notifier *notifier, void

[Qemu-devel] [PATCH v2 10/14] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode

2016-09-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/kvm_i386.h | 1 + hw/i386/kvm/apic.c | 13 +++-- target-i386/kvm.c | 14 ++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm_i386.h b/target-i386/kvm_i386.h index 42b00af..dad0dcf 100644

[Qemu-devel] [PATCH v2 14/14] pc: q35: bump max_cpus to 288

2016-09-22 Thread Igor Mammedov
along with it for machine versions 2.7 and older keep it at 255. Signed-off-by: Igor Mammedov --- v2: - make 288 cpus available only since q35-2.8 machine type --- hw/i386/pc_q35.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 0b214f2..b40d19e

[Qemu-devel] [PATCH v2 09/14] pc: apic_common: reset APIC ID to initial ID when switching into x2APIC mode

2016-09-22 Thread Igor Mammedov
SDM: x2APIC State Transitions: State Changes From xAPIC Mode to x2APIC Mode " Any APIC ID value written to the memory-mapped local APIC ID register is not preserved " Signed-off-by: Igor Mammedov --- hw/intc/apic_common.c | 5 + 1 file changed, 5 insertions(+) diff --git

[Qemu-devel] [PATCH v2 00/14] pc: q35: x2APIC support in kvm_apic mode

2016-09-22 Thread Igor Mammedov
thub.com/imammedo/qemu.git x2apic_v2 To play with the feature, one would also need x2apic enabled seabios counterpart: https://github.com/imammedo/seabios.git x2apic_v4 Igor Mammedov (14): numa: reduce code duplication by adding helper numa_get_node_for_cpu() pc: acpi: x2APIC support for MADT ta

Re: [Qemu-devel] [PATCH v2 07/14] pc: apic_common: extend APIC ID property to 32bit

2016-09-22 Thread Igor Mammedov
On Thu, 22 Sep 2016 16:37:04 +0200 Paolo Bonzini wrote: > On 22/09/2016 14:50, Igor Mammedov wrote: > > ACPI ID is 32 bit wide on CPUs with x2APIC support. > > Extend 'id' property to support it. > > > > Signed-off-by: Igor Mammedov > > --

Re: [Qemu-devel] [PATCH v2 10/14] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode

2016-09-26 Thread Igor Mammedov
On Thu, 22 Sep 2016 21:57:39 +0200 Radim Krčmář wrote: > 2016-09-22 16:36+0200, Paolo Bonzini: > > On 22/09/2016 14:50, Igor Mammedov wrote: > >> +#ifdef KVM_CAP_X2APIC_API > >> +if (kvm_check_extension(s, KVM_CAP_X2APIC_API)) { > >> +h

Re: [Qemu-devel] [PATCH v2 07/14] pc: apic_common: extend APIC ID property to 32bit

2016-09-26 Thread Igor Mammedov
On Thu, 22 Sep 2016 18:16:47 +0200 Paolo Bonzini wrote: > On 22/09/2016 18:00, Igor Mammedov wrote: > > > Why not just return initial_apic_id? This is the meaning the property > > > had before your patch. > > > > initial_apic_id is immutable but 'id

Re: [Qemu-devel] [PATCH 2/5] apic: add send_msi() to APICCommonClass

2016-09-26 Thread Igor Mammedov
On Thu, 22 Sep 2016 23:04:29 +0200 Radim Krčmář wrote: > The MMIO based interface to APIC doesn't work well with MSIs that have > upper address bits set (remapped x2APIC MSIs). A specialized interface > is a quick and dirty way to avoid the shortcoming. > > Signed-off-by: Radim Krčmář > --- >

Re: [Qemu-devel] [PATCH v2 0/3] pc: compat macroses fixes/cleanups

2016-09-27 Thread Igor Mammedov
On Mon, 19 Sep 2016 10:32:32 +0200 Igor Mammedov wrote: > Changes since v1: > - drop 'pc: fix regression introduced by adding 2.8 machine' >it's not needed > - cleanup old style compat chaining > - add missing HW_COMPAT_2_8 to PC_COMPAT_2_8 machine type Edu

Re: [Qemu-devel] [PATCH 5/5] intel_iommu: do not allow EIM without KVM support

2016-09-27 Thread Igor Mammedov
On Thu, 22 Sep 2016 23:04:32 +0200 Radim Krčmář wrote: > Cluster x2APIC cannot work without KVM's x2apic API when the maximal > APIC ID is > 8. Make the code simpler by completely forbidding EIM > without KVM's x2apic API. > > Signed-off-by: Radim Krčmář > --- > I think it the dependency wou

Re: [Qemu-devel] [PATCH v2 10/14] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode

2016-09-27 Thread Igor Mammedov
On Mon, 26 Sep 2016 11:47:38 +0200 Igor Mammedov wrote: > On Thu, 22 Sep 2016 21:57:39 +0200 > Radim Krčmář wrote: > > > 2016-09-22 16:36+0200, Paolo Bonzini: > > > On 22/09/2016 14:50, Igor Mammedov wrote: > > >> +#ifdef KVM_CAP_X2APIC_API &

Re: [Qemu-devel] [PATCH 3/5] intel_iommu: pass whole remapped addresses to apic

2016-09-27 Thread Igor Mammedov
On Thu, 22 Sep 2016 23:04:30 +0200 Radim Krčmář wrote: > The MMIO interface to APIC only allowed 8 bit addresses, which is not > enough for 32 bit addresses from EIM remapping. > Intel stored upper 24 bits in the high MSI address, so use the same > technique. The technique is also used in KVM MSI

Re: [Qemu-devel] [PATCH v2 6/7] intel_iommu: reject broken EIM

2016-09-29 Thread Igor Mammedov
On Thu, 29 Sep 2016 13:23:28 +0200 Radim Krčmář wrote: > Cluster x2APIC cannot work without KVM's x2apic API when the maximal > APIC ID is greater than 8 and only KVM's LAPIC can support x2APIC, so we > forbid other APICs and also the old KVM case with less than 9, to > simplify the code. > > Th

Re: [Qemu-devel] [PATCH v2 6/7] intel_iommu: reject broken EIM

2016-09-29 Thread Igor Mammedov
On Thu, 29 Sep 2016 15:18:36 +0200 Paolo Bonzini wrote: > On 29/09/2016 13:23, Radim Krčmář wrote: > > Cluster x2APIC cannot work without KVM's x2apic API when the maximal > > APIC ID is greater than 8 and only KVM's LAPIC can support x2APIC, so we > > forbid other APICs and also the old KVM case

Re: [Qemu-devel] [PATCH v2 3/8] nvdimm acpi: introduce _FIT

2016-09-30 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:05 +0800 Xiao Guangrong wrote: > _FIT is required for hotplug support, guest will inquire the updated > device info from it if a hotplug event is received > > As FIT buffer is not completely mapped into guest address space, so a > new function, Read FIT whose function i

Re: [Qemu-devel] [PATCH v2 4/8] nvdimm acpi: implement Read FIT function

2016-09-30 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:06 +0800 Xiao Guangrong wrote: > Read FIT whose function index is 0x is reserved by QEMU to read > the piece of FIT buffer. Please refer to docs/specs/acpi_nvdimm.txt for > detailed info Pls, squash this patch into 3/8 > > Signed-off-by: Xiao Guangrong > ---

Re: [Qemu-devel] [PATCH v2 8/8] nvdimm docs: add nvdimm Read FIT function

2016-09-30 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:10 +0800 Xiao Guangrong wrote: > Add the specification of Read FIT function should be squashed into 3/8 > > Signed-off-by: Xiao Guangrong > --- > docs/specs/acpi_nvdimm.txt | 38 +++--- > 1 file changed, 35 insertions(+), 3 deletions(-

Re: [Qemu-devel] [PATCH v2 5/8] pc-dimm: introduce prepare_unplug() callback

2016-10-03 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:07 +0800 Xiao Guangrong wrote: > We should let nvdimm acpi know which nvdimm device is being unplugged > before QEMU interrupts the guest so that nvdimm acpi can update its > FIT properly > > prepare_unplug() callback is introduced exactly for this purpose then > the be

Re: [Qemu-devel] [PATCH v2 6/8] pc: memhp: do not export nvdimm's memory via _CRS

2016-10-03 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:08 +0800 Xiao Guangrong wrote: > nvdimm's memory info can not exported via _CRS, instead, it is reported > by NFIT/FIT > > This patch let _CRS return zero for both memory address and memory size > if it is a nvdimm device inserted to the slot I'm not sure if it's right

Re: [Qemu-devel] [PATCH v2 0/8] nvdimm: hotplug support

2016-10-03 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:02 +0800 Xiao Guangrong wrote: General design issue in this series is regenerating _FIT data every time inside of _FIT read loop. The issue here is that if FIT data doesn't fit in one page RFIT would be called several times resulting in calling nvdimm_dsm_func_read_fit(

Re: [Qemu-devel] [SeaBIOS] [PATCH 5/5] [wip] sercon: initial split-output implementation

2016-10-04 Thread Igor Mammedov
On Tue, 04 Oct 2016 10:49:41 +0200 Gerd Hoffmann wrote: > Hi, > > > Interesting. I'm curious how the memory scan works, because I > > didn't think there was any way to find the vga entry point except > > from the int10 vector. > > Run the init code in emulator? > > > Were you looking to inc

Re: [Qemu-devel] [PATCH v3 1/8] apic: add global apic_get_class()

2016-10-04 Thread Igor Mammedov
On Mon, 3 Oct 2016 13:03:33 -0300 Eduardo Habkost wrote: > On Fri, Sep 30, 2016 at 06:10:06PM +0200, Radim Krčmář wrote: > > Every configuration has only up to one APIC class and we'll be extending > > the class with a function that can be called without an instanced > > object, so a direct acces

Re: [Qemu-devel] [PATCH v3 2/8] apic: add send_msi() to APICCommonClass

2016-10-04 Thread Igor Mammedov
off-by: Radim Krčmář Reviewed-by: Igor Mammedov > --- > v2: change apic_send_msi() to accept MSIMessage [Igor] > --- > hw/i386/kvm/apic.c | 19 +-- > hw/i386/xen/xen_apic.c | 6 ++ > hw/intc/apic.c | 8 ++-- > inclu

Re: [Qemu-devel] [PATCH v3 3/8] intel_iommu: pass whole remapped addresses to apic

2016-10-04 Thread Igor Mammedov
On Fri, 30 Sep 2016 18:10:08 +0200 Radim Krčmář wrote: > The MMIO interface to APIC only allowed 8 bit addresses, which is not > enough for 32 bit addresses from EIM remapping. > Intel stored upper 24 bits in the high MSI address, so use the same > technique. The technique is also used in KVM MSI

Re: [Qemu-devel] [PATCH v3 8/8] target-i386/kvm: cache the return value of kvm_enable_x2apic()

2016-10-04 Thread Igor Mammedov
On Fri, 30 Sep 2016 18:10:13 +0200 Radim Krčmář wrote: > Assume that KVM would have returned the same on subsequent runs. > Abstract the memoizaiton pattern into macros. s/memoi/memori/i Throughout whole patch > > Signed-off-by: Radim Krčmář > --- > target-i386/kvm.c | 21 +++-

Re: [Qemu-devel] [PATCH v3 4/8] intel_iommu: redo configuraton check in realize

2016-10-04 Thread Igor Mammedov
On Fri, 30 Sep 2016 18:10:09 +0200 Radim Krčmář wrote: > * there no point in configuring the device if realization is going to > fail, so move the check to the beginning, > * create a separate function for the check, > * use error_setg() instead error_report(). Reviewed-by: I

Re: [Qemu-devel] [PATCH v3 7/8] intel_iommu: keep buggy EIM enabled in 2.7 machine type

2016-10-04 Thread Igor Mammedov
On Fri, 30 Sep 2016 18:10:12 +0200 Radim Krčmář wrote: > QEMU 2.7 allowed EIM even in configurations that were forbidden in the > last patch because they were not working, like old KVM or userspace > APIC. In order to keep backward compatibility, we again allow guests to > misbehave in non-obvio

Re: [Qemu-devel] [PATCH v3 5/8] intel_iommu: add OnOffAuto intr_eim as "eim" property

2016-10-04 Thread Igor Mammedov
On Fri, 30 Sep 2016 18:10:10 +0200 Radim Krčmář wrote: > The default (auto) emulates the current behavior. > > Signed-off-by: Radim Krčmář Reviewed-by: Igor Mammedov > --- > v3: > * use error_setg [Paolo] > * shorten the code [Peter] > --- > hw/i386

Re: [Qemu-devel] [PATCH v3 6/8] intel_iommu: reject broken EIM

2016-10-04 Thread Igor Mammedov
On Fri, 30 Sep 2016 18:10:11 +0200 Radim Krčmář wrote: > Cluster x2APIC cannot work without KVM's x2apic API when the maximal > APIC ID is greater than 8 and only KVM's LAPIC can support x2APIC, so we > forbid other APICs and also the old KVM case with less than 9, to > simplify the code. > > Th

Re: [Qemu-devel] Virtual Machine Generation ID

2016-10-05 Thread Igor Mammedov
On Tue, 4 Oct 2016 15:51:40 -0700 Ed Swierk wrote: > On Thu, Sep 15, 2016 at 5:36 PM, Michael S. Tsirkin wrote: > > On Thu, Sep 15, 2016 at 05:23:28PM -0700, Ed Swierk wrote: > >> I'm wondering what it will take to finish up work on vmgenid. > >> > >> https://lists.gnu.org/archive/html/qemu-de

[Qemu-devel] [PATCH v5 2/4] acpi: provide _PXM method for CPU devices if QEMU is started numa enabled

2016-10-05 Thread Igor Mammedov
numa node. Signed-off-by: Igor Mammedov Reviewed-by: Marcel Apfelbaum --- hw/acpi/cpu.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index c13b65c..902f5c9 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -4,6 +4,7 @@ #include "qa

[Qemu-devel] [PATCH v5 3/4] tests: acpi: extend cphp testcase with numa check

2016-10-05 Thread Igor Mammedov
so it would be possible to verify _PXM generation in DSDT and SRAT tables. Signed-off-by: Igor Mammedov Reviewed-by: Marcel Apfelbaum --- NOTE to maintainer: After running rebuild-expected-aml.sh following blobs should be updated tests/acpi-test-data/pc/DSDT.cphp tests/acpi-test-data/q35

[Qemu-devel] [PATCH v5 0/4] fix numa node mapping for hotplugged CPUs

2016-10-05 Thread Igor Mammedov
st-data/pc/DSDT.cphp tests/acpi-test-data/q35/DSDT.cphp new blobs to be added tests/acpi-test-data/pc/SRAT.cphp tests/acpi-test-data/q35/SRAT.cphp Igor Mammedov (4): numa: reduce code duplication by adding helper numa_get_node_for_cpu() acpi: provide _PXM method for CPU devices if QEM

[Qemu-devel] [PATCH v5 1/4] numa: reduce code duplication by adding helper numa_get_node_for_cpu()

2016-10-05 Thread Igor Mammedov
Replace repeated pattern for (i = 0; i < nb_numa_nodes; i++) { if (test_bit(idx, numa_info[i].node_cpu)) { ... break; with a helper function to lookup numa node index for cpu. Suggested-by: Michael S. Tsirkin Signed-off-by: Igor Mammedov Reviewed-by: Da

[Qemu-devel] [PATCH v5 4/4] tests: acpi tables expected blobs update

2016-10-05 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- fill free to discard if pull req contains other changes to expected blobs --- tests/acpi-test-data/pc/DSDT.cphp | Bin 6435 -> 6471 bytes tests/acpi-test-data/pc/SRAT.cphp | Bin 0 -> 304 bytes tests/acpi-test-data/q35/DSDT.cphp | Bin 9197 -> 9233 byt

Re: [Qemu-devel] [PATCH v4 8/8] target-i386/kvm: cache the return value of kvm_enable_x2apic()

2016-10-07 Thread Igor Mammedov
On Wed, 5 Oct 2016 15:06:57 +0200 Radim Krčmář wrote: > Assume that KVM would have returned the same on subsequent runs. > Abstract the memoizaiton pattern into macros and call it memorize as > adding the r makes it less obscure. > > Signed-off-by: Radim Krčmář Reviewed-by

<    1   2   3   4   5   6   7   8   9   10   >