[PATCH v2 1/1] hw/i386/amd_iommu: Fix IOMMU event log encoding errors

2022-04-21 Thread Wei Huang
/1487190/1487232/1487115/1487258 Reported-by: Peter Maydell Signed-off-by: Wei Huang --- hw/i386/amd_iommu.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index ea8eaeb330b6..725f69095b9e 100644 --- a/hw/i386

[PATCH 1/1] hw/i386/amd_iommu: Fix IOMMU event log encoding errors

2022-04-21 Thread Wei Huang
, which is also fixed. [1] CID 1487116/1487200/1487190/1487232/1487115/1487258 Reported-by: Peter Maydell Signed-off-by: Wei Huang --- hw/i386/amd_iommu.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index

Re: [PATCH 1/1] hw/i386/amd_iommu: Fix IOMMU event log encoding errors

2022-04-21 Thread Wei Huang
On 4/21/22 11:08, Peter Maydell wrote: On Thu, 21 Apr 2022 at 17:01, Wei Huang wrote: Coverity issues several UNINIT warnings against AMD IOMMU device [1]. This patch fixes them by initializing the variables. On top of it, this patch changes the event log size to 16 bytes per IOMMU

Re: who's maintaining amd_iommu.c these days?

2022-04-01 Thread Wei Huang
On 4/1/22 11:14, Peter Maydell wrote: On Fri, 1 Apr 2022 at 17:11, Wei Huang wrote: On 3/31/22 21:09, Jason Wang wrote: On Fri, Apr 1, 2022 at 2:30 AM Peter Xu wrote: On Thu, Mar 31, 2022 at 05:01:52PM +0100, Peter Maydell wrote: (4) The claimed bit layout of the event structure

Re: who's maintaining amd_iommu.c these days?

2022-04-01 Thread Wei Huang
On 3/31/22 21:09, Jason Wang wrote: On Fri, Apr 1, 2022 at 2:30 AM Peter Xu wrote: On Thu, Mar 31, 2022 at 05:01:52PM +0100, Peter Maydell wrote: Coverity points out some problems with hw/i386/amd_iommu.c's event logging code -- specifically, CID 1487115 1487116 1487190 1487200 1487232 148

Re: constant_tsc support for SVM guest

2021-04-24 Thread Wei Huang
On 4/23/21 4:27 PM, Eduardo Habkost wrote: On Fri, Apr 23, 2021 at 12:32:00AM -0500, Wei Huang wrote: There was a customer request for const_tsc support on AMD guests. Right now this feature is turned off by default for QEMU x86 CPU types (in CPUID_Fn8007_EDX[8]). However we are seeing a

constant_tsc support for SVM guest

2021-04-22 Thread Wei Huang
There was a customer request for const_tsc support on AMD guests. Right now this feature is turned off by default for QEMU x86 CPU types (in CPUID_Fn8007_EDX[8]). However we are seeing a discrepancy in guest VM behavior between Intel and AMD. In Linux kernel, Intel x86 code enables X86_FEA

[PATCH 1/1] x86/cpu: Populate SVM CPUID feature bits

2021-01-26 Thread Wei Huang
turns on this CPUID bit for nested VMs. In order to support it, let us populate this bit, along with other SVM feature bits, in FEAT_SVM. Signed-off-by: Wei Huang --- target/i386/cpu.c | 6 +++--- target/i386/cpu.h | 24 ++-- 2 files changed, 17 insertions(+), 13 deletions

[PATCH V2 2/3] amd-iommu: Sync IOVA-to-GPA translation during page invalidation

2020-10-02 Thread Wei Huang
Add support to sync the IOVA-to-GPA translation at the time of IOMMU page invalidation. This function is called when two IOMMU commands, AMDVI_CMD_INVAL_AMDVI_PAGES and AMDVI_CMD_INVAL_AMDVI_ALL, are intercepted. Address space notifiers are called accordingly. Co-developed-by: Wei Huang Signed

[PATCH V2 1/3] amd-iommu: Add address space notifier and replay support

2020-10-02 Thread Wei Huang
-by: Wei Huang Signed-off-by: Suravee Suthikulpanit --- hw/i386/amd_iommu.c | 45 +++-- hw/i386/amd_iommu.h | 3 +++ 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 74a93a5d93f4..c7d24a05484d

[PATCH V2 0/3] Passthru device support under emulated amd-iommu

2020-10-02 Thread Wei Huang
10G (SR-IOV) NICs on AMD boxes. V1->V2: * Remove unnecessary VFIO_IOMMU_MAP_DMA errno check (Alex Williamson) Thanks, -Wei Wei Huang (3): amd-iommu: Add address space notifier and replay support amd-iommu: Sync IOVA-to-GPA translation during page invalidation amd-iommu: Fix amdvi_mmio_tr

[PATCH V2 3/3] amd-iommu: Fix amdvi_mmio_trace() to differentiate MMIO R/W

2020-10-02 Thread Wei Huang
amd-iommu MMIO trace function does not differentiate MMIO writes from reads. Let us extend it to support both types. Co-developed-by: Wei Huang Signed-off-by: Suravee Suthikulpanit --- hw/i386/amd_iommu.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git

Re: [PATCH V1 2/3] amd-iommu: Sync IOVA-to-GPA translation during page invalidation

