Rename for better understanding of the code.
Suggested-by: Paolo Bonzini
Signed-off-by: Wei Yang
---
migration/ram.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index c5f9f4b0ef..66792568e2 100644
--- a/migration/ram.c
+++ b
Use common helper function to check the state.
Signed-off-by: Wei Yang
---
migration/rdma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index 3036221ee8..0e73e759ca 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -3140,7
On Fri, Jul 19, 2019 at 07:05:44PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> On Tue, Jun 11, 2019 at 10:33:29AM +0200, Juan Quintela wrote:
>> >Wei Yang wrote:
>> >> On Tue, Apr 02, 2019 at 08:31:06AM +0800, Wei Ya
On Fri, Jul 19, 2019 at 04:10:02PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> migration_object_init() create and assign current_migration, which means
>> it will never be null until migration_shutdown().
>>
>&
On Fri, Jul 19, 2019 at 05:47:59PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> It would be proper to flush file even for iterable_only case.
>>
>> Signed-off-by: Wei Yang
>
>OK, I don't think this is actually ne
On Fri, Jul 19, 2019 at 05:59:50PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> in_postcopy and iterable_only are not SaveStateEntry specific, it would
>> be more proper to check them out of iteration.
>>
>> Signed-off-by:
On Fri, Jul 19, 2019 at 06:41:28PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> Even we need to do discard for each RAMBlock, we still can leverage the
>> same memory space to store the information.
>>
>> By doing so, we
On Fri, Jul 19, 2019 at 07:41:28PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> LOADVM_QUIT allows a command to quit all layers of nested loadvm loops,
>> while current return value check is not that proper even it works now.
>&g
For migration incoming side, it either quit in precopy or postcopy. It
is save to use the mis->bh for both instead of allocating a dedicated
QEMUBH for postcopy.
Signed-off-by: Wei Yang
---
migration/savevm.c | 17 -
1 file changed, 4 insertions(+), 13 deletions(-)
diff --gi
On Thu, Jul 18, 2019 at 09:04:55AM +0800, Wei Yang wrote:
>The value left in nr is the number of bits for the last word, which
>could be calculate the last word mask directly.
>
>Remove the unnecessary size.
>
May I ask why Patch 2 is picked up, but this one is not?
>Signe
On Sun, Jul 21, 2019 at 07:27:14PM +0200, Paolo Bonzini wrote:
>On 21/07/19 02:33, Wei Yang wrote:
>> On Thu, Jul 18, 2019 at 09:04:55AM +0800, Wei Yang wrote:
>>> The value left in nr is the number of bits for the last word, which
>>> could be calculate the last word ma
multifd_load_cleanup() always return 0 and never use the errp, just
cleanup a little.
Signed-off-by: Wei Yang
---
migration/migration.c | 9 ++---
migration/ram.c | 7 +++
migration/ram.h | 2 +-
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/migration
On Fri, Jul 19, 2019 at 06:41:28PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> Even we need to do discard for each RAMBlock, we still can leverage the
>> same memory space to store the information.
>>
>> By doing so, we
It is not reasonable to continue when version_id mismatch.
Signed-off-by: Wei Yang
---
migration/ram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 7e34c82a72..6bfdfae16e 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -4216,7
Two cleanup for ram_load:
* return -EINVAL for version_id mismatch
* extract ram_load_precopy for better readability
Wei Yang (2):
migration: return -EINVAL directly when version_id mismatch
migration: extract ram_load_precopy
migration/ram.c | 73
After cleanup, it would be clear to audience there are two cases
ram_load:
* precopy
* postcopy
And it is not necessary to check postcopy_running on each iteration for
precopy.
Signed-off-by: Wei Yang
---
migration/ram.c | 73 +++--
1 file
On Tue, Jul 23, 2019 at 04:42:12PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> On Fri, Jul 19, 2019 at 06:41:28PM +0100, Dr. David Alan Gilbert wrote:
>> >* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> >> Even
their users
Signed-off-by: Wei Yang
---
v2:
* make it a static variable, suggested by Dave
---
migration/postcopy-ram.c | 70 +---
migration/postcopy-ram.h | 13 +++-
migration/ram.c | 30 +++--
3 files changed, 46 insertions(+), 67
On Tue, Jul 23, 2019 at 06:23:53PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> For migration incoming side, it either quit in precopy or postcopy. It
>> is save to use the mis->bh for both instead of allocating a dedicated
>
On Tue, Jul 23, 2019 at 04:39:08PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> multifd_load_cleanup() always return 0 and never use the errp, just
>> cleanup a little.
>>
>> Signed-off-by: Wei Yang
>
>I'd rath
On Tue, Jul 23, 2019 at 05:47:03PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> After cleanup, it would be clear to audience there are two cases
>> ram_load:
>>
>> * precopy
>> * postcopy
>>
>> And it
In case we enable multifd, not forget to cleanup it.
Signed-off-by: Wei Yang
---
migration/savevm.c | 4
1 file changed, 4 insertions(+)
diff --git a/migration/savevm.c b/migration/savevm.c
index 0105068579..27eef72c9d 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1738,6
directly and do more
investigation on persistent backend setup with ndctl.
Signed-off-by: Wei Yang
---
docs/nvdimm.txt | 28
1 file changed, 28 insertions(+)
diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt
index b531cacd35..baba7a940d 100644
--- a/docs/nvdimm.txt
+++ b
t;> Here we provide two examples for persistent backend and gives the link
>> to ndctl. By doing so, user could try it directly and do more
>> investigation on persistent backend setup with ndctl.
>>
>> Signed-off-by: Wei Yang
>> ---
>> docs/nvd
t;> Here we provide two examples for persistent backend and gives the link
>> to ndctl. By doing so, user could try it directly and do more
>> investigation on persistent backend setup with ndctl.
>>
>> Signed-off-by: Wei Yang
>> ---
>> docs/nvd
On Wed, Jul 24, 2019 at 01:10:24PM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> On Tue, Jul 23, 2019 at 05:47:03PM +0100, Dr. David Alan Gilbert wrote:
>> >* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> >> After
It is not reasonable to continue when version_id mismatch.
Signed-off-by: Wei Yang
Reviewed-by: Dr. David Alan Gilbert
---
migration/ram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 66792568e2..69c8a6bb0f 100644
--- a/migration
After cleanup, it would be clear to audience there are two cases
ram_load:
* precopy
* postcopy
And it is not necessary to check postcopy_running on each iteration for
precopy.
Signed-off-by: Wei Yang
Reviewed-by: Dr. David Alan Gilbert
---
v2: fix a comment
---
migration/ram.c | 73
Two cleanup for ram_load:
* return -EINVAL for version_id mismatch
* extract ram_load_precopy for better readability
v2: fix a comment
Wei Yang (2):
migration: return -EINVAL directly when version_id mismatch
migration: extract ram_load_precopy
migration/ram.c | 73
For migration incoming side, it either quit in precopy or postcopy. It
is safe to use the mis->bh for both instead of allocating a dedicated
QEMUBH for postcopy.
Signed-off-by: Wei Yang
Reviewed-by: Dr. David Alan Gilbert
---
v2: fix a typo in change log
---
migration/savevm.c |
capability at the same time.
Signed-off-by: Wei Yang
---
migration/migration.c | 11 ---
migration/ram.c | 10 ++
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index 5a496addbd..33c373033d 100644
--- a/migration
in_postcopy and iterable_only are not SaveStateEntry specific, it would
be more proper to check them out of iteration.
Signed-off-by: Wei Yang
---
migration/savevm.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index
It would be proper to flush file even for iterable_only case.
Signed-off-by: Wei Yang
---
migration/savevm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index c0e557b4c2..becedcc1c6 100644
--- a/migration/savevm.c
+++ b/migration
This is a preparation patch for further cleanup.
No functional change, just wrap two major part of
qemu_savevm_state_complete_precopy() into function.
Signed-off-by: Wei Yang
---
migration/savevm.c | 66 ++
1 file changed, 49 insertions(+), 17
iteration.
These three patches prepare the code and move the condition check out of the
iteration.
Wei Yang (3):
migration/savevm: flush file for iterable_only case
migration/savevm: split qemu_savevm_state_complete_precopy() into two
parts
migration/savevm: move non SaveStateEntry
Here are two trivial function cleanup.
BTW, I didn't test them since TPS == HPS. How could I setup a guest with
TPS != HPS?
Wei Yang (2):
migration/postcopy: reduce one operation to calculate fixup_start_addr
migration/postcopy: do_fixup is true when host_offset is non-zero
migration/
Use the same way for run_end to calculate run_start, which saves one
operation.
Signed-off-by: Wei Yang
---
migration/ram.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 410e0f89fe..c4dc36e525 100644
--- a/migration/ram.c
This means it is not necessary to spare an extra variable to hold this
condition. Use host_offset directly is fine.
Signed-off-by: Wei Yang
---
migration/ram.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index c4dc36e525..b0ca0059c4
Even we need to do discard for each RAMBlock, we still can leverage the
same memory space to store the information.
By doing so, we avoid memory allocation and deallocation to the system
and also avoid potential failure of memory allocation which breaks the
migration.
Signed-off-by: Wei Yang
PostcopyState is already set to ADVISE at the beginning of
loadvm_postcopy_handle_advise().
Remove the redundant set.
Signed-off-by: Wei Yang
---
migration/savevm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index 8a2ada529e..2350e219fc 100644
On Thu, Jul 11, 2019 at 10:34:27AM +0100, Dr. David Alan Gilbert wrote:
>* Wei Yang (richardw.y...@linux.intel.com) wrote:
>> Commit 6b6712efccd3 ('ram: Split dirty bitmap by RAMBlock') changes the
>> parameter of postcopy_send_discard_bm_ram(), while left the d
Since the start addr is already checked, to make sure the range is
aligned, checking the length is enough.
Signed-off-by: Wei Yang
---
exec.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/exec.c b/exec.c
index 50ea9c5aaa..8fa980baae 100644
--- a/exec.c
+++ b/exec.c
On Mon, Feb 18, 2019 at 02:53:36PM +0100, Igor Mammedov wrote:
>On Mon, 18 Feb 2019 13:21:29 +0000
>Wei Yang wrote:
>
>> On Mon, Feb 18, 2019 at 01:56:02PM +0100, Igor Mammedov wrote:
>> >On Mon, 18 Feb 2019 12:13:24 +
>> >Wei Yang wrote:
>> >
>
).
Fix it by checking if memory hotplug is enabled at pre_plug stage
where we can gracefully abort hotplug request.
Signed-off-by: Wei Yang
CC: Igor Mammedov
CC: Eric Blake
---
v3:
* replace acpi_memory_hotplug with memory-hotplug-support in changelog
* fix code alignment of ich9_pm_devic
We didn't specify the indent rule for multiline code here, which may
misleading users. And in current code, the code use different rules.
Add this rule in CODING_STYLE to make sure this is clear to every one.
Signed-off-by: Wei Yang
Suggested-by: Igor Mammedov
---
CODING_STYLE
The first one is suggested by Igor Mammedov to provide rule for multiline
code.
The second is a trivial fix to make example code all indented with 4 spaces.
Wei Yang (2):
CODING_STYLE: specify the indent rule for multiline code
CODING_STYLE: indent example code as all others
CODING_STYLE
All the example code are indented with four spaces except this one.
Fix this by adding four spaces here.
Signed-off-by: Wei Yang
---
CODING_STYLE | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CODING_STYLE b/CODING_STYLE
index 73f66ca185..27581d80c1 100644
--- a
Two trivial cleanup for pc-dimm.
Patch [1] remove the check on class->hotpluggable since pc-dimm is always
hotpluggable.
Patch [2] remove realized callback since the task is done in pre_plug stage.
Wei Yang (2):
pc-dimm: remove check on pc-dimm hotpluggable
pc-dimm: remove realize callb
ff-by: Wei Yang
---
hw/acpi/memory_hotplug.c | 1 -
hw/mem/nvdimm.c | 11 ---
hw/mem/pc-dimm.c | 5 -
include/hw/mem/pc-dimm.h | 3 ---
4 files changed, 20 deletions(-)
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index b19673d337..cb5284d36f 1
Function acpi_memory_plug_cb() is only invoked when dev is a PCDIMM,
which is hotpluggable. This means it is not necessary to check this
property again.
This patch removes this check.
Signed-off-by: Wei Yang
---
hw/acpi/memory_hotplug.c | 4
1 file changed, 4 deletions(-)
diff --git a/hw
On Tue, Feb 19, 2019 at 08:53:22AM +0800, Wei Yang wrote:
>Currently we do device realization like below:
>
> hotplug_handler_pre_plug()
> dc->realize()
> hotplug_handler_plug()
>
>Before we do device realization and plug, we should allocate necessary
>resources
).
Fix it by checking if memory hotplug is enabled at pre_plug stage
where we can gracefully abort hotplug request.
Signed-off-by: Wei Yang
CC: Igor Mammedov
CC: Eric Blake
---
v4:
* fix code alignment of piix4_device_pre_plug_cb
v3:
* replace acpi_memory_hotplug with memory-hotpl
On Tue, Feb 19, 2019 at 01:29:38PM +0100, Philippe Mathieu-Daudé wrote:
>On 2/19/19 7:07 AM, Wei Yang wrote:
>> Function acpi_memory_plug_cb() is only invoked when dev is a PCDIMM,
>> which is hotpluggable. This means it is not necessary to check this
>> property again.
>
On Tue, Feb 19, 2019 at 01:36:57PM +0100, Philippe Mathieu-Daudé wrote:
>On 2/19/19 7:07 AM, Wei Yang wrote:
>> PCDIMM's realize callback is introduced to do proper setup for NVDIMM.
>>
>> Currently the NVDIMM setup task is nvdimm_prepare_memory_region(), which
>>
On Tue, Feb 19, 2019 at 06:38:54PM +0100, Philippe Mathieu-Daudé wrote:
>On 2/19/19 2:31 AM, Wei Yang wrote:
>> All the example code are indented with four spaces except this one.
>>
>> Fix this by adding four spaces here.
>>
>> Signed-off-by: Wei Yang
>>
4 from the
>primary line.
We should put this style in the example too?
>
>--
>Eric Blake, Principal Software Engineer
>Red Hat, Inc. +1-919-301-3226
>Virtualization: qemu.org | libvirt.org
--
Wei Yang
Help you, Help me
On Tue, Feb 19, 2019 at 11:52:29AM -0600, Eric Blake wrote:
>On 2/18/19 7:31 PM, Wei Yang wrote:
>> We didn't specify the indent rule for multiline code here, which may
>> misleading users. And in current code, the code use different rules.
>>
>> Add this rule in C
omments?
This looks not relavant to this sectioin. I am afraid I will not add
this example here. Sorry for that.
>With/without multi-line example:
>Reviewed-by: Philippe Mathieu-Daudé
>
>Thanks!
>
>Phil.
--
Wei Yang
Help you, Help me
All the example code are indented with four spaces except this one.
Fix this by adding four spaces here.
Signed-off-by: Wei Yang
Reviewed-by: Eric Blake
Reviewed-by: Philippe Mathieu-Daudé
---
CODING_STYLE | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a
The first one is suggested by Igor Mammedov to provide rule for multiline
code.
The second is a trivial fix to make example code all indented with 4 spaces.
v2:
* adjust Patch 1 as suggested by Eric
Wei Yang (2):
CODING_STYLE: specify the indent rule for multiline code
CODING_STYLE
We didn't specify the indent rule for multiline code here, which may
misleading users. And in current code, the code use different rules.
Add this rule in CODING_STYLE to make sure this is clear to every one.
Signed-off-by: Wei Yang
Suggested-by: Igor Mammedov
---
v2:
* rephrase chan
Three trivial cleanup for pc-dimm.
Patch [1] remove the check on class->hotpluggable since pc-dimm is always
hotpluggable.
Patch [2] remove nvdimm_realize
Patch [2] remove pcdimm realize-callback
v2:
* fix warning in Patch 1
* split Patch 2 into two
Wei Yang (3):
pc-dimm: remove check
Function acpi_memory_plug_cb() is only invoked when dev is a PCDIMM,
which is hotpluggable. This means it is not necessary to check this
property again.
This patch removes this check.
Signed-off-by: Wei Yang
Reviewed-by: Philippe Mathieu-Daudé
---
v2:
* remove unused dc
---
hw/acpi
realize callback in introduced to check if the backend memory is large
enough to contain label data and init its memory region, while this task
is handled in pre_plug stage.
Now it's time to remove it.
Signed-off-by: Wei Yang
---
hw/mem/pc-dimm.c | 5 -
include/hw/mem/pc-dimm.
nvdimm_realize is used to prepare its memory region, while this is done
in pre_plug stage.
This is time to remove it.
Signed-off-by: Wei Yang
---
v2: split nvdimm part here
---
hw/mem/nvdimm.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
On Wed, Feb 20, 2019 at 02:26:16AM +0100, Philippe Mathieu-Daudé wrote:
>On 2/20/19 1:51 AM, Wei Yang wrote:
>> realize callback in introduced to check if the backend memory is large
>> enough to contain label data and init its memory region, while this task
>> is hand
Number two is the newer usb attached scsi transport. This one doesn't
>-automagically create a scsi disk, so you have to explicitly attach one
>+automatically create a scsi disk, so you have to explicitly attach one
> manually. Multiple logical units are supported. Here is an example
> with tree logical units:
>
>diff --git a/docs/vfio-ap.txt b/docs/vfio-ap.txt
>index 1233968..30f3c66 100644
>--- a/docs/vfio-ap.txt
>+++ b/docs/vfio-ap.txt
>@@ -624,7 +624,7 @@ These are the steps:
> -> IOMMU Hardware Support
> select S390 AP IOMMU Support
> -> VFIO Non-Privileged userspace driver framework
>- -> Mediated device driver frramework
>+ -> Mediated device driver framework
> -> VFIO driver for Mediated devices
>-> I/O subsystem
> -> VFIO support for AP devices
others looks good to me.
>--
>1.8.3.1
>
--
Wei Yang
Help you, Help me
On Tue, Feb 19, 2019 at 09:02:34PM -0600, Eric Blake wrote:
>On 2/19/19 6:31 PM, Wei Yang wrote:
>> We didn't specify the indent rule for multiline code here, which may
>> misleading users. And in current code, the code use different rules.
>
>s/misleading/mislead/
The first one is suggested by Igor Mammedov to provide rule for multiline
code.
The second is a trivial fix to make example code all indented with 4 spaces.
v3:
* fix typo in both changelog and example
v2:
* adjust Patch 1 as suggested by Eric
Wei Yang (2):
CODING_STYLE: specify the
We didn't specify the indent rule for multiline code here, which may
mislead users. And in current code, the code use different rules.
Add this rule in CODING_STYLE to make sure this is clear to every one.
Signed-off-by: Wei Yang
Suggested-by: Igor Mammedov
Reviewed-by: Eric Blake
-
All the example code are indented with four spaces except this one.
Fix this by adding four spaces here.
Signed-off-by: Wei Yang
Reviewed-by: Eric Blake
Reviewed-by: Philippe Mathieu-Daudé
---
CODING_STYLE | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a
-obj-$(CONFIG_IDE_VIA) += via.o
> common-obj-$(CONFIG_MICRODRIVE) += microdrive.o
> common-obj-$(CONFIG_AHCI) += ahci.o
>-common-obj-$(CONFIG_AHCI) += ich.o
>+common-obj-$(call land,$(CONFIG_AHCI),$(CONFIG_PCI)) += ich.o
> common-obj-$(CONFIG_ALLWINNER_A10) += ahci-allwinner.o
> common-obj-$(CONFIG_IDE_SII3112) += sii3112.o
>--
>1.8.3.1
>
--
Wei Yang
Help you, Help me
On Tue, Feb 19, 2019 at 10:37:27AM -0500, Stephen Checkoway wrote:
>Don't dynamically allocate the pflash's timer. But do use timer_del in
>an unrealize function to make sure that the timer can't fire after the
>pflash_t has been freed.
>
>Signed-off-by: Stephen Che
On Thu, Feb 21, 2019 at 02:03:19PM +0800, Xiao Guangrong wrote:
>
>
>On 2/20/19 8:51 AM, Wei Yang wrote:
>> Three trivial cleanup for pc-dimm.
>>
>> Patch [1] remove the check on class->hotpluggable since pc-dimm is always
>> hotpluggable.
>> Patch [2]
On Thu, Feb 21, 2019 at 03:37:53PM +0100, Igor Mammedov wrote:
>On Tue, 19 Feb 2019 13:36:57 +0100
>Philippe Mathieu-Daudé wrote:
>
>> On 2/19/19 7:07 AM, Wei Yang wrote:
>> > PCDIMM's realize callback is introduced to do proper setup for NVDIMM.
>> >
&
On Thu, Feb 21, 2019 at 03:45:51PM +0100, Igor Mammedov wrote:
>On Tue, 19 Feb 2019 16:08:26 +0800
>Wei Yang wrote:
>
>> Currently we do device realization like below:
>>
>>hotplug_handler_pre_plug()
>>dc->realize()
>>hotplug_handler_plug()
On Thu, Feb 21, 2019 at 03:45:51PM +0100, Igor Mammedov wrote:
>On Tue, 19 Feb 2019 16:08:26 +0800
>Wei Yang wrote:
>
>> Currently we do device realization like below:
>>
>>hotplug_handler_pre_plug()
>>dc->realize()
>>hotplug_handler_plug()
On Thu, Feb 21, 2019 at 03:50:04PM +0100, Igor Mammedov wrote:
>On Wed, 20 Feb 2019 08:51:21 +0800
>Wei Yang wrote:
>
>> Three trivial cleanup for pc-dimm.
>>
>> Patch [1] remove the check on class->hotpluggable since pc-dimm is always
>> hotpluggable.
>>
On Thu, Feb 21, 2019 at 03:55:19PM +0100, Igor Mammedov wrote:
>On Wed, 20 Feb 2019 11:15:56 +0800
>Wei Yang wrote:
>
>> We didn't specify the indent rule for multiline code here, which may
>> mislead users. And in current code, the code use different rules.
>>
).
Fix it by checking if memory hotplug is enabled at pre_plug stage
where we can gracefully abort hotplug request.
Signed-off-by: Wei Yang
CC: Igor Mammedov
CC: Eric Blake
Signed-off-by: Wei Yang
---
v5:
* rebase on latest upstream
* remove a comment before hotplug_handler_pre_plug
*
On Mon, Feb 25, 2019 at 09:07:08AM +0800, Wei Yang wrote:
>Currently we do device realization like below:
>
> hotplug_handler_pre_plug()
> dc->realize()
> hotplug_handler_plug()
>
>Before we do device realization and plug, we should allocate necessary
>resources
All the example code are indented with four spaces except this one.
Fix this by adding four spaces here.
Signed-off-by: Wei Yang
Reviewed-by: Eric Blake
Reviewed-by: Philippe Mathieu-Daudé
---
CODING_STYLE | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a
We didn't specify the indent rule for multiline code here, which may
mislead users. And in current code, the code use different rules.
Add this rule in CODING_STYLE to make sure this is clear to every one.
Signed-off-by: Wei Yang
Suggested-by: Igor Mammedov
---
v4:
* widths -&g
The first one is suggested by Igor Mammedov to provide rule for multiline
code.
The second is a trivial fix to make example code all indented with 4 spaces.
v4:
* one exception case for function
v3:
* fix typo in both changelog and example
v2:
* adjust Patch 1 as suggested by Eric
Wei
On Mon, Feb 25, 2019 at 09:05:37AM +0100, Igor Mammedov wrote:
>On Sat, 23 Feb 2019 00:02:49 +0000
>Wei Yang wrote:
>
>> On Thu, Feb 21, 2019 at 03:50:04PM +0100, Igor Mammedov wrote:
>> >On Wed, 20 Feb 2019 08:51:21 +0800
>> >Wei Yang wrote:
>> &g
On Mon, Feb 25, 2019 at 09:15:34AM +0800, Wei Yang wrote:
>On Mon, Feb 25, 2019 at 09:07:08AM +0800, Wei Yang wrote:
>>Currently we do device realization like below:
>>
>> hotplug_handler_pre_plug()
>> dc->realize()
>> hotplug_handler_plug()
>>
>
Leverage __ATTR_RO_MODE to define rev sysfs instead of using open code
to define the attribute.
Signed-off-by: Wei Yang
---
drivers/firmware/qemu_fw_cfg.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware
On Tue, Feb 26, 2019 at 07:45:46PM +0100, Philippe Mathieu-Daudé wrote:
>Hi Wei,
>
>On 2/26/19 8:31 AM, Wei Yang wrote:
>> Leverage __ATTR_RO_MODE to define rev sysfs instead of using open code
>> to define the attribute.
>>
>> Signed-off-by: Wei Yang
>>
On Tue, Feb 26, 2019 at 11:10:06AM -0500, Michael S. Tsirkin wrote:
>On Tue, Feb 26, 2019 at 03:31:59PM +0800, Wei Yang wrote:
>> Leverage __ATTR_RO_MODE to define rev sysfs instead of using open code
>> to define the attribute.
>>
>> Signed-off-by: Wei Yang
The IO range is defined to 4 bytes with NVDIMM_ACPI_IO_LEN, so it is
more proper to use this macro instead of calculating it by sizeof.
Signed-off-by: Wei Yang
---
hw/acpi/nvdimm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index
At the beginning or nvdimm_build_common_dsm(), variable *function* is
already allocated for Arg2.
This patch reuse variable *function* instead of allocating it again.
Signed-off-by: Wei Yang
---
hw/acpi/nvdimm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/acpi
Here are 4 cleanup patches for nvdimm.
The first three are trivial clean on argument/variable.
The last one move setup place of the FIT table.
Wei Yang (4):
nvdimm: fix typo in nvdimm_build_nvdimm_devices argument
nvdimm: use *function* directly instead of allocating it again
nvdimm: use
ld stage
It would be more proper to build fit buffer in nvdimm_build_acpi, which
consolidate all acpi related initialization together.
This patch moves FIT build in nvdimm_build_acpi.
Signed-off-by: Wei Yang
---
hw/acpi/nvdimm.c| 6 +-
hw/i386/pc.c| 5 -
includ
>From dsm_dma_arrea to dsm_dma_area.
Signed-off-by: Wei Yang
---
hw/acpi/nvdimm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index e53b2cb681..39af8cdba8 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -1260,7 +126
On Wed, Feb 27, 2019 at 02:12:42PM +0100, Igor Mammedov wrote:
>On Mon, 25 Feb 2019 12:47:14 +0000
>Wei Yang wrote:
>
>> On Mon, Feb 25, 2019 at 09:05:37AM +0100, Igor Mammedov wrote:
>> >On Sat, 23 Feb 2019 00:02:49 +
>> >Wei Yang wrote:
>> >
>
On Wed, Feb 27, 2019 at 08:54:58AM -0500, Michael S. Tsirkin wrote:
>On Wed, Feb 27, 2019 at 11:07:16AM +0800, Wei Yang wrote:
>> On Tue, Feb 26, 2019 at 07:45:46PM +0100, Philippe Mathieu-Daudé wrote:
>> >Hi Wei,
>> >
>> >On 2/26/19 8:31 AM, Wei Yang wrote:
>
On Wed, Feb 27, 2019 at 08:51:11AM -0500, Michael S. Tsirkin wrote:
>On Wed, Feb 27, 2019 at 01:33:19PM +0800, Wei Yang wrote:
>> On Tue, Feb 26, 2019 at 11:10:06AM -0500, Michael S. Tsirkin wrote:
>> >On Tue, Feb 26, 2019 at 03:31:59PM +0800, Wei Yang wrote:
>> >&
On Mon, Apr 15, 2019 at 03:01:28PM +0200, Philippe Mathieu-Daud?? wrote:
>Hi Wei,
>
>On 4/15/19 9:03 AM, Wei Yang wrote:
>> Now we have two identical build_mcfg function.
>>
>> Extract them to pci.c.
>>
>> Signed-off-by: Wei Yang
>>
>&g
This is obvious the member in AcpiMcfgInfo describe MCFG's property.
Remove the mcfg_ prefix.
Signed-off-by: Wei Yang
Suggested-by: Igor Mammedov
Reviewed-by: Igor Mammedov
Reviewed-by: Philippe Mathieu-Daudé
---
hw/i386/acpi-build.c | 14 +++---
1 file changed, 7 insertions(
To build MCFG, two information is necessary:
* bus number
* base address
Abstract these two information to AcpiMcfgInfo so that build_mcfg and
build_mcfg_q35 will have the same declaration.
Signed-off-by: Wei Yang
Reviewed-by: Philippe Mathieu-Daudé
---
v3:
* move AcpiMcfgInfo to
501 - 600 of 739 matches
Mail list logo