[Qemu-devel] [RFC PATCH] target-ppc: explicitly save page table headers in big endian

2014-10-27 Thread Cédric Le Goater
routine to write explicitly the kvm_get_htab_header structs in big endian. The ptes are left untouched. Signed-off-by: Cédric Le Goater Cc: pau...@samba.org Cc: a...@ozlabs.ru Cc: gk...@linux.vnet.ibm.com --- This patch needs to be completed by a relatively simple modification of kvm_htab_write

[Qemu-devel] [RFC PATCH 0/2] vhost: support for cross endian

2014-10-29 Thread Cédric Le Goater
These two small patches add a VHOST_VRING_F_BYTESWAP flag to the vring which will be used by the kernel to byteswap the different vring indexes. The kernel patchset can be found on the kvm@ and kvm-ppc@ mailing lists. Cédric Le Goater (2): vhost: add VHOST_VRING_F_BYTESWAP flag vhost_net

[Qemu-devel] [RFC PATCH 1/2] vhost: add VHOST_VRING_F_BYTESWAP flag

2014-10-29 Thread Cédric Le Goater
When the guest and the host have a different endian order, the data being accessed in the vring queues needs to be byteswapped. This patch adds a VHOST_VRING_F_BYTESWAP flag to inform the vhost kernel backend to byteswap vring data. Signed-off-by: Cédric Le Goater --- hw/virtio/vhost.c

[Qemu-devel] [RFC PATCH 2/2] vhost_net: re-enable when cross endian

2014-10-29 Thread Cédric Le Goater
revert 371df9f5e0f1 "vhost-net: disable when cross-endian" Signed-off-by: Cédric Le Goater --- hw/net/vhost_net.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 4e3a06162291..721fb2da52f8 100644 --- a/hw/net/v

[Qemu-devel] [PATCH] target-ppc: add extended opcodes for dcbt

2014-02-20 Thread Cédric Le Goater
and other commands, in TCG mode : invalid bits: 0200 for opcode: 1f - 16 - 08 (7e09322c) 3fff799feca0 This patch adds the extended opcodes as no-ops just like the 'dcbt' instruction. Other 'dcb*' instructions might be impacted but they have not showed up yet. S

[Qemu-devel] [PATCH v2] target-ppc: add extended opcodes for dcbt/dcbtst

2014-02-20 Thread Cédric Le Goater
and other commands, in TCG mode : invalid bits: 0200 for opcode: 1f - 16 - 08 (7e09322c) 3fff799feca0 This patch adds the extended opcodes for dcbt/dcbtst as no-ops just like the 'dcbt' instruction. Signed-off-by: Cédric Le Goater --- Changes in v2: - added extended opcodes

[Qemu-devel] [PATCH] target-ppc: explicitly save page table headers in big endian

2014-11-03 Thread Cédric Le Goater
routine to write explicitly the kvm_get_htab_header structs in big endian. The ptes are left untouched. Signed-off-by: Cédric Le Goater Cc: Paul Mackerras Cc: Alexey Kardashevskiy Cc: Gregory Kurz --- This patch needs to be completed by a relatively simple modification of kvm_htab_write() in

[Qemu-devel] [PATCH v2 3/9] ipmi: replace *_MAXCMD defines

2016-01-21 Thread Cédric Le Goater
ARRAY_SIZE() is simple to use and removes the need to pre-define the size of the command arrays. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c

[Qemu-devel] [PATCH v2 7/9] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-21 Thread Cédric Le Goater
This is a simulator. Just return an unknown cause (0). Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 7c0f2a1d9799

[Qemu-devel] [PATCH v2 0/9] ipmi: a couple of enhancements to the BMC simulator

2016-01-21 Thread Cédric Le Goater
as an extension of this patchset. (Work in progress) Based on 3db34bf64ab4 and also available here : https://github.com/legoater/qemu/commits/ipmi Thanks, Cédric Le Goater (9): ppc: add IPMI support ipmi: replace goto by a return statement ipmi: replace *_MAXCMD defines ipmi

[Qemu-devel] [PATCH v2 1/9] ppc: add IPMI support

2016-01-21 Thread Cédric Le Goater
Open PowerNV systems use a BT device to communicate with the BMC. Provide support for it. Signed-off-by: Cédric Le Goater --- default-configs/ppc64-softmmu.mak | 4 1 file changed, 4 insertions(+) diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak index

[Qemu-devel] [PATCH v2 6/9] ipmi: add get and set SENSOR_TYPE commands

2016-01-21 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 45 - 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 803c7e5130c0..7c0f2a1d9799 100644 --- a/hw

[Qemu-devel] [PATCH v2 5/9] ipmi: fix SDR length value

2016-01-21 Thread Cédric Le Goater
The IPMI BMC simulator populates the SDR table with a set of initial SDRs. The length of each SDR is taken from the record itself (byte 4) which does not include the size of the header. But, the full length (header + data) is required by the sdr_add_entry() routine. Signed-off-by: Cédric Le

[Qemu-devel] [PATCH v2 2/9] ipmi: replace goto by a return statement