2020-09-30 Thread Wei Huang
On 09/29 01:34, Alex Williamson wrote: > On Mon, 28 Sep 2020 15:05:05 -0500 > Wei Huang wrote: > > > Add support to sync the IOVA-to-GPA translation at the time of IOMMU > > page invalidation. This function is called when two IOMMU commands, > > AMDV

[PATCH V1 0/3] Passthru device support under emulated amd-iommu

2020-09-28 Thread Wei Huang
NICs on AMD boxes. Thanks, -Wei Wei Huang (3): amd-iommu: Add address space notifier and replay support amd-iommu: Sync IOVA-to-GPA translation during page invalidation amd-iommu: Fix up amdvi_mmio_trace() to differentiate MMIO R/W hw/i386/amd_iommu.c | 243

[PATCH V1 3/3] amd-iommu: Fix amdvi_mmio_trace() to differentiate MMIO R/W

2020-09-28 Thread Wei Huang
amd-iommu MMIO trace function does not differentiate MMIO writes from reads. Let us extend it to support both types. Co-developed-by: Wei Huang Signed-off-by: Suravee Suthikulpanit --- hw/i386/amd_iommu.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git

[PATCH V1 1/3] amd-iommu: Add address space notifier and replay support

2020-09-28 Thread Wei Huang
-by: Wei Huang Signed-off-by: Suravee Suthikulpanit --- hw/i386/amd_iommu.c | 45 +++-- hw/i386/amd_iommu.h | 3 +++ 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 74a93a5d93f4..c7d24a05484d

[PATCH V1 2/3] amd-iommu: Sync IOVA-to-GPA translation during page invalidation

2020-09-28 Thread Wei Huang
Add support to sync the IOVA-to-GPA translation at the time of IOMMU page invalidation. This function is called when two IOMMU commands, AMDVI_CMD_INVAL_AMDVI_PAGES and AMDVI_CMD_INVAL_AMDVI_ALL, are intercepted. Address space notifiers are called accordingly. Co-developed-by: Wei Huang Signed

[PATCH] hw/i386/amd_iommu: Fix the reserved bits definition of IOMMU commands

2020-04-17 Thread Wei Huang
Many reserved bits of amd_iommu commands are defined incorrectly in QEMU. Because of it, QEMU incorrectly injects lots of illegal commands into guest VM's IOMMU event log. Signed-off-by: Wei Huang --- hw/i386/amd_iommu.c | 19 ++- 1 file changed, 10 insertions(+), 9 dele

Re: [Qemu-devel] [PULL 2/7] tests/migration: Enable the migration test on s390x, too

2018-10-18 Thread Wei Huang
On 10/18/2018 07:43 AM, Emilio G. Cota wrote: > On Thu, Oct 18, 2018 at 14:38:01 +0200, Thomas Huth wrote: >> On 2018-10-17 21:28, Emilio G. Cota wrote: >>> Can anyone reproduce this? Otherwise, let me know what other info >>> I could provide. >> >> I've finally been able to reproduce it - seems

Re: [Qemu-devel] [PATCH 1/1] tests: Add migration test for aarch64

2018-10-04 Thread Wei Huang
On 10/04/2018 09:17 AM, Thomas Huth wrote: > On 2018-10-04 15:48, Andrew Jones wrote: >> On Fri, Sep 28, 2018 at 03:47:35PM -0400, Wei Huang wrote: > [...] >>> diff --git a/tests/migration/aarch64/Makefile >>> b/tests/migration/aarch64/Makefile >>>

[Qemu-devel] [PATCH V2 1/1] tests: Add migration test for aarch64

2018-10-04 Thread Wei Huang
this patch also includes the source code and the build script in tests/migration/aarch64. So users can change the source and/or re-compile the binary as they wish. Reviewed-by: Juan Quintela Reviewed-by: Andrew Jones Signed-off-by: Wei Huang --- tests/Makefile.include | 1 +

Re: [Qemu-devel] [PATCH 1/1] tests: Add migration test for aarch64

2018-10-04 Thread Wei Huang
On 10/04/2018 10:30 AM, Philippe Mathieu-Daudé wrote: > On 04/10/2018 17:27, Wei Huang wrote: >> On 10/04/2018 10:07 AM, Philippe Mathieu-Daudé wrote: >>> On 28/09/2018 21:47, Wei Huang wrote: >>> [...]> +++ b/tests/migration/aarch64/Makefile >>>>

Re: [Qemu-devel] [PATCH 1/1] tests: Add migration test for aarch64

2018-10-04 Thread Wei Huang
On 10/04/2018 10:07 AM, Philippe Mathieu-Daudé wrote: > On 28/09/2018 21:47, Wei Huang wrote: > [...]> +++ b/tests/migration/aarch64/Makefile >> @@ -0,0 +1,20 @@ >> +# To specify cross compiler prefix, use CROSS_PREFIX= >> +# $ make CROSS_PREFIX=aarch64-linux-gnu-

Re: [Qemu-devel] [PATCH 1/1] tests: Add migration test for aarch64

2018-10-04 Thread Wei Huang
On 10/04/2018 08:48 AM, Andrew Jones wrote: > On Fri, Sep 28, 2018 at 03:47:35PM -0400, Wei Huang wrote: >> This patch adds migration test support for aarch64. The test code, which >> implements the same functionality as x86, is booted as a kernel in qemu. >> Here are the d

[Qemu-devel] [PATCH 1/1] tests: Add migration test for aarch64

