addr_t base;
uint32_t limit;
- ZERO_INIT(*desc);
+ memset(desc, 0, sizeof(*desc));
+
/* valid gdt descriptors start from index 1 */
if (!sel.index && GDT_SEL == sel.ti) {
return false;
addr_t base = rvmcs(cpu->hvf_fd, VMCS_GUEST_IDTR_BASE);
uint32_t limit = rvmcs(cpu->hvf_fd, VMCS_GUEST_IDTR_LIMIT);
- ZERO_INIT(*idt_desc);
+ memset(idt_desc, 0, sizeof(*idt_desc));
if (gate * 8 >= limit) {
printf("%s: idt limit\n", __func__);
return false;
uint32_t decode_instruction(CPUX86State *env, struct x86_decode *decode)
{
- ZERO_INIT(*decode);
-
+ memset(decode, 0, sizeof(*decode));
decode_prefix(env, decode);
set_addressing_size(env, decode);
set_operand_size(env, decode);