2016-01-21 Thread Cédric Le Goater
. The code exits in ipmi_sim_handle_command() are a little different from the rest and a "possible" error in the macro IPMI_ADD_RSP_DATA is handled before making use of it. This might be a bit excessive as a minimum response len is currently 300 bytes and the patch checks that at least 3 are available. S

[Qemu-devel] [PATCH v2 8/9] ipmi: add ACPI power and GUID commands

2016-01-21 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- Changes since v1: - added ACPI to command names. hw/ipmi/ipmi_bmc_sim.c | 49 + 1 file changed, 49 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index e882af3f1b40..53c75cb21c1a

[Qemu-devel] [PATCH v2 4/9] ipmi: introduce a struct ipmi_sdr_compact

2016-01-21 Thread Cédric Le Goater
assumption is made on the type of SDR. This leave rooms to potential usage of other types in the future. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 65 +++--- include/hw/ipmi/ipmi.h | 44 ++ 2 files changed, 84

[Qemu-devel] [PATCH v2 9/9] ipmi: add SET_SENSOR_READING command (tentative try)

2016-01-21 Thread Cédric Le Goater
"Boot Count" sensor. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 135 + 1 file changed, 135 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 53c75cb21c1a..0aa

Re: [Qemu-devel] [PATCH v2 4/9] ipmi: introduce a struct ipmi_sdr_compact

2016-01-22 Thread Cédric Le Goater
On 01/22/2016 11:49 AM, Greg Kurz wrote: > On Thu, 21 Jan 2016 18:18:49 +0100 > Cédric Le Goater wrote: > >> Currently, sdr attributes are identified using byte offsets and this >> can be a bit confusing. >> >> This patch adds a struct ipmi_sdr_compact co

Re: [Qemu-devel] [PATCH v2 6/9] ipmi: add get and set SENSOR_TYPE commands

2016-01-22 Thread Cédric Le Goater
On 01/22/2016 12:07 PM, Greg Kurz wrote: > On Thu, 21 Jan 2016 18:18:51 +0100 > Cédric Le Goater wrote: > >> Signed-off-by: Cédric Le Goater >> Acked-by: Corey Minyard >> --- > > Reviewed-by: Greg Kurz > > Just two nits be

Re: [Qemu-devel] [PATCH v2 5/9] ipmi: fix SDR length value

2016-01-22 Thread Cédric Le Goater
On 01/22/2016 11:56 AM, Greg Kurz wrote: > On Thu, 21 Jan 2016 18:18:50 +0100 > Cédric Le Goater wrote: >> The IPMI BMC simulator populates the SDR table with a set of initial >> SDRs. The length of each SDR is taken from the record itself (byte 4) >> which does not includ

Re: [Qemu-devel] [PATCH v2 8/9] ipmi: add ACPI power and GUID commands

2016-01-22 Thread Cédric Le Goater
On 01/22/2016 12:24 PM, Greg Kurz wrote: > On Thu, 21 Jan 2016 18:18:53 +0100 > Cédric Le Goater wrote: > >> Signed-off-by: Cédric Le Goater >> --- >> >> Changes since v1: >> - added ACPI to command na

[Qemu-devel] [PATCH v3 00/10] ipmi: a couple of enhancements to the BMC simulator

2016-01-25 Thread Cédric Le Goater
4 and also available here : https://github.com/legoater/qemu/commits/ipmi Thanks, Cédric Le Goater (10): ppc: add IPMI support ipmi: replace goto by a return statement ipmi: replace *_MAXCMD defines ipmi: cleanup error_report messages ipmi: fix SDR length value ipmi: introduc

[Qemu-devel] [PATCH v3 06/10] ipmi: introduce a struct ipmi_sdr_compact

2016-01-25 Thread Cédric Le Goater
assumption is made on the type of SDR. This leave rooms to potential usage of other types in the future. Signed-off-by: Cédric Le Goater --- Changes since v2: - changed sdr_add_entry() prototype to use struct a ipmi_sdr_header hw/ipmi/ipmi_bmc_sim.c | 72

[Qemu-devel] [PATCH v3 02/10] ipmi: replace goto by a return statement

2016-01-25 Thread Cédric Le Goater
. The code exits in ipmi_sim_handle_command() are a little different from the rest and a "possible" error in the macro IPMI_ADD_RSP_DATA is handled before making use of it. This might be a bit excessive as a minimum response len is currently 300 bytes and the patch checks that at least 3 are availa

[Qemu-devel] [PATCH v3 01/10] ppc: add IPMI support

2016-01-25 Thread Cédric Le Goater
Open PowerNV systems use a BT device to communicate with the BMC. Provide support for it. Signed-off-by: Cédric Le Goater Cc: David Gibson Cc: qemu-...@nongnu.org --- default-configs/ppc64-softmmu.mak | 4 1 file changed, 4 insertions(+) diff --git a/default-configs/ppc64-softmmu.mak b

[Qemu-devel] [PATCH v3 03/10] ipmi: replace *_MAXCMD defines