2018-09-28 Thread Wei Huang
this patch also includes the source code and the build script in tests/migration/aarch64. So users can change the source and/or re-compile the binary as they wish. Reviewed-by: Juan Quintela Signed-off-by: Wei Huang --- tests/Makefile.include | 1 + tests/migration-t

Re: [Qemu-devel] [PATCH V9 4/4] tests: Add migration test for aarch64

2018-09-28 Thread Wei Huang
On 09/28/2018 10:20 AM, Dr. David Alan Gilbert wrote: > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: >> * Wei Huang (w...@redhat.com) wrote: >>> >>> >>> On 09/28/2018 09:04 AM, Dr. David Alan Gilbert wrote: >>>> * Wei Huang (w...@redhat.c

Re: [Qemu-devel] [PATCH V9 4/4] tests: Add migration test for aarch64

2018-09-28 Thread Wei Huang
On 09/28/2018 09:04 AM, Dr. David Alan Gilbert wrote: > * Wei Huang (w...@redhat.com) wrote: >> >> >> On 09/26/2018 11:31 AM, Dr. David Alan Gilbert wrote: >>> * Wei Huang (w...@redhat.com) wrote: >>>> This patch adds migration test support for aarch64

Re: [Qemu-devel] [PATCH V9 4/4] tests: Add migration test for aarch64

2018-09-28 Thread Wei Huang
On 09/26/2018 11:31 AM, Dr. David Alan Gilbert wrote: > * Wei Huang (w...@redhat.com) wrote: >> This patch adds migration test support for aarch64. The test code, which >> implements the same functionality as x86, is booted as a kernel in qemu. >> Here are the design choice

Re: [Qemu-devel] [PATCH V9 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-10 Thread Wei Huang
On 09/10/2018 11:18 AM, Alex Bennée wrote: > > Wei Huang writes: > >> Recently a new configure option, CROSS_CC_GUEST, was added to >> $(TARGET)-softmmu/config-target.mak to support TCG-related tests. This >> patch tries to leverage this option to support

Re: [Qemu-devel] [PATCH V9 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-07 Thread Wei Huang
On 09/07/2018 02:04 AM, Andrew Jones wrote: > On Thu, Sep 06, 2018 at 12:23:45PM -0400, Wei Huang wrote: >> >> >> - Original Message - >>> From: "Andrew Jones" >>> To: "Wei Huang" >>> Cc: lviv...@redhat.com, "pe

Re: [Qemu-devel] [PATCH V9 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-06 Thread Wei Huang
- Original Message - > From: "Andrew Jones" > To: "Wei Huang" > Cc: lviv...@redhat.com, "peter maydell" , > quint...@redhat.com, qemu-devel@nongnu.org, > dgilb...@redhat.com, "alex bennee" > Sent: Thursday, September 6,

Re: [Qemu-devel] [PATCH V9 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-06 Thread Wei Huang
- Original Message - > From: "Andrew Jones" > To: "Wei Huang" > Cc: qemu-devel@nongnu.org, lviv...@redhat.com, "peter maydell" > , quint...@redhat.com, > dgilb...@redhat.com, "alex bennee" > Sent: Thursday, September 6,

[Qemu-devel] [PATCH V9 4/4] tests: Add migration test for aarch64

2018-09-05 Thread Wei Huang
this patch also includes the source code and the build script in tests/migration/aarch64. So users can change the source and/or re-compile the binary as they wish. Reviewed-by: Juan Quintela Signed-off-by: Wei Huang --- tests/Makefile.include | 1 + tests/migration-t

[Qemu-devel] [PATCH V9 1/4] tests/migration: Convert x86 boot block compilation script into Makefile

2018-09-05 Thread Wei Huang
, the cross compiler prefix can be specified by setting the CROSS_PREFIX in "make" command. Also to allow gcc pre-processor to include the C-style file correctly, it also renames the x86-a-b-bootblock.s file extension from .s to .S. Reviewed-by: Juan Quintela Signed-off-by: Wei Huang

[Qemu-devel] [PATCH V9 3/4] tests/migration: Add migration-test header file

2018-09-05 Thread Wei Huang
This patch moves the settings related migration-test from the migration-test.c file to a new header file. Reviewed-by: Juan Quintela Reviewed-by: Andrew Jones Signed-off-by: Wei Huang --- tests/migration-test.c | 28 ++-- tests/migration/migration-test.h | 21

[Qemu-devel] [PATCH V9 0/4] tests: Add migration test for aarch64

2018-09-05 Thread Wei Huang
;t have a default machine type. RFC->V1: * aarch64 kernel blob is defined as an uint32_t array * The test code is re-written to address a data caching issue under KVM. Tests passed under both x86 and aarch64. * Re-use init_bootfile_x86() for both x86 and aarch64 * Other minor fixes Thanks, -

[Qemu-devel] [PATCH V9 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-05 Thread Wei Huang
: Wei Huang --- tests/migration-test.c | 2 +- tests/migration/Makefile | 44 -- tests/migration/i386/Makefile | 22 +++ .../{x86-a-b-bootblock.S => i386/a-b-bootblock.S} | 4 -- .../{x86-

Re: [Qemu-devel] [PATCH V8 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-04 Thread Wei Huang
- Original Message - > From: "Andrew Jones" > To: "Wei Huang" > Cc: qemu-devel@nongnu.org, lviv...@redhat.com, "peter maydell" > , quint...@redhat.com, > dgilb...@redhat.com > Sent: Monday, September 3, 2018 6:26:39 AM > Subje

Re: [Qemu-devel] [PATCH V8 4/4] tests: Add migration test for aarch64

2018-09-04 Thread Wei Huang
- Original Message - > From: "Andrew Jones" > To: "Wei Huang" > Cc: qemu-devel@nongnu.org, lviv...@redhat.com, "peter maydell" > , quint...@redhat.com, > dgilb...@redhat.com > Sent: Monday, September 3, 2018 6:53:35 AM > Subject: R

Re: [Qemu-devel] [PATCH V8 1/4] tests/migration: Convert x86 boot block compilation script into Makefile

2018-09-04 Thread Wei Huang
On 09/03/2018 06:08 AM, Andrew Jones wrote: > On Sat, Sep 01, 2018 at 01:11:12AM -0400, Wei Huang wrote: >> The x86 boot block header currently is generated with a shell script. >> To better support other CPUs (e.g. aarch64), we convert the script >> into Makefile. This al

Re: [Qemu-devel] [PATCH V8 4/4] tests: Add migration test for aarch64

2018-09-01 Thread Wei Huang
On 09/01/2018 05:07 AM, Peter Maydell wrote: > On 1 September 2018 at 06:11, Wei Huang wrote: >> This patch adds migration test support for aarch64. The test code, which >> implements the same functionality as x86, is booted as a kernel in qemu. >> Here are the desig

[Qemu-devel] [PATCH V8 3/4] tests/migration: Add migration-test header file

2018-08-31 Thread Wei Huang
This patch moves the settings related migration-test from the migration-test.c file to a new header file. Signed-off-by: Wei Huang --- tests/migration-test.c | 28 ++-- tests/migration/migration-test.h | 21 + 2 files changed, 39 insertions

[Qemu-devel] [PATCH V8 2/4] tests/migration: Support cross compilation in generating boot header file

2018-08-31 Thread Wei Huang
a new sub-dir (named ./x86_64). * A new top-layer Makefile is created in tests/migration/ directory. This Makefile searches and parses CROSS_CC_GUEST to generate CROSS_PREFIX. The CROSS_PREFIX, if available, is then passed to migration/$ARCH/Makefile. Signed-off-by: Wei Huang --- tests

[Qemu-devel] [PATCH V8 1/4] tests/migration: Convert x86 boot block compilation script into Makefile

2018-08-31 Thread Wei Huang
, the cross compiler prefix can be specified by setting the CROSS_PREFIX in "make" command. Also to allow gcc pre-processor to include the C-style file correctly, it also renames the x86-a-b-bootblock.s file extension from .s to .S. Signed-off-by: Wei Huang --- tests/migratio

[Qemu-devel] [PATCH V8 4/4] tests: Add migration test for aarch64

2018-08-31 Thread Wei Huang
this patch also includes the source code and the build script in tests/migration/aarch64. So users can change the source and/or re-compile the binary as they wish. Signed-off-by: Wei Huang --- tests/Makefile.include | 1 + tests/migration-test.c

[Qemu-devel] [PATCH V8 0/4] tests: Add migration test for aarch64

2018-08-31 Thread Wei Huang
doesn't have a default machine type. RFC->V1: * aarch64 kernel blob is defined as an uint32_t array * The test code is re-written to address a data caching issue under KVM. Tests passed under both x86 and aarch64. * Re-use init_bootfile_x86() for both x86 and aarch64 * Other minor fi

Re: [Qemu-devel] [PATCH 1/1] mach-virt: Change default cpu and gic-version setting to "max"

2018-04-09 Thread Wei Huang
On 04/09/2018 10:55 AM, Peter Maydell wrote: > On 9 April 2018 at 16:49, Wei Huang wrote: >> Running mach-virt machine types (i.e. "-M virt") on different systems can >> result in various misleading warnings if -cpu and/or gic-version not >> specified. >>

Re: [Qemu-devel] [PATCH 1/1] mach-virt: Change default cpu and gic-version setting to "max"

2018-04-09 Thread Wei Huang
On 04/09/2018 10:56 AM, Daniel P. Berrangé wrote: > On Mon, Apr 09, 2018 at 10:49:21AM -0500, Wei Huang wrote: >> Running mach-virt machine types (i.e. "-M virt") on different systems can >> result in various misleading warnings if -cpu and/or gic-version not >>

[Qemu-devel] [PATCH 1/1] mach-virt: Change default cpu and gic-version setting to "max"

2018-04-09 Thread Wei Huang
ith "host", the "max" type not only supports auto detection under KVM mode, but also works with TCG. So this patch set "max" as the default types for both -cpu and gic-version. Signed-off-by: Wei Huang --- hw/arm/virt.c | 10 +- 1 file changed, 5 insertio

[Qemu-devel] [PATCH V2 1/1] mach-virt: Set VM's SMBIOS system version to mc->name

2018-03-22 Thread Wei Huang
Product Name: KVM Virtual Machine Version: 1.0 Serial Number: Not Specified ... For backward compatibility, we allow older machine types to keep "1.0" as the default system version. Signed-off-by: Wei Huang --- hw/arm/virt.c | 8 +++

Re: [Qemu-devel] [PATCH 1/1] mach-virt: Set VM's SMBIOS system version to mc->desc

2018-03-22 Thread Wei Huang
On 03/22/2018 05:53 AM, Peter Maydell wrote: > On 22 March 2018 at 08:01, Andrew Jones wrote: >> I agree we should change the useless 1.0, but shouldn't we use >> mc->name instead of mc->desc? mc->name would make it consistent >> with pc-piix and q35 and also be a less verbose "version". We'd >>

[Qemu-devel] [PATCH 1/1] mach-virt: Set VM's SMBIOS system version to mc->desc

2018-03-21 Thread Wei Huang
Product Name: KVM Virtual Machine Version: 1.0 Serial Number: Not Specified ... Signed-off-by: Wei Huang --- hw/arm/virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 2c07245047..da7228b297 100644 --- a/

[Qemu-devel] [PATCH 1/1] dump: Update correct kdump phys_base field for AArch64

2018-03-09 Thread Wei Huang
different field, called "NUMBER(PHYS_OFFSET)=". This patch makes sure QEMU dump uses the correct string on AArch64. Signed-off-by: Wei Huang --- dump.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dump.c b/dump.c index 097e60b..6bdb0db 10064

Re: [Qemu-devel] [PATCH V7 1/4] rules: Move cross compilation auto detection functions to rules.mak

2018-03-05 Thread Wei Huang
On 03/05/2018 07:52 AM, Dr. David Alan Gilbert wrote: > * Andrew Jones (drjo...@redhat.com) wrote: >> On Mon, Mar 05, 2018 at 11:01:23AM +, Dr. David Alan Gilbert wrote: >>> * Laurent Vivier (lviv...@redhat.com) wrote: >>>> On 28/02/2018 19:02, Wei Huang wro

Re: [Qemu-devel] [PATCH V7 2/4] tests/migration: Convert the boot block compilation script into Makefile

2018-03-02 Thread Wei Huang
On 03/02/2018 09:25 AM, Laurent Vivier wrote: > On 28/02/2018 19:02, Wei Huang wrote: >> The x86 boot block header currently is generated with a shell script. >> To better support other CPUs (e.g. aarch64), we convert the script >> into Makefile. This allows us to 1) supp

[Qemu-devel] [PATCH V7 4/4] tests: Add migration test for aarch64

2018-02-28 Thread Wei Huang
this patch also includes the source code and the build script in tests/migration/. So users can change the source and/or re-compile the binary as they wish. Signed-off-by: Wei Huang --- tests/Makefile.include | 1 + tests/migration-test.c | 44 +++--

[Qemu-devel] [PATCH V7 3/4] tests/migration: Add migration-test header file

2018-02-28 Thread Wei Huang
This patch moves the settings related migration-test from the migration-test.c file to a seperate header file. It also renames the x86-a-b-bootblock.s file extension from .s to .S, allowing gcc pre-processor to include the C-style header file correctly. Signed-off-by: Wei Huang --- tests

[Qemu-devel] [PATCH V7 0/4] tests: Add migration test for aarch64

2018-02-28 Thread Wei Huang
as an uint32_t array * The test code is re-written to address a data caching issue under KVM. Tests passed under both x86 and aarch64. * Re-use init_bootfile_x86() for both x86 and aarch64 * Other minor fixes Thanks, -Wei Wei Huang (4): rules: Move cross compilation auto detection

[Qemu-devel] [PATCH V7 2/4] tests/migration: Convert the boot block compilation script into Makefile

2018-02-28 Thread Wei Huang
The x86 boot block header currently is generated with a shell script. To better support other CPUs (e.g. aarch64), we convert the script into Makefile. This allows us to 1) support cross-compilation easily, and 2) avoid creating a script file for every architecture. Signed-off-by: Wei Huang

[Qemu-devel] [PATCH V7 1/4] rules: Move cross compilation auto detection functions to rules.mak

2018-02-28 Thread Wei Huang
This patch moves the auto detection functions for cross compilation from roms/Makefile to rules.mak. So the functions can be shared among Makefiles in QEMU. Signed-off-by: Wei Huang Reviewed-by: Andrew Jones --- roms/Makefile | 24 +++- rules.mak | 15 +++ 2

Re: [Qemu-devel] [PATCH V6 3/4] tests/migration: Add migration-test header file

2018-02-27 Thread Wei Huang
On 02/27/2018 05:57 AM, Dr. David Alan Gilbert wrote: > * Wei Huang (w...@redhat.com) wrote: >> This patch moves the settings related migration-test from the >> migration-test.c file to a seperate header file. It also renames the >> x86-a-b-bootblock.s file extension from .

Re: [Qemu-devel] [PATCH V5 2/4] tests/migration: Convert the boot block compilation script into Makefile

2018-02-27 Thread Wei Huang
On 02/27/2018 05:38 AM, Dr. David Alan Gilbert wrote: > * Wei Huang (w...@redhat.com) wrote: >> >> >> On 02/26/2018 12:01 PM, Dr. David Alan Gilbert wrote: >>> * Wei Huang (w...@redhat.com) wrote: >>>> The x86 boot block header currently is generated w

Re: [Qemu-devel] [PATCH V5 2/4] tests/migration: Convert the boot block compilation script into Makefile

2018-02-26 Thread Wei Huang
On 02/26/2018 12:01 PM, Dr. David Alan Gilbert wrote: > * Wei Huang (w...@redhat.com) wrote: >> The x86 boot block header currently is generated with a shell script. >> To better support other CPUs (e.g. aarch64), we convert the script >> into Makefile. This allows u

Re: [Qemu-devel] [PATCH V4 3/3] tests: Add migration test for aarch64

2018-02-26 Thread Wei Huang
On 02/26/2018 03:03 AM, Andrew Jones wrote: > On Fri, Feb 23, 2018 at 04:13:08PM -0600, Wei Huang wrote: >> >> >> On 02/22/2018 03:00 AM, Andrew Jones wrote: >>> On Wed, Feb 21, 2018 at 10:44:17PM -0600, Wei Huang wrote: >>>> This patch adds migrati

[Qemu-devel] [PATCH V6 1/4] rules: Move cross compilation auto detection functions to rules.mak

2018-02-26 Thread Wei Huang
This patch moves the auto detection functions for cross compilation from roms/Makefile to rules.mak. So the functions can be shared among Makefiles in QEMU. Signed-off-by: Wei Huang Reviewed-by: Andrew Jones --- roms/Makefile | 24 +++- rules.mak | 15 +++ 2

[Qemu-devel] [PATCH V6 3/4] tests/migration: Add migration-test header file

2018-02-26 Thread Wei Huang
This patch moves the settings related migration-test from the migration-test.c file to a seperate header file. It also renames the x86-a-b-bootblock.s file extension from .s to .S, allowing gcc pre-processor to include the C-style header file correctly. Signed-off-by: Wei Huang Reviewed-by

[Qemu-devel] [PATCH V6 4/4] tests: Add migration test for aarch64

2018-02-26 Thread Wei Huang
this patch also includes the source code and the build script in tests/migration/. So users can change the source and/or re-compile the binary as they wish. Signed-off-by: Wei Huang --- tests/Makefile.include | 1 + tests/migration-test.c | 46 +++---

[Qemu-devel] [PATCH V6 0/4] tests: Add migration test for aarch64

2018-02-26 Thread Wei Huang
d aarch64. * Re-use init_bootfile_x86() for both x86 and aarch64 * Other minor fixes Thanks, -Wei Wei Huang (4): rules: Move cross compilation auto detection functions to rules.mak tests/migration: Convert the boot block compilation script into Makefile tests/migration:

[Qemu-devel] [PATCH V6 2/4] tests/migration: Convert the boot block compilation script into Makefile

2018-02-26 Thread Wei Huang
The x86 boot block header currently is generated with a shell script. To better support other CPUs (e.g. aarch64), we convert the script into Makefile. This allows us to 1) support cross-compilation easily, and 2) avoid creating a script file for every architecture. Signed-off-by: Wei Huang

Re: [Qemu-devel] [PATCH V4 3/3] tests: Add migration test for aarch64

2018-02-23 Thread Wei Huang
On 02/22/2018 03:00 AM, Andrew Jones wrote: > On Wed, Feb 21, 2018 at 10:44:17PM -0600, Wei Huang wrote: >> This patch adds migration test support for aarch64. The test code, which >> implements the same functionality as x86, is booted as a kernel in qemu. >> Here are the d

[Qemu-devel] [PATCH V5 4/4] tests: Add migration test for aarch64

2018-02-23 Thread Wei Huang
this patch also includes the source code and the build script in tests/migration/. So users can change the source and/or re-compile the binary as they wish. Signed-off-by: Wei Huang --- tests/Makefile.include | 1 + tests/migration-test.c

[Qemu-devel] [PATCH V5 2/4] tests/migration: Convert the boot block compilation script into Makefile

2018-02-23 Thread Wei Huang
The x86 boot block header currently is generated with a shell script. To better support other CPUs (e.g. aarch64), we convert the script into Makefile. This allows us to 1) support cross-compilation easily, and 2) avoid creating a script file for every architecture. Signed-off-by: Wei Huang

[Qemu-devel] [PATCH V5 1/4] rules: Move cross compilation auto detection functions to rules.mak

2018-02-23 Thread Wei Huang
This patch moves the auto detection functions for cross compilation from roms/Makefile to rules.mak. So the functions can be shared among Makefiles in QEMU. Signed-off-by: Wei Huang --- roms/Makefile | 24 +++- rules.mak | 15 +++ 2 files changed, 22

[Qemu-devel] [PATCH V5 0/4] tests: Add migration test for aarch64

2018-02-23 Thread Wei Huang
RFC->V1: * aarch64 kernel blob is defined as an uint32_t array * The test code is re-written to address a data caching issue under KVM. Tests passed under both x86 and aarch64. * Re-use init_bootfile_x86() for both x86 and aarch64 * Other minor fixes Thanks, -Wei Wei Huang (4): ru

[Qemu-devel] [PATCH V5 3/4] tests/migration: Add migration-test header file

2018-02-23 Thread Wei Huang
This patch moves the settings related migration-test from the migration-test.c file to a seperate header file. It also renames the x86-a-b-bootblock.s file extension from .s to .S, allowing gcc pre-processor to include the C-style header file correctly. Signed-off-by: Wei Huang --- tests

[Qemu-devel] [PATCH V4 0/3] tests: Add migration test for aarch64

2018-02-21 Thread Wei Huang
both x86 and aarch64. * Re-use init_bootfile_x86() for both x86 and aarch64 * Other minor fixes Thanks, -Wei Wei Huang (3): tests/migration: Convert the boot block compilation script into Makefile tests/migration: Add migration-test header file tests: Add migration test for aarch64 tests

[Qemu-devel] [PATCH V4 3/3] tests: Add migration test for aarch64

2018-02-21 Thread Wei Huang
this patch also includes the source code and the build script in tests/migration/. So users can change the source and/or re-compile the binary as they wish. Signed-off-by: Wei Huang --- tests/Makefile.include | 1 + tests/migration-test.c | 47 +---

[Qemu-devel] [PATCH V4 1/3] tests/migration: Convert the boot block compilation script into Makefile

2018-02-21 Thread Wei Huang
The x86 boot block header currently is generated with a shell script. To better support other CPUs (e.g. aarch64), we convert the script into Makefile. This allows us to 1) support cross-compilation easily, and 2) avoid creating a script file for every architecture. Signed-off-by: Wei Huang

