mbox series

[v3,0/4] hw/misc: Add a MMIO interface to the pvpanic device

Message ID 20181018130434.23237-1-philmd@redhat.com
Headers show
Series hw/misc: Add a MMIO interface to the pvpanic device | expand

Message

Philippe Mathieu-Daudé Oct. 18, 2018, 1:04 p.m. UTC
Hi, this series takes Peng Hao's previous work but rather than adding yet
another device, simply add the MMIO interface to the current device (which
only implements the I/O port access). 

The first patches are simple cleanups:
- patch 1 move the pvpanic device with the 'ocmmon objects' so we compile
  it once for the x86/arm/aarch64 archs,
- patch 2 simply renames ISA fields/definitions to generic ones.

Then instead of add/use the MMIO pvpanic device in the virt machine in an
unique patch, I split it in two distinct patches:
- patch 3 uses Peng Hao's work, but add the MMIO interface to the existing
  device (no logical change).
- patch 4 is Peng Hao's work in the virt machine (no logical change).

v2 from Peng Hao is:
https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg03433.html

Regards,

Phil.

Philippe Mathieu-Daudé (4):
  hw/misc/pvpanic: Build the pvpanic device in $(common-obj)
  hw/misc/pvpanic: Cosmetic renaming
  hw/misc/pvpanic: Add the MMIO interface
  hw/arm/virt: Use the pvpanic device

 default-configs/arm-softmmu.mak |  2 +-
 hw/arm/virt.c                   | 21 ++++++++++
 hw/misc/Makefile.objs           |  2 +-
 hw/misc/pvpanic.c               | 68 +++++++++++++++++++++++++++++----
 include/hw/arm/virt.h           |  1 +
 5 files changed, 84 insertions(+), 10 deletions(-)

Comments

Philippe Mathieu-Daudé Oct. 18, 2018, 1:09 p.m. UTC | #1
On 18/10/2018 15:04, Philippe Mathieu-Daudé wrote:
> Hi, this series takes Peng Hao's previous work but rather than adding yet
> another device, simply add the MMIO interface to the current device (which
> only implements the I/O port access). 
> 
> The first patches are simple cleanups:
> - patch 1 move the pvpanic device with the 'ocmmon objects' so we compile
>   it once for the x86/arm/aarch64 archs,
> - patch 2 simply renames ISA fields/definitions to generic ones.
> 
> Then instead of add/use the MMIO pvpanic device in the virt machine in an
> unique patch, I split it in two distinct patches:
> - patch 3 uses Peng Hao's work, but add the MMIO interface to the existing
>   device (no logical change).
> - patch 4 is Peng Hao's work in the virt machine (no logical change).
> 
> v2 from Peng Hao is:
> https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg03433.html
> 
> Regards,
> 
> Phil.
> 
> Philippe Mathieu-Daudé (4):
>   hw/misc/pvpanic: Build the pvpanic device in $(common-obj)
>   hw/misc/pvpanic: Cosmetic renaming

Oops I failed when rebasing, these two are supposed to be from

  Peng Hao

with below my S-o-b:
[PMD: Use TYPE_PVPANIC definition, split in 2 patches,
     improved patch subject]

>   hw/misc/pvpanic: Add the MMIO interface
>   hw/arm/virt: Use the pvpanic device
> 
>  default-configs/arm-softmmu.mak |  2 +-
>  hw/arm/virt.c                   | 21 ++++++++++
>  hw/misc/Makefile.objs           |  2 +-
>  hw/misc/pvpanic.c               | 68 +++++++++++++++++++++++++++++----
>  include/hw/arm/virt.h           |  1 +
>  5 files changed, 84 insertions(+), 10 deletions(-)
>
Peng Hao Oct. 25, 2018, 5:47 a.m. UTC | #2
>On 18/10/2018 15:04, Philippe Mathieu-Daudé wrote:
>> Hi, this series takes Peng Hao's previous work but rather than adding yet
>> another device, simply add the MMIO interface to the current device (which
>> only implements the I/O port access).
>>
>> The first patches are simple cleanups:
>> - patch 1 move the pvpanic device with the 'ocmmon objects' so we compile
>>   it once for the x86/arm/aarch64 archs,
>> - patch 2 simply renames ISA fields/definitions to generic ones.
>>
>> Then instead of add/use the MMIO pvpanic device in the virt machine in an
>> unique patch, I split it in two distinct patches:
>> - patch 3 uses Peng Hao's work, but add the MMIO interface to the existing
>>   device (no logical change).
>> - patch 4 is Peng Hao's work in the virt machine (no logical change).
>>
>> v2 from Peng Hao is:
>> https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg03433.html
>>
>> Regards,
>>
>> Phil.
>>
>> Philippe Mathieu-Daudé (4):
>>   hw/misc/pvpanic: Build the pvpanic device in $(common-obj)
>>   hw/misc/pvpanic: Cosmetic renaming
>
>Oops I failed when rebasing, these two are supposed to be from
>
>Peng Hao
>
now it can works.
In refactoring code, there is still a need to add a type to distinguish different bus device.
I add a type TYPE_PVPANIC_MMIO for sysbus pvpanic device and 
orignal TYPE_PVPANIC  for isa pvpanic deivce.

bindling-DT "qemu,pvpanic-mmio" in kernel  is in review.
I will resubmit patches.

Thanks.

>with below my S-o-b:
>[PMD: Use TYPE_PVPANIC definition, split in 2 patches,
>improved patch subject]
>
>>   hw/misc/pvpanic: Add the MMIO interface
>>   hw/arm/virt: Use the pvpanic device
>>
>>  default-configs/arm-softmmu.mak |  2 +-
>>  hw/arm/virt.c                   | 21 ++++++++++
>>  hw/misc/Makefile.objs           |  2 +-
>>  hw/misc/pvpanic.c               | 68 +++++++++++++++++++++++++++++----
>>  include/hw/arm/virt.h           |  1 +
>>  5 files changed, 84 insertions(+), 10 deletions(-)
>>