2016-01-25 Thread Cédric Le Goater
ARRAY_SIZE() is simple to use and removes the need to pre-define the size of the command arrays. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz --- hw/ipmi/ipmi_bmc_sim.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b

[Qemu-devel] [PATCH v3 10/10] ipmi: add SET_SENSOR_READING command (tentative try)

2016-01-25 Thread Cédric Le Goater
"Boot Count" sensor. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Greg Kurz --- hw/ipmi/ipmi_bmc_sim.c | 135 + 1 file changed, 135 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c in

[Qemu-devel] [PATCH v3 04/10] ipmi: cleanup error_report messages

2016-01-25 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater Cc: Greg Kurz --- hw/ipmi/ipmi_bmc_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index fc596a548df7..2c540c0782c9 100644 --- a/hw/ipmi/ipmi_bmc_sim.c +++ b/hw/ipmi/ipmi_bmc_sim.c

[Qemu-devel] [PATCH v3 09/10] ipmi: add ACPI power and GUID commands

2016-01-25 Thread Cédric Le Goater
-by: Cédric Le Goater Acked-by: Corey Minyard --- Changes since v1: - added ACPI to command names. hw/ipmi/ipmi_bmc_sim.c | 49 + 1 file changed, 49 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 1b552732b

[Qemu-devel] [PATCH v3 05/10] ipmi: fix SDR length value

2016-01-25 Thread Cédric Le Goater
The IPMI BMC simulator populates the SDR table with a set of initial SDRs. The length of each SDR is taken from the record itself (byte 4) which does not include the size of the header. But, the full length (header + data) is required by the sdr_add_entry() routine. Signed-off-by: Cédric Le

[Qemu-devel] [PATCH v3 07/10] ipmi: add get and set SENSOR_TYPE commands

2016-01-25 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Greg Kurz --- hw/ipmi/ipmi_bmc_sim.c | 45 - 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 3960c2f90094

[Qemu-devel] [PATCH v3 08/10] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-25 Thread Cédric Le Goater
This is a simulator. Just return an unknown cause (0). Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Greg Kurz --- hw/ipmi/ipmi_bmc_sim.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c

Re: [Qemu-devel] [PATCH v3 01/10] ppc: add IPMI support

2016-01-25 Thread Cédric Le Goater
On 01/26/2016 06:46 AM, David Gibson wrote: > On Mon, Jan 25, 2016 at 03:07:26PM +0100, Cédric Le Goater wrote: >> Open PowerNV systems use a BT device to communicate with the BMC. >> Provide support for it. > > Given that there's quite a bit of work to be done to ma

Re: [Qemu-devel] [PATCH v4 00/17] Add an IPMI device to QEMU

2015-11-15 Thread Cédric Le Goater
On 11/12/2015 08:02 PM, miny...@acm.org wrote: > This is a long delayed patch set, but I think I have things reworked > to make Igor happy with the way ACPI and SMBIOS work. This is more > consistent with the way most other things work, anyway. It did > require adding stubs for systems without IP

Re: [Qemu-devel] [PATCH v4 03/17] ipmi: Add a local BMC simulation

2015-11-24 Thread Cédric Le Goater
A few comments below, On 11/12/2015 08:02 PM, miny...@acm.org wrote: > From: Corey Minyard > > This provides a minimal local BMC, basically enough to comply with the > spec and provide a complete watchdog timer (including a sensor, SDR, > and event). > > Signed-off-by: Corey Minyard > --- > d

Re: [Qemu-devel] [PATCH v2 05/11] block: m25p80: 4byte address mode

2016-02-04 Thread Cédric Le Goater
Hello Marcin, Some comments below On 02/04/2016 01:23 PM, marcin.krzemin...@nokia.com wrote: > From: Marcin Krzeminski > > This patch adds only 4byte address mode (does not cover dummy cycles). > This mode is needed to access more than 16 MiB of flash. > > Signed-off-by: Marcin Krzeminski >

Re: [Qemu-devel] [PATCH v2 04/11] block: m25p80: Extend address mode

2016-02-04 Thread Cédric Le Goater
On 02/04/2016 01:23 PM, marcin.krzemin...@nokia.com wrote: > From: Marcin Krzeminski > > Extend address mode allows to switch flash 16 MiB banks, > allowing user to access all flash sectors. > This access mode is used by u-boot. > > Signed-off-by: Marcin Krzeminski > Reviewed-by: Peter Crosthwa

Re: [Qemu-devel] [PATCH v2 07/11] block: m25p80: Dummy cycles for N25Q256/512

2016-02-05 Thread Cédric Le Goater
On 02/04/2016 01:23 PM, marcin.krzemin...@nokia.com wrote: > From: Marcin Krzeminski > > This patch handles dummy cycles. > > Signed-off-by: Marcin Krzeminski > --- > hw/block/m25p80.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c > index

[Qemu-devel] [PATCH 1/8] ipmi: add a realize function to the device class

2016-02-09 Thread Cédric Le Goater
This will be useful to define and use properties when the object is instanciated. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index e1ad19b8db6e

[Qemu-devel] [PATCH 3/8] ipmi: remove the need of an ending record in the SDR table