[Qemu-devel] [PATCH V4 2/3] tests/migration: Add migration-test header file

2018-02-21 Thread Wei Huang
This patch moves the settings related migration-test from the migration-test.c file to a seperate header file. It also renames the x86-a-b-bootblock.s file extension from .s to .S, allowing gcc pre-processor to include the C-style header file correctly. Signed-off-by: Wei Huang --- tests

[Qemu-devel] [PATCH V3 2/2] tests: Add migration test for aarch64

2018-02-14 Thread Wei Huang
this patch also includes the source code and the build script in tests/migration/. So users can change the source and/or re-compile the binary as they wish. Signed-off-by: Wei Huang --- tests/Makefile.include | 1 + tests/migration-test.c | 39 ---

[Qemu-devel] [PATCH V3 1/2] tests/migration: Convert the boot block compilation script into Makefile

2018-02-14 Thread Wei Huang
The x86 boot block header currently is generated with a shell script. To better support other CPUs (e.g. aarch64), we convert the script into Makefile. This allows us to 1) support cross-compilation easily; 2) avoid creating a script file for every architecture. Signed-off-by: Wei Huang

[Qemu-devel] [PATCH V3 0/2] tests: Add migration test for aarch64

2018-02-14 Thread Wei Huang
under KVM. Tests passed under both x86 and aarch64. * Re-use init_bootfile_x86() for both x86 and aarch64 * Other minor fixes Thanks, -Wei Wei Huang (2): tests/migration: Convert the boot block compilation script into Makefile tests: Add migration test for aarch64 tests/Makefile.include

