v: Handle HVMSG_X64_HALT vm exit
> accel/mshv: Workaround for overlappig mem mappings
> docs: Add mshv to documentation
Thanks for posting this, Magnus.
I skimmed through the code and found some cosmetic issues, but overall
the code looks sensible to me.
Wei
gt; + const uint64_t *values;
> + uintptr_t count;
Need four spaces for indentation.
Wei.
pcode;
> + uint64_t last_ip;
> + uint64_t last_dp;
> + uint8_t xmm[16][16];
> + uint32_t mxcsr;
> + uint32_t pad2;
Not enough spaces here.
> +} MshvFPU;
> +
Wei
parent_obj;
> -int vm;
> -MshvMemoryListener memory_listener;
> -/* number of listeners */
> -int nr_as;
> -MshvAddressSpace *as;
> + AccelState parent_obj;
> + int vm;
> + MshvMemoryListener memory_listener;
> + /* number of listeners */
> + int nr_as;
> + MshvAddressSpace *as;
Unnecessary changes due to tabs.
> +int fd;
> } MshvState;
> extern MshvState *mshv_state;
Wei
_decode {
> struct x86_modrm modrm;
> struct x86_decode_op op[4];
> bool is_fpu;
> +
> + x86_insn_stream *stream;
Tab here.
> } x86_decode;
>
> uint64_t sign(uint64_t val, int size);
>
> uint32_t decode_instruction(CPUX86State *env, struct x86_decode *decode);
> +uint32_t decode_instruction_stream(CPUX86State *env,
> +struct
> x86_decode *decode,
> +struct x86_insn_stream *stream);
Mixing spaces and tabs.
Wei
On 2025/7/1 1:24 PM, Thomas Huth wrote:
On 16/06/2025 17.48, Sean Wei wrote:
Several files were renamed in previous commits, causing their entries
in MAINTAINERS to reference outdated paths.
This prevents scripts/get_maintainer.pl from correctly matching
these files to their maintainers
On Tue, Jul 01, 2025 at 05:45:07PM +0200, Magnus Kulke wrote:
> On Tue, Jul 01, 2025 at 03:11:39PM +0000, Wei Liu wrote:
> > On Tue, Jul 01, 2025 at 10:35:34AM +0200, Magnus Kulke wrote:
> > > On Tue, May 20, 2025 at 10:52:39PM +, Wei Liu wrote:
> > > > On Tue, Ma
On Tue, Jul 01, 2025 at 10:35:34AM +0200, Magnus Kulke wrote:
> On Tue, May 20, 2025 at 10:52:39PM +0000, Wei Liu wrote:
> > On Tue, May 20, 2025 at 01:30:17PM +0200, Magnus Kulke wrote:
> > > +default:
> > > +msg = &exit_msg;
> >
> > Do you
Hi Christian,
On 2025/6/20 10:17 AM, Christian Schoenebeck wrote:
On Saturday, June 14, 2025 4:07:40 AM CEST Sean Wei wrote:
v9fs_string_sprintf() and v9fs_path_sprintf() already have
G_GNUC_PRINTF annotations in their own *.c files, but the
prototypes in the corresponding headers lack them
On Fri, Jun 13, 2025 at 12:54:20PM -0400, Sean Wei wrote:
> Some of the LGPLv2.1 boiler-plate still contained the
> obsolete "51 Franklin Street" postal address.
>
> Replace it with the canonical GNU licenses URL recommended by the FSF:
> https://www.gnu.org/licenses/
>
"VMware" is the vendor's official spelling.
Adjust the spelling in MAINTAINERS for consistency.
Signed-off-by: Sean Wei
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 0477e124d1..7428217361 100644
--- a/MA
-target.c
Rename cpus-common.c => cpu-common.c
42fa9665e59 (Apr 2025)
exec: Restrict 'cpu_ldst.h' to accel/tcg/
Rename include/{exec/cpu_ldst.h => accel/tcg/cpu-ldst.h}
Signed-off-by: Sean Wei
---
docs/spin/tcg-exclusive.promela | 4 ++--
hw/nvme/ctrl.c
-hotplug.txt to .rst
Signed-off-by: Sean Wei
---
hw/acpi/nvdimm.c | 2 +-
hw/acpi/pcihp.c| 2 +-
hw/acpi/vmgenid.c | 6 +++---
hw/misc/ivshmem-flat.c | 2 +-
hw/ppc/spapr.c | 2 +-
include/hw/acpi/pcihp.h| 2 +-
include/hw/misc
The entry for the VMware PVSCSI spec uses "vwm" instead of "vmw",
which does not match any file in the tree.
Correct the path so scripts/get_maintainer.pl can match the file.
Signed-off-by: Sean Wei
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
monitor: Rename misc.c to hmp-target.c
Rename monitor/{misc.c => hmp-target.c}
Signed-off-by: Sean Wei
---
MAINTAINERS | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index fed8619874..0477e124d1 100644
--- a/MAINTAIN
:
8472cc5dbe6 (Sep 2023): docs/specs/vmw_pvscsi-spec: Convert to rST
8e72ceee5cd (Jun 2022): Rename docs/specs/fw_cfg.txt to .rst
Signed-off-by: Sean Wei
---
MAINTAINERS | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 28b3dd2684..fed8619874
be verified using:
git log --
git show --stat
I have also included the relevant commit IDs in each patch to make
the review process easier.
Sean Wei (6):
MAINTAINERS: update docs file extensions (.txt -> .rst)
MAINTAINERS: fix paths for relocated files
MAINTAINERS: fix ven
ello Sean,
On 6/13/25 18:44, Sean Wei wrote:
Some of the GPLv2 boiler-plate still contained the
obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the
FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
Instead, I wo
-Identifier, without changing code.
Does this approach sound reasonable for you?
Thanks again for the guidance!
Best regards,
Sean Wei
smime.p7s
Description: S/MIME Cryptographic Signature
ith SPDX identifier in the same patch series?
Please let me know what works best for you and I will send v2 accordingly.
Thanks again for the guidance,
Sean Wei
change.
Signed-off-by: Sean Wei
---
hw/9pfs/9p.c | 3 +--
hw/9pfs/9p.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 8b001b9112..acfa7db4e1 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -201,8 +201,7 @@ void v9fs_path_free(V9fsPath *path
$ make -C poc run
// Compiling version 1 (Place G_GNUC_PRINTF in 'foo-v1.c')
No warning will appear, sliently cause security flaw
// Compiling version 2 (Place G_GNUC_PRINTF in 'foo-v2.h')
bar-v2.c:4:17: warning: more '%' conversions than data arguments
[-Wformat-insuf
behavior change.
Signed-off-by: Sean Wei
---
fsdev/9p-marshal.c | 3 +--
fsdev/9p-marshal.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fsdev/9p-marshal.c b/fsdev/9p-marshal.c
index f9b0336cd5..3455580703 100644
--- a/fsdev/9p-marshal.c
+++ b/fsdev/9p-marshal.c
@@ -27,8
next mail in the thread) demo how
G_GNUC_PRINTF behaves differently when the attribute is present
only in code.c or code.h file.
--
Sean Wei (3):
fsdev/9p-marshal: move G_GNUC_PRINTF to header
hw/9pfs: move G_GNUC_PRINTF to header
fsdev/9p-marshal.c | 3 +--
fsdev/9p-marshal.h | 2 +-
hw
The LGPLv2.1 boiler-plate in rcu.h and rcu_queue.h still
contained the obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
include/qemu/rcu.h | 4 ++--
in
Some of the LGPLv2.1 boiler-plate still contained the
obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
target/i386/emulate/x86_emu.c | 4 ++--
target/i3
Some of the GPLv2 boiler-plate still contained the
obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
target/xtensa/core-dc232b/gdb-config.c.inc | 5 ++-
The LGPLv2.1 boiler-plate in pdb.c file still contained
the obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
contrib/elf2dmp/pdb.c | 4 ++--
1 file
The GPLv2 boiler-plate in scripts/device-crash-test still
contained the obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
scripts/device-crash-test | 3 +
The GPLv2 boiler-plate in vmxnet3.h and vmw_pvscsi.h still
contained the obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
hw/net/vmxnet3.h | 4 ++-
The LGPLv2.1 boiler-plate in util/rcu.c still contained
the obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
util/rcu.c | 4 ++--
1 file changed, 2 insert
Some of the GPLv2 boiler-plate still contained the
obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
include/hw/i2c/aspeed_i2c.h | 3 +--
include/hw/pci/pc
Some of the GPLv2 boiler-plate still contained the
obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
include/libdecnumber/dconfig.h | 5 ++--
Some of the GPLv2 boiler-plate still contained the
obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
libdecnumber/decContext.c | 5 ++---
libdecnumber/d
The GPLv2 boiler-plate in asm-arm/kvm.h and asm-powerpc/kvm.h still
contained the obsolete "51 Franklin Street" postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
---
linux-headers/asm-arm/kvm
The license text in COPYING (GPLv2), COPYING.LIB (LGPLv2.1),
and the linux-headers/LICENSES/preferred/GPL-2.0 file are
referenced to the obsolete FSF postal address.
Replace it with the canonical GNU licenses URL recommended by the FSF:
https://www.gnu.org/licenses/
Signed-off-by: Sean Wei
r the clarifications.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2438
Signed-off-by: Sean Wei
--
Sean Wei (12):
COPYING: replace FSF postal address with licenses URL
linux-headers: replace FSF postal address with licenses URL
libdecnumber: replace FSF postal address with license
ages might benefit from a short summary that links back to
the main page.
Could you please create a wiki account for me so I can submit these
improvements?
Thank you for your time and for maintaining such a great project!
May the source be with you,
Sean Wei
smime.p7s
Description: S/MIME Cry
On Wed, May 28, 2025 at 04:30:55PM +0200, Magnus Kulke wrote:
> On Tue, May 20, 2025 at 10:22:27PM +0000, Wei Liu wrote:
> > On Tue, May 20, 2025 at 01:30:11PM +0200, Magnus Kulke wrote:
> > > +/*
> > > + * TODO: support asserting an interrupt using interrup_bit
moved, since we know for sure how many
elements are in `SPECIAL_REGISTER_NAMES`. It should be fine to use an
on-stack array.
There are probably other places you can optimize.
Thanks,
Wei.
On 5/26/2025 2:16 AM, Markus Armbruster wrote:
Si-Wei Liu writes:
On 5/15/2025 11:40 PM, Markus Armbruster wrote:
Jason Wang writes:
On Thu, May 8, 2025 at 2:47 AM Jonah Palmer wrote:
Current memory operations like pinning may take a lot of time at the
destination. Currently they
need some time to discuss kernel side
changes.
Thanks,
Wei.
>
> Paolo
>
On Fri, May 23, 2025 at 10:23:58AM +0200, Magnus Kulke wrote:
> On Tue, May 20, 2025 at 07:07:06PM +0000, Wei Liu wrote:
> > On Tue, May 20, 2025 at 01:30:01PM +0200, Magnus Kulke wrote:
> > > Create the MSHV virtual machine by opening a partition and issuing
> >
On Thu, May 22, 2025 at 05:42:48PM +0200, Magnus Kulke wrote:
> On Tue, May 20, 2025 at 07:07:06PM +0000, Wei Liu wrote:
> > On Tue, May 20, 2025 at 01:30:01PM +0200, Magnus Kulke wrote:
> > > +static void mshv_reset(void *param)
> > > +{
> > > +warn_r
nmapped_mem(vm_fd, cpu, &exit_msg, &exit_reason);
> +if (ret < 0) {
> +error_report("failed to handle unmapped memory");
> +return -1;
> +}
> +return exit_reason;
> + case HVMSG_GPA_INTERCEPT:
I'm not sure why you want t
l = { .sel = seg->selector & 0x };
> +
> +ret = x86_read_segment_descriptor(cpu, desc, sel);
> +if (ret == false) {
> +error_report("failed to read segment descriptor");
> +abort();
> +}
> +}
> +
> +static const struct x86_emul_ops mshv_x86_emul_ops = {
> +.fetch_instruction = fetch_instruction_emu,
> +.read_mem = read_mem_emu,
> +.write_mem = write_mem_emu,
> +.read_segment_descriptor = read_segment_descriptor_emu,
You can remove the _emu suffix from all the handler functions.
> +};
> +
> void mshv_init_cpu_logic(void)
> {
> cpu_guards_lock = g_new0(QemuMutex, 1);
> qemu_mutex_init(cpu_guards_lock);
> cpu_guards = g_hash_table_new(g_direct_hash, g_direct_equal);
> +
> +init_decoder();
> +init_emu(&mshv_x86_emul_ops);
If I'm not mistaken, the name mshv_init_cpu_logic suggests this function
is called every time a CPU is initialized. There is no need to
repeatedly initialize the emulator.
The code snippet should be moved to either the initialization function
of the accelerator or the initialization function of the VM object.
Thanks,
Wei.
> }
>
> void mshv_arch_init_vcpu(CPUState *cpu)
> --
> 2.34.1
>
ic_state);
> +
> +/*
> + * TODO: support asserting an interrupt using interrup_bitmap
> + * it should be possible if we use the vm_fd
> + */
> +
Why is there a need to assert an interrupt here?
> +ret = mshv_set_generic_regs(cpu_fd, assocs,
ret < 0) {
> +error_report("failed to get special registers");
> +g_free(assocs);
> +return -errno;
> +}
> +
> +populate_special_regs(assocs, x86cpu);
> +
> +g_free(assocs);
> +return 0;
> +}
> +
> int mshv_load_regs(CPUState *cpu)
> {
> int ret;
> @@ -225,8 +334,13 @@ int mshv_load_regs(CPUState *cpu)
> return -1;
> }
>
> - error_report("unimplemented");
> - abort();
> +ret = mshv_get_special_regs(cpu);
> +if (ret < 0) {
> +error_report("Failed to load special registers");
> +return -1;
> +}
> +
> +return 0;
Ah so you changed the code in this patch.
Thanks,
Wei.
> }
>
> int mshv_arch_put_registers(const CPUState *cpu)
> --
> 2.34.1
>
+error_report("Failed to load standard registers");
> +return -1;
> +}
> +
> error_report("unimplemented");
> abort();
This part looks wrong. It should be "return 0;" instead.
Thanks,
Wei.
> }
> --
> 2.34.1
>
ed to store them every time we refresh the CPU state,
unless we know some of them are dirtied by QEMU.
Thanks,
Wei.
> +
> +return 0;
> }
>
> +
> int mshv_load_regs(CPUState *cpu)
> {
> error_report("unimplemented");
> --
> 2.34.1
>
xit *exit)
>
> void mshv_remove_vcpu(int vm_fd, int cpu_fd)
> {
> - error_report("unimplemented");
> - abort();
> +/*
> + * TODO: don't we have to perform an ioctl to remove the vcpu?
> + * there is WHvDeleteVirtualProcessor in the WHV api
> + *
? */
You must have seen this in real life, right? We need to convince
ourselves why this is okay.
Thanks,
Wei.
> +return 0;
> +}
> +
> +union hv_interrupt_control control = {
> +.interrupt_type = interrupt_type,
> +.level_triggered = level_
*mml, MemoryRegionSection *section,
> bool add)
> {
> - error_report("unimplemented");
> - abort();
> -}
> +int ret = 0;
> +MemoryRegion *area = section->mr;
> +bool writable = !area->readonly && !ar
+error_report("Failed to perform hvcall: %s", strerror(errno));
> +return -1;
> +}
> +return ret;
> +}
>
>
> static int mshv_init(MachineState *ms)
> {
> MshvState *s;
> +int mshv_fd, ret;
> +
> s = MSHV_
mit = env->ldt.limit;
> +}
> +
> +if (sel.index * 8 >= limit) {
> +return false;
> +}
> +
> +gva = base + sel.index * 8;
> +emul_ops->write_mem(cpu, desc, gva, sizeof(*desc));
> +
> +return true;
> +}
> +
[...]
> +
> +target_ulong
gt; bool is_fpu;
> +
> + x86_insn_stream *stream;
Tab here.
> } x86_decode;
>
> uint64_t sign(uint64_t val, int size);
>
> uint32_t decode_instruction(CPUX86State *env, struct x86_decode *decode);
>
> +uint32_t decode_instruction_stream(CPUX86State *e
On 5/15/2025 11:40 PM, Markus Armbruster wrote:
Jason Wang writes:
On Thu, May 8, 2025 at 2:47 AM Jonah Palmer wrote:
Current memory operations like pinning may take a lot of time at the
destination. Currently they are done after the source of the migration is
stopped, and before the wor
On 5/14/2025 10:43 PM, Michael S. Tsirkin wrote:
On Wed, May 14, 2025 at 05:17:15PM -0700, Si-Wei Liu wrote:
Hi Eugenio,
On 5/14/2025 8:49 AM, Eugenio Perez Martin wrote:
On Wed, May 7, 2025 at 8:47 PM Jonah Palmer wrote:
Current memory operations like pinning may take a lot of time at
ggested-by: Si-Wei Liu
--
v2:
Move the memory listener registration to vhost_vdpa_set_owner function.
In case of hotplug the vdpa device, the memory is already set up, and
leaving memory listener register call in the init function made maps
occur before set owner call.
To be 100% safe, let'
oceed to Michael for upcoming merge?
I think I cannot ack the series as I sent the first revision. Jason or
Si-Wei, could you ack it?
Sure, I just give my R-b, this series look good to me. Hopefully Jason
can ack on his own.
Thanks!
-Siwei
Thanks!
Future directions on top of this serie
For the series:
Reviewed-by: Si-Wei Liu
On 5/7/2025 11:46 AM, Jonah Palmer wrote:
Current memory operations like pinning may take a lot of time at the
destination. Currently they are done after the source of the migration is
stopped, and before the workload is resumed at the destination
On Wed, May 07, 2025 at 01:20:49PM +0200, Philippe Mathieu-Daudé wrote:
> Hi Wei,
>
> On 7/5/25 08:35, Wei Liu wrote:
> > On Tue, May 06, 2025 at 04:34:54PM +0200, Philippe Mathieu-Daudé wrote:
> > > Include "exec/target_page.h" to be able to compile HVF on x86_
Fixes: 9c2ff9cdc9b ("exec/cpu-all: remove exec/target_page include")
> Reported-by: Pierrick Bouvier
> Reported-by: Wei Liu
> Signed-off-by: Philippe Mathieu-Daudé
> Message-Id: <20250425174310.70890-1-phi...@linaro.org>
> Reviewed-by: Pierrick Bouvier
FYI Pao
Magnus, can you test this series on MSHV?
On Fri, May 02, 2025 at 11:48:37PM +0200, Paolo Bonzini wrote:
> These are some improvements to the x86 emulator that I wrote but have no
> way of testing (right now).
>
> I tried to place them in order of importance so that, if something breaks,
> it is
On Sat, May 03, 2025 at 09:01:46AM +0200, Paolo Bonzini wrote:
> Il sab 3 mag 2025, 07:39 Wei Liu ha scritto:
>
> > FWIW this series builds fine on for x86 HVF.
> >
>
> Thanks, can you also test it on either HVF or Hyper-V?
>
I will leave it to Magnus to test your changes on MSHV.
Wei.
t; It should fix issues with 64-bit ALU operations, but it's also the one
> where it's more likely to have a mistake.
>
> Patch 4 is comparatively trivial, though I cannot exclude any screwups.
>
> It should be possible to test this with both HVF and Hyper-V.
>
compilation issues w/ the emulator code, that I had to
> fix to make it compile on Linux. However I don't have access to an x86_64
> Mac for development either, so I can't test a HVF build.
>
I still have my loaner Macbook for a few more days. If I have not
returned it when Paolo posts his patches I can build test HVF.
Thanks,
Wei.
RGET_PAGE_SIZE - 1u);
| ^
../target/i386/hvf/hvf.c:141:45: error: use of undeclared identifier
'TARGET_PAGE_SIZE'
141 | hv_vm_protect(dirty_page_start, TARGET_PAGE_SIZE,
| ^
the commit message should be longer.
Linux kernel uses 12 characters. Looking at some recent commits in the
QEMU tree, their commti hash length goes from 11 to 14.
Assuming you've built and tested this patch and with the minor issues
fixed:
Reviewed-by: Wei Liu
> ---
> target/i386/
Hi Lei,
On 3/18/2025 7:06 AM, Lei Yang wrote:
On Tue, Mar 18, 2025 at 10:15 AM Jason Wang wrote:
On Tue, Mar 18, 2025 at 9:55 AM Lei Yang wrote:
Hi Jonah
I tested this series with the vhost_vdpa device based on mellanox
ConnectX-6 DX nic and hit the host kernel crash. This problem can be
ea
On Fri, Mar 07, 2025 at 11:55:11AM -0800, Wei Liu wrote:
> Hi,
>
> Microsoft's Linux Systems Group developed a Linux driver for the Microsoft
> Hypervisor (MSHV for short). The driver is being upstreamed. The first
> supported VMM is Cloud Hypervisor. We want to add QEMU as
This drops the calls to hvf_handle_io from x86_emu.c.
Signed-off-by: Wei Liu
---
target/i386/hvf/hvf.c | 1 +
target/i386/hvf/x86_emu.c | 29 +++--
target/i386/hvf/x86_emu.h | 2 ++
3 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/target/i386/hvf
Use the newly defined emul_ops. This allows the module to be reused
by other accelerator in the future.
No functional change intended.
Signed-off-by: Wei Liu
---
target/i386/hvf/x86_decode.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/target/i386
The macros will be used by the instruction emulator. The code is the same as
the one under hvf.
Signed-off-by: Wei Liu
---
target/i386/emulate/panic.h | 45 +
1 file changed, 45 insertions(+)
create mode 100644 target/i386/emulate/panic.h
diff --git a
Move x86_decode, x86_emu, x86_flags and some headers to the new location.
Fix up all the inclusion sites in hvf.
Signed-off-by: Wei Liu
---
target/i386/emulate/meson.build | 5 +
target/i386/{hvf => emulate}/x86.h| 0
target/i386/{hvf => emulate}/x86_decode.c | 0
This will be used to remove HVF specific code from the instruction emulator.
For now we only introduce two hooks for x86_decode.c. More hooks will be added
when the code is refactored.
The emulator initialization function now takes in a pointer to the ops
structure.
Signed-off-by: Wei Liu
Add myself as a reviewer.
Signed-off-by: Wei Liu
---
v2: new
---
MAINTAINERS | 8
1 file changed, 8 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 5df6020ed545..02c763e9d14f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -533,6 +533,14 @@ S: Supported
F: target/i386/whpx
The same structure and code can be used by other accelerators. Drop
the hvf prefix in the type and field name.
No functional change.
Signed-off-by: Wei Liu
---
target/i386/cpu.h | 6 ++--
target/i386/hvf/x86_flags.c | 56 ++---
2 files changed, 31
Signed-off-by: Wei Liu
---
target/i386/hvf/x86_decode.c | 3 ---
target/i386/hvf/x86_emu.c| 4
2 files changed, 7 deletions(-)
diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c
index 728e15963817..ddd7b60bcfe1 100644
--- a/target/i386/hvf/x86_decode.c
+++ b
These headers will be moved out to its own component.
Signed-off-by: Wei Liu
---
target/i386/hvf/x86.h| 4 ++--
target/i386/hvf/x86_decode.h | 4 ++--
target/i386/hvf/x86_flags.h | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/target/i386/hvf/x86.h b/target
Change the first argument's type to be CPUState to match other hooks.
Signed-off-by: Wei Liu
---
target/i386/hvf/hvf-i386.h | 4 ++--
target/i386/hvf/hvf.c | 18 ++
target/i386/hvf/x86_emu.c | 4 ++--
target/i386/hvf/x86_emu.h | 2 ++
4 files changed, 16 inser
Signed-off-by: Wei Liu
---
target/i386/hvf/hvf.c | 6 ++
target/i386/hvf/x86_emu.c | 8
target/i386/hvf/x86_emu.h | 1 +
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 1cecb765952b..e4f48a79fb7c 100644
--- a
Signed-off-by: Wei Liu
---
v2: name the directory emulate
---
target/i386/emulate/meson.build | 0
target/i386/meson.build | 1 +
2 files changed, 1 insertion(+)
create mode 100644 target/i386/emulate/meson.build
diff --git a/target/i386/emulate/meson.build b/target/i386/emulate
We want to refactor HVF's instruction emulator to a common component. Renaming
hvf_mmio_buf removes the association between HVF and the instruction emulator.
The definition of the field is still guarded by CONFIG_HVF for now, since it is
the only user.
No functional change.
Signed-off-by
n an Intel-based
Mac.
Thanks,
Wei.
Changes in v2:
1. Address comments from Paolo on variable and directory names.
2. Rebase and drop the already applied patches.
3. Add a new entry in MAINTAINERS.
Wei Liu (14):
target/i386/hvf: introduce x86_emul_ops
target/i386/hvf: remove HVF specific cal
No functional change.
Signed-off-by: Wei Liu
---
target/i386/hvf/x86_emu.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/target/i386/hvf/x86_emu.c b/target/i386/hvf/x86_emu.c
index e59a73e00d5c..7b816b5a1dab 100644
--- a/target/i386/hvf/x86_emu.c
+++ b/target
Hi Cameron, Roman and Phil,
On Fri, Feb 21, 2025 at 12:36:08AM -0800, Wei Liu wrote:
> Hi,
>
> Microsoft's Linux Systems Group developed a Linux driver for the Microsoft
> Hypervisor (MSHV for short). The driver is being upstreamed. The first
> supported VMM is Cloud Hypervis
On Fri, Feb 21, 2025 at 04:53:26PM +, Peter Maydell wrote:
> On Fri, 21 Feb 2025 at 14:02, Wei Liu wrote:
> >
> > Hi,
> >
> > Microsoft's Linux Systems Group developed a Linux driver for the Microsoft
> > Hypervisor (MSHV for short). The driver is being u
On Fri, Feb 21, 2025 at 05:36:39PM +0100, Paolo Bonzini wrote:
> On 2/21/25 09:36, Wei Liu wrote:
> > This patch series attempts to make the instruction emulator in HVF a common
> > component for the i386 target. It removes HVF specific code by either using
> > a
> > s
Signed-off-by: Wei Liu
---
target/i386/hvf/x86_decode.c | 3 ---
target/i386/hvf/x86_emu.c| 4
2 files changed, 7 deletions(-)
diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c
index 31285952ad..ffece4773b 100644
--- a/target/i386/hvf/x86_decode.c
+++ b/target
Use the newly defined emul_ops. This allows the module to be reused
by other accelerator in the future.
No functional change intended.
Signed-off-by: Wei Liu
---
target/i386/hvf/x86_decode.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/target/i386
No functional change.
Signed-off-by: Wei Liu
---
target/i386/hvf/x86_emu.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/target/i386/hvf/x86_emu.c b/target/i386/hvf/x86_emu.c
index d0a8e221ea..f1244640e6 100644
--- a/target/i386/hvf/x86_emu.c
+++ b/target/i386
-i386.h.
Take the chance to change the first argument's type to be CPUState.
Signed-off-by: Wei Liu
---
target/i386/hvf/hvf-i386.h | 2 +-
target/i386/hvf/hvf.c | 6 +++---
target/i386/hvf/x86_emu.c | 4 +---
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/target/i3
These headers will be moved out to its own component.
Signed-off-by: Wei Liu
---
target/i386/hvf/x86.h| 4 ++--
target/i386/hvf/x86_decode.h | 4 ++--
target/i386/hvf/x86_flags.h | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/target/i386/hvf/x86.h b/target
This drops the calls to hvf_handle_io from x86_emu.c.
Signed-off-by: Wei Liu
---
target/i386/hvf/hvf.c | 1 +
target/i386/hvf/x86_emu.c | 30 +++---
target/i386/hvf/x86_emu.h | 2 ++
3 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/target/i386/hvf
This requires making raise_exception non-static. That function needs to be
renamed to avoid clashing with a function in TCG.
Mostly code movement. No functional change.
Signed-off-by: Wei Liu
---
target/i386/hvf/hvf-i386.h | 2 +
target/i386/hvf/hvf.c | 216
Make the code to rely on the segment definition for checking cs.db.
This allows removing HVF specific VMX related definition from the
decoder.
Introduce a function for retrieving the CS descriptor.
No functional change intended.
Signed-off-by: Wei Liu
---
target/i386/hvf/x86_decode.c | 20
Change the first argument's type to be CPUState to match other hooks.
Signed-off-by: Wei Liu
---
target/i386/hvf/hvf-i386.h | 4 ++--
target/i386/hvf/hvf.c | 18 ++
target/i386/hvf/x86_emu.c | 4 ++--
target/i386/hvf/x86_emu.h | 2 ++
4 files changed, 16 inser
The same structure and code can be used by other accelerators. Drop
the hvf prefix in the type and field name.
No functional change.
Signed-off-by: Wei Liu
---
target/i386/cpu.h | 6 ++--
target/i386/hvf/x86_flags.c | 56 ++---
2 files changed, 31
The macros will be used by the instruction emulator. The code is the same as
the one under hvf.
Signed-off-by: Wei Liu
---
target/i386/x86-insn-emul/panic.h | 45 +++
1 file changed, 45 insertions(+)
create mode 100644 target/i386/x86-insn-emul/panic.h
diff --git a
1 - 100 of 1199 matches
Mail list logo