2016-02-09 Thread Cédric Le Goater
Currently, the code initializing the sdr table relies on an ending record with a recid of 0x. This patch changes the loop to use the sdr size as a breaking condition. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions

[Qemu-devel] [PATCH 4/8] ipmi: add some local variables in ipmi_sdr_init

2016-02-09 Thread Cédric Le Goater
This patch adds a couple of variables to manipulate the raw sdr entries. The const attribute is also removed on init_sdrs. This will ease the introduction of a sdr loader using a file. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 15 ++- 1 file changed, 10 insertions

[Qemu-devel] [PATCH 6/8] ipmi: provide support for FRUs

2016-02-09 Thread Cédric Le Goater
created as a default. Just enough to start some simulation. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 140 + 1 file changed, 140 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 69318eb6b556

[Qemu-devel] [PATCH 0/8] ipmi: a couple of enhancements to the BMC simulator (round 2)

2016-02-09 Thread Cédric Le Goater
platforms in some occasions. Based on e4a096b1cd43 and also available here : https://github.com/legoater/qemu/commits/ipmi Thanks, C. Cédric Le Goater (8): ipmi: add a realize function to the device class ipmi: use a function to initialize the SDR table ipmi: remove the need of an ending

[Qemu-devel] [PATCH 7/8] ipmi: introduce an ipmi_bmc_sdr_find() API

2016-02-09 Thread Cédric Le Goater
of a device tree. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 16 include/hw/ipmi/ipmi.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index b0754893fc08..c952219429f4 100644 --- a/hw/ipmi/ipmi_bmc_sim.c

[Qemu-devel] [PATCH 5/8] ipmi: use a file to load SDRs

2016-02-09 Thread Cédric Le Goater
file to use is defined through a new 'sdr' property of the simulator device. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index af

[Qemu-devel] [PATCH 2/8] ipmi: use a function to initialize the SDR table

2016-02-09 Thread Cédric Le Goater
This patch does not change anything. It only moves the code section initializing the sdrs in its own routine and prepares ground for the subsequent patches. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 49 - 1 file changed, 28

[Qemu-devel] [PATCH 8/8] ipmi: introduce an ipmi_bmc_gen_event() API

2016-02-09 Thread Cédric Le Goater
It will be used to fill the message buffer with custom events expected by some systems. Typically, an Open PowerNV platform guest is notified with an OEM SEL message before a shutdown or a reboot. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 24 include

Re: [Qemu-devel] [PATCH 0/8] ipmi: a couple of enhancements to the BMC simulator (round 2)

2016-02-10 Thread Cédric Le Goater
Hello Corey, On 02/09/2016 07:25 PM, Corey Minyard wrote: > On 02/09/2016 06:13 AM, Cédric Le Goater wrote: >> The first patches are cleanups and prepare ground for an extension of >> the BMC simulator providing a SDR loader using a file. A simple FRU >> support comes next. &

Re: [Qemu-devel] [PATCH 0/8] ipmi: a couple of enhancements to the BMC simulator (round 2)

2016-02-10 Thread Cédric Le Goater
On 02/10/2016 05:06 PM, Corey Minyard wrote: > On 02/10/2016 08:05 AM, Cédric Le Goater wrote: >> Hello Corey, >> >> On 02/09/2016 07:25 PM, Corey Minyard wrote: >>> On 02/09/2016 06:13 AM, Cédric Le Goater wrote: >>>> The first patches are cleanups and p

Re: [Qemu-devel] [PATCH 2/8] ipmi: use a function to initialize the SDR table

2016-02-15 Thread Cédric Le Goater
On 02/14/2016 09:31 AM, Marcel Apfelbaum wrote: > On 02/09/2016 02:13 PM, Cédric Le Goater wrote: >> This patch does not change anything. > > Hi, > > Well, it changes *something*, otherwise ... :) > > Maybe "This is only a re-factoring." Yes. This is much b

Re: [Qemu-devel] [PATCH 4/8] ipmi: add some local variables in ipmi_sdr_init

2016-02-15 Thread Cédric Le Goater
On 02/14/2016 09:55 AM, Marcel Apfelbaum wrote: > On 02/09/2016 02:13 PM, Cédric Le Goater wrote: >> This patch adds a couple of variables to manipulate the raw sdr >> entries. The const attribute is also removed on init_sdrs. This will >> ease the introduction of a sd

Re: [Qemu-devel] [PATCH 5/8] ipmi: use a file to load SDRs

2016-02-15 Thread Cédric Le Goater
On 02/14/2016 10:08 AM, Marcel Apfelbaum wrote: > On 02/09/2016 02:13 PM, Cédric Le Goater wrote: >> The IPMI BMC simulator populates the sdr/sensor tables with a minimal >> set of entries (Watchdog). But some qemu platforms might want to use >> extra entries for their cus

Re: [Qemu-devel] [PATCH 6/8] ipmi: provide support for FRUs