Re: [Qemu-devel] [PATCH V2 1/1] tests: Add migration test for aarch64

2018-02-14 Thread Wei Huang
On 02/12/2018 11:31 AM, Andrew Jones wrote: > On Fri, Feb 09, 2018 at 04:42:42PM -0500, Wei Huang wrote: >> This patch adds migration test support for aarch64. The test code, which >> implements the same functionality as x86, is booted as a kernel in qemu. >> Here are the d

Re: [Qemu-devel] [PATCH v2] tests/migration: Add source to PC boot block

2018-02-12 Thread Wei Huang
On 02/12/2018 09:07 AM, Dr. David Alan Gilbert wrote: > * Andrew Jones (drjo...@redhat.com) wrote: >> On Mon, Feb 05, 2018 at 06:18:46PM +, Dr. David Alan Gilbert (git) wrote: >>> diff --git a/tests/migration/rebuild-x86-bootblock.sh >>> b/tests/migration/rebuild-x86-bootblock.sh >>> new fil

Re: [Qemu-devel] [PATCH v2] tests/migration: Add source to PC boot block

2018-02-09 Thread Wei Huang
> + > +jmp mainloop > + > +# GDT magic from old (GPLv2) Grub startup.S > +.p2align 2 /* force 4-byte alignment */ > +gdt: > +.word 0, 0 > +.byte 0, 0, 0, 0 > + > +/* -- code segment -- > + * base = 0x, limit = 0xF (4 KiB Granularity), present > + * type = 32bit code execute/read, DPL = 0 > + */ > +.word 0x, 0 > +.byte 0, 0x9A, 0xCF, 0 > + > +/* -- data segment -- > + * base = 0x, limit 0xF (4 KiB Granularity), present > + * type = 32 bit data read/write, DPL = 0 > + */ > +.word 0x, 0 > +.byte 0, 0x92, 0xCF, 0 > + > +gdtdesc: > +.word 0x27/* limit */ > +.long gdt /* addr */ > + > +/* I'm a bootable disk */ > +.org 0x7dfe > +.byte 0x55 > +.byte 0xAA > I tested this patch and it worked on my x86 machine. Also using the same approach, I just submitted a new version of migration-test for aarch64. So, Reviewed-by: Wei Huang Tested-by: Wei Huang