2016-02-15 Thread Cédric Le Goater
On 02/14/2016 10:25 AM, Marcel Apfelbaum wrote: > On 02/09/2016 02:13 PM, Cédric Le Goater wrote: >> This patch provides a simple FRU support for the BMC simulator. FRUs >> are loaded from a file which name is specified in the object >> properties, each entry having a fixed si

Re: [Qemu-devel] [PATCH 7/8] ipmi: introduce an ipmi_bmc_sdr_find() API

2016-02-15 Thread Cédric Le Goater
On 02/14/2016 10:30 AM, Marcel Apfelbaum wrote: > On 02/09/2016 02:13 PM, Cédric Le Goater wrote: >> This patch exposes a new IPMI routine to query a sdr entry from the >> sdr table maintained by the IPMI BMC simulator. The API is very >> similar to the internal sdr_find_entry

Re: [Qemu-devel] [PULL v2 22/45] ipmi: introduce a struct ipmi_sdr_compact

2016-02-16 Thread Cédric Le Goater
if ((cmd[2] > MAX_SENSORS) || > hw/ipmi/ipmi_bmc_sim.c:if ((cmd[2] > MAX_SENSORS) || > hw/ipmi/ipmi_bmc_sim.c:if ((cmd[2] > MAX_SENSORS) || > hw/ipmi/ipmi_bmc_sim.c:if ((cmd[2] > MAX_SENSORS) || I missed that. Here is a patch. Thanks, C. From: Cédric Le Goat

Re: [Qemu-devel] [PATCH 6/8] ipmi: provide support for FRUs

2016-02-16 Thread Cédric Le Goater
On 02/16/2016 04:38 AM, Corey Minyard wrote: > On 02/15/2016 12:40 PM, Marcel Apfelbaum wrote: >> On 02/15/2016 07:17 PM, Cédric Le Goater wrote: >>> On 02/14/2016 10:25 AM, Marcel Apfelbaum wrote: >>>> On 02/09/2016 02:13 PM, Cédric Le Goater wrote: >>>>

Re: [Qemu-devel] [PATCH v4 03/17] ipmi: Add a local BMC simulation

2015-11-26 Thread Cédric Le Goater
On 11/24/2015 08:46 PM, Corey Minyard wrote: > On 11/24/2015 07:31 AM, Cédric Le Goater wrote: >> A few comments below, > > Thanks a bunch for the review. As you probably have guessed, this was > not really intended as a fully functional BMC, though it has most of the >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/77] ppc: Add "native" POWER8 platform

2015-11-30 Thread Cédric Le Goater
On 11/28/2015 08:59 AM, Benjamin Herrenschmidt wrote: > On Fri, 2015-11-27 at 11:21 +0100, Alexander Graf wrote: >> >> How does real hardware store petitboot? If it's flash, you could pass it >> in using -pflash and thus model things even more closely and allow users >> to just take the ROM image a

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/77] ppc: Add "native" POWER8 platform

2015-11-30 Thread Cédric Le Goater
On 11/30/2015 09:09 PM, Benjamin Herrenschmidt wrote: > On Mon, 2015-11-30 at 19:15 +0100, Cédric Le Goater wrote: >> The pnor file is compiled from github. The patch is below (without the dirty >> cut and paste I did in loader.c). The offset for the PAYLOAD and BOOTKERNEL >>

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/77] ppc: Add "native" POWER8 platform

2015-12-07 Thread Cédric Le Goater
On 12/07/2015 02:25 AM, Stewart Smith wrote: > Cédric Le Goater writes: >> On 11/28/2015 08:59 AM, Benjamin Herrenschmidt wrote: >>> On Fri, 2015-11-27 at 11:21 +0100, Alexander Graf wrote: >>>> >>>> How does real hardware store petitboot? If it's

Re: [Qemu-devel] [PATCH 4/8] ipmi: add FRU support

2016-01-11 Thread Cédric Le Goater
Hello, On 01/08/2016 08:41 PM, Corey Minyard wrote: > On 01/05/2016 11:29 AM, Cédric Le Goater wrote: >> This patch provides a simplistic FRU support for the IPMI BMC >> simulator. The FRU area contains 32 entries * 256 bytes which should >> be enough to start some simulat

Re: [Qemu-devel] [PATCH 5/8] ipmi: add ACPI power and GUID commands

2016-01-11 Thread Cédric Le Goater
On 01/08/2016 08:46 PM, Corey Minyard wrote: > On 01/05/2016 11:29 AM, Cédric Le Goater wrote: >> Signed-off-by: Cédric Le Goater >> --- >> hw/ipmi/ipmi_bmc_sim.c | 55 >> ++ >> 1 file changed, 55 inserti

Re: [Qemu-devel] [PATCH 2/8] ipmi: add get and set SENSOR_TYPE commands

2016-01-11 Thread Cédric Le Goater
On 01/08/2016 09:23 PM, Corey Minyard wrote: > Acked-by: Corey Minyard > > I agree with Greg's comments, too. Me also. I will rework the code to use ARRAY_SIZE or something similar. Thanks, C. > -corey > > On 01/05/2016 11:29 AM, Cédric Le Goater wrote: >> Si

Re: [Qemu-devel] [PATCH 7/8] ipmi: introduce an ipmi_bmc_init_sensor() API

2016-01-12 Thread Cédric Le Goater
eeds are simple, but if you > need something more extensive we probably should think about something > else. > > A few comments inline, too. > > On 01/05/2016 11:30 AM, Cédric Le Goater wrote: >> This routine will let qemu platforms populate the sdr/sensor tables of &g

Re: [Qemu-devel] [PATCH 1/8] ipmi: fix SDR length value

2016-01-12 Thread Cédric Le Goater
On 01/08/2016 09:20 PM, Corey Minyard wrote: > On 01/06/2016 02:14 AM, Cédric Le Goater wrote: >> On 01/05/2016 08:59 PM, Eric Blake wrote: >>> On 01/05/2016 10:29 AM, Cédric Le Goater wrote: >>> >>> [meta-comment] Your messages were not marked in-reply-to

Re: [Qemu-devel] [PATCH 5/8] ipmi: add ACPI power and GUID commands

2016-01-18 Thread Cédric Le Goater
On 01/17/2016 01:08 PM, Marcel Apfelbaum wrote: > On 01/17/2016 02:04 PM, Marcel Apfelbaum wrote: >> On 01/05/2016 07:29 PM, Cédric Le Goater wrote: >>> Signed-off-by: Cédric Le Goater >>> --- >>> hw/ipmi/ipmi_bmc_sim.c | 55 >>> ++

Re: [Qemu-devel] [PATCH 5/8] ipmi: add ACPI power and GUID commands

2016-01-21 Thread Cédric Le Goater
On 01/21/2016 05:37 PM, Corey Minyard wrote: > On 01/17/2016 08:16 AM, Michael S. Tsirkin wrote: >> On Sun, Jan 17, 2016 at 02:04:32PM +0200, Marcel Apfelbaum wrote: >>> On 01/05/2016 07:29 PM, Cédric Le Goater wrote: >>>> Signed-off-by: Cédric Le Goater >>

Re: [Qemu-devel] [PATCH 06/12] 4byte address mode support added.

2015-12-22 Thread Cédric Le Goater
Hello Marcin, On 12/16/2015 01:57 PM, marcin.krzemin...@nokia.com wrote: > From: Marcin Krzeminski > > Signed-off-by: Marcin Krzeminski > --- > hw/block/m25p80.c | 31 --- > 1 file changed, 28 insertions(+), 3 deletions(-) > > diff --git a/hw/block/m25p80.c b/hw/b

[Qemu-devel] [PATCH 1/8] ipmi: fix SDR length value

2016-01-05 Thread Cédric Le Goater
The IPMI BMC simulator populates the SDR table with a set of initial SDRs. The length of each SDR is taken from the record itself (byte 4) which does not include the size of the header. But, the full length (header + data) is required by the sdr_add_entry() routine. Signed-off-by: Cédric Le

[Qemu-devel] [PATCH 7/8] ipmi: introduce an ipmi_bmc_init_sensor() API

2016-01-05 Thread Cédric Le Goater
... }; struct ipmi_sdr_compact *sdr = (struct ipmi_sdr_compact *) &my_init_sdrs[0]; ipmi_bmc_init_sensor(IPMI_BMC(obj), my_init_sdrs[0], sdr->rec_length + 5, &sdr->sensor_owner_number); Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 61 ++