[Qemu-devel] [PATCH V2 0/1] tests: Add migration test for aarch64

2018-02-09 Thread Wei Huang
as an uint32_t array * The test code is re-written to address a data caching issue under KVM. Tests passed under both x86 and aarch64. * Re-use init_bootfile_x86() for both x86 and aarch64 * Other minor fixes Thanks, -Wei Wei Huang (1): tests: Add migration test for aarch64 test

[Qemu-devel] [PATCH V2 1/1] tests: Add migration test for aarch64

2018-02-09 Thread Wei Huang
this patch also includes the test source and the build script in tests/migration. So users can change/re-compile the binary as they wish. Signed-off-by: Wei Huang --- tests/Makefile.include| 1 + tests/migration-test.c| 29 ++--- tests/migration/aarc

Re: [Qemu-devel] [PATCH] tests/migration: Add source to PC boot block

2018-02-02 Thread Wei Huang
On 01/31/2018 02:16 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The boot block used in the migration test is currently only > shipped as a hex (with the source in the git commit message), > change this to actually include the source. > > A makefile rule is adde

[Qemu-devel] [PATCH 4/4] tests: Enable xhci test arm/aarch64

2018-02-01 Thread Wei Huang
Signed-off-by: Wei Huang --- tests/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Makefile.include b/tests/Makefile.include index e28277c..a79a7b8 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -366,10 +366,12 @@ check-qtest-arm-y += tests/test