[Qemu-devel] [PATCH 3/8] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-05 Thread Cédric Le Goater
This is a simulator. Just return an unknown cause (0). Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 061db8437479..5db94491b130 100644

[Qemu-devel] [PATCH 4/8] ipmi: add FRU support

2016-01-05 Thread Cédric Le Goater
This patch provides a simplistic FRU support for the IPMI BMC simulator. The FRU area contains 32 entries * 256 bytes which should be enough to start some simulation. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 119 + 1 file

[Qemu-devel] [PATCH 6/8] ipmi: add SET_SENSOR_READING command (tentative try)

2016-01-05 Thread Cédric Le Goater
"Boot Count" sensor. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 141 - 1 file changed, 140 insertions(+), 1 deletion(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index c3a06d0ac7e4..4f7c74da4b6b 10064

[Qemu-devel] [PATCH 8/8] ipmi: introduce an ipmi_bmc_gen_event() API

2016-01-05 Thread Cédric Le Goater
It will be used to fill the message buffer with custom events expected by some systems. Typically, an Open PowerNV platform guest is notified with an OEM SEL message before a shutdown or a reboot. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 24 include

[Qemu-devel] [PATCH 5/8] ipmi: add ACPI power and GUID commands

2016-01-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 60586a67104e..c3a06d0ac7e4 100644 --- a/hw/ipmi/ipmi_bmc_sim.c +++ b/hw/ipmi

[Qemu-devel] [PATCH 0/8] ipmi: a couple of enhancements to the BMC simulator

2016-01-05 Thread Cédric Le Goater
/legoater/qemu/commits/ipmi Thanks, Cédric Le Goater (8): ipmi: fix SDR length value ipmi: add get and set SENSOR_TYPE commands ipmi: add GET_SYS_RESTART_CAUSE chassis command ipmi: add FRU support ipmi: add ACPI power and GUID commands ipmi: add SET_SENSOR_READING command (tentative try

[Qemu-devel] [PATCH 2/8] ipmi: add get and set SENSOR_TYPE commands

2016-01-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 51 -- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 559e1398d669..061db8437479 100644 --- a/hw/ipmi/ipmi_bmc_sim.c

Re: [Qemu-devel] [PATCH 1/8] ipmi: fix SDR length value

2016-01-06 Thread Cédric Le Goater
On 01/05/2016 08:59 PM, Eric Blake wrote: > On 01/05/2016 10:29 AM, Cédric Le Goater wrote: > > [meta-comment] Your messages were not marked in-reply-to: the 0/8 cover > letter, but came through as separate threads. This makes it harder to > follow, especially in mail clients that

Re: [Qemu-devel] [PATCH 2/8] ipmi: add get and set SENSOR_TYPE commands

2016-01-06 Thread Cédric Le Goater
On 01/06/2016 10:55 AM, Greg Kurz wrote: > On Tue, 5 Jan 2016 18:29:56 +0100 > Cédric Le Goater wrote: > >> Signed-off-by: Cédric Le Goater >> --- > > Acked-by: Greg Kurz > > Just some minor comments on the form below. >

[Qemu-devel] [PATCH v2 00/10] ipmi: a couple of enhancements to the BMC simulator (round 2)

2016-03-02 Thread Cédric Le Goater
handlers - Fixed property naming - Kept the API extensions to expose SDR and generate events for later Based on 9c279bec754a and also available here : https://github.com/legoater/qemu/commits/ipmi Thanks, C. Cédric Le Goater (10): ipmi: remove IPMI_CHECK_CMD_LEN() macro ipmi

[Qemu-devel] [PATCH v2 06/10] ipmi: use a function to initialize the SDR table

2016-03-02 Thread Cédric Le Goater
This patch moves the code section initializing the sdrs in its own routine to prepare ground for changes in the subsequent patches. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 49 - 1 file changed, 28

[Qemu-devel] [PATCH v2 02/10] ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers

2016-03-02 Thread Cédric Le Goater
r routines to store byte(s) in a response buffer. rsp_buffer_push() replaces the macro IPMI_ADD_RSP_DATA() and rsp_buffer_pushmore() is new helper to push multiple bytes. The latest is used in the command handlers get_msg() and get_sdr() which are manipulating the buffer directly. Signed-off-by:

[Qemu-devel] [PATCH v2 05/10] ipmi: add a realize function to the device class

2016-03-02 Thread Cédric Le Goater
This will be useful to define and use properties when the object is instantiated. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Marcel Apfelbaum --- Changes since v1: - removed empty properties. hw/ipmi/ipmi_bmc_sim.c | 7 --- 1 file changed, 4 insertions(+), 3

[Qemu-devel] [PATCH v2 04/10] ipmi: add rsp_buffer_set_error() helper

2016-03-02 Thread Cédric Le Goater
The third byte in the response buffer of an IPMI command holds the error code. In many IPMI command handlers, this byte is updated directly. This patch adds a helper routine to clarify why this byte is being used. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 115

[Qemu-devel] [PATCH v2 09/10] ipmi: use a file to load SDRs

2016-03-02 Thread Cédric Le Goater
file to use is defined through a new 'sdr' property of the simulator device. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Marcel Apfelbaum --- Changes since v1: - log an error if file does not exist. - change property name to 'sdrfile' - add

[Qemu-devel] [PATCH v2 10/10] ipmi: provide support for FRUs

2016-03-02 Thread Cédric Le Goater
created as a default. Just enough to start some simulation. These commands complies with the IPMI spec : "34. FRU Inventory Device Commands". Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard --- Changes since v1: - change property name to 'fruareasize' and

[Qemu-devel] [PATCH v2 07/10] ipmi: remove the need of an ending record in the SDR table

2016-03-02 Thread Cédric Le Goater
Currently, the code initializing the sdr table relies on an ending record with a recid of 0x. This patch changes the loop to use the sdr size as a breaking condition. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Marcel Apfelbaum --- hw/ipmi/ipmi_bmc_sim.c | 13

[Qemu-devel] [PATCH v2 01/10] ipmi: remove IPMI_CHECK_CMD_LEN() macro

2016-03-02 Thread Cédric Le Goater
patch adds a 'cmd_len_min' attribute to the struct IPMICmdHandler defining the minimal number of arguments expected by the command and moves this check in the global command handler ipmi_sim_handle_command(). Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_s

[Qemu-devel] [PATCH v2 03/10] ipmi: remove IPMI_CHECK_RESERVATION() macro

2016-03-02 Thread Cédric Le Goater
Some IPMI command handlers in the BMC simulator use a macro IPMI_CHECK_RESERVATION() to check a SDR reservation but the macro implicitly uses local variables. This patch simply removes it. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 33 +++-- 1 file

[Qemu-devel] [PATCH v2 08/10] ipmi: add some local variables in ipmi_sdr_init

2016-03-02 Thread Cédric Le Goater
This patch adds a couple of variables to manipulate the raw sdr entries. The const attribute is also removed on init_sdrs. This will ease the introduction of a sdr loader using a file. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Marcel Apfelbaum --- hw/ipmi

Re: [Qemu-devel] [PATCH v2 02/10] ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers

2016-03-02 Thread Cédric Le Goater
On 03/02/2016 11:25 AM, Michael S. Tsirkin wrote: > On Wed, Mar 02, 2016 at 11:14:50AM +0100, Cédric Le Goater wrote: >> The IPMI command handlers in the BMC simulator use a macro >> IPMI_ADD_RSP_DATA() to push bytes in a response buffer. The macro >> hides the fact th

Re: [Qemu-devel] [PATCH v2 02/10] ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers

2016-03-02 Thread Cédric Le Goater
On 03/02/2016 07:02 PM, Michael S. Tsirkin wrote: > On Wed, Mar 02, 2016 at 06:53:08PM +0100, Cédric Le Goater wrote: >>> typedef struct RspBuffer RspBuffer; >> >> OK. So that's the rule for structs in qemu. It is not that clear >> when you look at the code arou

Re: [Qemu-devel] [PATCH v2 01/10] ipmi: remove IPMI_CHECK_CMD_LEN() macro

2016-03-07 Thread Cédric Le Goater
On 03/05/2016 12:41 PM, Corey Minyard wrote: > On 03/02/2016 04:14 AM, Cédric Le Goater wrote: >> Most IPMI command handlers in the BMC simulator start with a call to >> the macro IPMI_CHECK_CMD_LEN() which verifies that a minimal number of >> arguments expected by the command

Re: [Qemu-devel] [PATCH v2 01/10] ipmi: remove IPMI_CHECK_CMD_LEN() macro

2016-03-08 Thread Cédric Le Goater
On 03/07/2016 11:40 AM, Cédric Le Goater wrote: > On 03/05/2016 12:41 PM, Corey Minyard wrote: >> On 03/02/2016 04:14 AM, Cédric Le Goater wrote: >>> Most IPMI command handlers in the BMC simulator start with a call to >>> the macro IPMI_CHECK_CMD_LEN() which verifi

Re: [Qemu-devel] [PATCH v2 01/10] ipmi: remove IPMI_CHECK_CMD_LEN() macro

2016-03-09 Thread Cédric Le Goater
On 03/09/2016 05:07 AM, Corey Minyard wrote: > On 03/09/2016 12:06 AM, Cédric Le Goater wrote: >> On 03/07/2016 11:40 AM, Cédric Le Goater wrote: >>> On 03/05/2016 12:41 PM, Corey Minyard wrote: >>>> On 03/02/2016 04:14 AM, Cédric Le Goater wrote: >>>&

Re: [Qemu-devel] [Qemu-ppc] [PATCH 72/77] ppc: A couple more dummy POWER8 Book4 regs

2016-03-09 Thread Cédric Le Goater
On 03/02/2016 09:30 PM, Thomas Huth wrote: > On 11.11.2015 01:28, Benjamin Herrenschmidt wrote: >> WORT and PID this time >> >> Signed-off-by: Benjamin Herrenschmidt >> --- >> target-ppc/cpu.h| 2 ++ >> target-ppc/translate_init.c | 16 >> 2 files changed, 14 inserti

[Qemu-devel] [PATCH v3 07/10] ipmi: remove the need of an ending record in the SDR table

2016-03-10 Thread Cédric Le Goater
Currently, the code initializing the sdr table relies on an ending record with a recid of 0x. This patch changes the loop to use the sdr size as a breaking condition. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Marcel Apfelbaum --- hw/ipmi/ipmi_bmc_sim.c | 13

[Qemu-devel] [PATCH v3 05/10] ipmi: add a realize function to the device class

2016-03-10 Thread Cédric Le Goater
This will be useful to define and use properties when the object is instantiated. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard Reviewed-by: Marcel Apfelbaum --- Changes since v1: - removed empty properties. hw/ipmi/ipmi_bmc_sim.c |7 --- 1 file changed, 4 insertions

[Qemu-devel] [PATCH v3 00/10] ipmi: a couple of enhancements to the BMC simulator (round 2)

2016-03-10 Thread Cédric Le Goater
c279bec754a and also available here : https://github.com/legoater/qemu/commits/ipmi Thanks, C. Cédric Le Goater (10): ipmi: remove IPMI_CHECK_CMD_LEN() macro ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers ipmi: remove IPMI_CHECK_RESERVATION() macro ipmi: add rsp_buffer_set_e

[Qemu-devel] [PATCH v3 01/10] ipmi: remove IPMI_CHECK_CMD_LEN() macro

2016-03-10 Thread Cédric Le Goater
s a helper ipmi_get_handler(). Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard --- Changes since v2: - introduced ipmi_get_handler() helper. hw/ipmi/ipmi_bmc_sim.c | 164 + 1 file changed, 84 insertions(+), 80 deletions(-) I

  1   2   3   4   5   6   7   8   9   10   >