[Qemu-devel] [PATCH 2/4] tests/boot-serial-test: Add support for the aarch64 virt machine

2018-02-01 Thread Wei Huang
This patch adds a small binary kernel to test aarch64 virt machine's UART. Signed-off-by: Wei Huang --- tests/Makefile.include | 1 + tests/boot-serial-test.c | 9 + 2 files changed, 10 insertions(+) diff --git a/tests/Makefile.include b/tests/Makefile.include index ca82e0c..eb

[Qemu-devel] [PATCH 3/4] tests: Enable drive_del-test on arm/aarch64

2018-02-01 Thread Wei Huang
Signed-off-by: Wei Huang --- tests/Makefile.include | 2 ++ tests/drive_del-test.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index ebdb151..e28277c 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include

[Qemu-devel] [PATCH 1/4] hw/arm/virt: Set default machine and CPU types for mach-virt

2018-02-01 Thread Wei Huang
;virt") as the default machine type. It also changes the default CPU depending on the target. Signed-off-by: Wei Huang --- hw/arm/virt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index b334c82..f6b1408 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.

Re: [Qemu-devel] [PATCH V1 1/1] tests: Add migration test for aarch64

2018-01-26 Thread Wei Huang
On 01/26/2018 10:39 AM, Peter Maydell wrote: > On 26 January 2018 at 15:47, Wei Huang wrote: >> >> >> On 01/25/2018 02:05 PM, Dr. David Alan Gilbert wrote: >>> * Wei Huang (w...@redhat.com) wrote: >>>> innerloop: >>>> /* clean ca

Re: [Qemu-devel] [PATCH V1 1/1] tests: Add migration test for aarch64

2018-01-26 Thread Wei Huang
On 01/25/2018 02:05 PM, Dr. David Alan Gilbert wrote: > * Wei Huang (w...@redhat.com) wrote: >> This patch adds the migration test support for aarch64. The test code, >> which implements the same functionality as x86, is compiled into a binary >> and booted as a kernel

[Qemu-devel] [PATCH V1 1/1] tests: Add migration test for aarch64

2018-01-24 Thread Wei Huang
be 16 byte aligned for arm64, and 8 byte aligned for arm * sp must always be strictly less than the true stacktop */ stackptr = . - 16; stacktop = .; } ENTRY(start) Signed-off-by: Wei Huang --- tests/Makefile.include | 1 + tests/migration-test.c | 37

Re: [Qemu-devel] [PATCH RFC 1/1] tests: Add migration test for aarch64

2018-01-05 Thread Wei Huang
On 01/04/2018 02:10 PM, Juan Quintela wrote: > Wei Huang wrote: >> This patch adds the migration test support for aarch64. The test code, >> which implements the same functionality as x86, is compiled into a binary >> and booted as a kernel to qemu. Here are the design ide

Re: [Qemu-devel] [PATCH] cpu_physical_memory_sync_dirty_bitmap: Another alignment fix

2018-01-03 Thread Wei Huang
n't match the state in the bitmaps. > > Symptom: > Migration showing a few dirty pages left to be sent constantly > Seen on aarch64 and x86 with x86+ovmf > > Signed-off-by: Dr. David Alan Gilbert > Reported-by: Wei Huang > Fixes: 6b6712efccd383b48a909bee0b29e079

Re: [Qemu-devel] [PATCH RFC 1/1] tests: Add migration test for aarch64

2017-12-17 Thread Wei Huang
On 12/16/2017 07:49 AM, Peter Maydell wrote: > On 15 December 2017 at 20:37, Wei Huang wrote: >> This patch adds the migration test support for aarch64. The test code, >> which implements the same functionality as x86, is compiled into a binary >> and booted as a kernel

[Qemu-devel] [PATCH RFC 1/1] tests: Add migration test for aarch64

2017-12-15 Thread Wei Huang
/* * stack depth is 16K for arm and PAGE_SIZE for arm64, see THREAD_SIZE * sp must be 16 byte aligned for arm64, and 8 byte aligned for arm * sp must always be strictly less than the true stacktop */ stackptr = . - 16; stacktop = .; } ENTRY(start) Signed-off-by: Wei Hua

Re: [Qemu-devel] [PATCH] hw/arm: Silence xlnx-ep108 deprecation warning during tests

2017-11-16 Thread Wei Huang
nstead. It has the same features > supported."); > +if (!qtest_enabled()) { > +info_report("The Xilinx EP108 machine is deprecated, please use the " > + "ZCU102 machine (which has the same features) instead."); > +} > > xlnx_zynqmp_init(s, machine); > } > I tested it and it did solve the problem. Acked-by: Wei Huang

  1   2   3   4   >